awni commited on
Commit
5b83525
·
verified ·
1 Parent(s): a33164c

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -0
README.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: mlx
3
+ pipeline_tag: text-generation
4
+ tags:
5
+ - mlx
6
+ ---
7
+
8
+ # mlx-community/DeepSeek-R1-0528-4bit
9
+
10
+ This model [mlx-community/DeepSeek-R1-0528-4bit](https://huggingface.co/mlx-community/DeepSeek-R1-0528-4bit/new/main) was
11
+ converted to MLX format from [deepseek-ai/DeepSeek-R1-0528](https://huggingface.co/deepseek-ai/DeepSeek-R1-0528)
12
+ using mlx-lm version **0.24.1**.
13
+
14
+ ## Use with mlx
15
+
16
+ ```bash
17
+ pip install mlx-lm
18
+ ```
19
+
20
+ ```python
21
+ from mlx_lm import load, generate
22
+
23
+ model, tokenizer = load("mlx-community/DeepSeek-R1-0528-4bit")
24
+
25
+ prompt = "hello"
26
+
27
+ if tokenizer.chat_template is not None:
28
+ messages = [{"role": "user", "content": prompt}]
29
+ prompt = tokenizer.apply_chat_template(
30
+ messages, add_generation_prompt=True
31
+ )
32
+
33
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
34
+ ```