MCPcopy Create free account
hub / github.com/RingBDStack/GDAP / ModelArguments

Class ModelArguments

run_seq2seq.py:59–98  ·  view source on GitHub ↗

Arguments pertaining to which model/config/tokenizer we are going to fine-tune from.

Source from the content-addressed store, hash-verified

57
58@dataclass
59class ModelArguments:
60 """
61 Arguments pertaining to which model/config/tokenizer we are going to fine-tune from.
62 """
63
64 model_name_or_path: str = field(
65 metadata={
66 "help": "Path to pretrained model or model identifier from huggingface.co/models"}
67 )
68 config_name: Optional[str] = field(
69 default=None, metadata={"help": "Pretrained config name or path if not the same as model_name"}
70 )
71 tokenizer_name: Optional[str] = field(
72 default=None, metadata={"help": "Pretrained tokenizer name or path if not the same as model_name"}
73 )
74 cache_dir: Optional[str] = field(
75 default=None,
76 metadata={
77 "help": "Where to store the pretrained models downloaded from huggingface.co"},
78 )
79 use_fast_tokenizer: bool = field(
80 default=False,
81 metadata={
82 "help": "Whether to use one of the fast tokenizer (backed by the tokenizers library) or not."},
83 )
84 # !!! must use non-fast version
85 # fast: "<extra_id_0> <extra_id_1>" -> [32099, 3, 32098, 1]
86 # non-fast: "<extra_id_0> <extra_id_1>" -> [32099, 32098, 1]
87 model_revision: str = field(
88 default="main",
89 metadata={
90 "help": "The specific model version to use (can be a branch name, tag name or commit id)."},
91 )
92 use_auth_token: bool = field(
93 default=False,
94 metadata={
95 "help": "Will use the token generated when running `transformers-cli login` (necessary to use this script "
96 "with private models)."
97 },
98 )
99
100
101@dataclass

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected