[Core] Use sha256 bytes instead of BlockHash to reduce GC overhead (#23673)
Signed-off-by: linzebing <linzebing1995@gmail.com>
This commit is contained in:
@@ -6,6 +6,8 @@ import msgspec
|
||||
import zmq
|
||||
from msgspec.msgpack import Decoder
|
||||
|
||||
from vllm.v1.core.kv_cache_utils import BlockHash
|
||||
|
||||
|
||||
#
|
||||
# Types copied from vllm.distributed.kv_events
|
||||
@@ -22,8 +24,8 @@ class KVCacheEvent(
|
||||
|
||||
|
||||
class BlockStored(KVCacheEvent):
|
||||
block_hashes: list[int]
|
||||
parent_block_hash: Optional[int]
|
||||
block_hashes: list[BlockHash]
|
||||
parent_block_hash: Optional[BlockHash]
|
||||
token_ids: list[int]
|
||||
block_size: int
|
||||
lora_id: Optional[int]
|
||||
@@ -31,7 +33,7 @@ class BlockStored(KVCacheEvent):
|
||||
|
||||
|
||||
class BlockRemoved(KVCacheEvent):
|
||||
block_hashes: list[int]
|
||||
block_hashes: list[BlockHash]
|
||||
medium: Optional[str]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user