schroneko commited on
Commit
8261ccd
·
verified ·
1 Parent(s): 1a8712c

cecc99244970e8f5460adf9b9dac9ad9ff629ee54e0522bc2fbb7dd69e1d3c83

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-4bit](https://huggingface.co/mlx-community/DeepSeek-R1-Distill-Qwen-1.5B-4bit) 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-4bit")
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-4bit](https://huggingface.co/mlx-community/DeepSeek-R1-Distill-Qwen-1.5B-4bit) 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-4bit")
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:52809782c0af2ebd9c8a4269baaa3f219daab4f9bdd4f54c0d5d84352dc53edd
3
- size 999901724
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e37c5a7b2015dc7dfed3feb810cafefc02330910578f7994814f280757de0681
3
+ size 999901608