gasolsun's picture
Add model card
c0db9c0 verified
|
Raw History Blame Contribute Delete
2.95 kB
metadata
license: mit
base_model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
library_name: transformers
pipeline_tag: text-generation
tags:
  - on-policy-distillation
  - knowledge-distillation
  - synthetic-data
  - math
datasets:
  - gasolsun/Math_DeepSeek-R1-Distill-Qwen-7B_Skywork-OR1-Math-7B

Math_DeepSeek-R1-Distill-Qwen-7B_Skywork-OR1-Math-7B

deepseek-ai/DeepSeek-R1-Distill-Qwen-7B distilled from Skywork/Skywork-OR1-Math-7B with Ask to Distill.

Ask to Distill trains a question generator with RL so that the questions it writes expose bounded, learnable token-level disagreement between a teacher and a student on the student's own solutions (the same signal on-policy distillation learns from). A question bank is then sampled from the generator, filtered and deduplicated, and the student is trained with on-policy distillation (OPD) on it. No real training questions and no reference answers are used.

Training

Student deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
Teacher Skywork/Skywork-OR1-Math-7B
Question bank gasolsun/Math_DeepSeek-R1-Distill-Qwen-7B_Skywork-OR1-Math-7B
OPD objective per-token reverse KL on the student's top-16 tokens, weighted by renormalised student probabilities; no outcome reward
OPD recipe lr 1e-6 (constant), AdamW, rollout temperature 1.0, fp32 master weights / bf16 compute

Results

AIME24 AIME25 AIME26 AMC23 BRUMO25 MATH500 avg6
57.5 44.8 52.5 89.2 53.3 89.9 64.54

avg@16 (MATH500: avg@4), temperature 0.7, top-p 0.95, max 31,744 new tokens. avg6 = mean of the six benchmarks.

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "gasolsun/Math_DeepSeek-R1-Distill-Qwen-7B_Skywork-OR1-Math-7B"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "..."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=4096, do_sample=True, temperature=0.7, top_p=0.95)
print(tok.decode(out[0, inputs.shape[1]:], skip_special_tokens=True))
  • Evaluation prompt (user turn): Solve the following math problem step by step. The last line of your response should be of the form Answer: $Answer (without quotes) where $Answer is the answer to the problem.\n\n{problem}\n\nRemember to put your answer on its own line after "Answer:". Please reason step by step, and put your final answer within \\boxed{}.