Repository navigation
fix(exllamav2 awq): repack replaced checkpoint words before rebind - #3787
Merged
Merged
Conversation
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.
Fixes the stale AWQ packing flag found while reviewing #3717. After a native handle was built, replacing the registered buffers with raw checkpoint words and clearing the handle left
_awq_repacked=True; the next bind received raw layout.flowchart TD A["_ensure_q_handle"] --> B{"qweight shape is native?"} B -- no --> C["release old handle; reset packing/shuffle flags"] C --> D["unpack_reorder_pack raw checkpoint words"] B -- yes --> E["reuse finalized packed words"] D --> F["bind native descriptor"] E --> F G["load_state_dict with only raw qzeros"] --> X["RuntimeError: paired raw qweight required"]exllamav2_awq.py:201-205trusted the one-way flagexllamav2_awq.py:196-209recognizes raw qweight shape and repackspost_initexllamav2_awq.py:138uses the same rebind pathValidation: 5 handle lifecycle tests pass, including replacement with and without an explicit clear; they compare the bound packed words against a fresh packing result. Four native AWQ fusion cases pass on CUDA. Ruff passes. Direct replacement of a native-shaped buffer has no layout metadata; checkpoint reloads should use
load_state_dict.