Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
11fcf0e0
Unverified
Commit
11fcf0e0
authored
Nov 22, 2024
by
Noam Gat
Committed by
GitHub
Nov 21, 2024
Browse files
Remove token-adding chat embedding params (#10551)
Signed-off-by:
Noam Gat
<
noamgat@gmail.com
>
parent
b6374e09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
18 deletions
+4
-18
vllm/entrypoints/openai/protocol.py
vllm/entrypoints/openai/protocol.py
+0
-16
vllm/entrypoints/openai/serving_embedding.py
vllm/entrypoints/openai/serving_embedding.py
+4
-2
No files found.
vllm/entrypoints/openai/protocol.py
View file @
11fcf0e0
...
@@ -760,22 +760,6 @@ class EmbeddingChatRequest(OpenAIBaseModel):
...
@@ -760,22 +760,6 @@ class EmbeddingChatRequest(OpenAIBaseModel):
# doc: end-chat-embedding-pooling-params
# doc: end-chat-embedding-pooling-params
# doc: begin-chat-embedding-extra-params
# doc: begin-chat-embedding-extra-params
add_generation_prompt
:
bool
=
Field
(
default
=
True
,
description
=
(
"If true, the generation prompt will be added to the chat template. "
"This is a parameter used by chat template in tokenizer config of the "
"model."
),
)
continue_final_message
:
bool
=
Field
(
default
=
False
,
description
=
(
"If this is set, the chat will be formatted so that the final "
"message in the chat is open-ended, without any EOS tokens. The "
"model will continue this message rather than starting a new one. "
"This allows you to
\"
prefill
\"
part of the model's response for it. "
"Cannot be used at the same time as `add_generation_prompt`."
),
)
add_special_tokens
:
bool
=
Field
(
add_special_tokens
:
bool
=
Field
(
default
=
False
,
default
=
False
,
description
=
(
description
=
(
...
...
vllm/entrypoints/openai/serving_embedding.py
View file @
11fcf0e0
...
@@ -148,8 +148,10 @@ class OpenAIServingEmbedding(OpenAIServing):
...
@@ -148,8 +148,10 @@ class OpenAIServingEmbedding(OpenAIServing):
chat_template
=
request
.
chat_template
or
self
.
chat_template
,
chat_template
=
request
.
chat_template
or
self
.
chat_template
,
chat_template_content_format
=
self
.
chat_template_content_format
=
self
.
chat_template_content_format
,
chat_template_content_format
,
add_generation_prompt
=
request
.
add_generation_prompt
,
# In embedding requests, we are not generating tokens,
continue_final_message
=
request
.
continue_final_message
,
# so there is no need to append extra tokens to the input
add_generation_prompt
=
False
,
continue_final_message
=
False
,
truncate_prompt_tokens
=
truncate_prompt_tokens
,
truncate_prompt_tokens
=
truncate_prompt_tokens
,
add_special_tokens
=
request
.
add_special_tokens
,
add_special_tokens
=
request
.
add_special_tokens
,
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment