[TPU][V1] Disable per-request seed/Generator (#16172)
Signed-off-by: NickLucche <nlucches@redhat.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import torch
|
||||
import vllm.envs as envs
|
||||
from vllm.inputs import PromptType
|
||||
from vllm.logger import init_logger
|
||||
from vllm.sampling_params import SamplingParams
|
||||
from vllm.sampling_params import SamplingParams, SamplingType
|
||||
|
||||
from .interface import Platform, PlatformEnum, _Backend
|
||||
|
||||
@@ -145,7 +145,10 @@ class TpuPlatform(Platform):
|
||||
params: Union[SamplingParams, PoolingParams],
|
||||
) -> None:
|
||||
"""Raises if this request is unsupported on this platform"""
|
||||
if isinstance(params,
|
||||
SamplingParams) and params.guided_decoding is not None:
|
||||
raise ValueError("Structured output is not supported on "
|
||||
f"{cls.device_name}.")
|
||||
if isinstance(params, SamplingParams):
|
||||
if params.guided_decoding is not None:
|
||||
raise ValueError("Structured output is not supported on "
|
||||
f"{cls.device_name}.")
|
||||
if params.sampling_type == SamplingType.RANDOM_SEED:
|
||||
raise ValueError(
|
||||
"Torch XLA does not support per-request seed.")
|
||||
|
||||
Reference in New Issue
Block a user