[Testing] Fix test_sharded_state_loader (#51736)
Signed-off-by: Richard Zou <zou3519@gmail.com>
This commit is contained in:
@@ -12,7 +12,6 @@ import torch
|
|||||||
|
|
||||||
from vllm import LLM, SamplingParams
|
from vllm import LLM, SamplingParams
|
||||||
from vllm.model_executor.model_loader import ShardedStateLoader
|
from vllm.model_executor.model_loader import ShardedStateLoader
|
||||||
from vllm.platforms import current_platform
|
|
||||||
from vllm.transformers_utils.repo_utils import hf_api
|
from vllm.transformers_utils.repo_utils import hf_api
|
||||||
|
|
||||||
prompts = [
|
prompts = [
|
||||||
@@ -96,9 +95,10 @@ def test_sharded_state_loader(
|
|||||||
input_dir = llama_3p2_1b_files
|
input_dir = llama_3p2_1b_files
|
||||||
ctx = mp.get_context("spawn")
|
ctx = mp.get_context("spawn")
|
||||||
|
|
||||||
platform_args = {}
|
# Keep batching deterministic: this test compares exact greedy outputs
|
||||||
if current_platform.is_rocm() or current_platform.is_xpu():
|
# across separate engine processes, whose schedulers may otherwise form
|
||||||
platform_args["max_num_seqs"] = 1
|
# different batches depending on prompt-processing timing.
|
||||||
|
platform_args = {"max_num_seqs": 1}
|
||||||
|
|
||||||
# Run in separate processes for memory & CUDA isolation
|
# Run in separate processes for memory & CUDA isolation
|
||||||
with TemporaryDirectory() as output_dir:
|
with TemporaryDirectory() as output_dir:
|
||||||
|
|||||||
Reference in New Issue
Block a user