### What this PR does / why we need it?
The customized ascend operator sgmv_expand and sgmv_shrink applies only
to the scenario where rank is 8,16,32,64. When rank >= 128, the operator
is out of range, causing the model to report an error.
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
Depends on this commit https://github.com/vllm-project/vllm/pull/31408
- vLLM version: release/v0.13.0
- vLLM main:
254f6b9867
---------
Signed-off-by: ZT-AIA <1028681969@qq.com>
Signed-off-by: ZT-AIA <63220130+ZT-AIA@users.noreply.github.com>
27 lines
989 B
Python
27 lines
989 B
Python
import pytest
|
|
from modelscope import snapshot_download # type: ignore
|
|
|
|
from tests.e2e.conftest import VllmRunner
|
|
from tests.e2e.singlecard.test_ilama_lora import (EXPECTED_LORA_OUTPUT,
|
|
MODEL_PATH, do_sample)
|
|
|
|
|
|
@pytest.mark.parametrize("distributed_executor_backend", ["mp"])
|
|
def test_ilama_lora_tp2(distributed_executor_backend, ilama_lora_files):
|
|
with VllmRunner(
|
|
snapshot_download(MODEL_PATH),
|
|
enable_lora=True,
|
|
max_loras=4,
|
|
dtype="half",
|
|
max_model_len=1024,
|
|
max_num_seqs=16,
|
|
tensor_parallel_size=2,
|
|
cudagraph_capture_sizes=[1, 2, 4, 8],
|
|
distributed_executor_backend=distributed_executor_backend,
|
|
enforce_eager=True,
|
|
) as vllm_model:
|
|
output = do_sample(vllm_model.model, ilama_lora_files, lora_id=2)
|
|
|
|
for i in range(len(EXPECTED_LORA_OUTPUT)):
|
|
assert output[i] == EXPECTED_LORA_OUTPUT[i]
|