RL icon indicating copy to clipboard operation
RL copied to clipboard

[TRAIN-9] Thinking models (Qwen3/Qwen3.5) silently produce 0% accuracy due to low max_new_tokens

Open anwithk opened this issue 6 months ago • 3 comments

Problem

Default max_new_tokens values in Qwen2.5 and Llama-3 GRPO recipes (3K-4K tokens) are too low for thinking models like Qwen3 and Qwen3.5. Reasoning traces exceed the limit and get truncated before the final \boxed{N} answer. Evaluation accuracy appears near 0% even though training loss and reward metrics look normal. There is no documentation warning about this when switching to thinking models.

Steps to reproduce

  1. Switch a GRPO config from a non-thinking baseline to Qwen3 or Qwen3.5.
  2. Run training and observe evaluation accuracy near 0%.
  3. Increase max_new_tokens in the vLLM config to >= 8K and confirm accuracy recovers.

Suggested fix

  • Add a documentation note in the Qwen recipe guides to set max_new_tokens to at least 8K for thinking models.
  • Consider adding a config validation warning when a thinking model is detected but max_new_tokens is below a minimum threshold.

anwithk avatar Jun 05 '26 19:06 anwithk

@sharonyu-115 can someone on your team look into this? It is likely a doc change, but need to think through where is the best place to put that tip.

snowmanwwg avatar Jun 10 '26 21:06 snowmanwwg

Same for https://github.com/NVIDIA-NeMo/RL/issues/2722

sharonyu-115 avatar Jun 11 '26 05:06 sharonyu-115

Hi, I am looking into this issue and preparing a PR. Note: the documentation part appears to have landed already via #2900 (merged 2026-07-28, docs/guides/models/qwen/qwen3-5.md now warns to use max_new_tokens >= 8192 for thinking models), which left the config-validation warning as an explicit follow-up. I will verify the current state on main and focus on that remaining validation-warning follow-up, plus any doc gap I find.

four1er avatar Nov 23 '26 06:11 four1er