Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- squad
|
| 5 |
+
- adversarial_qa
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
metrics:
|
| 9 |
+
- exact_match
|
| 10 |
+
- f1
|
| 11 |
+
base_model:
|
| 12 |
+
- albert/albert-base-v2
|
| 13 |
+
model: xichenn/albert-base-v2-squad-fp16
|
| 14 |
+
library_name: transformers
|
| 15 |
+
model-index:
|
| 16 |
+
- name: xichenn/albert-base-v2-squad-fp16
|
| 17 |
+
results:
|
| 18 |
+
- task:
|
| 19 |
+
type: question-answering
|
| 20 |
+
name: Question Answering
|
| 21 |
+
dataset:
|
| 22 |
+
name: squad
|
| 23 |
+
type: squad
|
| 24 |
+
config: plain_text
|
| 25 |
+
split: validation
|
| 26 |
+
metrics:
|
| 27 |
+
- type: exact_match
|
| 28 |
+
value: 84.68
|
| 29 |
+
name: Exact Match
|
| 30 |
+
verified: true
|
| 31 |
+
- type: f1
|
| 32 |
+
value: 91.4
|
| 33 |
+
name: F1
|
| 34 |
+
verified: true
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
# albert-base-v2-squad-fp16
|
| 38 |
+
|
| 39 |
+
This model is a fp16 quantized version of [albert-base-v2-squad](https://huggingface.co/xichenn/albert-base-v2-squad).
|
| 40 |
+
It achieves the following results on the SQuAD 1.1 evaluation set (no model accuracy loss compared to fp32):
|
| 41 |
+
- Exact Match(EM): 84.68
|
| 42 |
+
- F1: 91.40
|
| 43 |
+
|
| 44 |
+
## Inference API
|
| 45 |
+
|
| 46 |
+
You can test the model directly using the Hugging Face Inference API:
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from transformers import pipeline
|
| 50 |
+
|
| 51 |
+
# Load the pipeline
|
| 52 |
+
qa_pipeline = pipeline("question-answering", model="xichenn/albert-base-v2-squad-fp16")
|
| 53 |
+
|
| 54 |
+
# Run inference
|
| 55 |
+
result = qa_pipeline(question="What is the capital of France?", context="France is a country in Europe. Its capital is Paris.")
|
| 56 |
+
|
| 57 |
+
print(result)
|
| 58 |
+
```
|