Fix radix cache key to include generated tokens in multi-turn (regression) (#16521)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -463,7 +463,7 @@ class RadixCache(BasePrefixCache):
|
||||
]
|
||||
|
||||
# Maybe convert to bigram keys for EAGLE
|
||||
keys = convert_to_bigram_key(req.fill_ids) if self.is_eagle else req.fill_ids
|
||||
keys = convert_to_bigram_key(token_ids) if self.is_eagle else token_ids
|
||||
keys = self._page_align_keys(keys)
|
||||
values = kv_indices[: len(keys)].to(dtype=torch.int64, copy=True)
|
||||
radix_key = RadixKey(keys, req.extra_key, is_bigram=self.is_eagle)
|
||||
@@ -501,7 +501,7 @@ class RadixCache(BasePrefixCache):
|
||||
]
|
||||
|
||||
# Maybe convert to bigram keys for EAGLE
|
||||
keys = convert_to_bigram_key(req.fill_ids) if self.is_eagle else req.fill_ids
|
||||
keys = convert_to_bigram_key(token_ids) if self.is_eagle else token_ids
|
||||
keys = self._page_align_keys(keys)
|
||||
values = kv_indices[: len(keys)].to(dtype=torch.int64, copy=True)
|
||||
radix_key = RadixKey(keys, req.extra_key, is_bigram=self.is_eagle)
|
||||
|
||||
Reference in New Issue
Block a user