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
82bfc38d
Unverified
Commit
82bfc38d
authored
Nov 06, 2024
by
Cyrus Leung
Committed by
GitHub
Nov 06, 2024
Browse files
[Misc] Sort the list of embedding models (#10037)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
c4cacbaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
vllm/model_executor/models/registry.py
vllm/model_executor/models/registry.py
+8
-18
No files found.
vllm/model_executor/models/registry.py
View file @
82bfc38d
...
...
@@ -94,33 +94,23 @@ _TEXT_GENERATION_MODELS = {
_EMBEDDING_MODELS
=
{
# [Text-only]
"BertModel"
:
(
"bert"
,
"BertEmbeddingModel"
),
"DeciLMForCausalLM"
:
(
"decilm"
,
"DeciLMForCausalLM"
),
"Gemma2Model"
:
(
"gemma2"
,
"Gemma2EmbeddingModel"
),
"LlamaModel"
:
(
"llama"
,
"LlamaEmbeddingModel"
),
**
{
# Multiple models share the same architecture, so we include them all
k
:
(
mod
,
arch
)
for
k
,
(
mod
,
arch
)
in
_TEXT_GENERATION_MODELS
.
items
()
if
arch
==
"LlamaForCausalLM"
},
"MistralModel"
:
(
"llama"
,
"LlamaEmbeddingModel"
),
"Qwen2ForRewardModel"
:
(
"qwen2_rm"
,
"Qwen2ForRewardModel"
),
"Qwen2ForSequenceClassification"
:
(
"qwen2_cls"
,
"Qwen2ForSequenceClassification"
),
"LlamaForCausalLM"
:
(
"llama"
,
"LlamaForCausalLM"
),
"Phi3ForCausalLM"
:
(
"phi3"
,
"Phi3ForCausalLM"
),
"DeciLMForCausalLM"
:
(
"decilm"
,
"DeciLMForCausalLM"
),
"Qwen2ForRewardModel"
:
(
"qwen2_rm"
,
"Qwen2ForRewardModel"
),
"Qwen2ForSequenceClassification"
:
(
"qwen2_cls"
,
"Qwen2ForSequenceClassification"
),
# noqa: E501
# [Multimodal]
"LlavaNextForConditionalGeneration"
:
(
"llava_next"
,
"LlavaNextForConditionalGeneration"
),
# noqa: E501
"Phi3VForCausalLM"
:
(
"phi3v"
,
"Phi3VForCausalLM"
),
}
def
add_embedding_models
(
base_models
,
embedding_models
):
with_pooler_method_models
=
{}
embedding_models_name
=
embedding_models
.
keys
()
for
name
,
(
path
,
arch
)
in
base_models
.
items
():
if
arch
in
embedding_models_name
:
with_pooler_method_models
[
name
]
=
(
path
,
arch
)
return
with_pooler_method_models
_EMBEDDING_MODELS
=
{
**
add_embedding_models
(
_TEXT_GENERATION_MODELS
,
_EMBEDDING_MODELS
),
**
_EMBEDDING_MODELS
,
}
_MULTIMODAL_MODELS
=
{
# [Decoder-only]
"Blip2ForConditionalGeneration"
:
(
"blip2"
,
"Blip2ForConditionalGeneration"
),
...
...
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