-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Openai embedding fix to support jina-embeddings-v2 #4642
Conversation
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
Merge dev branch
tested embedding model:
|
extensions/openai/completions.py
Outdated
@@ -235,7 +235,7 @@ def chat_completions_common(body: dict, is_legacy: bool = False, stream=False) - | |||
|
|||
max_tokens = generate_params['max_new_tokens'] | |||
if max_tokens in [None, 0]: | |||
generate_params['max_new_tokens'] = 4096 | |||
generate_params['max_new_tokens'] = 200 |
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.
Setting this high isn't necessary, as the auto_max_new_tokens fills the context. The 200 reference value is used when the context is fully used to remove old messages.
Looks good, thanks |
@wizd Does Jina embedding runs on cuda devices? Other setense transformer embedding always lies on CPU even if specifiying cuda |
Checklist:
tested with: https://huggingface.co/jinaai/jina-embeddings-v2-base-en