A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 21:00 UTC
Use smaller embedding model when not testing model specifically (#13891)
Harry Mellor committed
Feb 28, 2025 at 08:50 UTC
76c89fcadddbbd117a65bda74b92d750a88fbe05
9 files changed
+15
-15
tests/entrypoints/llm/test_encode.py
+1
-1
@@ -8,7 +8,7 @@ import pytest
8
from vllm import LLM, PoolingParams, PoolingRequestOutput
9
from vllm.distributed import cleanup_dist_env_and_memory
10
11
-MODEL_NAME = "intfloat/e5-mistral-7b-instruct"
11
+MODEL_NAME = "intfloat/multilingual-e5-small"
12
13
PROMPTS = [
14
"Hello, my name is",
tests/entrypoints/openai/test_embedding.py
+1
-1
@@ -13,7 +13,7 @@ from vllm.transformers_utils.tokenizer import get_tokenizer
13
14
from ...utils import RemoteOpenAIServer
15
16
-MODEL_NAME = "intfloat/e5-mistral-7b-instruct"
16
+MODEL_NAME = "intfloat/multilingual-e5-small"
17
DUMMY_CHAT_TEMPLATE = """{% for message in messages %}{{message['role'] + ': ' + message['content'] + '\\n'}}{% endfor %}""" # noqa: E501
18
19
tests/entrypoints/openai/test_metrics.py
+2
-2
@@ -282,7 +282,7 @@ async def test_metrics_exist(server: RemoteOpenAIServer,
282
def test_metrics_exist_run_batch(use_v1: bool):
283
if use_v1:
284
pytest.skip("Skipping test on vllm V1")
285
- input_batch = """{"custom_id": "request-0", "method": "POST", "url": "/v1/embeddings", "body": {"model": "intfloat/e5-mistral-7b-instruct", "input": "You are a helpful assistant."}}""" # noqa: E501
285
+ input_batch = """{"custom_id": "request-0", "method": "POST", "url": "/v1/embeddings", "body": {"model": "intfloat/multilingual-e5-small", "input": "You are a helpful assistant."}}""" # noqa: E501
286
287
base_url = "0.0.0.0"
288
port = "8001"
@@ -302,7 +302,7 @@ def test_metrics_exist_run_batch(use_v1: bool):
302
"-o",
303
output_file.name,
304
"--model",
305
- "intfloat/e5-mistral-7b-instruct",
305
+ "intfloat/multilingual-e5-small",
306
"--enable-metrics",
307
"--url",
308
base_url,
tests/entrypoints/openai/test_run_batch.py
+5
-5
@@ -18,10 +18,10 @@ INPUT_BATCH = """{"custom_id": "request-1", "method": "POST", "url": "/v1/chat/c
18
INVALID_INPUT_BATCH = """{"invalid_field": "request-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "NousResearch/Meta-Llama-3-8B-Instruct", "messages": [{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 1000}}
19
{"custom_id": "request-2", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "NousResearch/Meta-Llama-3-8B-Instruct", "messages": [{"role": "system", "content": "You are an unhelpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 1000}}"""
20
21
-INPUT_EMBEDDING_BATCH = """{"custom_id": "request-1", "method": "POST", "url": "/v1/embeddings", "body": {"model": "intfloat/e5-mistral-7b-instruct", "input": "You are a helpful assistant."}}
22
-{"custom_id": "request-2", "method": "POST", "url": "/v1/embeddings", "body": {"model": "intfloat/e5-mistral-7b-instruct", "input": "You are an unhelpful assistant."}}
21
+INPUT_EMBEDDING_BATCH = """{"custom_id": "request-1", "method": "POST", "url": "/v1/embeddings", "body": {"model": "intfloat/multilingual-e5-small", "input": "You are a helpful assistant."}}
22
+{"custom_id": "request-2", "method": "POST", "url": "/v1/embeddings", "body": {"model": "intfloat/multilingual-e5-small", "input": "You are an unhelpful assistant."}}
23
24
-{"custom_id": "request-3", "method": "POST", "url": "/v1/embeddings", "body": {"model": "intfloat/e5-mistral-7b-instruct", "input": "Hello world!"}}
24
+{"custom_id": "request-3", "method": "POST", "url": "/v1/embeddings", "body": {"model": "intfloat/multilingual-e5-small", "input": "Hello world!"}}
25
{"custom_id": "request-4", "method": "POST", "url": "/v1/embeddings", "body": {"model": "NonExistModel", "input": "Hello world!"}}"""
26
27
INPUT_SCORE_BATCH = """{"custom_id": "request-1", "method": "POST", "url": "/v1/score", "body": {"model": "BAAI/bge-reranker-v2-m3", "text_1": "What is the capital of France?", "text_2": ["The capital of Brazil is Brasilia.", "The capital of France is Paris."]}}
@@ -37,7 +37,7 @@ def test_empty_file():
37
proc = subprocess.Popen([
38
sys.executable, "-m", "vllm.entrypoints.openai.run_batch", "-i",
39
input_file.name, "-o", output_file.name, "--model",
40
- "intfloat/e5-mistral-7b-instruct"
40
+ "intfloat/multilingual-e5-small"
41
], )
42
proc.communicate()
43
proc.wait()
@@ -97,7 +97,7 @@ def test_embeddings():
97
proc = subprocess.Popen([
98
sys.executable, "-m", "vllm.entrypoints.openai.run_batch", "-i",
99
input_file.name, "-o", output_file.name, "--model",
100
- "intfloat/e5-mistral-7b-instruct"
100
+ "intfloat/multilingual-e5-small"
101
], )
102
proc.communicate()
103
proc.wait()
tests/model_executor/test_model_load_with_params.py
+2
-2
@@ -14,7 +14,7 @@ MODEL_NAME = os.environ.get("MODEL_NAME", "BAAI/bge-base-en-v1.5")
14
REVISION = os.environ.get("REVISION", "main")
15
16
MODEL_NAME_ROBERTA = os.environ.get("MODEL_NAME",
17
- "intfloat/multilingual-e5-large")
17
+ "intfloat/multilingual-e5-small")
18
REVISION_ROBERTA = os.environ.get("REVISION", "main")
19
20
@@ -83,7 +83,7 @@ def test_roberta_model_loading_with_params(vllm_runner):
83
assert model_config.pooler_config.pooling_norm
84
85
# asserts on the tokenizer loaded
86
- assert model_tokenizer.tokenizer_id == "intfloat/multilingual-e5-large"
86
+ assert model_tokenizer.tokenizer_id == "intfloat/multilingual-e5-small"
87
assert not model_tokenizer.tokenizer_config["do_lower_case"]
88
89
def check_model(model):
tests/models/embedding/language/test_embedding.py
+1
-1
@@ -17,7 +17,7 @@ from ..utils import check_embeddings_close
17
pytest.param("BAAI/bge-base-en-v1.5",
18
marks=[pytest.mark.core_model, pytest.mark.cpu_model]),
19
pytest.param("sentence-transformers/all-MiniLM-L12-v2"),
20
- pytest.param("intfloat/multilingual-e5-large"),
20
+ pytest.param("intfloat/multilingual-e5-small"),
21
# [Decoder-only]
22
pytest.param("BAAI/bge-multilingual-gemma2",
23
marks=[pytest.mark.core_model]),
tests/models/registry.py
+1
-1
@@ -211,7 +211,7 @@ _EMBEDDING_EXAMPLE_MODELS = {
211
"Qwen2ForSequenceClassification": _HfExamplesInfo("jason9693/Qwen2.5-1.5B-apeach"), # noqa: E501
212
"RobertaModel": _HfExamplesInfo("sentence-transformers/stsb-roberta-base-v2"), # noqa: E501
213
"RobertaForMaskedLM": _HfExamplesInfo("sentence-transformers/all-roberta-large-v1"), # noqa: E501
214
- "XLMRobertaModel": _HfExamplesInfo("intfloat/multilingual-e5-large"),
214
+ "XLMRobertaModel": _HfExamplesInfo("intfloat/multilingual-e5-small"),
215
# [Multimodal]
216
"LlavaNextForConditionalGeneration": _HfExamplesInfo("royokong/e5-v"),
217
"Phi3VForCausalLM": _HfExamplesInfo("TIGER-Lab/VLM2Vec-Full",
tests/test_config.py
+1
-1
@@ -13,7 +13,7 @@ from vllm.platforms import current_platform
13
("model_id", "expected_runner_type", "expected_task"),
14
[
15
("distilbert/distilgpt2", "generate", "generate"),
16
- ("intfloat/e5-mistral-7b-instruct", "pooling", "embed"),
16
+ ("intfloat/multilingual-e5-small", "pooling", "embed"),
17
("jason9693/Qwen2.5-1.5B-apeach", "pooling", "classify"),
18
("cross-encoder/ms-marco-MiniLM-L-6-v2", "pooling", "score"),
19
("Qwen/Qwen2.5-Math-RM-72B", "pooling", "reward"),
vllm/test_utils.py
+1
-1
@@ -28,7 +28,7 @@ MODELS_ON_S3 = [
28
"HuggingFaceM4/Idefics3-8B-Llama3",
29
"internlm/internlm2-1_8b-reward",
30
"intfloat/e5-mistral-7b-instruct",
31
- "intfloat/multilingual-e5-large",
31
+ "intfloat/multilingual-e5-small",
32
"jason9693/Qwen2.5-1.5B-apeach",
33
"llava-hf/llava-1.5-7b-hf",
34
"llava-hf/llava-onevision-qwen2-0.5b-ov-hf",