Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nanovllm/engine/block_manager.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections import deque
import xxhash
import numpy as np
import array

from nanovllm.engine.sequence import Sequence

Expand Down Expand Up @@ -37,7 +37,7 @@ def compute_hash(cls, token_ids: list[int], prefix: int = -1):
h = xxhash.xxh64()
if prefix != -1:
h.update(prefix.to_bytes(8, "little"))
h.update(np.array(token_ids).tobytes())
h.update(array.array('i', token_ids).tobytes())
return h.intdigest()

def _allocate_block(self, block_id: int) -> Block:
Expand Down