Skip to content

Commit d9a5856

Browse files
authored
fix dllm mask on set_step (#4278)
1 parent c2e7158 commit d9a5856

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lmdeploy/pytorch/strategies/dllm/sequence.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ def set_step(self, step: int):
200200
start = min(step, self.num_history_ids)
201201
end = self.num_history_ids
202202
if end > start:
203-
self.history_dllm_mask[start:end] = DLLM_MASKED
203+
to_change_mask = self.history_dllm_mask[start:]
204+
to_change_mask[to_change_mask == DLLM_CACHED] = DLLM_UNMASKED
204205
super().set_step(step)
205206

206207

0 commit comments

Comments
 (0)