chore: fix some typos (#18577)
Co-authored-by: Liangsheng Yin <lsyincs@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@ class DoubleSparseAttnBackend(AttentionBackend):
|
||||
self.heavy_token_num = model_runner.server_args.ds_heavy_token_num
|
||||
|
||||
self.sorted_channels = model_runner.sorted_channels
|
||||
self.sparse_decode_thresold = (
|
||||
self.sparse_decode_threshold = (
|
||||
model_runner.server_args.ds_sparse_decode_threshold
|
||||
)
|
||||
self.att_out_approx: torch.Tensor = None
|
||||
@@ -210,7 +210,7 @@ class DoubleSparseAttnBackend(AttentionBackend):
|
||||
# and set a minimum value for sparse_decode
|
||||
if (
|
||||
min_seq_len < self.heavy_token_num
|
||||
or max_seq_len < self.sparse_decode_thresold
|
||||
or max_seq_len < self.sparse_decode_threshold
|
||||
):
|
||||
self.decode_attention_fwd(
|
||||
q.view(-1, layer.tp_q_head_num, layer.qk_head_dim),
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1271,7 +1271,7 @@ class UpdateWeightFromDiskReqInput(BaseReq):
|
||||
torch_empty_cache: bool = False
|
||||
# Whether to keep the scheduler paused after weight update
|
||||
keep_pause: bool = False
|
||||
# Whether to recapture cuda graph after weight udpdate
|
||||
# Whether to recapture cuda graph after weight update
|
||||
recapture_cuda_graph: bool = False
|
||||
# The trainer step id. Used to know which step's weights are used for sampling.
|
||||
token_step: int = 0
|
||||
|
||||
Reference in New Issue
Block a user