[https://nvbugs/6181383][fix] Build inner text/vision/audio sub-configs as empty PretrainedConfig() then setat - #14399
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR adds a helper function in Mistral config loading to construct PretrainedConfig instances via setattr instead of from_dict, accommodating Transformers' strict dataclass validation. This helper is applied to both vision and audio checkpoint remapping. Additionally, DeepseekV3 weight loader now safely handles missing ChangesMistral PretrainedConfig Construction Helper
DeepseekV3 Safe Config Attribute Access
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
cf2d1a9 to
eda0f73
Compare
803cbe0 to
b43e4db
Compare
|
/bot run |
1 similar comment
|
/bot run |
|
PR_Github #52170 [ run ] triggered by Bot. Commit: |
|
PR_Github #52170 [ run ] completed with state
|
|
/bot run |
|
PR_Github #52242 [ run ] triggered by Bot. Commit: |
|
PR_Github #52242 [ run ] completed with state
|
|
/bot run |
|
PR_Github #52268 [ run ] triggered by Bot. Commit: |
|
PR_Github #52268 [ run ] completed with state
|
|
/bot run --extra-stage "GB200-4_GPUs-PyTorch-Post-Merge-1" |
|
PR_Github #52310 [ run ] triggered by Bot. Commit: |
|
PR_Github #52310 [ run ] completed with state
|
|
/bot run |
|
PR_Github #52355 [ run ] triggered by Bot. Commit: |
|
PR_Github #52355 [ run ] completed with state
|
|
/bot run |
|
PR_Github #52402 [ run ] triggered by Bot. Commit: |
|
PR_Github #52402 [ run ] completed with state
|
|
/bot run |
|
PR_Github #52415 [ run ] triggered by Bot. Commit: |
|
PR_Github #52415 [ run ] completed with state
|
|
/bot run |
|
PR_Github #52472 [ run ] triggered by Bot. Commit: |
|
PR_Github #52472 [ run ] completed with state
|
413e619 to
d154fed
Compare
…5.5.x In transformers 5.5.x, the base PreTrainedConfig is a strict dataclass and unknown kwargs are no longer set as attributes during __init__. They are only assigned at the end of __post_init__, but the rope-standardization path inside __post_init__ runs before that and dereferences self.max_position_embeddings, which is not a declared dataclass field on the base class. The MistralLarge3 vision path passes both rope_scaling and rope_theta into the inner text PretrainedConfig, triggering the path and raising AttributeError. Build the inner text/vision/audio sub-configs by constructing an empty PretrainedConfig (no kwargs -> no rope path) and setattr-ing each entry afterwards, matching the previous behavior where unknown kwargs landed on the instance. Also harden DeepseekV3WeightLoader.detect_shared_mtp_weights to use getattr with a default of None for num_nextn_predict_layers; the new strict dataclass raises AttributeError when the attribute is absent on mistral_large_3 configs, instead of returning None as the prior PreTrainedConfig did. The 'or 0' fallback is preserved. Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
d154fed to
f6056ab
Compare
|
/bot run |
|
PR_Github #52840 [ run ] triggered by Bot. Commit: |
|
PR_Github #52840 [ run ] completed with state
|
|
/bot run |
|
PR_Github #52892 [ run ] triggered by Bot. Commit: |
|
PR_Github #52892 [ run ] completed with state |
…gs as empty PretrainedConfig() then setat (NVIDIA#14399) Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
Summary
Test plan
Links
Summary by CodeRabbit