A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 13:30 UTC
[BUGFIX] use random for NONE_HASH only when PYTHONHASHSEED not set (#17088)
Signed-off-by: Andy Xie <andy.xning@gmail.com>
Ning Xie committed
Apr 26, 2025 at 22:34 UTC
dc2ceca5c519a010406650e5d391b33e4ea78a2f
1 file changed
+1
-1
vllm/v1/core/kv_cache_utils.py
+1
-1
@@ -43,7 +43,7 @@ class BlockHashType(NamedTuple):
43
# This aligns with the behavior of Python's hash() function, which also uses
44
# a random seed if PYTHONHASHSEED is not set.
45
NONE_HASH = int.from_bytes(os.urandom(32), byteorder="big") if os.getenv(
46
- 'PYTHONHASHSEED') is not None else sha256(os.getenv('PYTHONHASHSEED'))
46
+ 'PYTHONHASHSEED') is None else sha256(os.getenv('PYTHONHASHSEED'))
47
48
49
class PrefixCachingMetrics: