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

Implement Seed Parameter Support for OpenAI-Compatible API Endpoints #374

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

GirinMan
Copy link
Contributor

@GirinMan GirinMan commented Apr 3, 2024

What does this PR do?

This PR introduces the capability to specify a seed for deterministic generation in the OpenAI-compatible API endpoints (/v1/chat/completion, etc.) of the LoRAX local LLM serving platform. This feature aligns LoRAX more closely with the official OpenAI API, which supports deterministic outputs by allowing a seed to be specified in requests.

Technical Details:

  • The PR adds a seed parameter to the CompletionRequest and ChatCompletionRequest structures.
  • It ensures that this seed is passed through to the CompatGenerateRequest during request processing, influencing the generation process to produce deterministic outputs.
  • Relevant documentation has been updated to reflect this new capability and guide users on how to utilize it.

Dependencies:

  • There are no new dependencies introduced by this change.

Fixes #373

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Was this discussed/approved via a Github issue or the discord / slack channel? Please add a link
    to it if that's the case.
  • Did you write any new necessary tests?

Who can review?

@tgaddair
cc. @soeque1

Copy link
Contributor

@tgaddair tgaddair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tgaddair tgaddair merged commit f66c48f into predibase:main Apr 3, 2024
1 check passed
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.

Allow deterministic generation for OpenAI compatible requests
2 participants