78 lines
2.8 KiB
Markdown
78 lines
2.8 KiB
Markdown
---
|
||
license: mit
|
||
train: false
|
||
inference: true
|
||
pipeline_tag: text-generation
|
||
base_model:
|
||
- deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
|
||
---
|
||
This is a version of the <a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B">DeepSeek-R1-Distill-Qwen-1.5B</a> model re-distilled for better performance.
|
||
|
||
## Performance
|
||
|
||
| Models | <a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B">DeepSeek-R1-Distill-Qwen-1.5B</a> | <a href="https://huggingface.co/mobiuslabsgmbh/DeepSeek-R1-ReDistill-Qwen-1.5B-v1.1">DeepSeek-R1-ReDistill-Qwen-1.5B-v1.1</a> |
|
||
|:-------------------:|:--------:|:----------------:|
|
||
| ARC (25-shot) | 40.96 | <b>41.55</b> |
|
||
| HellaSwag (10-shot)| 44 | <b>45.88</b> |
|
||
| MMLU (5-shot) | 39.27 | <b>41.82</b> |
|
||
| TruthfulQA-MC2 | 45.17 | <b>46.63</b> |
|
||
| Winogrande (5-shot)| 55.49 | <b>57.7</b> |
|
||
| GSM8K (5-shot) | 69.9 | <b>74.3</b> |
|
||
| Average | 49.13 | <b>51.31</b> |
|
||
|
||
| Models | <a href="https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B">DeepSeek-R1-Distill-Qwen-1.5B</a> | <a href="https://huggingface.co/mobiuslabsgmbh/DeepSeek-R1-ReDistill-Qwen-1.5B-v1.1">DeepSeek-R1-ReDistill-Qwen-1.5B-v1.1</a> |
|
||
|:-------------------:|:--------:|:----------------:|
|
||
| GPQA (0-shot) | 26.96 | <b>26.99</b> |
|
||
| MMLU PRO (5-shot) | 16.74 | <b>19.86</b> |
|
||
| MUSR (0-shot) | 35.93 | <b>36.6</b> |
|
||
| BBH (3-shot) | 35.12 | <b>37.23</b> |
|
||
| IfEval (0-shot) | 24.94 | <b>27.22</b> |
|
||
|
||
## Usage
|
||
```Python
|
||
import torch
|
||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||
compute_dtype = torch.bfloat16
|
||
device = 'cuda'
|
||
model_id = "mobiuslabsgmbh/DeepSeek-R1-ReDistill-Qwen-1.5B-v1.1"
|
||
|
||
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=compute_dtype, attn_implementation="sdpa", device_map=device)
|
||
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||
|
||
prompt = "What is 1.5+102.2?"
|
||
chat = tokenizer.apply_chat_template([{"role":"user", "content":prompt}], tokenize=True, add_generation_prompt=True, return_tensors="pt")
|
||
outputs = model.generate(chat.to(device), max_new_tokens=1024, do_sample=True)
|
||
print(tokenizer.decode(outputs[0]))
|
||
```
|
||
|
||
Output:
|
||
```
|
||
<|begin▁of▁sentence|><|User|>What is 1.5+102.2?<|Assistant|><think>
|
||
First, I identify the numbers involved in the addition: 1.5 and 102.2.
|
||
|
||
Next, I add the whole numbers: 1 + 102 equals 103.
|
||
|
||
Then, I add the decimal parts: 0.5 + 0.2 equals 0.7.
|
||
|
||
Finally, I combine the results: 103 + 0.7 equals 103.7.
|
||
</think>
|
||
|
||
To solve the addition \(1.5 + 102.2\), follow these steps:
|
||
|
||
1. **Add the whole numbers:**
|
||
\[
|
||
1 + 102 = 103
|
||
\]
|
||
|
||
2. **Add the decimal parts:**
|
||
\[
|
||
0.5 + 0.2 = 0.7
|
||
\]
|
||
|
||
3. **Combine the results:**
|
||
\[
|
||
103 + 0.7 = 103.7
|
||
\]
|
||
|
||
So, the final answer is \(\boxed{103.7}\).<|end▁of▁sentence|>
|
||
``` |