This repository was archived by the owner on May 25, 2026. It is now read-only.
fix: initialize stage_indices in deepseek policy for interleave pipeline#1
Open
AmSach wants to merge 1 commit into
Open
fix: initialize stage_indices in deepseek policy for interleave pipeline#1AmSach wants to merge 1 commit into
AmSach wants to merge 1 commit into
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix: Missing stage_indices in DeepSeek Policy (Issue hpcaitech#6397)
Repo: hpcaitech/ColossalAI
Issue: hpcaitech#6397 — AttributeError: PipelineStageManager object has no attribute stage_indices
What was broken
When running DeepSeek with interleaved pipeline parallelism (--pp_style interleaved --n_chunks 2), the code crashes at interleaved_pp.py:309:
The root cause: in colossalai/shardformer/policies/deepseek.py, the get_held_layers() method's interleave branch never initializes stage_manager.stage_indices. The same code path in deepseek_v3.py (line 120) does initialize it correctly.
How I fixed it
Added one line to get_held_layers() in deepseek.py:
Diff
if stage_manager.is_first_stage(ignore_chunk=True):
Verification
Closes hpcaitech#6397