Skip to content

Fix dequant mixed#4675

Open
irexyc wants to merge 7 commits into
InternLM:mainfrom
irexyc:fix_dequant_mixed
Open

Fix dequant mixed#4675
irexyc wants to merge 7 commits into
InternLM:mainfrom
irexyc:fix_dequant_mixed

Conversation

@irexyc

@irexyc irexyc commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Motivation

fix https://huggingface.co/cyankiwi/Qwen3.5-27B-AWQ-4bit loading and inference

Copilot AI review requested due to automatic review settings June 11, 2026 13:05

Copilot AI 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.

Pull request overview

This PR fixes dequantization behavior for compressed-tensors int4 weights in TurboMind, enabling successful loading/inference for the referenced Qwen3.5 AWQ-4bit checkpoint when mixed-format fusion groups require dequantization to a trivial (FP) format.

Changes:

  • Adjust _zeros_int4_symmetric to synthesize zero-points using scales.dtype (avoids uint8 arithmetic wraparound during dequant).
  • Implement CompressedTensorFormat.dequant() to support dequant_mixed() flows for mixed-format fusion groups.
  • Update _dequant_linear docstring to reflect that CompressedTensorFormat.dequant now performs real work.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lmdeploy/turbomind/weight_format.py Fixes synthesized zero-point dtype and adds CompressedTensorFormat.dequant() for mixed dequant paths.
lmdeploy/turbomind/linear.py Updates dequantization documentation to include CompressedTensorFormat.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lmdeploy/turbomind/weight_format.py Outdated
Comment thread lmdeploy/turbomind/weight_format.py Outdated
irexyc and others added 2 commits June 11, 2026 21:13
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.

2 participants