awni commited on
Commit
7a5f80f
·
verified ·
1 Parent(s): 27db53d

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ license_link: https://github.com/OpenBMB/MiniCPM/blob/main/LICENSE
4
+ language:
5
+ - en
6
+ pipeline_tag: text-generation
7
+ base_model: openbmb/MiniCPM3-4B
8
+ tags:
9
+ - mlx
10
+ library_name: mlx
11
+ ---
12
+
13
+ # mlx-community/MiniCPM3-4B-4bit
14
+
15
+ The Model [mlx-community/MiniCPM3-4B-4bit](https://huggingface.co/mlx-community/MiniCPM3-4B-4bit) was
16
+ converted to MLX format from [openbmb/MiniCPM3-4B](https://huggingface.co/openbmb/MiniCPM3-4B)
17
+ using mlx-lm version **0.22.0**.
18
+
19
+ ## Use with mlx
20
+
21
+ ```bash
22
+ pip install mlx-lm
23
+ ```
24
+
25
+ ```python
26
+ from mlx_lm import load, generate
27
+
28
+ model, tokenizer = load("mlx-community/MiniCPM3-4B-4bit")
29
+
30
+ prompt = "hello"
31
+
32
+ if tokenizer.chat_template is not None:
33
+ messages = [{"role": "user", "content": prompt}]
34
+ prompt = tokenizer.apply_chat_template(
35
+ messages, add_generation_prompt=True
36
+ )
37
+
38
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
39
+ ```