better
This commit is contained in:
@@ -31,13 +31,11 @@ class Block:
|
||||
self.hash = -1
|
||||
self.token_ids = []
|
||||
|
||||
def __repr__(self):
|
||||
return f"{(self.block_id, self.ref_count, self.hash)}"
|
||||
|
||||
|
||||
class BlockManager:
|
||||
|
||||
def __init__(self, num_blocks: int, block_size: int):
|
||||
assert num_blocks > 0
|
||||
self.block_size = block_size
|
||||
self.blocks: list[Block] = [Block(i) for i in range(num_blocks)]
|
||||
self.hash_to_block_id: dict[int, int] = dict()
|
||||
|
||||
Reference in New Issue
Block a user