vllm.v1.request
¶
Classes:
-
Request– -
RequestStatus–Status of a request.
-
StreamingUpdate–Lightweight data for streaming session continuation.
Request
¶
Methods:
-
__lt__–Compare two requests based on priority, arrival time, and request ID.
-
get_max_cache_hit_length–Longest prefix cache hit allowed, optionally tightened by bound.
-
get_prefix_cache_hit_limit–Number of leading tokens that may be read from the prefix cache:
-
truncate_block_hashes–Discard hashes invalidated by truncating the request's tokens.
-
update_block_hashes–Compute block hashes for any new full blocks and append them.
Attributes:
-
prefill_token_ids(list[int]) –All token ids, as the prompt_token_ids object itself while they hold
prefill_token_ids
property
¶
All token ids, as the prompt_token_ids object itself while they hold the same tokens, so that pickling both sends them once.
__lt__(other)
¶
Compare two requests based on priority, arrival time, and request ID. Used in priority scheduling.
get_max_cache_hit_length(bound=None)
¶
Longest prefix cache hit allowed, optionally tightened by bound.
get_prefix_cache_hit_limit()
¶
Number of leading tokens that may be read from the prefix cache: 0 when the request skips cache reads, the first scored prompt row for prompt scoring, or None when unbounded. See docs/training/prompt_token_id_logprobs.md.
truncate_block_hashes(hash_block_size, num_hash_lookahead_tokens)
¶
Discard hashes invalidated by truncating the request's tokens.
update_block_hashes()
¶
Compute block hashes for any new full blocks and append them.
StreamingUpdate
dataclass
¶
Lightweight data for streaming session continuation.
Contains only the fields needed to update an existing streaming session with new input data.