Skip to content

feat: add support for FP8 model loading and ragged-tile dequantization fallback - #2158

Open
xin3he wants to merge 4 commits into
mainfrom
xinhe/8-14a
Open

feat: add support for FP8 model loading and ragged-tile dequantization fallback#2158
xin3he wants to merge 4 commits into
mainfrom
xinhe/8-14a

Conversation

@xin3he

@xin3he xin3he commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

support deepseek v3.2

Type of Change

Bug fix

Related Issues

Fixes or relates to #

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.
  • The CUDA CI has passed. You can trigger it by commenting /azp run Unit-Test-CUDA-AutoRound.

@xin3he
xin3he requested review from yiliu30 and a lite review from Copilot August 14, 2026 07:27

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 adds first-class support for loading FP8-quantized checkpoints (specifically DeepSeek v3.2) by detecting FP8 quantization from the model config and enabling dequantize-on-load, plus a fallback patch to handle “ragged tile” FP8 scale grids during dequantization.

Changes:

  • Add FP8 model detection via config inspection and automatically pass FineGrainedFP8Config(dequantize=True) during model load (transformers ≥ 4.56.0).
  • Patch transformers’ FP8 dequantization to fall back to AutoRound’s dequantizer when scale-grid divisibility checks fail due to over-provisioned grids.

Reviewed changes

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

File Description
auto_round/utils/model.py Detect FP8 checkpoints (DeepSeek v3.2) and adjust from_pretrained kwargs to enable dequantize-on-load.
auto_round/modeling/fp8_quant.py Add a patch for FP8 ragged-tile dequantization mismatches by falling back to AutoRound’s robust dequantizer.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread auto_round/utils/model.py
Comment thread auto_round/utils/model.py
Comment thread auto_round/modeling/fp8_quant.py
Comment thread auto_round/utils/model.py
@AutoRoundBot

Copy link
Copy Markdown
Collaborator

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

…n fallback

Signed-off-by: Xin He <xin3.he@intel.com>
@AutoRoundBot

Copy link
Copy Markdown
Collaborator

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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.

3 participants