-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix/issue 10113 embeddings use non default tokenizer #10629
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
Fix/issue 10113 embeddings use non default tokenizer #10629
Conversation
… hosted_vllm models
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
litellm/proxy/proxy_server.py
Outdated
@@ -3814,14 +3814,15 @@ async def embeddings( # noqa: PLR0915 | |||
if m["model_name"] == data["model"] and ( | |||
m["litellm_params"]["model"] in litellm.open_ai_embedding_models | |||
or m["litellm_params"]["model"].startswith("azure/") | |||
or m["litellm_params"]["model"].startswith("hosted_vllm/") |
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.
add a unit test for this in test_proxy_server.py
in tests/litellm
-
import socket |
So there are no future regressions.
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.
…of lists of tokens (int)" This reverts commit a48acd9.
…t a list of tokens
…accept a arrays of tokens as input When passing a list of tokens as input, verify the provider of the model by going through the list of models (`llm_model_list`). First, it check for model name then get the provider and verify if it accept or not arrays of tokens. If yes, then pass, else decode. Previously, it was verifying provider and model name at the same time resulting in decoding even if the current model checked was not the target one (looping onto `llm_model_list`)
…th input as array of tokens Ref: BerriAI#10113
Title
Embeddings: Not use default
gpt-3.5-turbo
's tokenizerRelevant issues
Fixes #10113
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/
directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit
Type
🐛 Bug Fix
Changes