Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
29bfdc9
Add script for downloading GLUE data (source: https://gist.github.com…
wojtek11530 Sep 14, 2021
c2dceb7
Add blank data folder
wojtek11530 Sep 14, 2021
b05fee5
Comment logging candidate words
wojtek11530 Sep 14, 2021
45a26da
Log info about augmentation status more frequently
wojtek11530 Sep 14, 2021
780cdc3
Log info about loading GloVe embeddings
wojtek11530 Sep 14, 2021
bc9394d
Add script for standard fine-tuning of pretrained models
wojtek11530 Sep 14, 2021
906c120
Correct fine-tuning
wojtek11530 Sep 15, 2021
3dd28f9
Correct logging
wojtek11530 Sep 15, 2021
4035039
Add minor correct
wojtek11530 Sep 15, 2021
c605dbf
Add minor corrects
wojtek11530 Sep 15, 2021
efd7a7d
Add minor corrects
wojtek11530 Sep 15, 2021
065a082
Add minor corrects
wojtek11530 Sep 15, 2021
e68c110
Correct saving results
wojtek11530 Sep 15, 2021
2c69c97
Add small correction
wojtek11530 Sep 15, 2021
b12e2e0
Add small correction for task_distill.py
wojtek11530 Sep 15, 2021
008b180
Add minor corrects
wojtek11530 Sep 15, 2021
0996bde
feat: add script counting number of parameters and MACs of model
wojtek11530 Sep 21, 2021
b6c9716
feat: update requirements.txt
wojtek11530 Sep 21, 2021
4b93a39
fix: add no_cuda argument
wojtek11530 Sep 21, 2021
3705117
Merge branch 'huawei-noah:master' into master
wojtek11530 Nov 25, 2021
222d8f1
feat: small correct in logging during finetuning
wojtek11530 Nov 27, 2021
7f3a20d
feat: add scripts for multiemo
wojtek11530 Nov 27, 2021
26328e0
feat: add evaluation on test set after training
wojtek11530 Nov 27, 2021
e549623
feat: add Dockerfile
wojtek11530 Nov 27, 2021
d94594a
feat: add experiments script
wojtek11530 Nov 27, 2021
e5e731c
feat: fix Dockerfile
wojtek11530 Nov 27, 2021
d63093a
fixup! feat: fix Dockerfile
wojtek11530 Nov 27, 2021
ace5d6b
fixup! fixup! feat: fix Dockerfile
wojtek11530 Nov 27, 2021
a6c5111
feat: fix commands in runneing experiment script
wojtek11530 Nov 27, 2021
add4903
fixup! feat: fix commands in runneing experiment script
wojtek11530 Nov 27, 2021
6265a5f
fixup! fixup! feat: fix commands in runneing experiment script
wojtek11530 Nov 27, 2021
05e145e
feat: fix loading data
wojtek11530 Nov 27, 2021
406cacb
feat: handle no directory error
wojtek11530 Nov 27, 2021
58f9d05
feat: correct metrics counting
wojtek11530 Nov 27, 2021
5cddb66
feat: correct fr score calculating and batch size issue
wojtek11530 Nov 27, 2021
dc94fc2
feat: refactor training loops
wojtek11530 Nov 28, 2021
0bf8860
feat: correct bacth size issue
wojtek11530 Nov 28, 2021
e4da554
feat: correct saving condition
wojtek11530 Nov 28, 2021
8bdb9e2
feat: correct test data loading
wojtek11530 Nov 28, 2021
11ce3b7
fixup! feat: correct test data loading
wojtek11530 Nov 28, 2021
6055587
feat: fix loading teacher model
wojtek11530 Nov 28, 2021
41ad7b5
Merge pull request #1 from wojtek11530/feature/ternarybert_for_polemo
wojtek11530 Nov 30, 2021
98379e5
feat: add data processing for multiemo
wojtek11530 Nov 30, 2021
51d250b
feat: add training dynabert for multiemo
wojtek11530 Nov 30, 2021
a0fb1f2
feat: add evaluation on test dataset
wojtek11530 Nov 30, 2021
0fc35b6
feat: add script running experiments
wojtek11530 Nov 30, 2021
045abab
feat: fix typing
wojtek11530 Nov 30, 2021
b82f0d3
feat: add regex to requirements
wojtek11530 Nov 30, 2021
76c9611
feat: add minor corrects
wojtek11530 Nov 30, 2021
3f7546b
feat: add skilearn imports
wojtek11530 Nov 30, 2021
8f21d8e
feat: coorect sabing results
wojtek11530 Nov 30, 2021
ba9908e
feat: coorect arguments of evaluating
wojtek11530 Dec 1, 2021
d62c303
feat: correct model dir
wojtek11530 Dec 1, 2021
1938cb4
feat: correct loading test data
wojtek11530 Dec 1, 2021
c112a59
feat: add gathering results for ternarybert
wojtek11530 Dec 9, 2021
7b59279
feat: correct dir in gathering result script
wojtek11530 Dec 9, 2021
0c82cc6
add results
wojtek11530 Dec 9, 2021
4fec476
feat: add adding results for DynaBERT
wojtek11530 Dec 9, 2021
d8290b5
Add DynaBERT results
wojtek11530 Dec 9, 2021
f8df472
feat: add model name to results
wojtek11530 Dec 9, 2021
a983e54
Update results
wojtek11530 Dec 9, 2021
71cd4a5
feat: minor correct
wojtek11530 Dec 9, 2021
8173a5c
Update results 2
wojtek11530 Dec 9, 2021
7a977d6
feat: capitilize model name
wojtek11530 Dec 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DynaBERT/data/results-dynabert-multiemo_en_all_sentence.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name,model_name,data_dir,model_dir,output_dir,model_type,task_name,max_seq_length,do_train,evaluate_during_training,do_lower_case,per_gpu_train_batch_size,per_gpu_eval_batch_size,gradient_accumulation_steps,learning_rate,weight_decay,num_train_epochs,warmup_steps,seed,hidden_dropout_prob,attention_probs_dropout_prob,data_aug,depth_mult_list,depth_lambda1,depth_lambda2,width_mult_list,width_lambda1,width_lambda2,training_phase,n_gpu,output_mode,train_batch_size,eval_batch_size,training_time,accuracy,eval_time,z_amb_precision,z_amb_recall,z_amb_f1-score,z_amb_support,z_minus_m_precision,z_minus_m_recall,z_minus_m_f1-score,z_minus_m_support,z_plus_m_precision,z_plus_m_recall,z_plus_m_f1-score,z_plus_m_support,z_zero_precision,z_zero_recall,z_zero_f1-score,z_zero_support,macro avg_precision,macro avg_recall,macro avg_f1-score,macro avg_support,weighted avg_precision,weighted avg_recall,weighted avg_f1-score,weighted avg_support,model_size,memory,parameters
multiemo_en_all_sentence,dynabert_d_0.5_w_1.,data/multiemo2,data/models/dynabertw/multiemo_en_all_sentence,data/models/dynabert-finetuned/multiemo_en_all_sentence,bert,multiemo_en_all_sentence,128,True,True,True,16,8,1,5e-05,0.01,3.0,0,42,0.1,0.1,False,"[0.5, 0.75, 1.0]",1.0,1.0,"[0.25, 0.5, 0.75, 1.0]",1.0,0.1,final_finetuning,1,classification,16,8,34809.954543,0.7724978241949522,14.607117,0.5470219435736677,0.5124816446402349,0.5291887793783169,681,0.7953004970628107,0.8290155440414507,0.8118081180811808,2123,0.8104786545924968,0.8232588699080158,0.8168187744458931,1522,0.798219584569733,0.7582804792107117,0.7777376219732562,1419,0.737755169949677,0.7307591344501033,0.7338883234696617,5745,0.770612184792384,0.7724978241949522,0.771219156436846,5745,438020911,437941264,109485316
31 changes: 31 additions & 0 deletions DynaBERT/download_bert_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import os
import requests
import tarfile

url = 'https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased.tar.gz'

output_path = os.path.join('data', 'models')
os.makedirs(output_path, exist_ok=True)

output_tar = os.path.join(output_path, 'bert-base-uncased.tar.gz')
model_folder = os.path.join(output_path, 'bert-base-uncased')

response = requests.get(url, stream=True)
if response.status_code == 200:
with open(output_tar, 'wb') as f:
f.write(response.raw.read())

with tarfile.open(name=output_tar, mode="r|gz") as tar_ref:
tar_ref.extractall(model_folder)

os.rename(os.path.join(model_folder, 'bert_config.json'), os.path.join(model_folder, 'config.json'))

os.remove(output_tar)

url_vocab = 'https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt'
r = requests.get(url_vocab)

with open(os.path.join(model_folder, 'vocab.txt'), 'wb') as f:
f.write(r.content)

print('Completed!')
Loading