@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4203926f10
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 15, 16:00 UTC

[CI/Build] Further clean up LoRA tests (#15920)

Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>

Jee Jee Li committed Apr 2, 2025 at 16:39 UTC 4203926f10f5170c7ef0dfefb676f3b82a7f5e0a
6 files changed +9 -46
.buildkite/test-pipeline.yaml
+1 -3
@@ -289,7 +289,7 @@ steps:
289 source_file_dependencies:
290 - vllm/lora
291 - tests/lora
292 - command: pytest -v -s lora --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT --ignore=lora/test_chatglm3_tp.py --ignore=lora/test_llama_tp.py --ignore=lora/test_minicpmv_tp.py --ignore=lora/test_transfomers_model.py
292 + command: pytest -v -s lora --shard-id=$$BUILDKITE_PARALLEL_JOB --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT --ignore=lora/test_chatglm3_tp.py --ignore=lora/test_llama_tp.py
293 parallelism: 4
294
295 - label: PyTorch Fullgraph Smoke Test # 9min
@@ -602,8 +602,6 @@ steps:
602 # requires multi-GPU testing for validation.
603 - pytest -v -s -x lora/test_chatglm3_tp.py
604 - pytest -v -s -x lora/test_llama_tp.py
605 - - pytest -v -s -x lora/test_minicpmv_tp.py
606 - - pytest -v -s -x lora/test_transfomers_model.py
605
606
607 - label: Weight Loading Multiple GPU Test # 33min
tests/lora/conftest.py
-23
@@ -2,7 +2,6 @@
2
3 import tempfile
4 from collections import OrderedDict
5 -from typing import TypedDict
5 from unittest.mock import MagicMock, patch
6
7 import pytest
@@ -26,28 +25,6 @@ from vllm.model_executor.models.interfaces import SupportsLoRA
25 from vllm.platforms import current_platform
26
27
29 -class ContextIDInfo(TypedDict):
30 - lora_id: int
31 - context_length: str
32 -
33 -
34 -class ContextInfo(TypedDict):
35 - lora: str
36 - context_length: str
37 -
38 -
39 -LONG_LORA_INFOS: list[ContextIDInfo] = [{
40 - "lora_id": 1,
41 - "context_length": "16k",
42 -}, {
43 - "lora_id": 2,
44 - "context_length": "16k",
45 -}, {
46 - "lora_id": 3,
47 - "context_length": "32k",
48 -}]
49 -
50 -
28 @pytest.fixture()
29 def should_do_global_cleanup_after_test(request) -> bool:
30 """Allow subdirectories to skip global cleanup by overriding this fixture.
tests/lora/test_layers.py
+1 -1
@@ -59,7 +59,7 @@ DEVICES = ([
59 # prefill stage(True) or decode stage(False)
60 STAGES = [True, False]
61
62 -NUM_RANDOM_SEEDS = 10
62 +NUM_RANDOM_SEEDS = 6
63
64 VOCAB_PARALLEL_EMBEDDING_TEST_NUM_RANDOM_SEEDS = 128
65
tests/lora/test_llama_tp.py
-17
@@ -153,20 +153,3 @@ def test_llama_lora_tp4_fully_sharded_loras(sql_lora_files):
153 enable_chunked_prefill=True,
154 )
155 generate_and_test(llm, sql_lora_files)
156 -
157 -
158 -@multi_gpu_test(num_gpus=4)
159 -@create_new_process_for_each_test()
160 -def test_llama_lora_tp4_fully_sharded_enable_bias(sql_lora_files):
161 -
162 - llm = vllm.LLM(
163 - MODEL_PATH,
164 - enable_lora=True,
165 - max_num_seqs=16,
166 - max_loras=4,
167 - tensor_parallel_size=4,
168 - fully_sharded_loras=True,
169 - enable_lora_bias=True,
170 - enable_chunked_prefill=True,
171 - )
172 - generate_and_test(llm, sql_lora_files)
tests/lora/test_minicpmv_tp.py
-1
@@ -58,7 +58,6 @@ def do_sample(llm: vllm.LLM, lora_path: str, lora_id: int) -> list[str]:
58 @pytest.mark.xfail(
59 current_platform.is_rocm(),
60 reason="MiniCPM-V dependency xformers incompatible with ROCm")
61 -@create_new_process_for_each_test()
61 def test_minicpmv_lora(minicpmv_lora_files):
62 llm = vllm.LLM(
63 MODEL_PATH,
tests/lora/test_transfomers_model.py
+7 -1
@@ -1,7 +1,10 @@
1 # SPDX-License-Identifier: Apache-2.0
2
3 +import pytest
4 +
5 import vllm
6 from vllm.lora.request import LoRARequest
7 +from vllm.platforms import current_platform
8
9 from ..utils import create_new_process_for_each_test, multi_gpu_test
10
@@ -44,7 +47,6 @@ def do_sample(llm: vllm.LLM, lora_path: str, lora_id: int) -> list[str]:
47 return generated_texts
48
49
47 -@create_new_process_for_each_test()
50 def test_ilama_lora(ilama_lora_files):
51 llm = vllm.LLM(MODEL_PATH,
52 max_model_len=1024,
@@ -63,6 +65,8 @@ def test_ilama_lora(ilama_lora_files):
65 assert output2[i] == EXPECTED_LORA_OUTPUT[i]
66
67
68 +@pytest.mark.skipif(current_platform.is_cuda_alike(),
69 + reason="Skipping to avoid redundant model tests")
70 @multi_gpu_test(num_gpus=4)
71 @create_new_process_for_each_test()
72 def test_ilama_lora_tp4(ilama_lora_files):
@@ -84,6 +88,8 @@ def test_ilama_lora_tp4(ilama_lora_files):
88 assert output2[i] == EXPECTED_LORA_OUTPUT[i]
89
90
91 +@pytest.mark.skipif(current_platform.is_cuda_alike(),
92 + reason="Skipping to avoid redundant model tests")
93 @multi_gpu_test(num_gpus=4)
94 @create_new_process_for_each_test()
95 def test_ilama_lora_tp4_fully_sharded_loras(ilama_lora_files):