schroneko commited on
Commit
9f0774b
·
verified ·
1 Parent(s): 20d8c42

b77cc86ae9b9d71a49aabe7fcd975d5a6089befd51fc49a57defc3f250d59813

Browse files
Files changed (2) hide show
  1. README.md +4 -4
  2. model.safetensors +2 -2
README.md CHANGED
@@ -8,7 +8,7 @@ tags:
8
 
9
  The Model [mlx-community/DeepSeek-R1-Distill-Qwen-1.5B-8bit](https://huggingface.co/mlx-community/DeepSeek-R1-Distill-Qwen-1.5B-8bit) was
10
  converted to MLX format from [deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B)
11
- using mlx-lm version **0.21.1**.
12
 
13
  ## Use with mlx
14
 
@@ -21,12 +21,12 @@ from mlx_lm import load, generate
21
 
22
  model, tokenizer = load("mlx-community/DeepSeek-R1-Distill-Qwen-1.5B-8bit")
23
 
24
- prompt = "hello"
25
 
26
- if tokenizer.chat_template is not None:
27
  messages = [{"role": "user", "content": prompt}]
28
  prompt = tokenizer.apply_chat_template(
29
- messages, add_generation_prompt=True
30
  )
31
 
32
  response = generate(model, tokenizer, prompt=prompt, verbose=True)
 
8
 
9
  The Model [mlx-community/DeepSeek-R1-Distill-Qwen-1.5B-8bit](https://huggingface.co/mlx-community/DeepSeek-R1-Distill-Qwen-1.5B-8bit) was
10
  converted to MLX format from [deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B)
11
+ using mlx-lm version **0.20.2**.
12
 
13
  ## Use with mlx
14
 
 
21
 
22
  model, tokenizer = load("mlx-community/DeepSeek-R1-Distill-Qwen-1.5B-8bit")
23
 
24
+ prompt="hello"
25
 
26
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
27
  messages = [{"role": "user", "content": prompt}]
28
  prompt = tokenizer.apply_chat_template(
29
+ messages, tokenize=False, add_generation_prompt=True
30
  )
31
 
32
  response = generate(model, tokenizer, prompt=prompt, verbose=True)
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fcaf9e5f931799b433d58ada2ab84d5c3dfc159f131a9029b06e350322d23c60
3
- size 1888373967
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6ba6c1da3c96692bc9719e9e70973ec4e9193d79a2e4e49e6c183a017bab78e
3
+ size 1888373799