RichardErkhov
commited on
Commit
•
0afa2f1
1
Parent(s):
65e3cd0
uploaded readme
Browse files
README.md
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Quantization made by Richard Erkhov.
|
2 |
+
|
3 |
+
[Github](https://github.com/RichardErkhov)
|
4 |
+
|
5 |
+
[Discord](https://discord.gg/pvy7H8DZMG)
|
6 |
+
|
7 |
+
[Request more models](https://github.com/RichardErkhov/quant_request)
|
8 |
+
|
9 |
+
|
10 |
+
xlm-roberta-base-finetuned-squad2 - bnb 8bits
|
11 |
+
- Model creator: https://huggingface.co/IProject-10/
|
12 |
+
- Original model: https://huggingface.co/IProject-10/xlm-roberta-base-finetuned-squad2/
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
Original model description:
|
18 |
+
---
|
19 |
+
license: mit
|
20 |
+
base_model: xlm-roberta-base
|
21 |
+
tags:
|
22 |
+
- generated_from_trainer
|
23 |
+
datasets:
|
24 |
+
- squad_v2
|
25 |
+
model-index:
|
26 |
+
- name: xlm-roberta-base-finetuned-squad2
|
27 |
+
results: []
|
28 |
+
language:
|
29 |
+
- en
|
30 |
+
- ar
|
31 |
+
- de
|
32 |
+
- el
|
33 |
+
- es
|
34 |
+
- hi
|
35 |
+
- ro
|
36 |
+
- ru
|
37 |
+
- th
|
38 |
+
- tr
|
39 |
+
- vi
|
40 |
+
- zh
|
41 |
+
metrics:
|
42 |
+
- exact_match
|
43 |
+
- f1
|
44 |
+
pipeline_tag: question-answering
|
45 |
+
---
|
46 |
+
|
47 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
48 |
+
should probably proofread and complete it, then remove this comment. -->
|
49 |
+
|
50 |
+
## Model description
|
51 |
+
|
52 |
+
XLM-RoBERTa is a multilingual version of RoBERTa developed by Facebook AI. It is pre-trained on 2.5TB of filtered CommonCrawl data containing 100 languages.
|
53 |
+
It is an extension of RoBERTa, which is itself a variant of the BERT model. XLM-RoBERTa is designed to handle multiple languages and demonstrate strong performance across a wide range of tasks, making it highly useful for multilingual natural language processing (NLP) applications.
|
54 |
+
|
55 |
+
**Language model:** xlm-roberta-base
|
56 |
+
**Language:** English
|
57 |
+
**Downstream-task:** Question-Answering
|
58 |
+
**Training data:** Train-set SQuAD 2.0
|
59 |
+
**Evaluation data:** Evaluation-set SQuAD 2.0
|
60 |
+
**Hardware Accelerator used**: GPU Tesla T4
|
61 |
+
|
62 |
+
## Intended uses & limitations
|
63 |
+
|
64 |
+
Multilingual Question-Answering
|
65 |
+
|
66 |
+
For Question-Answering in English-
|
67 |
+
|
68 |
+
```python
|
69 |
+
!pip install transformers
|
70 |
+
from transformers import pipeline
|
71 |
+
model_checkpoint = "IProject-10/bert-base-uncased-finetuned-squad2"
|
72 |
+
question_answerer = pipeline("question-answering", model=model_checkpoint)
|
73 |
+
|
74 |
+
context = """
|
75 |
+
The Statue of Unity is the world's tallest statue, with a height of 182 metres (597 feet), located near Kevadia in the state of Gujarat, India.
|
76 |
+
"""
|
77 |
+
|
78 |
+
question = "What is the height of statue of Unity?"
|
79 |
+
question_answerer(question=question, context=context)
|
80 |
+
```
|
81 |
+
For Question-Answering in Hindi-
|
82 |
+
|
83 |
+
```python
|
84 |
+
!pip install transformers
|
85 |
+
from transformers import pipeline
|
86 |
+
model_checkpoint = "IProject-10/bert-base-uncased-finetuned-squad2"
|
87 |
+
question_answerer = pipeline("question-answering", model=model_checkpoint)
|
88 |
+
|
89 |
+
context = """
|
90 |
+
स्टैच्यू ऑफ यूनिटी दुनिया की सबसे ऊंची प्रतिमा है, जिसकी ऊंचाई 182 मीटर (597 फीट) है, जो भारत के गुजरात राज्य में केवडिया के पास स्थित है।
|
91 |
+
"""
|
92 |
+
|
93 |
+
question = "स्टैच्यू ऑफ यूनिटी की ऊंचाई कितनी है?"
|
94 |
+
question_answerer(question=question, context=context)
|
95 |
+
```
|
96 |
+
|
97 |
+
For Question-Answering in Spanish-
|
98 |
+
|
99 |
+
```python
|
100 |
+
!pip install transformers
|
101 |
+
from transformers import pipeline
|
102 |
+
model_checkpoint = "IProject-10/bert-base-uncased-finetuned-squad2"
|
103 |
+
question_answerer = pipeline("question-answering", model=model_checkpoint)
|
104 |
+
|
105 |
+
context = """
|
106 |
+
La Estatua de la Unidad es la estatua más alta del mundo, con una altura de 182 metros (597 pies), ubicada cerca de Kevadia en el estado de Gujarat, India.
|
107 |
+
"""
|
108 |
+
|
109 |
+
question = "¿Cuál es la altura de la estatua de la Unidad?"
|
110 |
+
question_answerer(question=question, context=context)
|
111 |
+
```
|
112 |
+
|
113 |
+
## Results
|
114 |
+
|
115 |
+
Evaluation on SQuAD 2.0 validation dataset:
|
116 |
+
|
117 |
+
```
|
118 |
+
exact: 75.51587635812348,
|
119 |
+
f1: 78.7328391907263,
|
120 |
+
total: 11873,
|
121 |
+
HasAns_exact: 73.00944669365722,
|
122 |
+
HasAns_f1: 79.45259779208723,
|
123 |
+
HasAns_total: 5928,
|
124 |
+
NoAns_exact: 78.01513877207738,
|
125 |
+
NoAns_f1: 78.01513877207738,
|
126 |
+
NoAns_total: 5945,
|
127 |
+
best_exact: 75.51587635812348,
|
128 |
+
best_exact_thresh: 0.999241054058075,
|
129 |
+
best_f1: 78.73283919072665,
|
130 |
+
best_f1_thresh: 0.999241054058075,
|
131 |
+
total_time_in_seconds: 218.97641910400125,
|
132 |
+
samples_per_second: 54.220450076686134,
|
133 |
+
latency_in_seconds: 0.018443225730986376
|
134 |
+
```
|
135 |
+
|
136 |
+
### Training hyperparameters
|
137 |
+
|
138 |
+
The following hyperparameters were used during training:
|
139 |
+
- learning_rate: 3e-05
|
140 |
+
- train_batch_size: 16
|
141 |
+
- eval_batch_size: 16
|
142 |
+
- seed: 42
|
143 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
144 |
+
- lr_scheduler_type: linear
|
145 |
+
- num_epochs: 3
|
146 |
+
|
147 |
+
### Training results
|
148 |
+
|
149 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
150 |
+
|:-------------:|:-----:|:-----:|:---------------:|
|
151 |
+
| 1.0539 | 1.0 | 8333 | 0.9962 |
|
152 |
+
| 0.8013 | 2.0 | 16666 | 0.8910 |
|
153 |
+
| 0.5918 | 3.0 | 24999 | 0.9802 |
|
154 |
+
|
155 |
+
This model is a fine-tuned version of [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) on the squad_v2 dataset.
|
156 |
+
It achieves the following results on the evaluation set:
|
157 |
+
- Loss: 0.9802
|
158 |
+
|
159 |
+
### Framework versions
|
160 |
+
|
161 |
+
- Transformers 4.31.0
|
162 |
+
- Pytorch 2.0.1+cu118
|
163 |
+
- Datasets 2.14.3
|
164 |
+
- Tokenizers 0.13.3
|
165 |
+
|