Update generating_args.py

This commit is contained in:
hoshi-hiyouga 2024-05-07 00:28:16 +08:00 committed by GitHub
parent 7ae7ae64f0
commit f32eefae3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ class GeneratingArguments:
default=1.0, default=1.0,
metadata={"help": "Exponential penalty to the length that is used with beam-based generation."}, metadata={"help": "Exponential penalty to the length that is used with beam-based generation."},
) )
def to_dict(self) -> Dict[str, Any]: def to_dict(self) -> Dict[str, Any]:
args = asdict(self) args = asdict(self)
if args.get("max_new_tokens", -1) > 0: if args.get("max_new_tokens", -1) > 0: