Unverified Commit 47de8821 authored by WangErXiao's avatar WangErXiao Committed by GitHub
Browse files

[Misc]add some explanations for BlockHashType (#11847)

parent 5984499e
......@@ -11,8 +11,10 @@ logger = init_logger(__name__)
class BlockHashType(NamedTuple):
"""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
no hash collision happens when the hash value is the same.
We keep a tuple of token IDs and extra keys to reduce the likelihood of
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: int
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment