Downloads · 30 days
0
hari31416/deepseek-r1-grug-adapters
deepseek-r1-grug-adapters is a text generation model from hari31416. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This repository houses all trained fine-tuned LoRA adapter weights across both phases of the Grug Reasoning Project: 1. DeepSeek-R1-Distill-Qwen-7B: 4-bit QLoRA Supervised Fine-Tuned (SFT) and Direct Preference Optimi…
Downloads · 30 days
0
Access
Public
Updated Sep 3, 2026
Repo size
137 MB
Likes
0
Public
Click a slice to open those files.
.safetensors227 MB · 83%
From the Hugging Face model README
This repository houses all trained fine-tuned LoRA adapter weights across both phases of the Grug Reasoning Project:
The goal of Grug reasoning is aligning models to think in compressed, telegraphic fragments inside <think>...</think> tags—cutting conversational filler and generation latency while preserving mathematical task accuracy.
adapters/
├── deepseek-r1-7b/
│ ├── sft/ # 7B SFT LoRA adapters (PEFT safetensors)
│ └── dpo/ # 7B DPO LoRA adapters (PEFT safetensors)
├── deepseek-r1-1.5b/
│ ├── it-1/ # 1.5B Proof of Concept MLX adapters
│ ├── it-2-regularized/ # 1.5B Regularized MLX adapters (prompt-dropout)
│ └── it-2-unregularized/ # 1.5B Unregularized MLX adapters
├── sft/ # Backward compatible pointer to 7B SFT
└── dpo/ # Backward compatible pointer to 7B DPO
| Model Variant | Test Samples | Accuracy | Format Compliance | Mean Thinking Tokens | Mean Answer Tokens | Mean Latency |
|---|---|---|---|---|---|---|
| Base Model (7B) | 1,319 | 75.97% | 99.85% | 122.5 | 160.4 | 6.09s |
| SFT Adapter (7B) | 1,319 | 72.18% | 94.62% | 107.7 | 107.3 | 6.75s |
| DPO Adapter (7B) | 1,319 | 75.44% | 99.85% | 122.3 | 162.1 | 6.39s |
| Configuration | Accuracy | Mean Thinking Tokens | Mean Total Tokens | Mean Latency | Format Compliance |
|---|---|---|---|---|---|
| Base Normal (1.5B) | 64.9% | 219.0 | 477.4 | 0.88s | 96.6% |
| FT Normal (1.5B) | 66.0% | 156.2 | 389.3 | 0.73s | 98.9% |
| FT Regularized (1.5B) | 54.6% | 135.0 | 214.7 | 0.61s | 98.2% |
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B"
adapter_repo = "hari31416/deepseek-r1-grug-adapters"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float16,
device_map="auto",
)
# Load SFT adapter
sft_model = PeftModel.from_pretrained(base_model, adapter_repo, subfolder="deepseek-r1-7b/sft")
# Or load DPO adapter
# dpo_model = PeftModel.from_pretrained(base_model, adapter_repo, subfolder="deepseek-r1-7b/dpo")
# Load and generate using MLX LoRA
mlx_lm.generate \
--model mlx-community/DeepSeek-R1-Distill-Qwen-1.5B-4bit \
--adapter-path <path-to-downloaded-1.5b-adapters> \
--prompt "Janet has 16 eggs..."