Skip to content

Commit

Permalink
ALBERT vs BERT diff
Browse files Browse the repository at this point in the history
  • Loading branch information
graykode committed Oct 1, 2019
1 parent 82e2b3b commit 757fd6d
Show file tree
Hide file tree
Showing 15 changed files with 30,794 additions and 131 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2019 Tae Hwan Jung

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion classify.py
Expand Up @@ -171,7 +171,7 @@ def forward(self, input_ids, segment_ids, input_mask):

def main(task='mrpc',
train_cfg='config/train_mrpc.json',
model_cfg='config/bert_base.json',
model_cfg='config/albert_base.json',
data_file='../glue/MRPC/train.tsv',
model_file=None,
pretrain_file='../uncased_L-12_H-768_A-12/bert_model.ckpt',
Expand Down
13 changes: 13 additions & 0 deletions config/albert_base.json
@@ -0,0 +1,13 @@
{
"embedding" : 128,

"hidden": 768,
"hidden_ff": 3072,

"n_layers": 12,
"n_heads": 12,
"max_len": 512,
"n_segments": 2,
"vocab_size": 30522
}

12 changes: 12 additions & 0 deletions config/albert_unittest.json
@@ -0,0 +1,12 @@
{
"embedding" : 24,

"hidden": 64,
"hidden_ff": 256,

"n_layers": 6,
"n_heads": 1,
"max_len": 512,
"n_segments": 2,
"vocab_size": 30522
}
1 change: 0 additions & 1 deletion config/bert_base.json
Expand Up @@ -9,4 +9,3 @@
"n_segments": 2,
"vocab_size": 30522
}

4 changes: 2 additions & 2 deletions config/pretrain.json
@@ -1,9 +1,9 @@
{
"seed": 3431,
"batch_size": 96,
"batch_size": 8,
"lr": 1e-4,
"n_epochs": 25,
"warmup": 0.1,
"save_steps": 10000,
"total_steps": 1000000
}
}
Empty file added data/.keep
Empty file.

0 comments on commit 757fd6d

Please sign in to comment.