-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_OFA.py
32 lines (26 loc) · 1.09 KB
/
run_OFA.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
from exp.exp_forecasting import *
import numpy as np
import torch, os, time, warnings, json, argparse
warnings.filterwarnings('ignore')
from run import main, get_parser as get_basic_parser
def get_parser():
parser = get_basic_parser()
parser.add_argument('--gpt_layers', type=int, default=2)
parser.add_argument('--is_gpt', type=int, default=1)
parser.add_argument('--patch_size', type=int, default=7)
parser.add_argument('--pretrain', type=int, default=1)
parser.add_argument('--freeze', type=int, default=1)
parser.add_argument('--stride', type=int, default=1)
parser.add_argument('--max_len', type=int, default=-1)
parser.add_argument('--hid_dim', type=int, default=16)
parser.add_argument('--tmax', type=int, default=10)
parser.add_argument('--n_scale', type=float, default=-1)
parser.add_argument(
'--llm_model', type=str, default='GPT2', help='LLM model',
choices=['LLAMA', 'GPT2']) #
return parser
if __name__ == '__main__':
parser = get_parser()
args = parser.parse_args()
args.model = 'OFA'
main(args)