Fix ngram spec with page size > 1 (#11135)

This commit is contained in:
Liangsheng Yin
2025-10-02 12:34:23 +08:00
committed by GitHub
parent 0b2aa8a70c
commit 25e7dbe8af
5 changed files with 32 additions and 10 deletions
@@ -388,6 +388,8 @@ class EagleVerifyInput(SpecInput):
evict_mask = torch.full_like(self.draft_token, True, dtype=torch.bool)
evict_mask[accept_index] = False
accept_length_cpu = accept_length.cpu()
# FIXME: this `tolist()` fixes the numerical calculation consistency
# try to unify the tensor representation and list representation
accept_length_list = accept_length_cpu.tolist()
if page_size == 1: