[example] add bash usage (#7794)
This commit is contained in:
@@ -65,14 +65,16 @@ class BaseModelArguments:
|
||||
default=False,
|
||||
metadata={"help": "Whether or not the special tokens should be split during the tokenization process."},
|
||||
)
|
||||
new_special_tokens: Optional[str] = field(
|
||||
add_tokens: Optional[str] = field(
|
||||
default=None,
|
||||
metadata={
|
||||
"help": "Non-special tokens to be added into the tokenizer. Use commas to separate multiple tokens."
|
||||
},
|
||||
)
|
||||
add_special_tokens: Optional[str] = field(
|
||||
default=None,
|
||||
metadata={"help": "Special tokens to be added into the tokenizer. Use commas to separate multiple tokens."},
|
||||
)
|
||||
new_normal_tokens: Optional[str] = field(
|
||||
default=None,
|
||||
metadata={"help": "Normal tokens to be added into the tokenizer. Use commas to separate multiple tokens."},
|
||||
)
|
||||
model_revision: str = field(
|
||||
default="main",
|
||||
metadata={"help": "The specific model version to use (can be a branch name, tag name or commit id)."},
|
||||
@@ -180,11 +182,11 @@ class BaseModelArguments:
|
||||
if self.adapter_name_or_path is not None: # support merging multiple lora weights
|
||||
self.adapter_name_or_path = [path.strip() for path in self.adapter_name_or_path.split(",")]
|
||||
|
||||
if self.new_normal_tokens is not None: # support multiple normal tokens
|
||||
self.new_normal_tokens = [token.strip() for token in self.new_normal_tokens.split(",")]
|
||||
if self.add_tokens is not None: # support multiple tokens
|
||||
self.add_tokens = [token.strip() for token in self.add_tokens.split(",")]
|
||||
|
||||
if self.new_special_tokens is not None: # support multiple special tokens
|
||||
self.new_special_tokens = [token.strip() for token in self.new_special_tokens.split(",")]
|
||||
if self.add_special_tokens is not None: # support multiple special tokens
|
||||
self.add_special_tokens = [token.strip() for token in self.add_special_tokens.split(",")]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -153,7 +153,7 @@ def _check_extra_dependencies(
|
||||
elif model_args.infer_backend == EngineName.SGLANG:
|
||||
check_version("sglang>=0.4.4")
|
||||
check_version("sglang", mandatory=True)
|
||||
|
||||
|
||||
if finetuning_args.use_galore:
|
||||
check_version("galore_torch", mandatory=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user