Skip to content

docs(qwen3.6): add the decode-time fix for SciCode non-termination - #2606

Merged
kevalmorabia97 merged 8 commits into
mainfrom
kmorabia/scicode-verbosity-mitigation
Oct 2, 2026
Merged

kevalmorabia97 merged 8 commits into
mainfrom
kmorabia/scicode-verbosity-mitigation

Conversation

@kevalmorabia97

@kevalmorabia97 kevalmorabia97 commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Type of change: documentation

The Qwen3.6-35B-A3B tutorial already diagnoses SciCode's +90.9% completion tokens as a failure to terminate — a small fraction of sub-steps run to the 131,072-token cap inside <think> and return nothing. It offered no remedy short of redoing QAD. There is a decode-time one.

Adding presence_penalty: 1.5 — Qwen's own thinking-mode recommendation for this model — removes nearly all of it with no retraining. 8 runs per side, ~2,700 SciCode sub-steps per cell:

Model Capped sub-steps SciCode (Subtask) Generation time (s)
BF16 (teacher) 20 → 0 40.8 → 39.9 1,312 → 1,158
W4A16 NVFP4 PTQ 37 → 0 38.5 → 39.4 2,081 → 1,394
W4A4 NVFP4 PTQ 32 → 1 39.1 → 39.1 1,674 → 1,476
↳ + QAD 500 iters 96 → 2 40.2 → 39.6 2,340 → 1,316

Accuracy is neutral (deltas span −0.95 to +0.89, i.e. run-to-run noise) and generation is 12-44% faster.

It is scoped deliberately. On GPQA Diamond, which never caps, the same setting leaves accuracy unchanged while making generation 4.2× slower — pure cost. The tutorial says to use it where runaway generation actually occurs and not to make it a global default.

Also in this PR:

  • Defines sub-step and capped at the points they are used. A capped sub-step scores zero, which is what makes the "accuracy is neutral" result interesting — removing 96 automatic zeros did not raise the score.
  • Notes that params_to_add is how to set presence_penalty / top_k on an ns_* task, appended to the existing note that already explains why NEL's params block rejects them.
  • Cites Lotfi et al., arXiv:2606.00206, which reports quantization amplifying "overthinking" and proposes a hesitation-marker logit penalty. We tested that penalty: it helps less than presence_penalty and costs a little accuracy, and its marker-density signature does not reproduce on our W4A4 PTQ — their failure opens new reasoning branches, ours repeats a finished solution.

Usage

# In the eval config's adapter_config, for any ns_* task:
params_to_add:
  chat_template_kwargs: {enable_thinking: true}
  presence_penalty: 1.5

Testing

Docs-only; no code paths touched. The numbers come from 40 SciCode and 9 GPQA evaluation runs on oci-hsg (vLLM 0.28.0, 4× GB200), all on the existing published checkpoints — no retraining.

  • SciCode: 8 runs per side for all four models. An earlier 2-run read showed a −2.45 accuracy drop on W4A16 that reversed to +0.89 at 8 runs, so every figure quoted here is from the repeat-matched set.
  • GPQA: 3 baseline runs vs 2 with the penalty. The baseline was re-run specifically to confirm the 4.2× — the three baselines span 7,878-8,261 s, and the 19-day-old run sits inside the spread of two fresh ones, so it is the knob and not cluster drift.
  • pre-commit run --files ... clean (markdownlint).

Before your PR is "Ready for review"

  • Is this change backward compatible?: ✅
  • If you copied code from any other sources or added a new PIP dependency, did you follow guidance in CONTRIBUTING.md: N/A
  • Did you write any new necessary tests?: N/A — documentation only.
  • Did you update Changelog?: N/A — tutorial content, not a feature or fix.
  • Did you get Claude approval on this PR?: ❌ — not yet run.

Additional Information

Independent of #2592, which touches a different section of the same file.

Summary by CodeRabbit

  • Documentation
    • Clarified which evaluation configurations omit presence_penalty to reproduce the reported results and how parameters are passed to tau2-bench and ns_* tasks.
    • Documented that optionally setting presence_penalty: 1.5 reduces capped SciCode sub-steps with little accuracy change and lower mean output length; median output length remains similar. The setting remains disabled in the configuration.
    • Noted that this setting makes uncapped GPQA generation 4.2× slower and should not be used as a global default, and added a comparison to research on quantized-model overthinking.

The tutorial diagnosed SciCode's +90.9% completion tokens as a failure to
terminate, but offered no remedy short of redoing QAD. Adding
presence_penalty=1.5 -- Qwen's own thinking-mode recommendation, which NEL's
params block silently drops -- removes nearly all of it with no retraining:
capped sub-steps fall from 96 to 2 of ~2,700 on the QAD checkpoint, and
generation is 12-44% faster, with accuracy unchanged (8 runs per side).

Scope it to that failure mode. On GPQA Diamond, which never caps, the same
setting leaves accuracy flat while making generation 4.2x slower, so it is a
targeted fix rather than a new default.

Also define "sub-step" and "capped" where they are used, and note that
params_to_add is the way to set these knobs on an ns_* task.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
@kevalmorabia97
kevalmorabia97 requested a review from a team as a code owner September 30, 2026 21:29
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/Model-Optimizer/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 41e4ae0f-699a-4084-9f70-b8dfb0104c29

📥 Commits

Reviewing files that changed from the base of the PR and between 94fe9a7 and 5c3433b.

📒 Files selected for processing (1)
  • examples/megatron_bridge/tutorials/Qwen3.6-35B-A3B/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • examples/megatron_bridge/tutorials/Qwen3.6-35B-A3B/README.md

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The tutorial README clarifies parameter handling and describes SciCode termination findings, including results and costs for an optional presence penalty. The evaluation configs document parameter handling and state that the penalty remains disabled in the published-results configuration.

Changes

SciCode evaluation documentation

Layer / File(s) Summary
Adapter parameter instructions
examples/megatron_bridge/tutorials/Qwen3.6-35B-A3B/README.md, examples/megatron_bridge/tutorials/Qwen3.6-35B-A3B/eval_configs/tau2_telecom.yaml
The README and tau2 config comments describe how top_k and presence_penalty reach ns_* tasks through params_to_add. They state that the other five configs omit these parameters to reproduce the tutorial results table.
SciCode termination findings and comparison
examples/megatron_bridge/tutorials/Qwen3.6-35B-A3B/README.md, examples/megatron_bridge/tutorials/Qwen3.6-35B-A3B/eval_configs/scicode.yaml
The README reports fewer capped SciCode sub-steps with presence_penalty: 1.5, accuracy changes within run-to-run noise, lower mean token counts, and a 4.2× GPQA generation-time increase. It also discusses related quantized-model overthinking research. The SciCode config comments document the optional setting and state that it remains disabled.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 5c343

This PR only updates tutorial documentation about a SciCode presence-penalty mitigation. It does not change runtime behavior, so merge risk is minimal.

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main documentation change: adding a decode-time mitigation for SciCode non-termination in the Qwen3.6 tutorial.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Anti-Patterns ✅ Passed PASS. The pull request changes only one Markdown file and two YAML evaluation configs. It adds no Python changes, dependency changes, or executable security-sensitive patterns covered by SECURITY.md. …
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@kevalmorabia97

Copy link
Copy Markdown
Collaborator Author

/claude review

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.40%. Comparing base (e5b6332) to head (8009e71).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2606      +/-   ##
==========================================
- Coverage   69.46%   69.40%   -0.07%     
==========================================
  Files         611      611              
  Lines       68205    68279      +74     
==========================================
+ Hits        47380    47389       +9     
- Misses      20825    20890      +65     
Flag Coverage Δ
examples-megatron_bridge 26.57% <ø> (-0.13%) ⬇️
unit 59.16% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review — 1 IMPORTANT, 1 SUGGESTION

Scope. Full review; the trigger comment carried no extra scoping. Docs-only PR — 1 file changed (examples/megatron_bridge/tutorials/Qwen3.6-35B-A3B/README.md, +20/−4), no code paths touched, so the mode/state, export, and algorithm-correctness categories don't apply. I reviewed the diff for internal consistency against the rest of the tutorial and verified the one factual repo claim it makes.

Findings

CRITICAL: 0 · IMPORTANT: 1 · SUGGESTION: 1

[IMPORTANT Documentation] — BF16 without-penalty SciCode value contradicts the file's own baseline (inline)

The new table's BF16 row reads 40.8 → 39.9, but three other places in the same README put the BF16 SciCode baseline at 39.9:

Source Implies BF16 =
Headline table, line 25 39.9 ± 0.6
Paired test line 53, PTQ vs BF16 = −0.81 39.1 + 0.81 = 39.9
Paired test line 53, QAD 500 vs BF16 = +0.33 40.2 − 0.33 = 39.9

The other three rows (38.5, 39.1, 40.2) match the headline table exactly, and the capped counts (20, 96) are the same ones already quoted at line 319 — so this row's accuracy pair looks like it should come from that same 8-run set as well. If the BF16 pair is transposed (39.9 → 40.8), the delta span quoted at line 335 changes from "−0.95 to +0.89" to −0.6 to +0.9, and the penalty reads as mildly positive on the teacher rather than costing it 0.9 pp. Either correct the row and the span, or footnote why the BF16 column is a separate run set.

[SUGGESTION] — the new capped definition says a capped sub-step "returns nothing and scores zero" as an absolute, while the adjacent existing bullet says "93 of those 96". Worth hedging, since that definition carries the neutral-accuracy argument. (inline)

Verified

  • params_to_add is real and correctly placed. It exists under adapter_config in all six of this tutorial's eval configs (eval_configs/scicode.yaml:86, gpqa.yaml:87, and four others), so the new note at line 249 is accurate and the YAML snippet in the PR description matches the actual schema.
  • Arithmetic in the new table checks out. Generation-time deltas are −11.7%, −33.0%, −11.8%, −43.8% → the quoted "12-44%" is right. Capped counts 20/2704 and 96/2704 reconcile with the 0.7%/3.6% figures already in the file, and the new "80 problems into 338 sub-steps" is consistent with the 2,704 denominator at 8 runs (338 × 8).
  • The scoping caveat on GPQA (4.2× slower, don't make it a global default) is a genuinely useful addition — it keeps the tutorial from being read as a blanket recommendation.

Not verified

  • The arXiv:2606.00206 citation (title, authors, and the characterization of its hesitation-marker penalty) — WebFetch permission was not granted in this run, so I could not confirm it resolves to the cited paper. Worth a manual check before merge, since it is a public NVIDIA tutorial.
  • External claims I have no repo-side source for: the 4.2× GPQA slowdown, and presence_penalty: 1.5 being "Qwen's own thinking-mode recommendation for this model". These rest on the author's 49 evaluation runs and the model card.

Risk

Low. Documentation-only, no code, no API or state-schema surface, backward compatible. The one IMPORTANT finding is a numeric inconsistency rather than a broken code path — but it sits in a benchmark table in a published tutorial and the headline "accuracy is neutral" framing depends on the resolution, so it should be settled before merge.

🤖 Generated with Claude Code

The BF16 without-penalty cells came from 9 runs, one of which was a partial
run covering 27 of 338 sub-steps and scoring 48.15. Dropping it gives 39.90,
which matches the headline table and both paired deltas; generation time
likewise moves to 1,464 s. The delta span narrows to -0.59..+0.89. No other
build had a partial run, and the capped counts are unaffected -- that run
contributed none -- so the denominator is now a clean 2,704 everywhere.

Also hedge the new "capped" definition: 93 of 96 capped sub-steps return no
answer tokens, so "almost all" rather than an absolute.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
@kevalmorabia97

Copy link
Copy Markdown
Collaborator Author

/claude review

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review — 0 CRITICAL, 0 IMPORTANT, 3 SUGGESTION

Scope. Full review; the trigger comment carried no extra scoping. Docs-only PR — 1 file (examples/megatron_bridge/tutorials/Qwen3.6-35B-A3B/README.md, +20/−4), no code paths touched, so the mode/state, export, backward-compat, and algorithm-correctness categories don't apply. I re-checked the diff for internal consistency against the rest of the tutorial and against the eval configs it references.

Prior round's findings are resolved

Both findings from the review at 948d3d9 are fixed in 472ad85:

  • IMPORTANT (BF16 row contradicted the file's own baseline) — ✅ fixed. The row is now 39.9 → 39.9, matching the headline table (line 25, 39.9 ± 0.6) and both paired-test back-computations (39.1 + 0.81, 40.2 − 0.33). The delta span was updated to −0.59 to +0.89 accordingly, which reconciles with the four rounded rows (0.0, +0.9, 0.0, −0.6).
  • SUGGESTION (unhedged capped definition) — ✅ fixed. Now reads "almost all such sub-steps return nothing and score zero", consistent with the adjacent "93 of those 96".

The BF16 generation-time baseline also moved 1,312 → 1,464, which I hadn't flagged and which makes the table more coherent than before: gen-time ratios vs BF16 now track completion-token ratios divided by each config's decode throughput (W4A16 1.42× time on 1.23× tokens, consistent with W4A16 being slower per token in the throughput table; W4A4/QAD 1.60× time on 1.91× tokens, consistent with the 1.12-1.14× W4A4 speedup). At 1,312 those ratios did not line up.

This round's findings — all non-blocking

  1. [SUGGESTION] The appended params_to_add sentence contradicts the "that is why the other five configs omit them" clause immediately before it — the paragraph now says the five configs couldn't set presence_penalty and then shows they could. (inline)
  2. [SUGGESTION] The new capped definition creates ~3.5 pp of mechanical accuracy headroom on the QAD row (~94 recovered zeros / 2,704) that the measured score does not realize. The resolution — recovered sub-steps still fail their tests, so the win is cost not accuracy — is in the PR description but not the tutorial. (inline)
  3. [SUGGESTION] eval_configs/scicode.yaml does not carry presence_penalty: 1.5, and the README doesn't say whether that omission is deliberate (presumably: so the config reproduces the headline table). (inline)

Verified this round

  • params_to_add is real and correctly located. Present under adapter_config in all six configs — scicode.yaml:86, gpqa.yaml:87, ifbench.yaml:85, mmmu_pro.yaml:85, aa_lcr.yaml:92, tau2_telecom.yaml:101 — each currently holding only chat_template_kwargs. The new note at line 248 is accurate and the PR description's YAML snippet matches the actual schema.
  • All four SciCode without-penalty values match the headline table: 39.9 / 38.5 / 39.1 / 40.2.
  • Capped counts reconcile: 20 and 96 are the same figures already at line 316 (0.7% = 20/2704, 3.6% = 96/2704); 338 sub-steps × 8 runs = 2,704, and 338 subproblems over 80 problems is SciCode's actual structure.
  • Generation-time span: deltas are −20.9%, −33.0%, −11.8%, −43.8% → "12-44% faster" is correct.
  • "Run-to-run noise" is supported by the file's own spreads: with SciCode sem ≈ 0.5-0.7 per side, the difference-of-means sem is ≈ 0.85, so both +0.89 and −0.59 sit inside 1 sem.
  • max_new_tokens: 131072 in scicode.yaml:72 matches the cap the capped definition cites.
  • The GPQA scoping caveat (4.2× slower, don't globalize) remains the most valuable part of the addition — it stops the section being read as a blanket recommendation.

Not verified

  • The arXiv:2606.00206 citation (title, authors, characterization of the hesitation-marker penalty) — WebFetch permission was not granted in this run either, so this is still unconfirmed from the prior round. Worth one manual click before merge, since it's a public NVIDIA tutorial.
  • Claims with no repo-side source: the 4.2× GPQA slowdown, and presence_penalty: 1.5 being Qwen's thinking-mode recommendation for this model. These rest on the author's 49 evaluation runs and the model card.

Risk

Minimal. Documentation-only, no code, no public API or state-schema surface, backward compatible. The numeric inconsistency that blocked the last round is resolved and the table is now self-consistent in every cross-check I could run against the file and the configs. The three remaining items are clarity improvements a reader would benefit from, none of which block merge.

🤖 Generated with Claude Code

…config

Three follow-ups from review:

- The sampling note said params does not accept these knobs and then, in the
  next breath, gave the params_to_add workaround. Reworded so the omission
  reads as the deliberate scoping choice it is, not a tooling limit.
- The new "capped" definition implies ~94 recovered zeros on the QAD row is
  up to +3.5 pp of headroom; none of it appears. Say why: the sub-steps that
  stop looping still fail their tests, so the win is cost, not accuracy.
- eval_configs/scicode.yaml ships without the penalty, which now reads as an
  oversight. Note in both the README and the config that it is omitted so the
  config reproduces the published table.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
@kevalmorabia97

Copy link
Copy Markdown
Collaborator Author

/claude review

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review — 0 CRITICAL, 0 IMPORTANT, 3 SUGGESTION

Scope. Full review; the trigger comment carried no extra scoping. Docs-only PR — 2 files (README.md +24/−5, eval_configs/scicode.yaml +3/−0), no code paths touched, so the mode/state, export, backward-compat, and algorithm-correctness categories don't apply. I re-verified the diff against the rest of the tutorial and against all six eval configs.

Prior round's findings are resolved

All three SUGGESTIONs from the review at 472ad85 are addressed in 3a05732:

  • params_to_add sentence contradicted itself — ✅ fixed. Line 248 now separates the mechanism from the motive: the five configs can set these via params_to_add and omit them deliberately, to reproduce the table.
  • Accuracy-headroom puzzle unexplained in the tutorial — ✅ addressed at line 336 (the ~94 recovered zeros / +3.5 pp headroom that doesn't materialise). See suggestion 2 below on how it's worded.
  • Config didn't carry the setting, with no note on whether that was deliberate — ✅ fixed on both sides: scicode.yaml:89-91 now carries a commented-out presence_penalty: 1.5 with the rationale, and line 338 states the config leaves it out deliberately.

The IMPORTANT finding from the 948d3d9 round (BF16 row contradicting the file's own baseline) remains fixed.

This round's findings — all non-blocking

  1. [SUGGESTION] The README correction leaves the old, now-retracted claim intact in a shipped sibling config: eval_configs/tau2_telecom.yaml:18-19 still says NEL's params block is "why the other five configs omit them," which this PR walks back. (inline)
  2. [SUGGESTION] The new headroom explanation states a mechanism the data doesn't identify — it reads off the QAD row alone, while the W4A16 row in the same table realizes ~65% of its headroom (+0.89 of a possible +1.37), and the preceding clause already calls every delta noise. (inline)
  3. [SUGGESTION] Minor, not worth its own thread: the new cross-reference at line 249 is bold text (see **Output length** below) where this README otherwise uses anchor links for the same job ([setup](#5-evaluation) at line 21, [Potential further improvements](#potential-further-improvements) at line 60). [**Output length**](#output-length) would make it clickable in a 400-line file.

Verified this round

  • The YAML change is inert and correctly indented. scicode.yaml:89-91 adds only comments. # presence_penalty: 1.5 sits at 12 spaces, matching its sibling chat_template_kwargs, so stripping # yields a valid sibling key under params_to_add — the "uncomment" instruction works literally, with no re-indentation.
  • Both new cross-references resolve. #### Output length is at line 301; the pointer at line 249 is above it, so "below" is right, and the yaml comment's "Output length" matches the heading text verbatim.
  • No stale copy of the revised baseline. The BF16 generation time that moved between commits (1,312 → 1,464) appears only in the new table — grep finds no surviving 1,312 anywhere in the tutorial.
  • params_to_add is real and correctly located — present under adapter_config in all six configs (scicode.yaml:86, gpqa.yaml:87, ifbench.yaml:85, mmmu_pro.yaml:85, aa_lcr.yaml:92, tau2_telecom.yaml:101). The agent_args claim also checks out: tau2_telecom.yaml:121-123 really does carry top_k: 20 / presence_penalty: 1.5 there.
  • All four without-penalty SciCode values match the headline table (39.9 / 38.5 / 39.1 / 40.2), and the capped counts 20 / 96 are the same figures already at line 320 (0.7% = 20/2704, 3.6% = 96/2704). 338 sub-steps × 8 runs = 2,704.
  • Generation-time span recomputes correctly: −20.9%, −33.0%, −11.8%, −43.8% → "12-44% faster" is right against the revised BF16 baseline.
  • The revised BF16 time is the more coherent one. Gen-time ratios vs BF16 (W4A16 1.42×, W4A4 1.14×, QAD 1.60×) divided by the completion-token ratios from line 307 imply W4A16 decoding slower per token than BF16 and W4A4 faster — which is exactly what the throughput table at lines 66-75 reports (W4A16 slower than BF16 in 10 of 12 shapes; W4A4 at 1.12-1.14×). W4A4 and QAD, same precision, land at 1.10× and 1.19× of each other.
  • max_new_tokens: 131072 at scicode.yaml:72 matches the cap the capped definition cites.
  • "Run-to-run noise" is supported by the file's own spreads — SciCode sem ≈ 0.5-0.7 per side puts the difference-of-means sem near 0.85, so both +0.89 and −0.59 sit inside 1 sem.
  • The GPQA scoping caveat (4.2× slower, don't globalize) plus the new "pure cost" pointer at line 250 remain the most valuable part of the addition — a reader can no longer take the section as a blanket recommendation.

Not verified

  • The arXiv:2606.00206 citation (title, authors, characterization of the hesitation-marker penalty) — WebFetch permission was not granted in this run either, so this stays unconfirmed for the third round. Worth one manual click before merge, since it's a public NVIDIA tutorial.
  • Claims with no repo-side source: the 4.2× GPQA slowdown, the capped counts for the two rows not already in the file (W4A16 37, W4A4 32), and presence_penalty: 1.5 being Qwen's thinking-mode recommendation for this model. These rest on the author's 49 evaluation runs and the model card.

Risk

Minimal. Documentation-only, no code, no public API or state-schema surface, backward compatible, and the one behavioral knob it introduces ships commented out so the published configs still reproduce the results table. Every numeric cross-check I could run against the file and the six configs is now self-consistent. The three findings are clarity improvements — a stale duplicate comment in a sibling config, one over-stated causal claim, and a non-clickable link — none of which block merge.

🤖 Generated with Claude Code

kevalmorabia97 and others added 2 commits September 30, 2026 16:11
The headroom note concluded that recovered sub-steps "still fail their
tests". That reads off the QAD row alone: W4A16 recovers 37 caps against
+1.37 pp of headroom and measures +0.89, about 65% realized. Since the
preceding clause calls every delta run-to-run noise, no mechanism is
identifiable here -- say the score does not move and that the two
explanations are not separable at this noise level.

tau2_telecom.yaml still carried the causation the README walked back last
commit ("which is why the other five configs omit them"). Aligned, so the
two copies agree.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
The mitigation table reported wall-clock, which reads as the model becoming
more concise. It does not: the median response is flat or slightly longer on
three of four builds, and the 33-55% fall in mean tokens is entirely the
runaway tail disappearing.

Swap the generation-time column for mean and median completion tokens so both
are visible, and say what they mean together. Also note the limit: QAD's
median stays +71% over BF16 with the penalty on, against +91.6% without, so
the distribution shift the section already documents survives the mitigation.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
@kevalmorabia97

Copy link
Copy Markdown
Collaborator Author

/claude review

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review passed — no blocking issues found. LGTM

Scope: full review. 3 files changed (+32/−6), all documentation: the Qwen3.6-35B-A3B tutorial README.md plus comment-only edits to eval_configs/scicode.yaml and eval_configs/tau2_telecom.yaml. No code paths touched, so the Algorithm / Mode-State / Export / Compatibility / Performance categories have no surface here.

Findings — CRITICAL: 0, IMPORTANT: 0, SUGGESTION: 3

All three are documentation-precision points; none block.

  1. Mean-token anchor disagrees between adjacent tables — the new table's BF16 SciCode mean is 5,337 where line 307 says 5,348. The new value is the correct one: the +22.9% / +25.5% / +90.9% figures already in the doc all reproduce against 5,337 and none reproduce against 5,348 (10,186/5,348 = +90.5%). The headline +90.9% is therefore inconsistent with the anchor printed beside it.
  2. 4.2× slower vs 12-44% faster needs a cost model — the most substantive one. A fixed per-token overhead is ruled out by the PR's own data (0.455× tokens × 4.2 ≈ 1.9×, i.e. slower, vs the measured 0.56×), so GPQA's slowdown is most likely length growth on a benchmark that never caps. If so that strengthens the "don't make it a global default" conclusion rather than just qualifying it.
  3. 2,704 denominator vs the new "338 sub-steps" definition — worth spelling out as 338 × 8 runs, since defining the unit where it's used is this PR's own goal; it also clarifies the capped counts are pooled, not per-run.

What checks out

  • The new table is internally consistent throughout: accuracy deltas (0.0 / +0.9 / 0.0 / −0.6) match the stated −0.59 to +0.89 span; 96 → 2 gives 94 recovered = 3.5 pp of 2,704; mean drops span 33-55%; median is up on three of four builds; QAD median +71% with the penalty (3,302/1,927) against +91.6% without (3,482/1,817), both matching the text.
  • Left-hand column matches the main results table exactly (39.9 / 38.5 / 39.1 / 40.2), so the "shipped config reproduces the table above" claim holds.
  • scicode.yaml: the commented presence_penalty: 1.5 sits at 12 spaces, a correct sibling of chat_template_kwargs under adapter_config.params_to_add — uncommenting yields valid YAML at the path the README tells you to use.
  • "the other five configs omit them deliberately" is accurate: of the six configs, only tau2_telecom.yaml sets top_k/presence_penalty, and it does so via params.extra.agent_args, not params_to_add — so the new ns_* sentence doesn't contradict it.
  • #### Output length exists at line 301, so both new cross-references resolve.

Two notes, no action needed in the diff

  • The PR description's table is stale relative to the README it ships: it gives BF16 SciCode as 40.8 → 39.9 and the delta span as −0.95 to +0.89, where the README has 39.9 → 39.9 and −0.59 to +0.89. The README is self-consistent and is the deliverable; worth refreshing the description so reviewers aren't comparing against superseded numbers.
  • I could not verify the arXiv:2606.00206 citation (title, first author) — web fetch wasn't available in this environment, and the paper postdates my knowledge cutoff. Flagging only so someone confirms the identifier resolves; I am not asserting it is wrong.

Risk: very low. Documentation-only, backward compatible, and the behavioral change it documents is shipped commented-out so existing reproductions are unaffected.

🤖 Generated with Claude Code

… above

The new mean-token column was pooled per sub-step from output.jsonl, which
runs ~0.2% below the avg_completion_tokens figures the verbosity table uses,
so BF16 read 5,337 against 5,348 twenty lines apart. Switch the means to
avg_completion_tokens; BF16 now reads 5,348 and QAD/BF16 recomputes to the
published +90.9%. Medians still come from output.jsonl, the only place they
exist, and the text now says so.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
@kevalmorabia97

Copy link
Copy Markdown
Collaborator Author

/claude review

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude review — 0 CRITICAL, 2 IMPORTANT, 3 SUGGESTION

Scope. Full review; the trigger comment carried no extra scoping. Docs-only PR — 3 files (README.md +28/−5, eval_configs/scicode.yaml +3/−0, eval_configs/tau2_telecom.yaml +3/−1), no code paths touched, so mode/state, export, backward-compat, and algorithm-correctness do not apply. I re-verified every number in the new table against the rest of the tutorial.


Prior round's findings are resolved

All three SUGGESTIONs from the review at 3a05732 are addressed in 2fdf406:

  • tau2_telecom.yaml still carried the retracted claim — fixed. tau2_telecom.yaml:18-20 now matches the README: the params block is the mechanism, deliberate reproduction is the motive.
  • Headroom explanation asserted a mechanism the data could not identify — fixed. Line 336 now says the two candidate explanations are "not separable at this noise level", which is what the ±0.9 spread supports.
  • Cross-reference as bold text rather than an anchor link (line 249) — not taken; it was minor and I am not re-raising it.

The 948d3d9 IMPORTANT (BF16 row contradicting the file's own baseline) remains fixed.


Findings

[IMPORTANT Documentation] — the new sub-step definition contradicts the new denominator (inline)

This PR adds both halves of a mismatch that did not exist before it. Line 318 introduces "SciCode splits its 80 problems into 338 sub-steps"; line 327 says "the denominator is 2,704 sub-steps". Both are right in their own frame (2,704 = 338 × 8 runs) but nothing bridges them. That matters because the table's capped column and the claim at line 336 are only interpretable against the right denominator — read against 338, the QAD recovery becomes 94/338 = 27.8 pp instead of 3.5 pp, and 3.5 pp is exactly what makes "the score does not move" the interesting result. Making the multiplication explicit fixes it in one clause.

[IMPORTANT Documentation] — the PR description still quotes numbers the README has since retracted

The description's table reads BF16 ... 40.8 → 39.9 and "deltas span −0.95 to +0.89". The README now reads 39.9 → 39.9 and "−0.59 to +0.89" — the 40.8 was corrected after the first review round precisely because it contradicted the headline table's 39.9 ± 0.6. The BF16 generation time (1,312 → 1,158) is likewise the pre-correction value; 1,464 is the one that landed. Nothing shipped is wrong, but the description is the permanent record of what was measured, this repo's CLAUDE.md treats it as a deliverable, and it currently disagrees with the merged doc on the teacher's headline score. Worth a one-pass edit before merge.


Suggestions

  1. The 4.2× GPQA slowdown has no mechanism attached (inline) — a decode-time logit penalty costs nothing to compute, so the only plausible driver is longer output; saying so is worth a clause, and it is the counterintuitive half of the result.
  2. "wall-clock generation drops 12-44%" is now unverifiable in-doc (inline) — the Generation time (s) column it was read off was replaced by the mean/median columns this round. Good trade, orphaned claim.
  3. Line 342 says "add it" where the config now ships it commented out (inline) — "uncomment" is shorter and avoids a duplicate key at the wrong indent.

Verified

  • Every figure in the new table reconciles with the table above it. Mean tokens 5,348 / 6,572 / 6,713 / 10,209 reproduce that table's BF16 baseline and its +22.9% / +25.5% / +90.9% deltas exactly.
  • Medians are self-consistent. 3,482/1,817 = +91.6% matches the pre-existing bullet; 3,302/1,927 = +71.4% matches the quoted "+71%". Three of four builds do move up, as claimed.
  • Mean drops are 32.9-54.5% → "33-55%". Accuracy deltas round to 0.0 / +0.9 / 0.0 / −0.6 → "−0.59 to +0.89". Recovery 96−2 = 94, and 94/2,704 = 3.47 pp → "+3.5 pp".
  • Independent corroboration I had not expected to find: with the penalty on, QAD's mean is +29.3% over BF16, against the pre-existing "excluding capped sub-steps it is +30.4%". The decode-time fix lands within 1.1 pp of where the offline capped-exclusion analysis said it should — a strong consistency check on the whole story.
  • scicode.yaml indentation is correct. The commented presence_penalty: 1.5 sits at the same 12-space level as chat_template_kwargs, so uncommenting yields a valid sibling key under params_to_add, not a nested one under chat_template_kwargs.
  • params_to_add remains the right schema hook — present under adapter_config in all six eval configs, so the note at lines 248-250 and the PR description's snippet are both accurate.
  • 338 sub-steps is the correct SciCode figure (80 main problems, 338 subproblems), so the definition itself is right — only its juxtaposition with 2,704 needs the bridge.

Not verified: the new citation (arXiv:2606.00206, Lotfi et al.) — I could not fetch it in this environment, so its title, authorship, and the characterisation of its hesitation-marker penalty are taken on the author's word. The surrounding comparison is appropriately scoped to "we tested their penalty here", which is the author's own measurement either way.


Risk: low. Documentation only; no code, and no config default changed (the new presence_penalty ships commented out, so existing reproductions stay bit-identical). The technical content is unusually well cross-checked — the +29.3% / +30.4% agreement above is the kind of thing that only lines up when the underlying measurements are real. Both IMPORTANT findings are presentation-level and fixable in a handful of lines.

…ig line

The capped column's 2,704 denominator sat nine lines below the new "338
sub-steps" definition with nothing connecting them, so the counts read as
per-run. Say they are pooled over the 8 runs.

The companion config already ships `presence_penalty: 1.5` commented out, so
the instruction is to uncomment it, not to hand-write the key next to the
block that already has it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
The section asserted a GPQA slowdown with no mechanism, next to a SciCode
speedup, and the two read as contradictory. They are not: the penalty has a
throughput cost that scales with concurrency, and SciCode repays it in tokens
it stops emitting.

Re-measured both sides on single-Slurm-segment runs so neither figure carries
requeue overhead: GPQA 5,109 -> 1,067 tok/s (4.8x) at parallelism 32, SciCode
1,475 -> 1,192 (1.24x) at parallelism 8. Add the table and the rule it
implies -- the penalty pays for itself only where it removes enough tokens to
cover its rate cost. The per-sequence-per-vocab attribution is flagged as
inference, since we measured the correlation with parallelism and not the
implementation.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
@kevalmorabia97
kevalmorabia97 merged commit bc1e8db into main Oct 2, 2026
37 checks passed
@kevalmorabia97
kevalmorabia97 deleted the kmorabia/scicode-verbosity-mitigation branch October 2, 2026 08:15
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-02 08:15 UTC

kevalmorabia97 added a commit that referenced this pull request Oct 26, 2026
… Omniscience calibration, announcement update (#2899)

### What does this PR do?

Type of change: documentation

Follow-up to #2835. Adds a controlled rerun to the Qwen3.6-35B-A3B
data-format ablation and corrects its kernel caveat.

- **Correction.** #2835 said the packed chat-SFT runs had a *noisy*
teacher. They had a *wrong* kernel. In FLA 0.4.2 (`nemo:26.08`),
`chunk_gated_delta_rule` on packed (`cu_seqlens`) input disagrees with
each document run alone. It affects both the teacher and the student:
- 11% of tokens are off by more than 1% of the layer output's maximum,
and the worst by ~20%.
  - FLA 0.5.2 is bit-exact and reproducible.
  - The pre-tokenized (unpacked) runs are exact on both versions.
  - FLA 0.4.2's KDA kernel is also exact on packed input.
- **Controlled rerun at iteration 50.** Three arms separate
cross-document attention, the loss mask and the kernel. Mean delta vs
BF16 over the six benchmarks:
  - A, pre-tokenized (the main run): −1.30
  - B, + per-document attention: −0.85
  - C, chat SFT with assistant-only loss on FLA 0.5.2: −1.02
  - Chat SFT on FLA 0.4.2 (from #2835): −0.34
- **Reading.**
  - All three setups are within noise of each other.
- The correct kernel did not reproduce chat SFT's iteration-50 lead. C
is 0.68 lower, mostly on SciCode, and not because of runaway generations
(C has the lowest capped rate, 2.0%).
- So the earlier −0.34 was a favourable draw, consistent with its lead
fading by iteration 300.
- **Recipe unchanged:** pre-tokenized windows, no document boundaries.
No code changes: neither per-document attention nor the FLA upgrade is
needed for it.
- **README:** two pointer sentences updated; drops "provisionally".
- **Knowledge recall and calibration (new README section +
`eval_configs/omniscience.yaml`).** AA-Omniscience, 600 questions x 10
repeats, `pass@1[avg-of-10]`, Gemini 3 Flash judge:

  | Model | Correct | Abstained | Index | Hallucination |
  | --- | --- | --- | --- | --- |
  | BF16 | 21.0 | 46.0 | -11.3 | 40.9% |
  | W4A16 PTQ (published) | 20.9 | 42.2 | -15.4 | 45.8% |
  | W4A4 PTQ | 20.2 | 39.8 | -19.1 | 49.2% |
  | + QAD 500 | 21.0 | 29.8 | -27.5 | 61.4% |

QAD keeps the correct rate but makes the model guess instead of
abstaining. It is worst at iteration 50 (-31.4), partly recovers by 300
(-25.1), and chat SFT at 500 is -24.1. ABLATIONS.md gains these rows and
a note on tracking abstention.
- **Announcement (`docs/source/announcements/qwen36-w4a4-qad.rst`)**,
unchanged since #2411: its numbers still match the tutorial, but it
predates the SciCode output-length finding (#2606), the ablations
(#2835) and this calibration result. Adds a dated update note, two
highlights, a short "Output Length and Calibration" section, and an
ablations link.

### Testing

- Docs only; `pre-commit` (markdownlint) passes; new anchors resolve.
- Omniscience: 7 checkpoints evaluated on oci-hsg (BF16, W4A16, W4A4
PTQ, QAD 50/300/500, chat SFT 500), about 1.5-2 h each on 1 node; the
blog RST parses cleanly with docutils.
- Numbers come from the evaluation pool:
  - accuracy pooled per NEL invocation (same repeat counts as #2835);
  - SciCode capped/median from per-response `output.jsonl`.
- Kernel numbers come from teacher-forcing a real packed pair, then
random-input packed vs per-document checks on FLA 0.4.2 and 0.5.2.

### Before your PR is "*Ready for review*"

- Is this change backward compatible?: N/A
- If you copied code from any other sources or added a new PIP
dependency, did you follow guidance in `CONTRIBUTING.md`: N/A
- Did you write any new necessary tests?: N/A
- Did you update
[Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?:
N/A
- Did you get Claude approval on this PR?: N/A

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Added an Omniscience evaluation configuration with long-context
generation, retries, caching, request logging, and external judging.

* **Documentation**
* Expanded evaluation guidance with recall, calibration, abstention,
hallucination, output length, and SciCode findings.
* Documented controlled comparisons across tokenization, kernel
versions, document isolation, loss settings, and data approaches.
* Added evaluation setup requirements, repeat semantics, judge
configuration, throughput considerations, FLA correctness guidance, and
links to ablation results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Keval Morabia <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

2 participants