-
Notifications
You must be signed in to change notification settings - Fork 1
/
arguments_rerank.py
38 lines (33 loc) · 1.25 KB
/
arguments_rerank.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import os
from dataclasses import dataclass, field
from typing import Optional
@dataclass
class ModelArguments:
"""
Arguments pertaining to which model/config/tokenizer we are going to fine-tune from.
"""
model_name_or_path: str = field(
metadata={"help": "Path to pretrained model or model identifier from huggingface.co/models"}
)
config_name: Optional[str] = field(
default=None, metadata={"help": "Pretrained config name or path if not the same as model_name"}
)
tokenizer_name: Optional[str] = field(
default=None, metadata={"help": "Pretrained tokenizer name or path if not the same as model_name"}
)
cache_dir: Optional[str] = field(
default=None, metadata={"help": "Where do you want to store the pretrained models downloaded from s3"}
)
@dataclass
class DataArguments:
train_data: str = field(
default=None, metadata={"help": "Path to corpus"}
)
train_group_size: int = field(default=8)
max_len: int = field(
default=512,
metadata={
"help": "The maximum total input sequence length after tokenization for input text. Sequences longer "
"than this will be truncated, sequences shorter will be padded."
},
)