Skip to content

Commit 5d5886e

Browse files
committed
add models to tests/models/registry.py
1 parent 8963cc8 commit 5d5886e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

tests/models/embedding/language/test_snowflake_arctic_embed.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ def test_models(
5959
max_model_len=None,
6060
**vllm_extra_kwargs) as vllm_model:
6161

62-
if model_info.is_matryoshka:
63-
assert vllm_model.model.llm_engine.model_config.is_matryoshka
64-
else:
65-
assert not vllm_model.model.llm_engine.model_config.is_matryoshka
62+
assert (vllm_model.model.llm_engine.model_config.is_matryoshka ==
63+
model_info.is_matryoshka)
6664

6765
vllm_outputs = vllm_model.encode(example_prompts)
6866

tests/models/registry.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,13 @@ def check_available_online(
245245
"BertModel": _HfExamplesInfo("BAAI/bge-base-en-v1.5"),
246246
"Gemma2Model": _HfExamplesInfo("BAAI/bge-multilingual-gemma2"),
247247
"GritLM": _HfExamplesInfo("parasail-ai/GritLM-7B-vllm"),
248+
"GteModel": _HfExamplesInfo("Snowflake/snowflake-arctic-embed-m-v2.0"),
248249
"InternLM2ForRewardModel": _HfExamplesInfo("internlm/internlm2-1_8b-reward",
249250
trust_remote_code=True),
250251
"JambaForSequenceClassification": _HfExamplesInfo("ai21labs/Jamba-tiny-reward-dev"), # noqa: E501
251252
"LlamaModel": _HfExamplesInfo("llama", is_available_online=False),
252253
"MistralModel": _HfExamplesInfo("intfloat/e5-mistral-7b-instruct"),
254+
"NomicBertModel": _HfExamplesInfo("Snowflake/snowflake-arctic-embed-m-long"), # noqa: E501
253255
"Qwen2Model": _HfExamplesInfo("ssmits/Qwen2-7B-Instruct-embed-base"),
254256
"Qwen2ForRewardModel": _HfExamplesInfo("Qwen/Qwen2.5-Math-RM-72B"),
255257
"Qwen2ForProcessRewardModel": _HfExamplesInfo("Qwen/Qwen2.5-Math-PRM-7B"),

vllm/model_executor/models/registry.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,11 @@
121121
_EMBEDDING_MODELS = {
122122
# [Text-only]
123123
"BertModel": ("bert", "BertEmbeddingModel"),
124-
"RobertaModel": ("roberta", "RobertaEmbeddingModel"),
125-
"RobertaForMaskedLM": ("roberta", "RobertaEmbeddingModel"),
126-
"XLMRobertaModel": ("roberta", "RobertaEmbeddingModel"),
127-
"NomicBertModel": ("bert", "NomicBertEmbeddingModel"),
128-
"GteModel": ("bert", "GteEmbeddingModel"),
129124
"DeciLMForCausalLM": ("nemotron_nas", "DeciLMForCausalLM"),
130125
"Gemma2Model": ("gemma2", "Gemma2ForCausalLM"),
131126
"GlmForCausalLM": ("glm", "GlmForCausalLM"),
132127
"GritLM": ("gritlm", "GritLM"),
128+
"GteModel": ("bert", "GteEmbeddingModel"),
133129
"InternLM2ForRewardModel": ("internlm2", "InternLM2ForRewardModel"),
134130
"JambaForSequenceClassification": ("jamba", "JambaForSequenceClassification"), # noqa: E501
135131
"LlamaModel": ("llama", "LlamaForCausalLM"),
@@ -139,12 +135,16 @@
139135
if arch == "LlamaForCausalLM"
140136
},
141137
"MistralModel": ("llama", "LlamaForCausalLM"),
138+
"NomicBertModel": ("bert", "NomicBertEmbeddingModel"),
142139
"Phi3ForCausalLM": ("phi3", "Phi3ForCausalLM"),
143140
"Qwen2Model": ("qwen2", "Qwen2EmbeddingModel"),
144141
"Qwen2ForCausalLM": ("qwen2", "Qwen2ForCausalLM"),
145142
"Qwen2ForRewardModel": ("qwen2_rm", "Qwen2ForRewardModel"),
146143
"Qwen2ForProcessRewardModel": ("qwen2_rm", "Qwen2ForProcessRewardModel"),
144+
"RobertaForMaskedLM": ("roberta", "RobertaEmbeddingModel"),
145+
"RobertaModel": ("roberta", "RobertaEmbeddingModel"),
147146
"TeleChat2ForCausalLM": ("telechat2", "TeleChat2ForCausalLM"),
147+
"XLMRobertaModel": ("roberta", "RobertaEmbeddingModel"),
148148
# [Multimodal]
149149
"LlavaNextForConditionalGeneration": ("llava_next", "LlavaNextForConditionalGeneration"), # noqa: E501
150150
"Phi3VForCausalLM": ("phi3v", "Phi3VForCausalLM"),

0 commit comments

Comments
 (0)