mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2026-01-13 09:30:34 +08:00
[v1] add cli sampler (#9721)
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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."},
|
||||
|
||||
Reference in New Issue
Block a user