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

Add optional argument original_output to vLLM's generate function #1212

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LouSalaun
Copy link

This pull request fixes #1199. An optional argument original_output is added to the vLLM's generate function:

def generate(
self,
prompts: Union[str, List[str]],
generation_parameters: GenerationParameters,
logits_processor,
sampling_parameters: SamplingParameters,
*,
sampling_params: Optional["SamplingParams"] = None,
use_tqdm: bool = True,
):

original_output is a boolean. If True then the function returns the original (full) output of the vLLM API call.

Comment on lines +144 to +145
if original_output:
return results
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part won't pass coverage checks because it isn't tested. Could you add a test here: https://github.com/dottxt-ai/outlines/blob/main/tests/generate/test_integration_vllm.py

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay just pushed the integration tests

original_output is a boolean. If True then it returns the original
(full) output of the vLLM API call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Give the possibility to obtain the full response when calling the vLLM generate function
2 participants