[feat] For FP8 models, keep layers specified in `ignore_layers` in their original FP8 format
For Deepseek v32 and similar FP8 models, it is preferable to keep layers specified in ignore_layers (such as indexer or attn) in their original FP8 format, rather than dequantizing them to BF16.
Expected behavior:
AR_LOG_LEVEL=TRACE auto_round --model /models/Qwen3-8B-FP8 --ignore_layers "attn"
All layers within attention (matching "attn") should remain in FP8 format, not be dequantized to BF16 or float.
Depends on https://github.com/intel/auto-round/issues/1283
cc @wenhuach21 @thuang6 @xin3he
@yiliu30 I had tried to copy fp8 mtp and it doesn't work for vLLM. The quantization_config of fp8 would be overwritten by AutoRound, I think it causes a failure to load fp8 tensors.
这个功能可以通过在dequantize逻辑中添加layer name匹配来实现。建议在ignore_layers处理时使用前缀匹配(如'attn'匹配所有包含'attn'的layer name),参考similar models的处理方式。可以在量化器初始化时构建一个ignore set,dequantize时检查是否在set中。
It would be helpful if you could provide a case using mixed FP8 and AutoRound quantization_config that had been verified with vLLM. Otherwise, I would prefer to close it.
@yiliu30 I had tried to copy fp8 mtp and it doesn't work for vLLM. The quantization_config of fp8 would be overwritten by AutoRound, I think it causes a failure to load fp8 tensors.
what's your meaning of overwritten? I guess the reason is AutoRound does not support FP8, but we do have plans to support this feature on vLLM, right? @thuang6
AR_LOG_LEVEL=TRACE auto_round --model /models/Qwen3-8B-FP8 --ignore_layers "attn"
@wenhuach21
This command is quantizing fp8 to W4A16, and the quantization_config of original fp8 model will be overwritten by AutoRound W4A16 quantization_config.
https://huggingface.co/Qwen/Qwen3-8B-FP8/blob/main/config.json#L30
AR_LOG_LEVEL=TRACE auto_round --model /models/Qwen3-8B-FP8 --ignore_layers "attn"@wenhuach21 This command is quantizing fp8 to W4A16, and the quantization_config of original fp8 model will be overwritten by AutoRound W4A16 quantization_config. https://huggingface.co/Qwen/Qwen3-8B-FP8/blob/main/config.json#L30
then it is expected. We need to mark the FP8 layers as FP8 in extra_config in AutoRound config.
This is a useful feature for FP8 models like DeepSeek v32!
Implementation approach:
- Check if the model is already in FP8 format before applying ignore_layers
- Modify the dequantization logic in auto_round.py to skip layers matching ignore_layers when they are originally FP8
- Add a format check (e.g., check if weight tensor dtype is fp8) before dequantizing
The key is to preserve the original quantization state for matched layers instead of forcing dequantization to BF16. You might want to add a flag like preserve_fp8=True when ignore_layers patterns match.
Looking forward to this feature - it will be very helpful for FP8 deployment workflows!
@passionworkeer The main issue could be the ecosystem, we need to ensure the mixed-precision model works well with transformers and vLLM at least. I'm afraid that this simple change won't work. https://github.com/intel/auto-round/pull/1511
We would prioritize mixing the FP8 mtp with W4A16 model for Qwen3.5-35B-A3B related to this issue https://github.com/intel/auto-round/issues/1477
This issue has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this issue should remain open. Thank you!
keep the issue open
This issue is marked stale after 60 days of inactivity and will be closed in 21 days unless there is new activity.