feat: add end-to-end vLLM W4A8+FP8 mixed quantization pipeline #255
Merged
Conversation
yghstill
reviewed
Mar 10, 2026
| print("\n" + "=" * 80) | ||
| print("Calibration completed successfully!") | ||
| print(f"Results saved to: {output_dir}") | ||
| print("=" * 80) |
|
|
||
| return {"activation_stats": activation_stats, "moe_stats": moe_stats} | ||
|
|
||
| def quantize( |
Collaborator
There was a problem hiding this comment.
quantize函数能否抽象到compressor/quant文件夹
Collaborator
Author
There was a problem hiding this comment.
quantize是一个engine中控制顶层流程的函数,感觉还是放到engine里会比较好;把quantize下的_moe_expert_stats_to_input_scales函数移到quant文件夹下了,精简了engine中quantize的代码数量。
|
|
||
|
|
||
| @dataclass | ||
| class CalibrateConfig: |
Collaborator
There was a problem hiding this comment.
CalibrateConfig能不能放在QuantizationConfig下,类似quant_method
-->calibrate_method
Collaborator
Author
There was a problem hiding this comment.
CalibrateConfig移到CompressionConfig下了,和QuantizationConfig并列,这样层级关系会不会更好一点
yghstill
previously approved these changes
Mar 10, 2026
yghstill
approved these changes
Mar 11, 2026
dawnranger
pushed a commit
to dawnranger/AngelSlim
that referenced
this pull request
Mar 11, 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.
feat: add end-to-end vLLM W4A8+FP8 mixed quantization pipeline for DeepSeek V3
Major changes:
weight_quantize.py: standalone weight quantization module supportingFP8 blockwise and INT4 symmetric per-group quantization with multi-process
parallel processing on safetensors files (no full HF model loading required)
VLLMCalibrateEngineinengine.py: unified engine for vLLM-basedcalibration (activation/MoE stats collection) and weight quantization,
with support for skipping calibration when stats already exist
CalibrateConfiginconfig_parser.py: YAML-driven calibration config(backend, tp_size, max_num_seqs, etc.) integrated into FullConfig
pack_weight_to_int8_gpu()inpacking_utils.py: pure PyTorchGPU-accelerated INT4→INT8 packing (no numpy dependency)
deepseek_r1_w4a8_fp8_vllm.yamland shell script forDeepSeek R1 W4A8+FP8 quantization workflow
tools/run.pyviavllm_calibrate_run()tools/run_vllm_calibrate.py(consolidated into engine)