-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WikiDE - sp30k - nl4 #4
Labels
Comments
pretrain_lm
|
$ python fastai_scripts/infer.py --dir-path "${dir}" --cuda-id $cuda --bs 16\ ✘ 1
--pretrain-id "nl-${nl}-small-minilr" --sentence-piece-model sp.model \
--test_set tmp/val_ids.npy --correct_for_up=False --nl "${nl}"
infer(dir_path=work/wiki30k, test_set=tmp/val_ids.npy, cuda_id=0, bs=16, pretrain_id=nl-4-small-minilr, sentence_piece_model=sp.model, correct_for_up=False, limit=None, em_sz=400, nh=1150, nl=4, use_tqdm=True)
27002: dir_path work/wiki30k; cuda_id 0; bs 16; limit: None; pretrain_id nl-4-small-minilr_ em_sz 400 nh 1150 nl 4
27002: {'tokens_total': 12489514, 'subword_tokens_total': 19976480, 'oov': 0, 'vs': 30000}
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 41344/41344 [28:09<00:00, 24.48it/s]
27002: Cross entropy: 5.061666488647461, Perplexity: 157.85336303710938``` |
GE17predir=work/wiki30k
destdir=work/wikige2017
BS=128
cuda=0
nl=4
python ./fastai_scripts/finetune_lm.py --dir-path "${destdir}" --pretrain-path "${predir}" --cuda-id $cuda \
--cl 6 --pretrain-id "nl-${nl}-small-minilr" --lm-id "nl-${nl}-finetune" --bs $BS --lr 0.001 \
--use_discriminative True --dropmult 0.5 --sentence-piece-model sp.model --sampled True --nl "${nl}"
train_lm(dir_path=work/wikige2017, pretrain_path=work/wiki30k, cuda_id=0, cl=6, pretrain_id=nl-4-small-minilr, lm_id=nl-4-finetune, bs=128, dropmult=0.5, backwards=False, lr=0.001, preload=True, bpe=False, startat=0, use_clr=True, use_regular_schedule=False, use_discriminative=True, notrain=False, joined=False, train_file_id=, early_stopping=False, sentence_piece_model=sp.model, sampled=True, batch_sets=1, em_sz=400, nh=1150, nl=4)
Loading work/wikige2017/tmp/trn_ids.npy and work/wikige2017/tmp/val_ids.npy
Tokens to words fraction: 1.778323439377108
Loading LM weights ( work/wiki30k/models/fwd_nl-4-small-minilr.h5 )...
Epoch: 0%| | 0/6 [00:00<?, ?it/sepoch trn_loss val_loss accuracy
0 5.04466 4.308868 0.332463
Epoch: 17%|██████████████████▎ | 1/6 [01:47<08:58, 107.63s/it 1 4.637154 4.101497 0.361402
Epoch: 33%|████████████████████████████████████▋ | 2/6 [03:35<07:11, 107.81s/it 2 4.494651 4.023696 0.371602
Epoch: 50%|███████████████████████████████████████████████████████ | 3/6 [05:24<05:24, 108.12s/it 3 4.420981 3.986701 0.376534
Epoch: 67%|█████████████████████████████████████████████████████████████████████████▎ | 4/6 [07:14<03:37, 108.71s/it 4 4.356632 3.955569 0.380808
Epoch: 83%|███████████████████████████████████████████████████████████████████████████████████████████▋ | 5/6 [09:03<01:48, 108.76s/it 5 4.319008 3.950476 0.381265
Epoch: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [10:51<00:00, 108.49s/it] |
Evaluation$ destdir=work/wikige2017
BS=120
cuda=0
nl=4
python ./ulmfit/evaluate.py --dir-path="$destdir" --cuda-id=$cuda \
--clas-id="nl-${nl}-v1" --bs=$BS --nl $nl
Loading work/wikige2017/models/fwd_nl-4-v1_clas_1.h5
Test file: test1
F1 score: 0.765003897116134
Confusion matrix
[[1457 206 18]
[ 258 488 34]
[ 72 15 18]]
(0.765003897116134, array([[1457, 206, 18], [ 258, 488, 34], [ 72, 15, 18]]))
$ destdir=work/wikige2017
BS=120
cuda=0
nl=4
python ./ulmfit/evaluate.py --dir-path="$destdir" --cuda-id=$cuda \
--clas-id="nl-${nl}-v1" --bs=$BS --nl $nl --test-file test2
Loading work/wikige2017/models/fwd_nl-4-v1_clas_1.h5
Test file: test2
F1 score: 0.7812160694896851
Confusion matrix
[[1053 157 27]
[ 137 353 7]
[ 51 24 33]]
(0.7812160694896851, array([[1053, 157, 27], [ 137, 353, 7], [ 51, 24, 33]])) |
GE18 - CAT
|
|
GE18 - BIN
|
|
I had few attempts to break the 0.71 score using 30k all of the failed:
Here are some evaluations:
Training from LM finetuned for 6 epoches on btw17+ge18
Training for 12 epoch with dropout 1.0 from ft_16 (16 epochs finetune dropout 1.0)
Training for 12 epoch with dropout 1.0 from ft_16 (16 epochs finetune dropout 1.0)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: