Arguments pertaining to which model/config/tokenizer we are going to fine-tune, or train from scratch.
| 24 | |
| 25 | @dataclass |
| 26 | class ModelArguments: |
| 27 | """ |
| 28 | Arguments pertaining to which model/config/tokenizer we are going to fine-tune, or train from scratch. |
| 29 | """ |
| 30 | |
| 31 | model_name_or_path: Optional[str] = field( |
| 32 | default=None, |
| 33 | metadata={ |
| 34 | "help": ( |
| 35 | "The model checkpoint for weights initialization. Don't set if you want to train a model from scratch." |
| 36 | ) |
| 37 | }, |
| 38 | ) |
| 39 | model_revision: str = field( |
| 40 | default="main", |
| 41 | metadata={"help": "The specific model version to use (can be a branch name, tag name or commit id)."}, |
| 42 | ) |
| 43 | torch_dtype: Optional[str] = field( |
| 44 | default=None, |
| 45 | metadata={ |
| 46 | "help": ( |
| 47 | "Override the default `torch.dtype` and load the model under this dtype. If `auto` is passed, the " |
| 48 | "dtype will be automatically derived from the model's weights." |
| 49 | ), |
| 50 | "choices": ["auto", "bfloat16", "float16", "float32"], |
| 51 | }, |
| 52 | ) |
| 53 | use_fast_tokenizer: bool = field( |
| 54 | default=True, |
| 55 | metadata={"help": "Whether to use one of the fast tokenizer (backed by the tokenizers library) or not."}, |
| 56 | ) |
| 57 | |
| 58 | |
| 59 | @dataclass |
nothing calls this directly
no outgoing calls
no test coverage detected