Migrate model card from transformers-repo
Browse filesRead announcement at https://discuss.huggingface.co/t/announcement-all-model-cards-will-be-migrated-to-hf-co-model-repos/2755
Original file history: https://github.com/huggingface/transformers/commits/master/model_cards/twmkn9/albert-base-v2-squad2/README.md
README.md
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
This model is [ALBERT base v2](https://huggingface.co/albert-base-v2) trained on SQuAD v2 as:
|
2 |
+
|
3 |
+
```
|
4 |
+
export SQUAD_DIR=../../squad2
|
5 |
+
python3 run_squad.py
|
6 |
+
--model_type albert
|
7 |
+
--model_name_or_path albert-base-v2
|
8 |
+
--do_train
|
9 |
+
--do_eval
|
10 |
+
--overwrite_cache
|
11 |
+
--do_lower_case
|
12 |
+
--version_2_with_negative
|
13 |
+
--save_steps 100000
|
14 |
+
--train_file $SQUAD_DIR/train-v2.0.json
|
15 |
+
--predict_file $SQUAD_DIR/dev-v2.0.json
|
16 |
+
--per_gpu_train_batch_size 8
|
17 |
+
--num_train_epochs 3
|
18 |
+
--learning_rate 3e-5
|
19 |
+
--max_seq_length 384
|
20 |
+
--doc_stride 128
|
21 |
+
--output_dir ./tmp/albert_fine/
|
22 |
+
```
|
23 |
+
|
24 |
+
Performance on a dev subset is close to the original paper:
|
25 |
+
|
26 |
+
```
|
27 |
+
Results:
|
28 |
+
{
|
29 |
+
'exact': 78.71010200723923,
|
30 |
+
'f1': 81.89228117126069,
|
31 |
+
'total': 6078,
|
32 |
+
'HasAns_exact': 75.39518900343643,
|
33 |
+
'HasAns_f1': 82.04167868004215,
|
34 |
+
'HasAns_total': 2910,
|
35 |
+
'NoAns_exact': 81.7550505050505,
|
36 |
+
'NoAns_f1': 81.7550505050505,
|
37 |
+
'NoAns_total': 3168,
|
38 |
+
'best_exact': 78.72655478775913,
|
39 |
+
'best_exact_thresh': 0.0,
|
40 |
+
'best_f1': 81.90873395178066,
|
41 |
+
'best_f1_thresh': 0.0
|
42 |
+
}
|
43 |
+
```
|
44 |
+
|
45 |
+
We are hopeful this might save you time, energy, and compute. Cheers!
|