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

Server: clean up OAI params parsing function #6284

Merged
merged 6 commits into from
Mar 25, 2024

Conversation

ngxson
Copy link
Collaborator

@ngxson ngxson commented Mar 24, 2024

Motivation

This PR aims to resolve 2 issues:

  1. oaicompat_completion_params_parse and launch_slot_with_task have some duplicated logic
  2. For now, we're not having a good separation between "params come from OAI" and "params come from llama.cpp"

Proposal

  1. oaicompat_completion_params_parse should only take care of params that are specified in OAI's documentation. The other params , for example mirostat, tfs_z,... should be leave as-is and forwarded to launch_slot_with_task
  2. We explicitly throw errors for non-supported OAI fields: "tools", "tool_choice"

This PR also add partially support for logprobs since we already had this underlay logic, but the param is not implement in OAI logic

@ngxson ngxson marked this pull request as ready for review March 24, 2024 20:44
@ngxson ngxson requested review from ggerganov and phymbert March 24, 2024 20:44
@ngxson ngxson merged commit ad3a050 into ggerganov:master Mar 25, 2024
45 of 46 checks passed
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 1, 2024
* server: clean up oai parsing function

* fix response_format

* fix empty response_format

* minor fixes

* add TODO for logprobs

* update docs
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 3, 2024
* server: clean up oai parsing function

* fix response_format

* fix empty response_format

* minor fixes

* add TODO for logprobs

* update docs
tybalex pushed a commit to rubra-ai/tools.cpp that referenced this pull request Apr 17, 2024
* server: clean up oai parsing function

* fix response_format

* fix empty response_format

* minor fixes

* add TODO for logprobs

* update docs
tybalex pushed a commit to rubra-ai/tools.cpp that referenced this pull request Apr 18, 2024
* server: clean up oai parsing function

* fix response_format

* fix empty response_format

* minor fixes

* add TODO for logprobs

* update docs
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.

3 participants