mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2026-03-07 20:26:00 +08:00
[v1] model loader (#9613)
This commit is contained in:
@@ -14,8 +14,9 @@
|
||||
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Optional
|
||||
|
||||
from .arg_utils import AutoClass, PluginConfig, get_plugin_config
|
||||
from .arg_utils import ModelClass, PluginConfig, get_plugin_config
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -31,19 +32,19 @@ class ModelArguments:
|
||||
default=True,
|
||||
metadata={"help": "Use fast processor from Hugging Face."},
|
||||
)
|
||||
auto_class: AutoClass = field(
|
||||
default=AutoClass.CAUSALLM,
|
||||
model_class: ModelClass = field(
|
||||
default=ModelClass.LLM,
|
||||
metadata={"help": "Model class from Hugging Face."},
|
||||
)
|
||||
peft_config: PluginConfig = field(
|
||||
peft_config: Optional[PluginConfig] = field(
|
||||
default=None,
|
||||
metadata={"help": "PEFT configuration for the model."},
|
||||
)
|
||||
kernel_config: PluginConfig = field(
|
||||
kernel_config: Optional[PluginConfig] = field(
|
||||
default=None,
|
||||
metadata={"help": "Kernel configuration for the model."},
|
||||
)
|
||||
quant_config: PluginConfig = field(
|
||||
quant_config: Optional[PluginConfig] = field(
|
||||
default=None,
|
||||
metadata={"help": "Quantization configuration for the model."},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user