Files
vLLM/vllm/v1/attention/backends/utils.py
T
2025-05-06 07:58:37 -07:00

19 lines
537 B
Python

# SPDX-License-Identifier: Apache-2.0
from dataclasses import dataclass
import torch
@dataclass
class CommonAttentionMetadata:
"""
Attention metadata attributes that can be shared by layers in different KV
cache groups and thus having different block table.
"""
query_start_loc: torch.Tensor
"""(batch_size + 1,), the start location of each request in query Tensor"""
seq_lens: torch.Tensor
"""(batch_size,), the length of each request including both computed tokens
and newly scheduled tokens"""