roberta no year from scratch better finetuning
This commit is contained in:
parent
7c52ed0759
commit
0798d54e30
83980
dev-0/out.tsv
83980
dev-0/out.tsv
File diff suppressed because it is too large
Load Diff
@ -3,12 +3,12 @@ from config import LABELS_LIST, MODEL
|
|||||||
from transformers import AutoTokenizer
|
from transformers import AutoTokenizer
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
device = 'cpu'
|
device = 'cuda'
|
||||||
|
model_path= './roberta-ireland'
|
||||||
|
|
||||||
from transformers import AutoModelForSequenceClassification
|
from transformers import AutoModelForSequenceClassification
|
||||||
|
|
||||||
model = AutoModelForSequenceClassification.from_pretrained('test_trainer/checkpoint-620000/')
|
model = AutoModelForSequenceClassification.from_pretrained(model_path).cuda()
|
||||||
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
||||||
|
|
||||||
for dataset in ('dev-0', 'test-A'):
|
for dataset in ('dev-0', 'test-A'):
|
||||||
|
12
roberta_no_year_from_scratch/run.sh
Normal file
12
roberta_no_year_from_scratch/run.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
python run_glue.py --model_name_or_path roberta-base \
|
||||||
|
--train_file ../train/huggingface_format.csv \
|
||||||
|
--validation_file /media/kuba/ssdsam/gonito/ireland-news/dev-0/huggingface_format.csv \
|
||||||
|
--do_train \
|
||||||
|
--max_seq_length 64 \
|
||||||
|
--per_device_train_batch_size 32 \
|
||||||
|
--learning_rate 2e-5 \
|
||||||
|
--num_train_epochs 3 \
|
||||||
|
--output_dir ./roberta-ireland \
|
||||||
|
--save_steps=10000 \
|
||||||
|
--eval_steps=10000 \
|
||||||
|
--evaluation_strategy steps
|
49986
test-A/out.tsv
49986
test-A/out.tsv
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user