chore: fix some typos (#18577)

Co-authored-by: Liangsheng Yin <lsyincs@gmail.com>
This commit is contained in:
cutetocute
2026-02-10 20:47:41 -08:00
committed by GitHub
co-authored by Liangsheng Yin
parent a2c38f7796
commit 8d2892330c
7 changed files with 12 additions and 12 deletions
@@ -219,7 +219,7 @@ def _per_token_group_quant_8bit_raw(
quantized tensor along with the scaling factor used for quantization.
Args:
x: The input tenosr with ndim >= 2.
x: The input tensor with ndim >= 2.
group_size: The group size used for quantization.
eps: The minimum to avoid dividing zero.
dtype: The dype of output tensor.
@@ -635,7 +635,7 @@ def static_quant_fp8(
quantized tensor along with the scaling factor used for quantization.
Args:
x: The input tenosr with ndim >= 2.
x: The input tensor with ndim >= 2.
x_s: The quantization scale.
repeat_scale: Whether to broadcast per-tensor scale to per-channel scale.
dtype: The dype of output tensor.
@@ -143,7 +143,7 @@ def per_token_group_quant_int8(
quantized tensor along with the scaling factor used for quantization.
Args:
x: The input tenosr with ndim >= 2.
x: The input tensor with ndim >= 2.
group_size: The group size used for quantization.
eps: The minimum to avoid dividing zero.
dtype: The dype of output tensor. Note that only `torch.int8` is supported for now.
@@ -128,10 +128,10 @@ def b_dynamic_mxfp4_quant(x):
return x.view(h, b, d // 2), x_scales.view(h, b, d // 32)
def mxfp4_to_f32(x, is_threed):
def mxfp4_to_f32(x, is_3d):
# 2 because we pack fp4 in uint8.
x = x.repeat_interleave(2, dim=-1)
if is_threed:
if is_3d:
x[..., ::2] = x[..., ::2] & 0xF
x[..., 1::2] = x[..., 1::2] >> 4
else: