mirror of
https://github.com/vllm-project/vllm.git
synced 2026-08-18 03:30:20 +00:00
Signed-off-by: Andreas Karatzas <[email protected]> Signed-off-by: Andreas Karatzas <[email protected]> Co-authored-by: OpenAI Codex <[email protected]>
39 lines
1.0 KiB
Python
39 lines
1.0 KiB
Python
# SPDX-License-Identifier: Apache-2.0
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
import pytest
|
|
|
|
from vllm.assets.audio import AudioAsset
|
|
|
|
|
|
def add_attention_backend(server_args, attention_config):
|
|
"""Append attention backend CLI arg if specified.
|
|
|
|
Args:
|
|
server_args: List of server arguments to extend in-place.
|
|
attention_config: Dict with 'backend' key, or None.
|
|
"""
|
|
if attention_config and "backend" in attention_config:
|
|
server_args.extend(["--attention-backend", attention_config["backend"]])
|
|
|
|
|
|
@pytest.fixture
|
|
def mary_had_lamb():
|
|
path = AudioAsset("mary_had_lamb").get_local_path()
|
|
with open(str(path), "rb") as f:
|
|
yield f
|
|
|
|
|
|
@pytest.fixture
|
|
def winning_call():
|
|
path = AudioAsset("winning_call").get_local_path()
|
|
with open(str(path), "rb") as f:
|
|
yield f
|
|
|
|
|
|
@pytest.fixture
|
|
def foscolo():
|
|
# Test translation it->en
|
|
path = AudioAsset("azacinto_foscolo").get_local_path()
|
|
with open(str(path), "rb") as f:
|
|
yield f
|