Skip to content

Commit f483d9a

Browse files
committed
Optmize unit test
Signed-off-by: Jee Jee Li <[email protected]>
1 parent 7cb7eba commit f483d9a

File tree

1 file changed

+8
-30
lines changed

1 file changed

+8
-30
lines changed

tests/lora/test_ultravox.py

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
from vllm.lora.request import LoRARequest
1111

12-
from ..models.utils import check_outputs_equal
13-
1412
ULTRAVOX_MODEL_NAME = "fixie-ai/ultravox-v0_3"
1513
LLMA_MODEL_NAME = "meta-llama/Llama-3.1-8B-Instruct"
1614

@@ -61,6 +59,9 @@ def _get_prompt(audio_count, question, placeholder, model_name) -> str:
6159

6260

6361
def test_ultravox_lora(vllm_runner):
62+
"""
63+
TODO: Train an Ultravox LoRA instead of using a Llama LoRA.
64+
"""
6465
llama3_1_8b_chess_lora = llama3_1_8b_chess_lora_path()
6566
with TemporaryDirectory() as temp_ultravox_lora_dir:
6667
llama3_1_8b_ultravox_chess_lora = mk_llama3_1_8b_ultravox_chess_lora(
@@ -97,34 +98,11 @@ def test_ultravox_lora(vllm_runner):
9798
dtype="bfloat16",
9899
max_model_len=4096,
99100
) as vllm_model:
100-
llama_outputs_no_lora: List[Tuple[List[int],
101-
str]] = vllm_model.generate_greedy(
102-
[
103-
_get_prompt(
104-
0, PROMPT,
105-
VLLM_PLACEHOLDER,
106-
LLMA_MODEL_NAME)
107-
],
108-
256,
109-
)
110-
llama_outputs: List[Tuple[List[int],
111-
str]] = vllm_model.generate_greedy(
112-
[
113-
_get_prompt(0, PROMPT,
114-
VLLM_PLACEHOLDER,
115-
LLMA_MODEL_NAME)
116-
],
117-
256,
118-
lora_request=LoRARequest(
119-
str(1), 1, llama3_1_8b_chess_lora),
120-
)
121-
122-
check_outputs_equal(
123-
outputs_0_lst=ultravox_outputs,
124-
outputs_1_lst=llama_outputs,
125-
name_0="ultravox",
126-
name_1="llama",
127-
)
101+
llama_outputs_no_lora: List[Tuple[List[int], str]] = (
102+
vllm_model.generate_greedy(
103+
[_get_prompt(0, PROMPT, VLLM_PLACEHOLDER, LLMA_MODEL_NAME)],
104+
256,
105+
))
128106

129107
_, llama_no_lora_str = llama_outputs_no_lora[0]
130108
_, ultravox_str = ultravox_outputs[0]

0 commit comments

Comments
 (0)