KYUNGYONG commited on
Commit
da8dbb1
·
verified ·
1 Parent(s): d156728

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +43 -0
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ extra_gated_heading: Access Gemma on Hugging Face
6
+ extra_gated_prompt: To access Gemma on Hugging Face, you’re required to review and
7
+ agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging
8
+ Face and click below. Requests are processed immediately.
9
+ extra_gated_button_content: Acknowledge license
10
+ tags:
11
+ - conversational
12
+ - mlx
13
+ - mlx-my-repo
14
+ base_model: rtzr/ko-gemma-2-9b-it
15
+ language:
16
+ - ko
17
+ ---
18
+
19
+ # KYUNGYONG/ko-gemma-2-9b-it-4bit
20
+
21
+ The Model [KYUNGYONG/ko-gemma-2-9b-it-4bit](https://huggingface.co/KYUNGYONG/ko-gemma-2-9b-it-4bit) was converted to MLX format from [rtzr/ko-gemma-2-9b-it](https://huggingface.co/rtzr/ko-gemma-2-9b-it) using mlx-lm version **0.21.5**.
22
+
23
+ ## Use with mlx
24
+
25
+ ```bash
26
+ pip install mlx-lm
27
+ ```
28
+
29
+ ```python
30
+ from mlx_lm import load, generate
31
+
32
+ model, tokenizer = load("KYUNGYONG/ko-gemma-2-9b-it-4bit")
33
+
34
+ prompt="hello"
35
+
36
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
37
+ messages = [{"role": "user", "content": prompt}]
38
+ prompt = tokenizer.apply_chat_template(
39
+ messages, tokenize=False, add_generation_prompt=True
40
+ )
41
+
42
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
43
+ ```