|
--- |
|
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) |
|
``` |
|
|