| name | review-pr |
| description | Review or prepare a pull request for the AutoRound repository — checks registration points for new data types/backends/VLMs, validates Chinese translation parity for modified markdown files, verifies quantization numerical stability (scale overflow, STE gradient flow, group_size padding), confirms test placement and fixture usage, and enforces Apache 2.0 headers and DCO sign-off. Use when performing a code review, running a PR checklist, preparing a merge request, or auditing a contribution before submit. |
Pull Request Review Workflow for AutoRound
Review Sequence
Follow these steps in order. Stop and request changes at any gate that fails.
- Scope check — read the PR description and diff summary. Confirm the PR does one thing and unrelated changes are absent. If scope is unclear, request changes before proceeding.
- Code quality gate — run through the Code Quality checklist below. Any failure → request changes.
- Quantization review — if the PR touches
auto_round/ quantization logic, run the Quantization-Specific checklist. Any numerical stability concern → request changes.
- Registration audit — if the PR adds a new feature type (data type, export format, VLM, backend, dataset, scheme), verify every registration point in the table below is updated. Missing registration → request changes.
- Test verification — confirm new functionality has tests in the correct backend directory with minimal iterations. Missing or misplaced tests → request changes.
- Documentation & translation — check README/docs updates and run the Chinese Translation Verification procedure below. Missing
_CN.md updates for modified markdown → request changes.
- Contributing requirements — verify DCO sign-off, clean commits, and clear PR description.
- Decision — if all gates pass, approve. Otherwise, summarize all findings in a single review comment with specific file:line references.
Review Checklist
1. Code Quality
2. Quantization-Specific Concerns
3. Registration Points
When the PR adds new functionality, verify all registration points are updated:
| Feature | Registration Location |
|---|
| Data type | auto_round/data_type/__init__.py import + @register_dtype |
| Export format | auto_round/formats.py @OutputFormat.register() |
| VLM model | special_model_handler.py SPECIAL_MULTIMODAL_BLOCK + lists |
| Backend | auto_round/inference/backend.py BackendInfos dict |
| Dataset | auto_round/calib_dataset.py @register_dataset |
| Scheme preset | auto_round/schemes.py PRESET_SCHEMES dict |
4. Test Coverage
5. Documentation
6. Contributing Requirements
Chinese Translation Verification
This is a hard requirement for the AutoRound project. Use this procedure:
-
Identify modified markdown files:
git diff --name-only HEAD~1 -- '*.md'
-
Check for corresponding CN files:
For each modified .md file, verify a _CN.md counterpart exists and is
also modified:
README.md → README_CN.md
docs/step_by_step.md → docs/step_by_step_CN.md
docs/environments.md → docs/environments_CN.md
-
Compare structure:
- Same number of sections/headings
- Same tables, code blocks, and links
- Equivalent content (not machine-translated gibberish)
-
Files that do NOT need CN translation (no _CN counterpart exists):
CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md
test/README.md
docs/publication_list.md, docs/tips_and_tricks.md, accuracy result docs
Common Issues to Watch For
Quantization Bugs
- Scale overflow: Large models with small group_size can produce FP16 overflow
in scales. Check for
torch.clamp or torch.finfo guards.
- Asymmetric zero-point drift: Zero-points must be integer-rounded for INT
quantization.
- GGUF super-block alignment: GGUF formats require specific block sizes
(typically 256 elements). Verify padding/alignment logic.
Export Compatibility
- Format detection: Verify
quantize_config.json or equivalent metadata is
saved correctly for the target framework to detect.
- Weight name mapping: Ensure packed weight names match what the inference
framework expects.
- Mixed-precision layers: Layers excluded from quantization (e.g.,
lm_head)
must be saved in their original format.
Backend Selection
- Priority conflicts: New backends should not override existing backends unless
intentional. Check
priority values.
- Feature checker coverage: Ensure checkers don't silently reject valid layers
(test with real model shapes).