theatticusproject/cuad-qa
Updated • 2.59k • 67
How to use muhtasham/bert-tiny-finetuned-cuad with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("question-answering", model="muhtasham/bert-tiny-finetuned-cuad") # Load model directly
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("muhtasham/bert-tiny-finetuned-cuad")
model = AutoModelForQuestionAnswering.from_pretrained("muhtasham/bert-tiny-finetuned-cuad", device_map="auto")This model is a fine-tuned version of google/bert_uncased_L-2_H-128_A-2 on the portion of cuad dataset. It achieves the following results on the evaluation set:
The model was not trained on the whole dataset but, the first 10% of train + the first 10% of test.
raw_datasets_train, raw_datasets_test = load_dataset("cuad", split=['train[:10%]', 'test[:10%]'])
datasets = DatasetDict({'train': raw_datasets_train, 'validation': raw_datasets_test})
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| No log | 1.0 | 136 | 2.9644 |
| No log | 2.0 | 272 | 1.9337 |
| No log | 3.0 | 408 | 1.4375 |
| 2.7124 | 4.0 | 544 | 1.0978 |
| 2.7124 | 5.0 | 680 | 0.8571 |
| 2.7124 | 6.0 | 816 | 0.6907 |
| 2.7124 | 7.0 | 952 | 0.5799 |
| 0.9512 | 8.0 | 1088 | 0.5105 |
| 0.9512 | 9.0 | 1224 | 0.4726 |
| 0.9512 | 10.0 | 1360 | 0.4606 |