mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-03 19:29:10 +08:00
[Frontend] deprecate --device arg (#18399)
Signed-off-by: Kebe <mail@kebe7jun.com>
This commit is contained in:
parent
cd8dfc6dfc
commit
5d7f545204
@ -66,7 +66,6 @@ XPU platform supports **tensor parallel** inference/serving and also supports **
|
|||||||
python -m vllm.entrypoints.openai.api_server \
|
python -m vllm.entrypoints.openai.api_server \
|
||||||
--model=facebook/opt-13b \
|
--model=facebook/opt-13b \
|
||||||
--dtype=bfloat16 \
|
--dtype=bfloat16 \
|
||||||
--device=xpu \
|
|
||||||
--max_model_len=1024 \
|
--max_model_len=1024 \
|
||||||
--distributed-executor-backend=ray \
|
--distributed-executor-backend=ray \
|
||||||
--pipeline-parallel-size=2 \
|
--pipeline-parallel-size=2 \
|
||||||
|
|||||||
@ -2201,7 +2201,11 @@ class DeviceConfig:
|
|||||||
"""Configuration for the device to use for vLLM execution."""
|
"""Configuration for the device to use for vLLM execution."""
|
||||||
|
|
||||||
device: Union[Device, torch.device] = "auto"
|
device: Union[Device, torch.device] = "auto"
|
||||||
"""Device type for vLLM execution."""
|
"""Device type for vLLM execution.
|
||||||
|
This parameter is deprecated and will be
|
||||||
|
removed in a future release.
|
||||||
|
It will now be set automatically based
|
||||||
|
on the current platform."""
|
||||||
device_type: str = field(init=False)
|
device_type: str = field(init=False)
|
||||||
"""Device type from the current platform. This is set in
|
"""Device type from the current platform. This is set in
|
||||||
`__post_init__`."""
|
`__post_init__`."""
|
||||||
|
|||||||
@ -737,7 +737,9 @@ class EngineArgs:
|
|||||||
title="DeviceConfig",
|
title="DeviceConfig",
|
||||||
description=DeviceConfig.__doc__,
|
description=DeviceConfig.__doc__,
|
||||||
)
|
)
|
||||||
device_group.add_argument("--device", **device_kwargs["device"])
|
device_group.add_argument("--device",
|
||||||
|
**device_kwargs["device"],
|
||||||
|
deprecated=True)
|
||||||
|
|
||||||
# Speculative arguments
|
# Speculative arguments
|
||||||
speculative_group = parser.add_argument_group(
|
speculative_group = parser.add_argument_group(
|
||||||
@ -977,7 +979,7 @@ class EngineArgs:
|
|||||||
from vllm.platforms import current_platform
|
from vllm.platforms import current_platform
|
||||||
current_platform.pre_register_and_update()
|
current_platform.pre_register_and_update()
|
||||||
|
|
||||||
device_config = DeviceConfig(device=self.device)
|
device_config = DeviceConfig(device=current_platform.device_type)
|
||||||
model_config = self.create_model_config()
|
model_config = self.create_model_config()
|
||||||
|
|
||||||
# * If VLLM_USE_V1 is unset, we enable V1 for "supported features"
|
# * If VLLM_USE_V1 is unset, we enable V1 for "supported features"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user