[Misc] offest -> offset in comments and variable names (#33444)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
@@ -105,7 +105,7 @@ class Mamba2AttentionMetadata(BaseMambaAttentionMetadata):
|
|||||||
# Chunk-related metadata (only for prefill)
|
# Chunk-related metadata (only for prefill)
|
||||||
seq_idx_p: torch.Tensor | None = None
|
seq_idx_p: torch.Tensor | None = None
|
||||||
# cu_chunk_seqlen_p is a tensor of shape (nchunks+1,) that contains, for
|
# cu_chunk_seqlen_p is a tensor of shape (nchunks+1,) that contains, for
|
||||||
# each chunk, its offests into the varlen sequence dimension. It is defined
|
# each chunk, its offsets into the varlen sequence dimension. It is defined
|
||||||
# such that the i-th chunk contains tokens from cu_chunk_seqlen_p[i] to
|
# such that the i-th chunk contains tokens from cu_chunk_seqlen_p[i] to
|
||||||
# cu_chunk_seqlen_p[i+1].
|
# cu_chunk_seqlen_p[i+1].
|
||||||
cu_chunk_seqlen_p: torch.Tensor | None = None
|
cu_chunk_seqlen_p: torch.Tensor | None = None
|
||||||
|
|||||||
@@ -1038,7 +1038,7 @@ class SpecDecodeBaseProposer:
|
|||||||
# [0, 1, 2, 3, 4, 5, 6, 7, 8] ->
|
# [0, 1, 2, 3, 4, 5, 6, 7, 8] ->
|
||||||
# [0, 1, 0, 1, 2, 3, 0, 1, 2]
|
# [0, 1, 0, 1, 2, 3, 0, 1, 2]
|
||||||
# _r1_ ____r2____ ___r3__
|
# _r1_ ____r2____ ___r3__
|
||||||
token_offests = (
|
token_offsets = (
|
||||||
self.token_arange_np[:total_num_tokens] - new_query_start_locs_expanded
|
self.token_arange_np[:total_num_tokens] - new_query_start_locs_expanded
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1053,7 +1053,7 @@ class SpecDecodeBaseProposer:
|
|||||||
# [0, 1, // req 1
|
# [0, 1, // req 1
|
||||||
# q1 + 0, q1 + 1, q1 + 2, q1 + 3, // req 2
|
# q1 + 0, q1 + 1, q1 + 2, q1 + 3, // req 2
|
||||||
# q1 + q2 + 0, q1 + q2 + 1, q1 + q2 + 2] // req 3
|
# q1 + q2 + 0, q1 + q2 + 1, q1 + q2 + 2] // req 3
|
||||||
token_indices_np = token_offests + old_query_start_locs_expanded
|
token_indices_np = token_offsets + old_query_start_locs_expanded
|
||||||
token_indices = torch.from_numpy(token_indices_np).to(device, non_blocking=True)
|
token_indices = torch.from_numpy(token_indices_np).to(device, non_blocking=True)
|
||||||
|
|
||||||
spec_common_attn_metadata = CommonAttentionMetadata(
|
spec_common_attn_metadata = CommonAttentionMetadata(
|
||||||
|
|||||||
Reference in New Issue
Block a user