Qwen3-4B-Qwen27B-Distill-45k: A compact math reasoner with step-by-step thinking
2 min readupdated
This model is designed to solve math problems in English with detailed step-by-step reasoning: it first reasons inside a tag and then outputs the final answer in \boxed{} format. Built on Qwen3-4B-Base (4.02 billion parameters) by author 96kevinli29, it underwent full-parameter SFT (full fine-tuning of all model weights). Unlike the original base version, it was trained on 45,000 verified reasoning chains from the larger Qwen3.8-27B and supports a long generation context. It is ideal for researchers and developers running local experiments with reasoning models on limited hardware.
Key features
- Distillation from Qwen3.8-27B: Trained on 45,000 math problems with long reasoning traces filtered for correctness.
- Long token budget: Supports sequence lengths up to 16k tokens during training and is designed to generate up to 16,384 tokens via vLLM.
- Intermediate checkpoints: In addition to the final weights (step 2109), early epoch checkpoints are saved in the
intermediate/folder.
What you can do
- Local math tutor bot: Deploy the model via vLLM for step-by-step breakdowns of algebra and competition math problems with transparent solution logic.
- Compare training dynamics: Test model behavior and reasoning length at different fine-tuning stages using the saved intermediate checkpoints.
Example
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)
Read more
DetailsMetrics: The final checkpoint (step 2109, 3 epochs) was not fully evaluated; the first checkpoint (step 703) scored an AIME 2026 avg@32 of 8.8%.
Training: Full-parameter SFT, 3 epochs, learning rate 2e-5, sequence length up to 16k.
Limitations: On complex tasks, the 4B parameter model frequently hits the 16,384 token limit before outputting an answer; it is not aligned for chat safety or tool use.










Comments