XLNet baseline for DREAM dataset
Author: Chenglei Si (River Valley High School, Singapore)
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: firstname.lastname@example.org
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.
- Download data and unzip to this folder.
- (If you have not installed sentencepiece) Run
pip install sentencepiece
- To test a trained model, Run
python test_xlnet_dream.py --data_dir=data --xlnet_model=xlnet-large-cased --output_dir=xlnet_dream --checkpoint_name=pytorch_model_3epoch_72_len256.bin --max_seq_length=256 --do_eval --eval_batch_size=1You may need to change the checkpint name accordingly.
(The hyperparameters that I used can be found in run.sh)
Result: 72.0 (SOTA as of July 2019, leaderboard)