-
Notifications
You must be signed in to change notification settings - Fork 300
Fix vLLM generation with sampling params #578
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
# SOFTWARE. | ||
import os | ||
import re | ||
from typing import Optional | ||
|
||
from typer import Argument, Option | ||
|
@@ -138,6 +139,8 @@ def vllm( | |
generation_parameters = GenerationParameters.from_dict(config) | ||
else: | ||
generation_parameters = GenerationParameters.from_model_args(model_args) | ||
# We slice out generation_parameters from model_args to avoid double-counting in the VLLMModelConfig | ||
model_args = re.sub(r"generation_parameters=\{.*?\},?", "", model_args).strip(",") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a bit hacky, so am open to other ideas! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Works for me for now, I trust you debuggued it - but can you create an issue so we don't forget to upgrade to something more robust? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Issue here! #579 |
||
metric_options = {} | ||
|
||
model_args_dict: dict = {k.split("=")[0]: k.split("=")[1] if "=" in k else True for k in model_args.split(",")} | ||
|
Uh oh!
There was an error while loading. Please reload this page.