-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
[Bugfix] Fix compressed-tensors fp8 block assert and FlashInfer scale propagation #34863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,7 +111,7 @@ def process_weights_after_loading(self, layer: torch.nn.Module) -> None: | |
| size_k_first = True | ||
| # TODO(rob): refactor block quant into separate class. | ||
| if self.strategy == QuantizationStrategy.BLOCK: | ||
| assert self.is_static_input_scheme is False | ||
| assert not self.is_static_input_scheme | ||
|
Comment on lines
112
to
+114
|
||
| size_k_first = False | ||
| weight, weight_scale = process_fp8_weight_block_strategy( | ||
| weight, weight_scale | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change fixes a real runtime correctness issue for FlashInfer, but there’s no automated coverage asserting that loaded q/k/v scales are propagated into the host
*_scale_floatfields. Please add a unit/integration test that constructs an Attention layer (or minimal stub) withCompressedTensorsKVCacheMethod, setsk_scale/v_scale/q_scaleto non-1.0 scalars, runsprocess_weights_after_loading, and verifies_k_scale_float/_v_scale_float/_q_scale_floatmatch (and are not left at the default 1.0).