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

Fix vllm sampling params #2871

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

Conversation

malte-aws
Copy link

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Updates loading of generation config from file.
Previously the _load_generation_config function did not load all configuration from a generation_config.json file.

With this pull request _load_generation_config loads all configuration from a generation_config.json file. The _prepare_generation_config now uses the sampling parameters loaded from file and overwrites the ones provided in the request config.

This allows to configure guided decoding in a generation_config.json file. Here is an example generation_config.json file:

{
  "bos_token_id": 151643,
  "do_sample": true,
  "eos_token_id": 151645,
  "max_new_tokens": 2048,
  "pad_token_id": 151643,
  "temperature": 0.01,
  "top_k": 1,
  "top_p": 0.001,
  "transformers_version": "4.46.0.dev0",
  "guided_decoding": {
    "backend":"lm-format-enforcer",
    "json":{
      "type": "object",
      "properties": {
        "foo": { "type": "string"},
      },
      "required": ["foo"]
    }
  }
}

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.

1 participant