Update README.md (#7491)
Model now fine-tuned on Transformers 3.1.0, previous out-of-date model was fine-tuned on Transformers 2.3.0.
This commit is contained in:
Родитель
6ef7658c0a
Коммит
f745f61c99
|
@ -1,71 +1,60 @@
|
||||||
## Albert xxlarge version 1 language model fine-tuned on SQuAD2.0
|
## Albert xxlarge version 1 language model fine-tuned on SQuAD2.0
|
||||||
|
|
||||||
### with the following results:
|
### (updated 30Sept2020) with the following results:
|
||||||
|
|
||||||
```
|
```
|
||||||
exact: 85.65653162637918
|
exact: 86.11134506864315
|
||||||
f1: 89.260458954177
|
f1: 89.35371214945009
|
||||||
total': 11873
|
total': 11873
|
||||||
HasAns_exact': 82.6417004048583
|
HasAns_exact': 83.56950067476383
|
||||||
HasAns_f1': 89.8598902096736
|
HasAns_f1': 90.06353312254078
|
||||||
HasAns_total': 5928
|
HasAns_total': 5928
|
||||||
NoAns_exact': 88.66274179983179
|
NoAns_exact': 88.64592094196804
|
||||||
NoAns_f1': 88.66274179983179
|
NoAns_f1': 88.64592094196804
|
||||||
NoAns_total': 5945
|
NoAns_total': 5945
|
||||||
best_exact': 85.65653162637918
|
best_exact': 86.11134506864315
|
||||||
best_exact_thresh': 0.0
|
best_exact_thresh': 0.0
|
||||||
best_f1': 89.2604589541768
|
best_f1': 89.35371214944985
|
||||||
best_f1_thresh': 0.0
|
best_f1_thresh': 0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
### from script:
|
### from script:
|
||||||
|
|
||||||
```
|
```
|
||||||
python -m torch.distributed.launch --nproc_per_node=2 ${RUN_SQUAD_DIR}/run_squad.py \
|
python ${EXAMPLES}/run_squad.py \
|
||||||
--model_type albert \
|
--model_type albert \
|
||||||
--model_name_or_path albert-xxlarge-v1 \
|
--model_name_or_path albert-xxlarge-v1 \
|
||||||
--do_train \
|
--do_train \
|
||||||
--train_file ${SQUAD_DIR}/train-v2.0.json \
|
--do_eval \
|
||||||
--predict_file ${SQUAD_DIR}/dev-v2.0.json \
|
--train_file ${SQUAD}/train-v2.0.json \
|
||||||
--version_2_with_negative \
|
--predict_file ${SQUAD}/dev-v2.0.json \
|
||||||
--num_train_epochs 3 \
|
--version_2_with_negative \
|
||||||
--max_steps 8144 \
|
--do_lower_case \
|
||||||
--warmup_steps 814 \
|
--num_train_epochs 3 \
|
||||||
--do_lower_case \
|
--max_steps 8144 \
|
||||||
--learning_rate 3e-5 \
|
--warmup_steps 814 \
|
||||||
--max_seq_length 512 \
|
--learning_rate 3e-5 \
|
||||||
--doc_stride 128 \
|
--max_seq_length 512 \
|
||||||
--save_steps 2000 \
|
--doc_stride 128 \
|
||||||
--per_gpu_train_batch_size 1 \
|
--per_gpu_train_batch_size 6 \
|
||||||
--gradient_accumulation_steps 24 \
|
--gradient_accumulation_steps 8 \
|
||||||
--output_dir ${MODEL_PATH}
|
--per_gpu_eval_batch_size 48 \
|
||||||
|
--fp16 \
|
||||||
CUDA_VISIBLE_DEVICES=0 python ${RUN_SQUAD_DIR}/run_squad.py \
|
--fp16_opt_level O1 \
|
||||||
--model_type albert \
|
--threads 12 \
|
||||||
--model_name_or_path ${MODEL_PATH} \
|
--logging_steps 50 \
|
||||||
--do_eval \
|
--save_steps 3000 \
|
||||||
--train_file ${SQUAD_DIR}/train-v2.0.json \
|
--overwrite_output_dir \
|
||||||
--predict_file ${SQUAD_DIR}/dev-v2.0.json \
|
--output_dir ${MODEL_PATH}
|
||||||
--version_2_with_negative \
|
|
||||||
--do_lower_case \
|
|
||||||
--max_seq_length 512 \
|
|
||||||
--per_gpu_eval_batch_size 48 \
|
|
||||||
--output_dir ${MODEL_PATH}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### using the following system & software:
|
### using the following software & system:
|
||||||
|
|
||||||
```
|
```
|
||||||
OS/Platform: Linux-4.15.0-76-generic-x86_64-with-debian-buster-sid
|
Transformers: 3.1.0
|
||||||
GPU/CPU: 2 x NVIDIA 1080Ti / Intel i7-8700
|
PyTorch: 1.6.0
|
||||||
Transformers: 2.3.0
|
TensorFlow: 2.3.1
|
||||||
PyTorch: 1.4.0
|
Python: 3.8.1
|
||||||
TensorFlow: 2.1.0
|
OS: Linux-5.4.0-48-generic-x86_64-with-glibc2.10
|
||||||
Python: 3.7.6
|
CPU/GPU: Intel i9-9900K / NVIDIA Titan RTX 24GB
|
||||||
```
|
```
|
||||||
|
|
||||||
### Access this albert_xxlargev1_sqd2_512 fine-tuned model with:
|
|
||||||
|
|
||||||
```python
|
|
||||||
tokenizer = AutoTokenizer.from_pretrained("ahotrod/albert_xxlargev1_squad2_512")
|
|
||||||
model = AutoModelForQuestionAnswering.from_pretrained("ahotrod/albert_xxlargev1_squad2_512")
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче