lokinfey commited on
Commit
01919f1
·
verified ·
1 Parent(s): 7a02318

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -3
README.md CHANGED
@@ -1,3 +1,44 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # **DeepSeek-R1-Distill-Qwen-14B-INT4-MLX**
6
+
7
+ This is a quantized INT4 model based on Apple MLX Framework Phi-4. You can deploy it on Apple Silicon devices (M1,M2,M3,M4...).
8
+
9
+ <b><span style="text-decoration:underline">Note: This is unoffical version,just for test and dev.</span></b>
10
+
11
+ ## **Installation**
12
+
13
+
14
+ ```bash
15
+
16
+ pip install -U mlx-lm
17
+
18
+ ```
19
+
20
+ ## **Conversion**
21
+
22
+ ```bash
23
+
24
+ python -m mlx_lm.convert --hf-path {Your DeepSeek-R1-Distill-Qwen-14B Path} -q
25
+
26
+ ```
27
+
28
+ ## **Samples**
29
+
30
+ ```python
31
+
32
+ from mlx_lm import load, generate
33
+
34
+ model, tokenizer = load("Your Phi-4-mlx-int4 Path")
35
+
36
+ prompt = tokenizer.apply_chat_template(
37
+ [{"role": "user", "content": "I have $20,000 in my savings account, where I receive a 4% profit per year and payments twice a year. Can you please tell me how long it will take for me to become a millionaire? Also, can you please explain the math step by step as if you were explaining it to an uneducated person?"}],
38
+ tokenize=False,
39
+ add_generation_prompt=True,
40
+ )
41
+
42
+ response = generate(model, tokenizer, prompt=prompt,max_tokens=1024, verbose=True)
43
+
44
+ ```