Skip to content

Remove dead prewarm_mhc_token_count_buckets - #26787

Open
yhyang201 wants to merge 2 commits into
mainfrom
fix/remove-dead-prewarm-mhc-token-count-buckets
Open

yhyang201 wants to merge 2 commits into
mainfrom
fix/remove-dead-prewarm-mhc-token-count-buckets

Conversation

@yhyang201

@yhyang201 yhyang201 commented May 30, 2026

Copy link
Copy Markdown
Collaborator

Motivation

DeepseekV4DecoderLayer.prewarm_mhc_token_count_buckets and prewarm_mhc_token_counts are dead code with no callers.

Timeline:

This happened because #25976 was developed in parallel with #26238. When #25976 was merged after #26238, it re-introduced the function definitions based on the older code, but the callers that #26238 had already removed were not restored — resulting in orphaned dead code.

Modifications

Remove prewarm_mhc_token_count_buckets and prewarm_mhc_token_counts from DeepseekV4DecoderLayer (116 lines).

cc @YAMY1234 @Fridge003 @JoeLee314 @ch-wan


CI States

Latest PR Test (Base): ❌ Run #26686294856
Latest PR Test (Extra): ❌ Run #26686294831
Latest PR Test (AMD ROCm 10): ➖ No AMD PR run found for this commit.

PR #25810 introduced the model-level MHC token-count prewarm call chain.
PR #26238 removed all callers by routing MHC prenorm through the unified
DeepGEMM wrapper warmup infrastructure. PR #25976 then re-added the
definition in DeepseekV4DecoderLayer without restoring any caller,
leaving it as dead code. Remove it.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the prewarm_mhc_token_count_buckets method from the DeepSeekV4 model class in python/sglang/srt/models/deepseek_v4.py. There are no review comments, and I have no feedback to provide.

The only caller was prewarm_mhc_token_count_buckets which was removed
in the previous commit.
@b8zhong b8zhong mentioned this pull request Aug 5, 2026
41 tasks
@Jiminator Jiminator closed this Sep 14, 2026
@Jiminator
Jiminator deleted the fix/remove-dead-prewarm-mhc-token-count-buckets branch September 14, 2026 04:42
@alexnails
alexnails restored the fix/remove-dead-prewarm-mhc-token-count-buckets branch September 14, 2026 05:44
@hnyls2002 hnyls2002 reopened this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants