mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 23:58:11 +08:00
Update generating_args.py
Former-commit-id: 7a9fb56786f4c40856211009656a983be1e42cb7
This commit is contained in:
parent
45becd2a45
commit
8e4ab2f7d0
@ -1,5 +1,5 @@
|
||||
from dataclasses import asdict, dataclass, field
|
||||
from typing import Any, Dict, Union, Optional, List
|
||||
from typing import Any, Dict
|
||||
|
||||
|
||||
@dataclass
|
||||
@ -46,10 +46,6 @@ class GeneratingArguments:
|
||||
default=1.0,
|
||||
metadata={"help": "Exponential penalty to the length that is used with beam-based generation."},
|
||||
)
|
||||
stop: Union[Optional[str], List[str]] = field(
|
||||
default=None,
|
||||
metadata={"help": "List of strings or string that stop the generation when they are generated. The returned output will not contain the stop strings."},
|
||||
)
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
args = asdict(self)
|
||||
if args.get("max_new_tokens", -1) > 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user