File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -728,9 +728,7 @@ def _make_cached_request_data(
728728 assert not scheduled_in_prev_step
729729 resumed_req_ids .add (req_id )
730730 if not scheduled_in_prev_step :
731- all_token_ids [req_id ] = req .all_token_ids [
732- : req .num_computed_tokens + num_tokens
733- ]
731+ all_token_ids [req_id ] = req .all_token_ids .copy ()
734732 new_block_ids .append (
735733 req_to_new_blocks [req_id ].get_block_ids (allow_none = True )
736734 )
Original file line number Diff line number Diff line change @@ -97,6 +97,9 @@ def __len__(self):
9797 def __repr__ (self ):
9898 return f"ConstantList({ self ._x } )"
9999
100+ def copy (self ) -> list [T ]:
101+ return self ._x .copy ()
102+
100103
101104class CpuGpuBuffer :
102105 """Buffer to easily copy tensors between CPU and GPU."""
You can’t perform that action at this time.
0 commit comments