Qwen3-4B-Qwen27B-Distill-45k
A Qwen3-4B-Base model fine-tuned (full-parameter SFT) to solve math problems with long step-by-step reasoning.
The model thinks inside a <think> … </think> block and then writes a final answer with \boxed{}.
Training
- Data: about 45,000 math problems with long reasoning traces generated by Qwen3.8-27B in thinking mode, filtered to verified-correct traces.
- Format: Qwen chat template; assistant turn =
<think>\n…\n</think>\n\n+ final solution. Prompt suffix:Please reason step by step, and put your final answer within \boxed{}. - Full fine-tuning, 3 epochs, learning rate 2e-5, sequence length up to 16k.
- End-of-sequence token set to
<|im_end|>.
Usage (vLLM)
from vllm import LLM, SamplingParams
llm = LLM("96kevinli29/Qwen3-4B-Qwen27B-Distill-45k", max_model_len=20480)
q = "Find the remainder when 2^100 is divided by 7."
msgs = [{"role": "user", "content": q + "\n\nPlease reason step by step, and put your final answer within \\boxed{}."}]
sp = SamplingParams(temperature=0.6, top_p=0.95, top_k=20, max_tokens=16384, stop=["<|im_end|>", "<|endoftext|>"])
print(llm.chat(msgs, sp)[0].outputs[0].text)
Evaluation
Thinking mode, temperature 0.6, top-p 0.95, top-k 20, 16,384-token budget, strict answer matching (a response cut off before the answer counts as wrong). Accuracy in %.
Root weights = step 2109 (3 epochs). Only the first checkpoint (step 703) was spot-checked (AIME 2026 avg@32: 8.8); the root and other checkpoints are not benchmark-evaluated.
Checkpoints
- Root: final checkpoint (step 2109 (3 epochs)).
intermediate/epochK_stepN/: earlier checkpoints, kept as-is.
Limitations
A 4B model with long outputs: many hard-problem responses hit the 16k budget before answering. Math-only training; not tuned for chat safety or tool use.