lokinfey commited on
Commit
6e89cee
·
verified ·
1 Parent(s): fa00463

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +40 -3
README.md CHANGED
@@ -1,3 +1,40 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ This is a quantized INT4 model based on Apple MLX Framework Phi-3.5-mini-instruct. You can deploy it on Apple Silicon devices.
6
+
7
+ ## **Installation**
8
+
9
+
10
+ ```bash
11
+
12
+ pip install -U mlx-lm
13
+
14
+ ```
15
+
16
+ ## **Conversion**
17
+
18
+ ```bash
19
+
20
+ python -m mlx_lm.convert --hf-path microsoft/Phi-3.5-mini-instruct -q
21
+
22
+ ```
23
+
24
+ ## **Samples**
25
+
26
+ ```python
27
+
28
+ from mlx_lm import load, generate
29
+
30
+ model, tokenizer = load("Your Phi-3.5-instruct-mlx-int4 Path")
31
+
32
+ prompt = tokenizer.apply_chat_template(
33
+ [{"role": "user", "content": "能介绍一下 iOS 吗?"}],
34
+ tokenize=False,
35
+ add_generation_prompt=True,
36
+ )
37
+
38
+ response = generate(model, tokenizer, prompt=prompt,max_tokens=1024, verbose=True)
39
+
40
+ ```