transformers pytorch bert question-answering generated_from_trainer dataset:squad base_model:google-bert/bert-base-uncased base_model:finetune:google-bert/bert-base-uncased license:apache-2.0 endpoints_compatible region:us
---
base_model: bert-base-uncased
datasets:
- squad
license: apache-2.0
tags:
- generated_from_trainer
model-index:
- name: bert-base-uncased-squad-v1
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# bert-base-uncased-squad-v1

This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the squad dataset.
It was finetuned following the [Transformers Question Answering example](https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering#fine-tuning-bert-on-squad10):

```
python run_qa.py \
  --model_name_or_path bert-base-uncased \
  --dataset_name squad \
  --do_train \
  --do_eval \
  --per_device_train_batch_size 12 \
  --learning_rate 3e-5 \
  --num_train_epochs 2 \
  --max_seq_length 384 \
  --doc_stride 128 \
```


### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 12
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2.0

### Training results

```
***** eval metrics *****
  epoch                   =        2.0
  eval_exact_match        =    81.3434
  eval_f1                 =    88.7002
  eval_samples            =      10784
```

### Framework versions

- Transformers 4.26.1
- Pytorch 1.13.1+cu117
- Datasets 2.8.0
- Tokenizers 0.13.2
