Qwen3-4B-Qwen27B-Distill
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: 5,743 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, 5 epochs, batch size 32, 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", 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 %.
Evaluated checkpoint: the root weights (epoch 5, step 895). Intermediate checkpoints are not benchmark-evaluated.
| Benchmark | This model | Qwen3-4B-Base |
|---|---|---|
| AIME 2025 (avg@32) | 8.4 | – |
| AIME 2026 (avg@32) | 7.4 | 6.9 |
| AMC 2025 (avg@32) | 33.1 | 32.5 |
| MATH-500 (avg@8) | 70.5 | 69.3 |
| GPQA Diamond (avg@4) | 23.4 | – |
Checkpoints
- Root: final checkpoint (epoch 5, step 895).
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.