[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,
|
device=o.device,
|
||||||
dtype=torch.bfloat16,
|
dtype=torch.bfloat16,
|
||||||
)
|
)
|
||||||
|
weight_scale = (
|
||||||
|
wo_a.weight_scale if hasattr(wo_a, "weight_scale") else wo_a.weight_scale_inv
|
||||||
|
)
|
||||||
fp8_einsum(
|
fp8_einsum(
|
||||||
"bhr,hdr->bhd",
|
"bhr,hdr->bhd",
|
||||||
(o_fp8, o_scale),
|
(o_fp8, o_scale),
|
||||||
(wo_a.weight, wo_a.weight_scale_inv),
|
(wo_a.weight, weight_scale),
|
||||||
z,
|
z,
|
||||||
recipe=einsum_recipe,
|
recipe=einsum_recipe,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user