forked from zjunlp/HVPNeT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_twitter15.sh
31 lines (28 loc) · 859 Bytes
/
run_twitter15.sh
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
#!/usr/bin/env bash
# Required environment variables:
# batch_size (recommendation: 8 / 16)
# lr: learning rate (recommendation: 3e-5 / 5e-5)
# seed: random seed, default is 1234
# BERT_NAME: pre-trained text model name ( bert-*)
# max_seq: max sequence length
# sample_ratio: few-shot learning, default is 1.0
# save_path: model saved path
DATASET_NAME="twitter15"
BERT_NAME="bert-base-uncased"
lr=3e-5
CUDA_VISIBLE_DEVICES=0 python -u run.py \
--dataset_name=${DATASET_NAME} \
--bert_name=${BERT_NAME} \
--num_epochs=30 \
--batch_size=8 \
--lr=$lr \
--warmup_ratio=0.01 \
--eval_begin_epoch=3 \
--seed=1234 \
--do_train \
--ignore_idx=0 \
--max_seq=80 \
--use_prompt \
--prompt_len=4 \
--sample_ratio=1.0 \
--save_path=your_ckpt_path