This repository has been archived by the owner on Nov 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 126
Add Anyscale Endpoint support and Llama Tokenizer #173
Merged
Conversation
This file contains 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
igiloh-pinecone
suggested changes
Nov 15, 2023
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.
@kylehh Thank you very much for your contribution!! This is highly appreciated!
Please see a few comments. The main 3 issues:
- We plan to merge Upgrade openai sdk to v.1.2.3 #171 today, which adds a
base_url
init argument toOpenAILLM
class. With that change, the implementation ofAnyscaleLLM
could be as easy as inheritingOpenAILLM
and passing hard codedbase_url
tosuper().__init__()
. - The new classes,
AnyscaleLLM
andLlamaTokenizer
require their own unit classes before this PR can be merged. - Let's figure out together if it's really required for every Canopy user to generate a HF identification token just for the Tokenizer, or can we find a more user friendly solution.
The underlying HuggingFace tokenizer has a proper `.tokenize()` method, as well as a `.convert_tokens_to_string()` method. Together with a few configurations like `add_bos_token=False` the tokenizer now passes all tests
Added a few more asserts, and more elaborate prints on failure
The new LlamaTokenizer class should be almost identical to OpenAI tokenizer, other than the expected tokens being slightly different
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.
A few improvements to `LLamaTokenizer` + its unit test
igiloh-pinecone
approved these changes
Nov 26, 2023
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.
LGTM!
Thank you @kylehh for all of your efforts. Merging.
It is required for the system tests
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
Solution
tokenizers
libraryType of Change
Test Plan
Describe specific steps for validating this change.
canopy start --config anyscale.yaml