fix: qwen2_5_7b_squad ckpt robustness thresholds for transformers v5.5#1937
Closed
fix: qwen2_5_7b_squad ckpt robustness thresholds for transformers v5.5#1937
Conversation
- Bump `ci.checkpoint_robustness.hf_kl_threshold` from 9e-3 to 2.5e-2 to tolerate the Phase 4 (vanilla HF forward) numerical drift introduced by the transformers v5.5 upgrade (#1734), matching the precedent set by #1867 (qwen3_moe, gpt_oss) and #1932 (gemma_3_270m_squad). - Add `ci.checkpoint_robustness.resume_loss_threshold: 5e-2` to tolerate the Phase 6 (resume vs continuous-baseline) loss drift observed at TP=2 for this model, following the existing Baichuan 2 7B precedent (examples/llm_finetune/baichuan/baichuan_2_7b_squad.yaml uses the same 5e-2 value for the same check). Phase 3 KL stays at 0 — save/reload is bit-exact — so this is not a checkpoint correctness bug; it is forward-pass + TP=2 bf16 accumulation drift that the pre-v5.5 thresholds no longer accommodate. Signed-off-by: Adil Asif <adasif@nvidia.com> Signed-off-by: adil-a <adil.asif2000@hotmail.com>
This was referenced Apr 21, 2026
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ci.checkpoint_robustness.hf_kl_thresholdinexamples/llm_finetune/qwen/qwen2_5_7b_squad.yamlfrom9e-3to2.5e-2and addresume_loss_threshold: 5e-2, to restore theqwen2_5_7b_squad/sft_ckpt_robustnessCI job that started failing after the transformers v5.5 upgrade (ci: Update to transformers v5.5 #1734).baichuan_2_7b_squad.yamlprecedent forresume_loss_threshold: 5e-2on TP=2 SFT.Evidence
Pre-fix, CI job 301287531:
Phase 3 (automodel-from-consolidated) KL is exactly 0, so the save/reload path is bit-exact. Phases 4 and 5 also pass in the CI run. The failure is Phase 6 (training resumption) with the 5e-3 default
resume_loss_threshold. Reproducing on cw-dfw 8xH100 with transformers 5.5.0 and the CI launcher overrides (--step_scheduler.max_steps 5 --step_scheduler.ckpt_every_steps 5 --step_scheduler.val_every_steps 5 --step_scheduler.global_batch_size 32 --step_scheduler.local_batch_size 2) shows the same failure mode — Phase 6 loss diffs drifting between runs and occasionally exceeding 5e-3; multiple runs also showed Phase 4 HF KL drifting up to ~1.1e-2 above the 9e-3 threshold. This is the same kind of forward-pass + optimizer-step numerical drift (TP=2 bf16 accumulation + v5.5's revised Qwen2 HF forward) that the sibling PRs already addressed via threshold bumps.Post-fix verification on cw-dfw 8xH100 (transformers 5.5.0, same CI overrides):
Test plan