Qwen3 4B Think SFT (MLX)
An MLX checkpoint of Qwen3-4B-Instruct-2507 fine-tuned to emit an explicit reasoning section followed by a final answer using a neutral system prompt:
<think>
...
</think>
final answer
This is the supervised checkpoint. A separate GRPO checkpoint is trained from it with rule-based mathematical correctness and format rewards.
Prompt format
Training used this system message:
Answer the user request. First generate a short reasoning trace inside <think> and </think>, then give the final answer.
The assistant targets contain synthetic, strongly stylized reasoning traces. The prompt itself is neutral and does not require a named-person instruction. The traces are generated text, not authentic private reasoning.
Training
- Base:
Qwen/Qwen3-4B-Instruct-2507 - MLX base:
mlx-community/Qwen3-4B-Instruct-2507-4bit - Examples: 143 synthetic prompt/reasoning/response records
- Split: 114 train / 14 validation / 15 test
- Method: LoRA on the final 16 transformer layers plus the tied token embedding/output head
- LoRA rank: 8
- LoRA scale: 16
- Batch size: 1
- Gradient accumulation: 4
- Learning rate: 1e-5
- Iterations: 350
- Maximum sequence length: 1536
- Prompt masking: enabled
- Final validation loss: approximately 2.325
The tied embedding/output head was included because the non-thinking Instruct checkpoint otherwise preferred nearby tool-call delimiter tokens over <think> tokens.
MLX usage
from mlx_lm import load, generate
model, tokenizer = load("12384-0ashntoi/Qwen3-4B-Think-SFT-MLX")
messages = [
{
"role": "system",
"content": "Answer the user request. First generate a short reasoning trace inside <think> and </think>, then give the final answer.",
},
{"role": "user", "content": "What is 17 times 23?"},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
print(generate(model, tokenizer, prompt=prompt, max_tokens=512))
Limitations
- The dataset is very small and synthetic.
- Reasoning traces are stylistic reconstructions, not verified internal reasoning.
- The model may hallucinate, repeat itself, produce weak logic, or preserve artifacts from its synthetic source responses.
- SFT traces are mostly 130–350 tokens, so much longer generation can become repetitive.
- The model inherits biases and limitations from its base model and training data.
- Do not rely on it for factual, medical, legal, financial, or political guidance.