fix(parallel): shard SwiGLU weights in six model families - #1237
fix(parallel): shard SwiGLU weights in six model families#1237chaofengw-nv wants to merge 6 commits into
Conversation
Slice gate and up projections along their output dimension and the down projection along its input dimension so rank-local weights match the reduced MLP width. Add family-owned numerical regression coverage for TP 1, 2, 4, and 8 without changing E2E passing criteria. Signed-off-by: chaofengw <chaofengw@nvidia.com>
Slice gate and up projections along their output dimension and the down projection along its input dimension so rank-local weights match the reduced MLP width. Add family-owned numerical regression coverage for TP 1, 2, 4, and 8 without changing E2E passing criteria. Signed-off-by: chaofengw <chaofengw@nvidia.com>
Slice gate and up projections along their output dimension and the down projection along its input dimension so rank-local weights match the reduced MLP width. Add family-owned numerical regression coverage for TP 1, 2, 4, and 8 without changing E2E passing criteria. Signed-off-by: chaofengw <chaofengw@nvidia.com>
Slice gate and up projections along their output dimension and the down projection along its input dimension so rank-local weights match the reduced MLP width. Add family-owned numerical regression coverage for TP 1, 2, 4, and 8 without changing E2E passing criteria. Signed-off-by: chaofengw <chaofengw@nvidia.com>
Slice gate and up projections along their output dimension and the down projection along its input dimension so rank-local weights match the reduced MLP width. Add family-owned numerical regression coverage for TP 1, 2, 4, and 8 without changing E2E passing criteria. Signed-off-by: chaofengw <chaofengw@nvidia.com>
Slice gate and up projections along their output dimension and the down projection along its input dimension so rank-local weights match the reduced MLP width. Add family-owned numerical regression coverage for TP 1, 2, 4, and 8 without changing E2E passing criteria. Signed-off-by: chaofengw <chaofengw@nvidia.com>
|
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 (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 SummarySummaryFixes SwiGLU tensor-parallel sharding for Eagle VLM, GLM, Granite, OLMo, Qwen-VL, and StableLM.
Architecture impactStatus: PASS
WalkthroughChangesSwiGLU tensor-parallel sharding now covers SwiGLU sharding rules
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix 🚥 Pre-merge checks | ✅ 8 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (8 passed)
Comment |
0db4fb0 to
cbbe5c2
Compare
Background
The Eagle VLM, GLM, Granite, OLMo, Qwen-VL, and StableLM tensor-parallel sharders reduce MLP width but leave SwiGLU gate/up/down weights unsharded. This passes full matrices to rank-local graph dimensions and causes reshape failures before inference. The defect is reproducible with small CPU arrays and does not require model downloads.
Exit Criteria
Implementation
Add the missing weight suffixes to each family's existing sharder, with one independently revertible commit per family. Each family owns its regression test; no cross-family model abstraction is introduced. There are no public API, ABI, dependency, or bundle-schema changes.
Change categories
Validation
Commands and Results
python3 -m pytest families/eagle_vlm/tests/test_parallel_swiglu.py families/glm/tests/test_parallel_swiglu.py families/granite/tests/test_parallel_swiglu.py families/olmo/tests/test_parallel_swiglu.py families/qwen_vl/tests/test_parallel_swiglu.py families/stablelm/tests/test_parallel_swiglu.py -q --tb=short: 48 passed after the fix. The same regression cases produced 36 failures and 12 passes before the production change.python3 -m pytest families/eagle_vlm/tests families/glm/tests families/granite/tests families/olmo/tests families/qwen_vl/tests families/stablelm/tests -m 'not e2e and not gpu and not trt' -q --tb=short: 101 passed, 17 skipped; skipped tests require explicit E2E selection/checkpoints.python3 -m pytest tools/tests/test_architecture.py tools/tests/test_family_impact.py tools/tests/test_community_ci.py tools/tests/test_public_source_hygiene.py tools/tests/test_new_ci.py tools/tests/test_pr_metadata.py -q -p no:cacheprovider: 128 passed.ruff check families/{eagle_vlm,glm,granite,olmo,qwen_vl,stablelm}/parallel.py families/{eagle_vlm,glm,granite,olmo,qwen_vl,stablelm}/tests/test_parallel_swiglu.py: passed.python3 -m tools.model_ci validate: passed.git diff --check github/main...HEAD: passed.Hardware, Environment, and Revisions
Tested tree:
cbbe5c24324af75038e8090b036865696fa4221e, based ondddd2663336753c1102e47c281a925d96d899ac2. Linux x86_64, Python 3.12.3, NumPy 2.4.6, pytest 9.0.3; TensorRT 10.16.1.11 is available for imports. New tests use synthetic FP16/FP32 weights and CPU NumPy calculations, not GPU kernels or model checkpoints. CUDA execution was not exercised.Not Run / Remaining Gaps
Target TensorRT 11.1 multi-GPU engine builds, inference, and checkpoint parity still require CI validation. CPU numerical reconstruction is not evidence of GPU E2E, performance, or model qualification. No premerge pass is claimed.
Contributor Self-Review
Checked family mapper weight layouts, rank-local graph dimensions, down-projection all-reduce placement, dtype/contiguity preservation, TP 1 behavior, and unchanged input arrays and replicated weights.
Notes For Future Readers
Review any family sharder together with its local regression test, then check the other family-local commits. Duplication here preserves independent family ownership and rollback. Rebuild affected TP engines to pick up the corrected weight partitioning; the serialized schema does not change. This fixes a deterministic shape defect, not every possible downstream multi-GPU failure.
Risk level
The production diff is small and CPU-reproducible, but it changes rank-local model weights in six families and still needs target-hardware validation.