[Core] Reuse created spec tokens lists to mitigate GC cost (#28917)
Signed-off-by: Jialin Ouyang <Jialin.Ouyang@gmail.com>
This commit is contained in:
@@ -892,7 +892,8 @@ class GPUModelRunner(
|
||||
# conform to the schema. This can result in
|
||||
# scheduler_output.scheduled_spec_decode_tokens being empty,
|
||||
# even when speculative decoding is enabled.
|
||||
self.input_batch.spec_token_ids[req_index] = spec_token_ids
|
||||
self.input_batch.spec_token_ids[req_index].clear()
|
||||
self.input_batch.spec_token_ids[req_index].extend(spec_token_ids)
|
||||
|
||||
# there are no draft tokens with async scheduling,
|
||||
# we clear the spec_decoding info in scheduler_output and
|
||||
|
||||
Reference in New Issue
Block a user