forked from VumBleBot/odqa_baseline_code
-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_args.py
27 lines (21 loc) · 1 KB
/
model_args.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
from typing import Optional
from dataclasses import dataclass, field
@dataclass
class ModelArguments:
"""
Arguments pertaining to which model/config/tokenizer we are going to fine-tune from.
"""
model_name_or_path: str = field(
default="bert-base-multilingual-cased",
metadata={"help": "Reader Backbone, Path to pretrained model or model identifier from huggingface.co/models"},
)
model_path: str = field(default="", metadata={"help": "checkpoint path to load(used when evaluate&test)"})
retriever_name: str = field(default="TFIDF", metadata={"help": "this args used in tools/get_retriever"})
reader_name: str = field(default="DPR")
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="bert-base-multilingual-cased",
metadata={"help": "Pretrained tokenizer name or path if not the same as model_name"},
)