support control eos, fix #6345

Former-commit-id: cb0f8399356bf372f3b7963f2565c3d504be0923
This commit is contained in:
hiyouga
2024-12-17 10:42:05 +00:00
parent 6522467ddb
commit 19ebc0e7a2
5 changed files with 21 additions and 7 deletions

View File

@@ -64,6 +64,10 @@ class GeneratingArguments:
default=None,
metadata={"help": "Default system message to use in chat completion."},
)
skip_special_tokens: bool = field(
default=True,
metadata={"help": "Whether or not to remove special tokens in the decoding."},
)
def to_dict(self) -> Dict[str, Any]:
args = asdict(self)