File size: 2,836 Bytes
b5e7919 a14ae0b b5e7919 a14ae0b 1424b1b a14ae0b 83b2d72 99b083a a14ae0b 99b083a a14ae0b 99b083a b5e7919 99b083a b5e7919 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
---
base_model: Dongwei/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math
datasets: DigitalLearningGmbH/MATH-lighteval
library_name: transformers
model_name: DeepSeek-R1-Distill-Qwen-7B-GRPO_Math
tags:
- generated_from_trainer
- open-r1
- trl
- grpo
- mlx
- mlx-my-repo
licence: license
---
# About:
**This GRPO trained model is a fine-tuned version of **[**__deepseek-ai/DeepSeek-R1-Distill-Qwen-7B__**](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B)** on the **[**__DigitalLearningGmbH/MATH-lighteval__**](https://huggingface.co/datasets/DigitalLearningGmbH/MATH-lighteval)** dataset.**
GRPO is applied after a distilled R1 model is created to further refine its reasoning capabilities. Rather than the initial distillation step—which transfers capacities from a larger model—GRPO uses reinforcement learning to optimize the policy model by maximizing a reward signal. This fine-tuning step is distinct from distillation and aims to boost performance in chain-of-thought and reasoning tasks.
*Special thanks to Dongwei for fine-tuning this version of DeepSeek-R1-Distill-Qwen-7B. More information about it can be found here:*
[https://huggingface.co/Dongwei/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math](https://huggingface.co/Dongwei/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math)
- Converted to MLX format with a quantization of 4-bit for better performance on Apple Silicon Macs (M1,M2,M3,M4 Chips).
# Notes:
- Seems to brush over the "thinking" process and immediately start answering, leading to extremely quick but correct answers.
## Other Types:
| Link | Type | Size| Notes |
|-------|-----------|-----------|-----------|
| [MLX] (https://huggingface.co/AlejandroOlmedo/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math-8bit-mlx) | 8-bit | 8.10 GB | **Best Quality** |
| [MLX] (https://huggingface.co/AlejandroOlmedo/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math-4bit-mlx) | 4-bit | 4.30 GB | Good Quality|
# AlejandroOlmedo/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math-4bit-mlx
The Model [AlejandroOlmedo/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math-4bit-mlx](https://huggingface.co/AlejandroOlmedo/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math-4bit-mlx) was converted to MLX format from [Dongwei/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math](https://huggingface.co/Dongwei/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math) using mlx-lm version **0.20.5**.
## Use with mlx
```bash
pip install mlx-lm
```
```python
from mlx_lm import load, generate
model, tokenizer = load("AlejandroOlmedo/DeepSeek-R1-Distill-Qwen-7B-GRPO_Math-4bit-mlx")
prompt="hello"
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
response = generate(model, tokenizer, prompt=prompt, verbose=True)
```
|