OpenAI refactoring#2360
Merged
simon-mo merged 15 commits intovllm-project:mainfrom Jan 17, 2024
FlorianJoncour:main
Merged
Conversation
added 2 commits
January 6, 2024 02:18
NikolaBorisov
approved these changes
Jan 10, 2024
Contributor
NikolaBorisov
left a comment
There was a problem hiding this comment.
I think this looks ok.
simon-mo
approved these changes
Jan 12, 2024
| return StreamingResponse(fake_stream_generator(), | ||
| generator = await openai_serving_completion.create_completion( | ||
| request, raw_request) | ||
| logger.info("TYPE COMPLETION : %s" % str(type(generator))) |
Collaborator
There was a problem hiding this comment.
Suggested change
| logger.info("TYPE COMPLETION : %s" % str(type(generator))) |
| engine_model_config.tokenizer, | ||
| tokenizer_mode=engine_model_config.tokenizer_mode, | ||
| trust_remote_code=engine_model_config.trust_remote_code) | ||
| self._load_chat_template(self.chat_template) |
Collaborator
There was a problem hiding this comment.
chat template is the responsibility of ChatCompletion only
Collaborator
|
will fix and merge this once #2355 is in. |
Contributor
Author
|
Fine. I still made the changes ^^ |
Collaborator
|
@FlorianJoncour, merged! Thank you for the contribution, looking forward to the tool calling PR! |
|
@FlorianJoncour Is there a new pr of function_call? |
Contributor
Author
|
I work on it, it shouldn't be too long |
hongxiayang
pushed a commit
to hongxiayang/vllm
that referenced
this pull request
Jan 18, 2024
joennlae
added a commit
to joennlae/vllm
that referenced
this pull request
Jan 21, 2024
introduced with vllm-project#2360 was not here before
hongxiayang
pushed a commit
to hongxiayang/vllm
that referenced
this pull request
Feb 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a reset of #2210.
The final goal is to implement function calls using the OpenAI API.
But since it was likely too much all at once, we will do it in two parts.
This pull request is only a refactoring/relocation of code to separate the Uvicorn server, the chat, and the completions.
The chat and completions are now in separate classes.
The goal is to make the entire codebase clearer and more easily modifiable in the future, as the completion should now be considered legacy.
The chat part has been divided into several methods, while the completion remained largely unchanged except for being encapsulated within a class.
Tested chat and completions with and without stream mode.