mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 09:06:03 +08:00
[Minor] Fix some random typos in comments (#24009)
Signed-off-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
parent
81eea3d348
commit
752d2e1c36
@ -3290,7 +3290,7 @@ def sha256_cbor_64bit(input) -> int:
|
|||||||
return full_hash & ((1 << 64) - 1)
|
return full_hash & ((1 << 64) - 1)
|
||||||
|
|
||||||
|
|
||||||
def get_hash_fn_by_name(hash_fn_name: str) -> Callable:
|
def get_hash_fn_by_name(hash_fn_name: str) -> Callable[[Any], int]:
|
||||||
"""Get a hash function by name, or raise an error if
|
"""Get a hash function by name, or raise an error if
|
||||||
the function is not found.
|
the function is not found.
|
||||||
Args:
|
Args:
|
||||||
|
|||||||
@ -1207,7 +1207,7 @@ class Scheduler(SchedulerInterface):
|
|||||||
# Now that the blocks are ready, actually cache them.
|
# Now that the blocks are ready, actually cache them.
|
||||||
(block_ids, ) = self.kv_cache_manager.get_block_ids(request.request_id)
|
(block_ids, ) = self.kv_cache_manager.get_block_ids(request.request_id)
|
||||||
num_computed_tokens = len(block_ids) * self.block_size
|
num_computed_tokens = len(block_ids) * self.block_size
|
||||||
# Handle the case where num request tokens less then one block.
|
# Handle the case where num request tokens less than one block.
|
||||||
num_computed_tokens = min(num_computed_tokens, request.num_tokens)
|
num_computed_tokens = min(num_computed_tokens, request.num_tokens)
|
||||||
if num_computed_tokens == request.num_tokens:
|
if num_computed_tokens == request.num_tokens:
|
||||||
num_computed_tokens -= 1
|
num_computed_tokens -= 1
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class SingleTypeKVCacheManager(ABC):
|
|||||||
# {req_id: The number of cached blocks for this given request}
|
# {req_id: The number of cached blocks for this given request}
|
||||||
# This is used to track the number of cached blocks for each request.
|
# This is used to track the number of cached blocks for each request.
|
||||||
# This is only used to track the RUNNING requests, we do not track the
|
# This is only used to track the RUNNING requests, we do not track the
|
||||||
# data for reempted ones.
|
# data for preempted ones.
|
||||||
self.num_cached_block: dict[str, int] = {}
|
self.num_cached_block: dict[str, int] = {}
|
||||||
|
|
||||||
self.kv_cache_group_id = kv_cache_group_id
|
self.kv_cache_group_id = kv_cache_group_id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user