Add LAQ NVFP4 export support#1847
Draft
realAsma wants to merge 1 commit into
Draft
Conversation
Signed-off-by: realAsma <akuriparambi@nvidia.com>
|
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. |
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Summary
Adds LAQ export support for NVFP4 unified HF export.
quantize_pre_scale=False.quantize_pre_scaleconfig plumbing and dtype/FSDP2 test updates from the LAQ branch worktree base.Testing
pre-commit run --files modelopt/torch/export/quant_utils.py modelopt/torch/export/unified_export_hf.py modelopt/torch/quantization/config.py modelopt/torch/quantization/model_calib.py modelopt/torch/quantization/nn/modules/tensor_quantizer.py tests/unit/torch/quantization/test_nvfp4_static_export_cpu.py tests/unit/torch/quantization/test_laq.py tests/gpu/torch/quantization/test_laq_cuda.py tests/gpu/torch/quantization/test_nvfp4_static_quantizer_cuda.py tests/gpu/torch/quantization/test_fsdp2.pypytest_pwd tests/unit/torch/quantization/test_laq.py tests/unit/torch/quantization/test_nvfp4_static_export_cpu.py -qomniml-a8.nvidia.com,CUDA_VISIBLE_DEVICES=1,2,3,4, recipenvfp4_laq_post_unquantized_pre_scale-mse_init-fp8_kv.ymlwithquantize_pre_scale: false: exportedconfig.json,hf_quant_config.json,.quant_summary.txt, tokenizer files, and one 5.2 GBmodel.safetensorsshard under/home/scratch.akuriparambi_coreai/Model-Optimizer-LAQ-export/agent_art/laq_qwen3_8b_export_a8_20260628T1815/qwen3_8b_laq_post_unquantized_pre_scale_export.omniml-a8.nvidia.com,CUDA_VISIBLE_DEVICES=1,2,3,4, aftersource ~/.bashrcandconda activate black; log confirmspython=/home/akuriparambi/anaconda3/envs/black/bin/python,modelopt_file=/home/scratch.akuriparambi_coreai/Model-Optimizer-LAQ-export/modelopt/__init__.py, andpythonpath_head=/home/scratch.akuriparambi_coreai/Model-Optimizer-LAQ-export. Export succeeded withhf_quant_config.json,.quant_summary.txt, tokenizer/config files, and one 5.5 GBmodel.safetensorsunder/home/scratch.akuriparambi_coreai/Model-Optimizer-LAQ-export/agent_art/laq_qwen3_8b_export_a8_black_20260629T0005/qwen3_8b_laq_post_unquantized_pre_scale_export.Notes
The first a8 attempt reused a stale shared
modelopt_cuda_ext_fp8Torch extension cache and failed withCUDA error: no kernel image is available for execution on the device. Passing runs used artifact-localTORCH_EXTENSIONS_DIRvalues andTORCH_CUDA_ARCH_LIST=8.9so the FP8 extension rebuilt for Ada.