Skip to content

fix(rm): deepscaler silently zeroes all rewards for non-thinking models#2219

Open
acmore wants to merge 1 commit into
THUDM:mainfrom
acmore:fix/deepscaler-non-thinking-zero-reward
Open

fix(rm): deepscaler silently zeroes all rewards for non-thinking models#2219
acmore wants to merge 1 commit into
THUDM:mainfrom
acmore:fix/deepscaler-non-thinking-zero-reward

Conversation

@acmore

@acmore acmore commented Jul 18, 2026

Copy link
Copy Markdown

Motivation

get_deepscaler_rule_based_reward returns 0 whenever the response contains neither </think> nor ###Response. For any non-thinking model (or a thinking model whose chat template strips the tags), every sample scores 0:

  • all GRPO groups become zero-std → advantages vanish → training runs with no signal;
  • there is no error or warning anywhere;
  • the symptom is deceptive: generation looks healthy (sane response lengths, ~0% truncation, correct answers plainly visible in the sampled text) while reward stays flat at 0.

We hit this running DeepSeek-V3.2 GRPO (non-thinking chat template) on dapo-math-17k: several steps of flat-zero reward with otherwise perfect-looking rollouts.

Change

One-line fallback: when neither marker is present, grade the whole response instead of returning 0. Extraction/verification below this point (extract_answer + grade_answer_mathd/grade_answer_sympy) already handles raw text fine.

Verification

Same DeepSeek-V3.2 setup, only this change: reward went from 0.0 (all steps) to 0.676 at step 0 with a normal GRPO signal thereafter. Thinking-model path (</think> present) is untouched.

🤖 Generated with Claude Code

get_deepscaler_rule_based_reward returns 0 whenever the response contains
neither "</think>" nor "###Response". For any non-thinking model (or a
thinking model with stripped tags) every sample scores 0: GRPO groups all
become zero-std, advantages vanish, and training runs with no signal —
with no error or warning anywhere. The symptom is deceptive: generation
looks healthy (sane lengths, ~0% truncation, correct answers visible in
the text) while rewards stay flat at 0.

Fall back to grading the whole response instead. Measured on
DeepSeek-V3.2 (non-thinking chat template): reward 0 -> 0.676 on
dapo-math-17k with this one-line change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant