Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bnellnm committed Feb 10, 2025
1 parent ad2e198 commit 56edd27
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions vllm/v1/core/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ def update_from_output(
new_token_ids=[],
new_logprobs = [],
new_prompt_logprobs_tensors = [],
finished=[],
finish_reason={},
scheduler_stats=None
)
Expand Down Expand Up @@ -522,11 +521,10 @@ def update_from_output(
new_ids = request.output_token_ids[-num_new_tokens:]
output.new_token_ids += new_ids

# XXXXXXXXX list/None
# TODO: This is not right
output.new_logprobs += new_logprobs
output.new_prompt_logprobs_tensors += (prompt_logprobs_tensors if prompt_logprobs_tensors is not None else [])

output.finished.append(request.is_finished())
if request.get_finished_reason() is not None:
output.finish_reason[req_id] = request.get_finished_reason()
#print(f"req stop = {request.stop_reason}, {request.status}")
Expand Down
1 change: 0 additions & 1 deletion vllm/v1/engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class EngineCoreOutputs(
# TODO: need offsets for logprobs?
new_logprobs: List[Optional[LogprobsLists]]
new_prompt_logprobs_tensors: List[Optional[LogprobsTensors]]
finished: List[bool]
finish_reason: Dict[str, FinishReason] # Union[List, Dict]?
scheduler_stats: SchedulerStats

Expand Down
1 change: 0 additions & 1 deletion vllm/v1/engine/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def step(self) -> EngineCoreOutputs:
new_token_ids=[],
new_logprobs = [],
new_prompt_logprobs_tensors = [],
finished=[],
finish_reason={},
scheduler_stats=self.scheduler.make_stats()
)
Expand Down
2 changes: 1 addition & 1 deletion vllm/v1/engine/output_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def process_outputs(
# Free completed requests.
if request_output.finished:
self.request_states.pop(req_id)
if not engine_core_outputs.finished[i]:
if finish_reason is not None:
# If req not finished in EngineCore, but Detokenizer
# detected stop string, abort needed in EngineCore.
reqs_to_abort.append(req_id)
Expand Down

0 comments on commit 56edd27

Please sign in to comment.