-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Feature: Adds support for OpenAISpec in litgpt serve #1943
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
Feature: Adds support for OpenAISpec in litgpt serve #1943
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good o me :)
looking at the failure due to OSError: There was a specific connection error when trying to load ...
Still getting the same error
|
looking into it and will debug it in #1940 |
Isn't the sticking point here that the OpenAI API was added in LitServe 0.2.5 , but litgpt currently uses 0.2.4 since 0.2.5 causes tests to fail? |
@craigpfeifer, we had the OpenAI Chat API in LitServe with the |
You are correct, seems like the streaming was fixed in 0.2.5 , but is present in earlier versions : Lightning-AI/LitServe#360 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we pls add a test?
also shall we then bump litServe to be 0.2.5+?
Sure |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
All tests are finally passing, and the PR is ready for your review.
|
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @bhimrazy @Borda @craigpfeifer @aniketmaurya
@t-vi when will this get released? |
What does this PR do?
feat: Add support for
OpenAISpec
inlitgpt serve
Description:
OpenAISpec
from LitServe to enable OpenAI-compatible API endpoints.Fixes: #1908
Also closes: #1865
Usage
Step 1: Serve a model with
--openai_spec
enabledlitgpt download HuggingFaceTB/SmolLM2-135M-Instruct litgpt serve HuggingFaceTB/SmolLM2-135M-Instruct --openai_spec true
Step 2: Test with
curl