Skip to content

[BugFix] fix request_output sampling_params (#3154) #3464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions fastdeploy/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,10 +737,6 @@ def insert_tasks(self, tasks, current_id=-1, allocated=False):
"""
Insert tasks to engine.
"""
for task in tasks:
start_span_request("DEQUEUE", task, trace.SpanKind.CONSUMER)
if task.sampling_params.bad_words is not None:
task.sampling_params.update_from_tokenizer(self.data_processor.tokenizer)
# TODO 返回至 scheduler
if allocated:
current_tasks = []
Expand All @@ -767,6 +763,11 @@ def insert_tasks(self, tasks, current_id=-1, allocated=False):
self.engine_worker_queue.put_tasks((current_tasks, self.resource_manager.real_bsz))
return True

for task in tasks:
start_span_request("DEQUEUE", task, trace.SpanKind.CONSUMER)
if task.sampling_params.bad_words is not None:
task.sampling_params.update_from_tokenizer(self.data_processor.tokenizer)

self.resource_manager.check_and_free_block_tables()

if not isinstance(tasks, list):
Expand Down
Loading