Skip to content

feat(quantization): rewrite quantize_model.py with full algorithm sup…#35

Draft
luozixin2 wants to merge 1 commit intoSJTU-DENG-Lab:feat/quantfrom
luozixin2:feat/quant
Draft

feat(quantization): rewrite quantize_model.py with full algorithm sup…#35
luozixin2 wants to merge 1 commit intoSJTU-DENG-Lab:feat/quantfrom
luozixin2:feat/quant

Conversation

@luozixin2
Copy link
Collaborator

…port

  • Support quant_method: rtn, gptq, awq, gptq_marlin, awq_marlin
  • Implement RTN quantization (no calibration)
  • Implement GPTQ with Hessian-based error compensation
  • Implement AWQ with activation-aware scaling
  • Add Marlin repack for gptq_marlin and awq_marlin
  • Correct pack functions for GPTQ and AWQ formats
  • Full calibration data pipeline for diffusion models
  • CLI interface with all parameters
  • AutoModel support for DiffusionLM

Bug fixes:

  • Add missing shutil import
  • Fix load_file usage (no context manager)
  • Fix attention_mask dtype to bool
  • Fix AutoModel import

…port

- Support quant_method: rtn, gptq, awq, gptq_marlin, awq_marlin
- Implement RTN quantization (no calibration)
- Implement GPTQ with Hessian-based error compensation
- Implement AWQ with activation-aware scaling
- Add Marlin repack for gptq_marlin and awq_marlin
- Correct pack functions for GPTQ and AWQ formats
- Full calibration data pipeline for diffusion models
- CLI interface with all parameters
- AutoModel support for DiffusionLM

Bug fixes:
- Add missing shutil import
- Fix load_file usage (no context manager)
- Fix attention_mask dtype to bool
- Fix AutoModel import
@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fc394eb9-d281-4b45-9418-fd2988aaed60

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant