mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-01 02:27:06 +08:00
[Misc]add some explanations for BlockHashType (#11847)
This commit is contained in:
parent
5984499e47
commit
47de8821d3
@ -11,8 +11,10 @@ logger = init_logger(__name__)
|
|||||||
|
|
||||||
class BlockHashType(NamedTuple):
|
class BlockHashType(NamedTuple):
|
||||||
"""Hash value of a block (int), the token IDs in the block, and extra keys.
|
"""Hash value of a block (int), the token IDs in the block, and extra keys.
|
||||||
The reason we keep a tuple of token IDs and extra keys is to make sure
|
We keep a tuple of token IDs and extra keys to reduce the likelihood of
|
||||||
no hash collision happens when the hash value is the same.
|
hash collisions when the hash value is the same. But please note that
|
||||||
|
hash collisions can still theoretically occur, albeit with an extremely
|
||||||
|
low probability.
|
||||||
"""
|
"""
|
||||||
# Hash value of the block in an integer.
|
# Hash value of the block in an integer.
|
||||||
hash_value: int
|
hash_value: int
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user