[CompressedTensors] DeepSeek4 CT Quantization Support (#41276)
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
This commit is contained in:
@@ -60,10 +60,13 @@ def deep_gemm_fp8_o_proj(
|
||||
device=o.device,
|
||||
dtype=torch.bfloat16,
|
||||
)
|
||||
weight_scale = (
|
||||
wo_a.weight_scale if hasattr(wo_a, "weight_scale") else wo_a.weight_scale_inv
|
||||
)
|
||||
fp8_einsum(
|
||||
"bhr,hdr->bhd",
|
||||
(o_fp8, o_scale),
|
||||
(wo_a.weight, wo_a.weight_scale_inv),
|
||||
(wo_a.weight, weight_scale),
|
||||
z,
|
||||
recipe=einsum_recipe,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user