@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 696b01af8f
Fork 0

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 16, 09:30 UTC

[CI/Build] Split up decoder-only LM tests (#9488)

Co-authored-by: Nick Hill <nickhill@us.ibm.com>

Cyrus Leung committed Oct 21, 2024 at 12:27 UTC 696b01af8fac1819b2409cc0f205c73ef553558c
3 files changed +18 -57
.buildkite/test-pipeline.yaml
+11 -2
@@ -310,13 +310,22 @@ steps:
310 - pytest -v -s models/test_oot_registration.py # it needs a clean process
311 - pytest -v -s models/*.py --ignore=models/test_oot_registration.py
312
313 -- label: Decoder-only Language Models Test # 1h36min
313 +- label: Decoder-only Language Models Test (Standard) # 35min
314 #mirror_hardwares: [amd]
315 source_file_dependencies:
316 - vllm/
317 - tests/models/decoder_only/language
318 commands:
319 - - pytest -v -s models/decoder_only/language
319 + - pytest -v -s models/decoder_only/language/test_models.py
320 + - pytest -v -s models/decoder_only/language/test_big_models.py
321 +
322 +- label: Decoder-only Language Models Test (Extended) # 1h20min
323 + nightly: true
324 + source_file_dependencies:
325 + - vllm/
326 + - tests/models/decoder_only/language
327 + commands:
328 + - pytest -v -s models/decoder_only/language --ignore=models/decoder_only/language/test_models.py --ignore=models/decoder_only/language/test_big_models.py
329
330 - label: Decoder-only Multi-Modal Models Test # 1h31min
331 #mirror_hardwares: [amd]
tests/models/decoder_only/language/test_big_models.py
+7 -3
@@ -21,10 +21,14 @@ MODELS = [
21 ]
22
23 if not current_platform.is_cpu():
24 - # MiniCPM requires fused_moe which is not supported by CPU
25 - MODELS.append("openbmb/MiniCPM3-4B")
24 + MODELS += [
25 + # fused_moe which not supported on CPU
26 + "openbmb/MiniCPM3-4B",
27 + # Head size isn't supported on CPU
28 + "h2oai/h2o-danube3-4b-base",
29 + ]
30
27 -#TODO: remove this after CPU float16 support ready
31 +# TODO: remove this after CPU float16 support ready
32 target_dtype = "float" if current_platform.is_cpu() else "half"
33
34
tests/models/decoder_only/language/test_danube3_4b.py deleted
-52
@@ -1,52 +0,0 @@
1 -"""Compare the outputs of HF and vLLM when using greedy sampling.
2 -
3 -This tests danube3 separately because its head size isn't supported on CPU yet.
4 -
5 -Run `pytest tests/models/test_danube3_4b.py`.
6 -"""
7 -import pytest
8 -
9 -from ...utils import check_outputs_equal
10 -
11 -MODELS = ["h2oai/h2o-danube3-4b-base"]
12 -
13 -target_dtype = "half"
14 -
15 -
16 -@pytest.mark.parametrize("model", MODELS)
17 -@pytest.mark.parametrize("dtype", [target_dtype])
18 -@pytest.mark.parametrize("max_tokens", [32])
19 -def test_models(
20 - hf_runner,
21 - vllm_runner,
22 - example_prompts,
23 - model: str,
24 - dtype: str,
25 - max_tokens: int,
26 -) -> None:
27 - with hf_runner(model, dtype=dtype) as hf_model:
28 - hf_outputs = hf_model.generate_greedy(example_prompts, max_tokens)
29 -
30 - with vllm_runner(model, dtype=dtype) as vllm_model:
31 - vllm_outputs = vllm_model.generate_greedy(example_prompts, max_tokens)
32 -
33 - check_outputs_equal(
34 - outputs_0_lst=hf_outputs,
35 - outputs_1_lst=vllm_outputs,
36 - name_0="hf",
37 - name_1="vllm",
38 - )
39 -
40 -
41 -@pytest.mark.parametrize("model", MODELS)
42 -@pytest.mark.parametrize("dtype", [target_dtype])
43 -def test_model_print(
44 - vllm_runner,
45 - model: str,
46 - dtype: str,
47 -) -> None:
48 - with vllm_runner(model, dtype=dtype) as vllm_model:
49 - # This test is for verifying whether the model's extra_repr
50 - # can be printed correctly.
51 - print(vllm_model.model.llm_engine.model_executor.driver_worker.
52 - model_runner.model)