Qwen3-4B-MathRL-Multilingual-Gated

Qwen3-4B that reasons in the language of the problem, and finishes

arXiv: 2609.37104 base: Qwen3-4B stage: RL gated languages: 6 license: Apache 2.0

Bar chart, non-English mean. Reasoning in the requested language: released 40%, SFT 99%, RL additive 100%, RL gated 100%. Did not finish: 5%, 21%, 1%, 2%. Delivered: 29%, 60%, 60%, 61%.

Mean over Chinese, Spanish, French, Arabic and Russian · 70 problems × 16 samples per language

  • What it is. Qwen3-4B-SFT-Math-Multilingual after 200 PPO steps on localized math prompts with the gated reward R = C · (0.7 + 0.3 · ℓ): correctness C gates a language score ℓ, so a wrong answer earns nothing.
  • What it fixes. The SFT model reasons in the right language but 21.1% of its non-English responses never finish. Here that is 1.8%, the reasoning stays in the requested language (99.7%), and the median response shrinks from 7,673 to 4,463 tokens.
  • What to know. It is one of two matched runs that differ only in reward; Qwen3-4B-MathRL-Multilingual-Additive (additive reward) performs comparably. A third run rewarded for correctness alone also stops the looping but drifts back to English.

Results

Released SFT RL additive RL gated
Answer correct 76.2% 61.4% 60.1% 61.7%
Reasoning in the requested language 39.8% 99.4% 99.6% 99.7%
Did not finish 4.7% 21.1% 1.2% 1.8%
Delivered (J@1) 28.6% 60.2% 59.8% 61.4%
Delivered, best of 16 (J@16) 35.7% 84.6% 83.1% 83.7%
Median response, tokens 5,824 7,673 4,072 4,463

70 competition problems (30 AIME-2026 + 40 AMC-2023) per language from Multilingual-Math-Reasoning-Eval, 16 samples each at temperature 0.7, 24,576-token budget. A response is delivered when the answer is correct, the visible reasoning is in the requested language, and it terminates (J = C ∧ L ∧ T, scored per response). Tables show the mean over Chinese, Spanish, French, Arabic and Russian.

Per language · other benchmarks
Correct In language Did not finish J@1 J@16 Median tokens
English 67.1% 100.0% 0.4% 67.1% 87.1% 3,591
Chinese 60.5% 100.0% 2.3% 60.5% 82.9% 3,758
Spanish 62.4% 99.8% 1.1% 62.3% 84.3% 4,306
French 63.0% 99.7% 0.4% 62.9% 82.9% 4,244
Arabic 59.1% 98.8% 2.3% 57.9% 84.3% 4,904
Russian 63.4% 100.0% 2.9% 63.3% 84.3% 5,102
Delivered (J), non-English mean Released SFT RL additive RL gated
PolyMath, 444 problems 16.8% 34.1% 35.4% 36.8%
MMLU-ProX-Lite, 588 questions 24.0% 49.0% 56.2% 55.5%

Quick start

from datasets import load_dataset
from transformers import AutoModelForCausalLM, AutoTokenizer

name = "96kevinli29/Qwen3-4B-MathRL-Multilingual-Gated"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, torch_dtype="auto", device_map="auto")

# a French problem with a French instruction: "…en raisonnant entièrement en français."
prompt = load_dataset("96kevinli29/Multilingual-Math-Reasoning-Eval", "fr")["amc23"][0]["prompt"]
text = tok.apply_chat_template([{"role": "user", "content": prompt}], tokenize=False, add_generation_prompt=True)
inputs = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=24576, do_sample=True, temperature=0.7)
print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))

Qwen3 chat template with thinking on; the reasoning appears inside <think> … </think>. Give hard problems a large max_new_tokens. Loads with transformers 4.x and 5.x.

Prompt format in six languages
Instruction that opens the user turn
English Solve the following math problem step by step, reasoning entirely in English.
Chinese 请全程用中文逐步推理并解决以下数学问题。
Spanish Resuelve el siguiente problema matemático paso a paso, razonando enteramente en español.
French Résous le problème de mathématiques suivant étape par étape, en raisonnant entièrement en français.
Arabic حل المسألة الرياضية التالية خطوة بخطوة مع التفكير بالكامل باللغة العربية.
Russian Решите следующую математическую задачу шаг за шагом, рассуждая полностью на русском языке.

The full prompts (instruction, problem and answer format, all in the target language) are in the evaluation set.

Model family

Stage Checkpoint
I · Release Qwen/Qwen3-4B · Qwen/Qwen3-8B solves the problem, reasons in English
II · SFT Qwen3-4B-SFT-Math-Multilingual reasons in the requested language, sometimes loops
II · SFT Qwen3-8B-SFT-Math-Multilingual the same result at 8B
III · RL Qwen3-4B-MathRL-Multilingual-Gated ← this model keeps the language, stops the looping
III · RL Qwen3-4B-MathRL-Multilingual-Additive keeps the language, stops the looping

Data: SFT-Math-Multilingual-43k · SFT-Math-Multilingual-56k · DAPO-Math-Multilingual-6Lang · Multilingual-Math-Reasoning-Eval

Training

Algorithm PPO, GAE with γ = λ = 1, clip ratio 0.2, no KL term
Reward C · (0.7 + 0.3 · ℓ), plus a soft penalty for overlong responses
Prompts DAPO-Math-Multilingual-6Lang, 16,754 localized DAPO-Math-17K prompts
Batch 32 prompts × 8 rollouts per step, 16,384-token response cap
Learning rate 1e-6 actor, 1e-5 critic
Steps 200
Hardware · framework 8 GPUs on one node · verl, FSDP

C is rule-based correctness of the final answer; ℓ ∈ [0, 1] is a language-identification score of the response against the language of the prompt.

Limitations

  • Accuracy stays below the released Qwen3-4B on the same problems (76.2% → 61.7%). The cost enters with SFT; RL does not recover it, and it is now what limits delivery.
  • 200 PPO steps, one seed, one model size.
  • Mathematics and six languages only.

Citation

@article{li2026posttraining,
  title   = {What Does Post-Training Change in Multilingual Reasoning?},
  author  = {Li, Hongyang and Li, Xiao and Wu, Caesar and Danoy, Gr{\'e}goire and Bouvry, Pascal},
  journal = {arXiv preprint arXiv:2609.37104},
  year    = {2026}
}

@misc{qwen3-4b-mathrl-multilingual-gated-2026,
  title        = {{Qwen3-4B-MathRL-Multilingual-Gated}: PPO from multilingual-SFT {Qwen3-4B} with a gated language reward},
  author       = {Li, Hongyang and Li, Xiao and Wu, Caesar and Danoy, Gr{\'e}goire and Bouvry, Pascal and {Sea-Fill Community}},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/96kevinli29/Qwen3-4B-MathRL-Multilingual-Gated}},
  note         = {Maintained by Sea-Fill Community.}
}

Built and released by the authors together with the Sea-Fill Community, which maintains this release.

Downloads last month
53
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for 96kevinli29/Qwen3-4B-MathRL-Multilingual-Gated

Finetuned
Qwen/Qwen3-4B
Finetuned
(2)
this model

Dataset used to train 96kevinli29/Qwen3-4B-MathRL-Multilingual-Gated

Paper for 96kevinli29/Qwen3-4B-MathRL-Multilingual-Gated

Evaluation results

  • Delivered J@1 (correct, in the requested language, terminated) on AIME-2026 + AMC-2023, five non-English languages (zh, es, fr, ar, ru)
    self-reported
    61.400
  • Answer accuracy on AIME-2026 + AMC-2023, five non-English languages (zh, es, fr, ar, ru)
    self-reported
    61.700
  • Reasoning in the requested language on AIME-2026 + AMC-2023, five non-English languages (zh, es, fr, ar, ru)
    self-reported
    99.700