Skip to content
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

Apply inferface change to duplicated code in the tgis layer #50

Merged
merged 2 commits into from
Jun 19, 2024
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
8 changes: 1 addition & 7 deletions vllm/tgis_utils/guided_decoding.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import asyncio
import concurrent.futures
from copy import copy
from re import escape as regex_escape
from typing import Tuple, Union

Expand Down Expand Up @@ -30,7 +29,7 @@ async def get_outlines_guided_decoding_logits_processor(
concurrent.futures.ThreadPoolExecutor(max_workers=2))
loop = asyncio.get_running_loop()

result = await loop.run_in_executor(
return await loop.run_in_executor(
outlines_decoding.global_thread_pool,
_get_logits_processor,
guide,
Expand All @@ -39,11 +38,6 @@ async def get_outlines_guided_decoding_logits_processor(
None, # guided_whitespace_pattern - TBD
)

logits_processor = copy(result)
# reset logits processor's internal state
logits_processor.init_state()
return logits_processor


def _get_guide_and_mode(
decoding_params: DecodingParameters,
Expand Down
Loading