[Core] latency optimization (#3890)

This commit is contained in:
youkaichao 2024-04-06 19:14:06 -07:00 committed by GitHub
parent 95baec828f
commit 2f19283549
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -328,7 +328,7 @@ class BlockSpaceManagerV1(BlockSpaceManager):
self,
seq: Sequence,
) -> bool:
token_ids_len = len(seq.data.get_token_ids())
token_ids_len = seq.data.get_len()
return token_ids_len > 0 and token_ids_len % seq.block_size == 0
def _maybe_promote_last_block(