Skip to content

fix(deepseek): guard missing quant weight_block_size#261

Open
mesaleh wants to merge 1 commit into
lightseekorg:mainfrom
mesaleh:fix/deepseek-quant-weight-block-size-guard
Open

fix(deepseek): guard missing quant weight_block_size#261
mesaleh wants to merge 1 commit into
lightseekorg:mainfrom
mesaleh:fix/deepseek-quant-weight-block-size-guard

Conversation

@mesaleh
Copy link
Copy Markdown

@mesaleh mesaleh commented May 26, 2026

Summary

  • use getattr(..., "weight_block_size", None) before reading quant_config.weight_block_size
  • keep the existing default quant_block_size = 1 behavior when the quant config does not expose that attribute

Motivation

Some quantization config implementations do not define weight_block_size. The current DeepSeek/Kimi loader path assumes the attribute exists before indexing it, which can fail during NVFP4 model loading.

Validation

  • python3 -m compileall -q python/tokenspeed/runtime/models/deepseek_v3.py
  • Hit and validated locally while bringing up Kimi K2.6 NVFP4 under TokenSpeed

Signed-off-by: Moustafa Saleh <moustafa.saleh@omniva.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant