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 17, 09:15 UTC
Add get_block_table
Woosuk Kwon committed
Feb 23, 2023 at 07:55 UTC
4f6f4967f6af78534f460d75a9391f9a42b564b0
1 file changed
+4
cacheflow/master/block_manager.py
+4
@@ -228,3 +228,7 @@ class BlockSpaceManager:
228
for block_table in self.block_tables.values():
229
self._free_block_table(block_table)
230
self.block_tables.clear()
231
+
232
+ def get_block_table(self, seq: Sequence) -> List[int]:
233
+ block_table = self.block_tables[seq.seq_id]
234
+ return [block.block_number for block in block_table]