fix inference crashed on v100 with qwen3.5-0.8b#4420
Merged
lvhan028 merged 1 commit intoInternLM:mainfrom Mar 18, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a V100 (SM70) decoding-time crash observed with Qwen3.5-0.8B by reducing resource usage in the SM70 HeadDim=256 decoding kernel and by improving Qwen3.5 weight export handling when embeddings are tied.
Changes:
- Tune SM70 HeadDim=256 decoding kernel parameters (CTA_S and staging) to reduce shared-memory usage and avoid runtime launch failures.
- For Qwen3.5 export, honor
tie_word_embeddingsby mapping the output head weight to the token embedding weight.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/turbomind/kernels/attention/kernel/decoding_sm70_256.cu | Lowers SM70 decoding kernel tile size / stages to reduce shared-memory footprint and prevent V100 launch aborts. |
| lmdeploy/turbomind/deploy/source_model/qwen.py | Sets output_weight_key to embeddings when tie_word_embeddings is enabled for Qwen3.5 export. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| @@ -12,9 +12,9 @@ | |||
| namespace turbomind::attention { | |||
|
|
|||
| constexpr int kHeadDim = 256; | |||
| self.tok_embeddings_key = 'model.language_model.embed_tokens.weight' | ||
| self.norm_weight_key = 'model.language_model.norm.weight' | ||
|
|
||
| tie_word_embeddings = self.model_cfg.get('tie_word_embeddings', False) |
3 tasks
lzhangzz
approved these changes
Mar 18, 2026
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.
No description provided.