-
Notifications
You must be signed in to change notification settings - Fork 19
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
[fix] Sampling Parameters related improvements #80
Conversation
LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Only minor comments, otherwise LGTM!
@@ -197,6 +317,22 @@ else | |||
RET=1 | |||
fi | |||
fi | |||
|
|||
# Test generate endpoint + LoRA enabled (boolean flag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Test generate endpoint + LoRA enabled (boolean flag)
LoRA enabled -> disabled ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
@@ -243,6 +379,22 @@ else | |||
RET=1 | |||
fi | |||
fi | |||
|
|||
# Test generate endpoint + LoRA enabled (str flag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Test generate endpoint + LoRA enabled (str flag)
LoRA enabled -> disabled ?
What does the PR do?
This PR removes dependencies on
vllm.SamplingParams
names, present in_get_sampling_params_dict
in favor of dynamically checking sampling parameters passed with the request withvllm.SamplingParams.__annotations__
Previously, we needed to keep track about SamplingParams members and their types: e.g. float keys as defined here.
I suggest to infer the type from
vllm.SamplingParams.__annotations__
and for simple ones (int, float, bool, str, Optional[int]) perform a conversion from string to the expected type. Suggested logic is implemented here.Also added proper handling of "guided_generation" parameter for constrained decoding test. Limited test added in
accuracy_tests
Misc:
Fixed some inconsistencies with error response for LoRA-based inference via generate endpoint with parameters passed through "parameters" vs through client script with "sampling_parameters" input. Enhanced tests.
Checklist
<commit_type>: <Title>
Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
Where should the reviewer start?
vllm_backend_utils.py -> main.py
Test plan:
22089744
Caveats:
Background
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)