Fix critical quantization parameter bugs in AWQ and NVFP4#6
Conversation
Root Cause #1: Invalid parameter name 'dataset_split' - LLM-Compressor's oneshot() expects 'splits' not 'dataset_split' - The parameter must be a dict: {"calibration": split_name} - This was causing: ValueError: Some keys are not used by the HfArgumentParser: ['dataset_split'] Root Cause #2: Inverted symmetric/zero_point logic - AWQ config had: "symmetric": config.zero_point - Correct: "symmetric": not config.zero_point - When zero_point=True → asymmetric quantization → symmetric=False - When zero_point=False → symmetric quantization → symmetric=True - This bug caused incorrect quantization configuration Changes: - AWQ: Fixed splits parameter format (line 151) - AWQ: Fixed symmetric parameter logic (line 111) - NVFP4: Fixed splits parameter format (line 225) Both quantizers now use the correct LLM-Compressor API format. Tested with: llmcompressor 0.8.1, wikitext dataset
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a critical bug in AWQ quantization configuration and updates the API parameter name for dataset splits to match the llm-compressor library interface.
- Fixed inverted logic for the
symmetricquantization parameter - Updated
dataset_splitparameter tosplitsdictionary format for both AWQ and NVFP4 quantizers - Removed trailing whitespace for code consistency
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Automated review 🤖 Summary of Changes Key Changes & Positives
Potential Issues & Recommendations
Language/Framework Checks
Security & Privacy Build/CI & Ops Tests
Approval Recommendation
|
Root Cause #1: Invalid parameter name 'dataset_split'
Root Cause #2: Inverted symmetric/zero_point logic
Changes:
Both quantizers now use the correct LLM-Compressor API format.
Tested with: llmcompressor 0.8.1, wikitext dataset