Unify spec v2's naming manner. (#15990)
This commit is contained in:
@@ -359,7 +359,7 @@ class SchedulerOutputProcessorMixin:
|
||||
next_token_ids = next_token_ids.tolist()
|
||||
if batch.return_logprob:
|
||||
next_token_logprobs = logits_output.next_token_logprobs.tolist()
|
||||
elif batch.is_eagle_v2:
|
||||
elif batch.is_spec_v2:
|
||||
next_token_ids = self._resolve_spec_overlap_token_ids(result, batch)
|
||||
|
||||
self.num_generated_tokens += len(batch.reqs)
|
||||
@@ -386,8 +386,8 @@ class SchedulerOutputProcessorMixin:
|
||||
new_accepted_len = 1
|
||||
if batch.spec_algorithm.is_none():
|
||||
req.output_ids.append(next_token_id)
|
||||
elif batch.is_eagle_v2:
|
||||
# Only v2 eagle's output_ids are updated here.
|
||||
elif batch.is_spec_v2:
|
||||
# Only spec v2's output_ids are updated here.
|
||||
req.output_ids.extend(next_token_id)
|
||||
new_accepted_len = len(next_token_id)
|
||||
|
||||
@@ -438,7 +438,7 @@ class SchedulerOutputProcessorMixin:
|
||||
if batch.spec_algorithm.is_none():
|
||||
# Normal decode: single token
|
||||
req.grammar.accept_token(next_token_id)
|
||||
elif batch.is_eagle_v2:
|
||||
elif batch.is_spec_v2:
|
||||
# Speculative decode: next_token_id is a list of accepted tokens
|
||||
for token_id in next_token_id:
|
||||
req.grammar.accept_token(token_id)
|
||||
|
||||
Reference in New Issue
Block a user