Views
No views yet
1!pip install transformers
2from transformers import pipeline
3model_checkpoint = "IProject-10/deberta-base-finetuned-squad2"
4question_answerer = pipeline("question-answering", model=model_checkpoint)
5
6context = """
7🤗 Transformers is backed by the three most popular deep learning libraries — Jax, PyTorch and TensorFlow — with a seamless integration
8between them. It's straightforward to train your models with one before loading them for inference with the other.
9"""
10
11question = "Which deep learning libraries back 🤗 Transformers?"
12question_answerer(question=question, context=context) exact: 81.03259496336226,
f1: 84.42279239924598,
total: 11873,
HasAns_exact: 79.30161943319838,
HasAns_f1: 86.09173653108105,
HasAns_total: 5928,
NoAns_exact: 82.75862068965517,
NoAns_f1: 82.75862068965517,
NoAns_total: 5945,
best_exact: 81.03259496336226,
best_exact_thresh: 0.9992604851722717,
best_f1: 84.42279239924635,
best_f1_thresh: 0.9992604851722717,
total_time_in_seconds: 326.41847440000004,
samples_per_second: 36.37355398411236,
latency_in_seconds: 0.027492501844521185| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.8054 | 1.0 | 8238 | 0.7902 |
| 0.5368 | 2.0 | 16476 | 0.7901 |
| 0.3845 | 3.0 | 24714 | 0.9334 |