Code_Qwen2.5-Coder-3B-Instruct_Qwen2.5-Coder-32B-Instruct

Qwen/Qwen2.5-Coder-3B-Instruct distilled from Qwen/Qwen2.5-Coder-32B-Instruct 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 Qwen/Qwen2.5-Coder-3B-Instruct
Teacher Qwen/Qwen2.5-Coder-32B-Instruct
Question bank gasolsun/Code_Qwen2.5-Coder-3B-Instruct_Qwen2.5-Coder-32B-Instruct
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

LiveCodeBench v5_v6 MBPP+ APPS-Intro APPS-Interview APPS-Comp CodeContests Avg
17.0 65.1 31.6 7.6 3.7 2.4 21.2

LiveCodeBench v5_v6 (342 problems, n=4, pass@1); MBPP+ (EvalPlus, greedy, lenient answer extraction); APPS intro / interview (1k subset) / competition and CodeContests test (165): n=1, temperature 0.2, top-p 0.95, top-k 20, 4,096 tokens, at most 50 tests per problem. Avg = mean of six.

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "gasolsun/Code_Qwen2.5-Coder-3B-Instruct_Qwen2.5-Coder-32B-Instruct"
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))
  • Prompts use the LiveCodeBench stdin/stdout template (read from standard input, write to standard output, one fenced Python block).
Downloads last month
77
Safetensors
Model size
3B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for gasolsun/Code_Qwen2.5-Coder-3B-Instruct_Qwen2.5-Coder-32B-Instruct

Base model

Qwen/Qwen2.5-3B
Finetuned
(159)
this model

Dataset used to train gasolsun/Code_Qwen2.5-Coder-3B-Instruct_Qwen2.5-Coder-32B-Instruct