Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
47de8821
Unverified
Commit
47de8821
authored
Jan 09, 2025
by
WangErXiao
Committed by
GitHub
Jan 08, 2025
Browse files
[Misc]add some explanations for BlockHashType (#11847)
parent
5984499e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
vllm/v1/core/kv_cache_utils.py
vllm/v1/core/kv_cache_utils.py
+4
-2
No files found.
vllm/v1/core/kv_cache_utils.py
View file @
47de8821
...
@@ -11,8 +11,10 @@ logger = init_logger(__name__)
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment