[v1] add cli sampler (#9721)

This commit is contained in:
Yaowei Zheng
2026-01-06 23:31:27 +08:00
committed by GitHub
parent e944dc442c
commit ea0b4e2466
45 changed files with 1091 additions and 505 deletions

View File

@@ -17,7 +17,7 @@
import json
from enum import Enum, unique
from enum import StrEnum, unique
class PluginConfig(dict):
@@ -36,7 +36,7 @@ PluginArgument = PluginConfig | dict | str | None
@unique
class ModelClass(str, Enum):
class ModelClass(StrEnum):
"""Auto class for model config."""
LLM = "llm"
@@ -45,7 +45,7 @@ class ModelClass(str, Enum):
@unique
class SampleBackend(str, Enum):
class SampleBackend(StrEnum):
HF = "hf"
VLLM = "vllm"

View File

@@ -21,8 +21,13 @@ from .arg_utils import ModelClass, PluginConfig, get_plugin_config
@dataclass
class ModelArguments:
model: str = field(
default="Qwen/Qwen3-4B-Instruct-2507",
metadata={"help": "Path to the model or model identifier from Hugging Face."},
)
template: str = field(
default="chatml",
metadata={"help": "Template for the model."},
)
trust_remote_code: bool = field(
default=False,
metadata={"help": "Trust remote code from Hugging Face."},