[Model] Support Qwen2 embeddings and use tags to select model tests (#10184)
This commit is contained in:
@@ -4,37 +4,52 @@ Run `pytest tests/models/test_models.py`.
|
||||
"""
|
||||
import pytest
|
||||
|
||||
from vllm.platforms import current_platform
|
||||
|
||||
from ...utils import check_logprobs_close
|
||||
|
||||
MODELS = [
|
||||
"facebook/opt-125m", # opt
|
||||
"openai-community/gpt2", # gpt2
|
||||
# "Milos/slovak-gpt-j-405M", # gptj
|
||||
# "bigcode/tiny_starcoder_py", # gpt_bigcode
|
||||
# "EleutherAI/pythia-70m", # gpt_neox
|
||||
"bigscience/bloom-560m", # bloom - testing alibi slopes
|
||||
"microsoft/phi-2", # phi
|
||||
# "stabilityai/stablelm-3b-4e1t", # stablelm
|
||||
# "bigcode/starcoder2-3b", # starcoder2
|
||||
"google/gemma-1.1-2b-it", # gemma
|
||||
"Qwen/Qwen2.5-0.5B-Instruct", # qwen2
|
||||
"meta-llama/Llama-3.2-1B-Instruct", # llama
|
||||
]
|
||||
|
||||
if not current_platform.is_cpu():
|
||||
MODELS += [
|
||||
# fused_moe which not supported on CPU
|
||||
"openbmb/MiniCPM3-4B",
|
||||
]
|
||||
|
||||
target_dtype = "half"
|
||||
|
||||
|
||||
@pytest.mark.core_model
|
||||
@pytest.mark.parametrize("model", MODELS)
|
||||
@pytest.mark.parametrize("dtype", [target_dtype])
|
||||
@pytest.mark.parametrize(
|
||||
"model",
|
||||
[
|
||||
pytest.param(
|
||||
"bigscience/bloom-560m", # bloom - testing alibi slopes
|
||||
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
|
||||
),
|
||||
pytest.param(
|
||||
"openai-community/gpt2", # gpt2
|
||||
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
|
||||
),
|
||||
pytest.param("Milos/slovak-gpt-j-405M"), # gptj
|
||||
pytest.param("bigcode/tiny_starcoder_py"), # gpt_bigcode
|
||||
pytest.param("EleutherAI/pythia-70m"), # gpt_neox
|
||||
pytest.param(
|
||||
"google/gemma-1.1-2b-it", # gemma
|
||||
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
|
||||
),
|
||||
pytest.param(
|
||||
"meta-llama/Llama-3.2-1B-Instruct", # llama
|
||||
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
|
||||
),
|
||||
pytest.param(
|
||||
"openbmb/MiniCPM3-4B",
|
||||
# fused_moe not supported on CPU
|
||||
marks=[pytest.mark.core_model],
|
||||
),
|
||||
pytest.param(
|
||||
"facebook/opt-125m", # opt
|
||||
marks=[pytest.mark.core_model, pytest.mark.cpu_model],
|
||||
),
|
||||
pytest.param(
|
||||
"microsoft/phi-2", # phi
|
||||
marks=[pytest.mark.core_model],
|
||||
),
|
||||
pytest.param(
|
||||
"Qwen/Qwen2.5-0.5B-Instruct", # qwen2
|
||||
marks=[pytest.mark.core_model],
|
||||
),
|
||||
pytest.param("stabilityai/stablelm-3b-4e1t"), # stablelm
|
||||
pytest.param("bigcode/starcoder2-3b"), # starcoder2
|
||||
])
|
||||
@pytest.mark.parametrize("dtype", ["half"])
|
||||
@pytest.mark.parametrize("max_tokens", [32])
|
||||
@pytest.mark.parametrize("num_logprobs", [5])
|
||||
def test_models(
|
||||
|
||||
Reference in New Issue
Block a user