update bench

This commit is contained in:
GeeeekExplorer
2025-06-12 09:47:09 +08:00
parent f16adb729e
commit ec3c60d96f
3 changed files with 19 additions and 12 deletions

View File

@@ -8,7 +8,7 @@ from nanovllm.engine.sequence import Sequence
def compute_hash(token_ids: list[int], prefix: int = -1):
h = xxhash.xxh64()
if prefix != -1:
h.update(prefix.to_bytes(8))
h.update(prefix.to_bytes(8, "little"))
h.update(np.array(token_ids).tobytes())
return h.intdigest()