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

[OpenAI] Support logit_bias in chat completion #331

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

CharlieFRuan
Copy link
Contributor

Support logit_bias in ChatCompletionRequest, hence also in GenerationCongfig. This record<string, number> modifies the likelihood of seeing a token. For more, see https://platform.openai.com/docs/api-reference/chat/create#chat-create-logit_bias

@CharlieFRuan CharlieFRuan merged commit 81e1a99 into mlc-ai:main Mar 13, 2024
CharlieFRuan added a commit that referenced this pull request Mar 14, 2024
Changes in WebLLM:
- Stateful chat completion: #330
- OpenAI's `logit_bias`: #331
- OpenAI's `logprobs` and `top_logprobs`:
#333

Changes in TVMjs:
- apache/tvm#16650
- Fix param download issues (already reflected in 0.2.26, but at the
time this PR was not merged yet)
  - Expose `sampleTopPFromProb` to support `logprobs` (new in 0.2.27)
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.

None yet

1 participant