Repository navigation
Add Cascade-KTO ablation study - #3692
danielkorzekwa wants to merge 11 commits into
Conversation
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3692 +/- ##
==========================================
- Coverage 82.57% 80.16% -2.41%
==========================================
Files 731 737 +6
Lines 83388 94951 +11563
==========================================
+ Hits 68857 76121 +7264
- Misses 14531 18830 +4299
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Bot review (gpt-6.2-sol) — DM the bot to share feedback.
Changes requested: the ablation does not document whether both checkpoints used matched evaluation settings, which is necessary to interpret the headline cap-hit reductions.
Needs action:
- Document the evaluation settings and pairing for both checkpoints in
kto_cascade_ablation.md, especially the MMLU-Pro temperature, presence penalty, and output cap. - Identify the Cascade training subset, explain how both label types were selected, and state whether training examples were checked for overlap with evaluation items.
- Label which runner produced each Telecom result and state that the custom-runner accuracy comparison did not establish 2 pp non-inferiority.
No action needed:
- Checked relative links and anchors in source. Reviewed against the supplied
maindiff and guidance; the exact base SHA, pre-commit results, and benchmark runs were not independently verified.
There was a problem hiding this comment.
The ablation is useful, but its "KTO" column doesn't reproduce the main tutorial's numbers for the same checkpoint, and that undercuts the MMLU-Pro headline.
Needs action:
- Explain why the re-evaluated KTO checkpoint differs from the main tutorial's QAKTO column: MMLU-Pro has 37 cap hits here vs 7, AA-LCR is 63.50% vs 68.50%, and SciCode is 1 vs 0 cap hits. Then link both checkpoints' eval configs. See the inline comment.
- Reconsider the MMLU-Pro headline. Against the main tutorial's 7/24,064, 2/24,064 is likely not significant. See the inline comment.
- Pick one layout for
kto/ABLATIONS.mdtogether with #3682. That PR puts the loop-escape ablation directly inABLATIONS.md, while this one makes it an index overablations/*.md. Whichever merges second conflicts and leaves the two inconsistent. - Name the Cascade dataset and subset, and say whether it overlaps IFBench / MMLU-Pro. In-domain instruction data would explain the IFBench gain. I agree with meenchen's thread on line 12.
- Fill in the PR template checklist.
No action needed:
- I recomputed the cap-hit rates and the unweighted averages (accuracy 65.80% / 65.94%, cap hits 1.00% / 0.16%) from the counts, and they match.
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
Separius
left a comment
There was a problem hiding this comment.
construction of the dataset was missing before and now it is included, LGTM.
Signed-off-by: Daniel Korzekwa <dkorzekwa@nvidia.com>
meenchen
left a comment
There was a problem hiding this comment.
Bot review (gpt-6.2-sol) — DM the bot to share feedback.
Changes requested: the new Gym configs document the decoding settings, but the study still does not explain how it paired observations for its significance tests.
Needs action:
- 💬 The Gym configs now show the sampling settings. In
kto_cascade_ablation.md, state how questions and repeats were matched across checkpoints and what unit the statistical tests used. - 💬 The data-preparation section now identifies the subset and both label sources. State whether Cascade training examples were checked for overlap with evaluation items, especially IFBench and MMLU-Pro.
- 💬 The custom Telecom rows now link to the runner description. Label the native Gym accuracy and token rows, and state that the custom runner did not establish 2 pp accuracy non-inferiority.
No action needed:
- ✔️ The headline now names MMMU-Pro, the AA-LCR discrepancy is documented, and the PR checklist is filled in.
|
|
||
| ## Experiments and results | ||
|
|
||
| We use the same results analysis as the [main KTO tutorial](../README.md#experiments-and-results). Both checkpoints were evaluated again using the [NeMo Gym configs](nemo_gym/). We used NeMo Gym because the NeMo Evaluator Launcher (NEL) evaluation protocol used for the main tutorial had been deprecated and was no longer available to us. All differences are Cascade-KTO − KTO. |
There was a problem hiding this comment.
Bot comment.
The shared YAML and benchmark overrides now document the requested settings, including MMLU-Pro at temperature 0.6, presence penalty 0, and a 131,072-token output cap. They don't show how the saved observations were joined for the paired tests. Please state the actual pairing key (e.g., item ID plus seed or repeat index) and whether the tests and intervals treated questions/tasks or individual rollouts as the statistical unit. That distinction matters for the headline p-values because each question has multiple rollouts.
|
|
||
| Of 202 candidate positives, one exceeded the 32,768-token limit for the prompt and response, leaving 201. We selected 197 to match the 197 negatives. The final set contains 176 QAD-baseline answers and 21 Cascade reference answers. Reference answers were used for prompts where the saved QAD response hit the output-token limit. | ||
|
|
||
| The [training data manifest](kto_cascade_training_examples.json) lists source records and seeds for the 197 positive responses and 197 looping prefixes. |
There was a problem hiding this comment.
Bot comment.
The pinned manifest and the new selection description establish the training provenance, but neither says whether these prompts were checked against the evaluation items. Since the training subset includes instruction-following examples and IFBench is a headline result, please report the scope and outcome of any overlap check, or explicitly say overlap was not checked and remains unknown.
|
|
||
| ### Check for regressions | ||
|
|
||
| At p < 0.05 per comparison, all eight benchmarks in the accuracy table pass the 2.0 pp non-inferiority check; five pass at 1.0 pp. |
There was a problem hiding this comment.
Bot comment.
The custom-runner cap-hit and non-inferiority rows are labeled now, but the Telecom accuracy and token rows still don't name their runner. Please label those as native Gym and explicitly state that the custom run's p=0.335 did not establish 2 pp accuracy non-inferiority. The linked tutorial explains NEL's retry behavior, but it doesn't map the runners to this study's tables.
What does this PR do?
Type of change: Documentation
Problem: The main KTO tutorial does not compare its KTO checkpoint with KTO trained on Cascade examples, or provide the corresponding evaluation configs and training-example references.
Fix: Add the Cascade-KTO study with paired accuracy, cap-hit rates, missing final answers, abstention and completion-token use. Include the 197 positive and 197 negative training-example references and one NeMo Gym config per benchmark, with shared settings and usage instructions.
Usage
Read the Cascade-KTO study and NeMo Gym setup instructions. The Gym instructions list the required saved inputs and endpoints.
Testing
Before your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True,torch.load(..., weights_only=False),pickle, etc.).CONTRIBUTING.md: N/AAdditional Information
The comparison uses different training-data sizes and update counts, so it does not isolate the effect of the data source.
Summary by CodeRabbit