Skip to content

Add LAQ/LSQ support and recipes#1884

Draft
realAsma wants to merge 1 commit into
mainfrom
asma/laq-qad-recipes
Draft

Add LAQ/LSQ support and recipes#1884
realAsma wants to merge 1 commit into
mainfrom
asma/laq-qad-recipes

Conversation

@realAsma

@realAsma realAsma commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • port LAQ support onto latest main
  • add QAD quantize recipes for fp4 LSQ and fp4 Dual Scale LSQ only
  • use modular $import recipes and set quantize_pre_scale: false
  • add qad_laq_scales.yaml for scale-only QAD
  • add focused recipe and LAQ behavior tests

Validation

  • pre-commit run --files ...
  • git diff --check
  • pytest_pwd tests/unit/recipe/test_laq_recipes.py tests/unit/torch/quantization/test_laq.py (37 passed)

Parity

Compared the new recipes against the original LAQ folder reference at /home/scratch.akuriparambi_coreai/Model-Optimizer-LAQ. The two new recipes resolve to the same core LAQ algorithm and weight/input/KV/lm_head quantizer settings as the old LAQ recipes, with the new explicit quantize_pre_scale: false setting.

Signed-off-by: realAsma <akuriparambi@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 50d620e3-7806-4270-806e-3fd0b1d9da3a

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
  • Commit unit tests in branch asma/laq-qad-recipes

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

@realAsma realAsma changed the title Add LAQ QAD recipes Add LAQ/LSQ support and recipes Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.80524% with 118 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.13%. Comparing base (892d27a) to head (f95fdff).

Files with missing lines Patch % Lines
modelopt/torch/quantization/model_calib.py 14.10% 67 Missing ⚠️
...lopt/torch/kernels/quantization/gemm/fp4_kernel.py 0.00% 23 Missing ⚠️
.../torch/quantization/nn/modules/tensor_quantizer.py 82.47% 17 Missing ⚠️
modelopt/torch/quantization/tensor_quant.py 74.19% 8 Missing ⚠️
...torch/quantization/plugins/transformers_trainer.py 80.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1884      +/-   ##
==========================================
- Coverage   61.16%   61.13%   -0.04%     
==========================================
  Files         515      515              
  Lines       57216    57474     +258     
==========================================
+ Hits        34995    35135     +140     
- Misses      22221    22339     +118     
Flag Coverage Δ
unit 54.90% <55.80%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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