[Fix] scheduler: Clear stale encoder_swa_reset in convert_decode_to_extend (#45042)

This commit is contained in:
Liangsheng Yin
2026-10-18 17:09:19 -07:00
committed by GitHub
parent 6708426728
commit 1637a4e305
2 changed files with 29 additions and 0 deletions
@@ -3312,6 +3312,10 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
# Also stale residue; None keeps the prefill result path from
# re-reporting old prefill stats for what is decode work.
self.prefill_stats = None
# Also stale residue: decode rows are never fresh placements, so they
# reset no encoder SWA window and fold no replay rows the vote missed.
if self.encoder_swa_reset is not None:
self.encoder_swa_reset = [False] * bs
# A 1-token extend's position is arange(prefix, prefix + 1), so prefix
# must be seq_len - 1; output_ids trails the row by one or zero and
# cannot stand in for it. Rows past bs are a beam tail, not requests.