Draft
Conversation
- Make DeepSeek-specific imports lazy (only loaded for --model_type deepseek) - Add load_hf_model() using device_map="auto" for single-node multi-GPU - Add dynamic MoE class discovery and registration for calibration - Add HF layer name patterns for quant config (q_a_proj, kv_a_proj, etc.) - Disable GLM-5 indexer/MTP layers from quantization - Make dist calls conditional for non-distributed HF path - Add --model_type flag to ptq.py, quantize_to_nvfp4.py, and shell script - Skip key remapping in quantize_to_nvfp4.py for HF models - Guard quantization_config removal for bf16 checkpoints - Add run_glm5_ptq.sh launch script Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix _remap_key to use component-level matching, add kernel.py stubs, MTP head extraction script, and GLM-5 documentation.
- Fix TokenizersBackend compatibility in dataset_utils.py: transformers 5.x TokenizersBackend lacks batch_encode_plus, added fallback using _encode_plus per-sample with manual padding support (left/right) - Fix quantize_to_nvfp4.py: skip quantization for layers not listed in per_layer_quant_config when using MIXED_PRECISION mode - Add GLM MLA and DSA Indexer exclusions to hf_ptq build_quant_cfg - Improve run_glm5_ptq.sh CLI: add --amax-path and --mla-quant flags - Add glm5 dequant_nvfp4.py utility
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: Pro 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)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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.
What does this PR do?
Type of change: ?
Usage
# Add a code snippet demonstrating how to use thisTesting
Before your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True, usingtorch.load(..., weights_only=True), avoidingpickle, etc.).Additional Information