@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / e0fdfa1608
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, 18:30 UTC

[CI/Build] Delete LoRA bias test (#14849)

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

Jee Jee Li committed Mar 15, 2025 at 13:09 UTC e0fdfa1608b988f3b6767117a9adf2f9a3831cb9
2 files changed -68
tests/lora/conftest.py
-5
@@ -173,11 +173,6 @@ def sql_lora_files(sql_lora_huggingface_id):
173 return snapshot_download(repo_id=sql_lora_huggingface_id)
174
175
176 -@pytest.fixture(scope="session")
177 -def lora_bias_files():
178 - return snapshot_download(repo_id="followumesh/granite-3b-lora8-bias")
179 -
180 -
176 @pytest.fixture(scope="session")
177 def mixtral_lora_files():
178 # Note: this module has incorrect adapter_config.json to test
tests/lora/test_lora_bias_e2e.py deleted
-63
@@ -1,63 +0,0 @@
1 -# SPDX-License-Identifier: Apache-2.0
2 -
3 -import pytest
4 -
5 -import vllm
6 -from vllm.lora.request import LoRARequest
7 -
8 -MODEL_PATH = "ibm-granite/granite-3b-code-base"
9 -
10 -
11 -def do_sample(llm: vllm.LLM, lora_path: str, lora_id: int) -> list[str]:
12 - prompts = [
13 - "[user] Write a SQL query to answer the question based on the table schema.\n\n context: CREATE TABLE candidate (people_id VARCHAR, unsure_rate INTEGER); CREATE TABLE people (sex VARCHAR, people_id VARCHAR)\n\n question: which gender got the highest average uncertain ratio. [/user] [assistant]", # noqa: E501
14 - "[user] Write a SQL query to answer the question based on the table schema.\n\n context: CREATE TABLE table_28138035_4 (womens_doubles VARCHAR, mens_singles VARCHAR)\n\n question: Name the women's doubles for werner schlager [/user] [assistant]" # noqa: E501
15 - ]
16 - sampling_params = vllm.SamplingParams(temperature=0,
17 - max_tokens=256,
18 - stop=["[/assistant]"])
19 - outputs = llm.generate(
20 - prompts,
21 - sampling_params,
22 - lora_request=LoRARequest(str(lora_id), lora_id, lora_path)
23 - if lora_id else None)
24 - generated_texts: list[str] = []
25 - for output in outputs:
26 - generated_text = output.outputs[0].text
27 - generated_texts.append(generated_text)
28 - return generated_texts
29 -
30 -
31 -@pytest.fixture(autouse=True)
32 -def v1(run_with_both_engines_lora):
33 - # Simple autouse wrapper to run both engines for each test
34 - # This can be promoted up to conftest.py to run for every
35 - # test in a package
36 - pass
37 -
38 -
39 -# Skipping for V1 for now as we are hitting,
40 -# "Head size 80 is not supported by FlashAttention." error.
41 -@pytest.mark.skip_v1
42 -@pytest.mark.parametrize("lora_bias", [True])
43 -@pytest.mark.parametrize("fully_sharded", [True, False])
44 -def test_lora_bias(lora_bias_files: str, lora_bias: bool, fully_sharded: bool):
45 - llm = vllm.LLM(MODEL_PATH,
46 - enable_lora=True,
47 - max_num_seqs=16,
48 - max_lora_rank=8,
49 - max_loras=1,
50 - enable_lora_bias=lora_bias,
51 - tensor_parallel_size=1,
52 - fully_sharded_loras=fully_sharded)
53 -
54 - print("lora adapter created")
55 - output1 = do_sample(llm, lora_bias_files, lora_id=0)
56 -
57 - print("lora")
58 - output2 = do_sample(llm, lora_bias_files, lora_id=1)
59 -
60 - if lora_bias:
61 - assert output1 != output2
62 - else:
63 - assert output1 == output2