Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NoviScl committed Jul 26, 2019
1 parent 6d137b8 commit f1fffe0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -3,6 +3,8 @@ Author: Chenglei Si (River Valley High School, Singapore)

Update:
Sometimes you may get degenerate runs where the performance is far lower than the expected performance. This is mainly because the training is not stable on smaller datasets. You may try to change the random seeds (and perhaps learning rate, batch size, warmup steps or other hyperparameters as well) and restart training. If you want, I can send you a trained checkpoint. Feel free to contact me through email: sichenglei1125@gmail.com
Note:
You should use the dev set to do hyper-parameter tuning and then use the test file and trained model to evaluate on the test data. This is the standard practice for ML.

Usage:

Expand Down
2 changes: 1 addition & 1 deletion run.sh
@@ -1,2 +1,2 @@
python run_xlnet_dream.py --data_dir=data --xlnet_model=xlnet-large-cased --output_dir=xlnet_dream --max_seq_length=256 --do_train --do_eval --train_batch_size=32 --eval_batch_size=1 --learning_rate=1e-5 --num_train_epochs=4 --warmup_proportion=0.1 --gradient_accumulation_steps=32 && /root/shutdown.sh
python run_xlnet_dream.py --data_dir=data --xlnet_model=xlnet-large-cased --output_dir=xlnet_dream --max_seq_length=128 --do_train --do_eval --train_batch_size=32 --eval_batch_size=2 --learning_rate=2e-5 --num_train_epochs=3 --warmup_steps=120 --weight_decay=0.0 --adam_epsilon=1e-8 --gradient_accumulation_steps=16 && /root/shutdown.sh
python run_xlnet_dream.py --data_dir=data --xlnet_model=xlnet-large-cased --output_dir=xlnet_dream --max_seq_length=128 --do_train --do_eval --train_batch_size=32 --eval_batch_size=2 --learning_rate=2e-5 --num_train_epochs=3 --warmup_steps=120 --weight_decay=0.0 --adam_epsilon=1e-6 --gradient_accumulation_steps=16 && /root/shutdown.sh
4 changes: 2 additions & 2 deletions run_xlnet_dream.py
Expand Up @@ -580,11 +580,11 @@ def main():


if args.do_eval:
eval_examples = processor.get_test_examples(args.data_dir)
eval_examples = processor.get_dev_examples(args.data_dir)
eval_features = convert_examples_to_features(
eval_examples, label_list, args.max_seq_length, tokenizer)

logger.info("***** Running evaluation *****")
logger.info("***** Running Dev Evaluation *****")
logger.info(" Num examples = %d", len(eval_examples))
logger.info(" Batch size = %d", args.eval_batch_size)

Expand Down

0 comments on commit f1fffe0

Please sign in to comment.