Downloads · 30 days
29
1% of all-time downloads
LLukas22/all-MiniLM-L12-v2-qa-en
all-MiniLM-L12-v2-qa-en is a question answering model from LLukas22. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as apache-2.0.
This model is an extractive qa model. It's a fine-tuned version of all-MiniLM-L12-v2 on the following datasets: squadv2, LLukas22/nq-simplified.
Downloads · 30 days
29
1% of all-time downloads
All-time downloads
2.8K
Public
Parameters
33.2M
1.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin133 MB · 50%
How the weights are stored.
F3233.2M · 100%
From the Hugging Face model README
This model is an extractive qa model. It's a fine-tuned version of all-MiniLM-L12-v2 on the following datasets: squad_v2, LLukas22/nq-simplified.
You can use the model like this:
from transformers import pipeline
#Make predictions
model_name = "LLukas22/all-MiniLM-L12-v2-qa-en"
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
QA_input = {
"question": "What's my name?",
"context": "My name is Clara and I live in Berkeley."
}
result = nlp(QA_input)
print(result)
Alternatively you can load the model and tokenizer on their own:
from transformers import AutoModelForQuestionAnswering, AutoTokenizer
#Make predictions
model_name = "LLukas22/all-MiniLM-L12-v2-qa-en"
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
The following hyperparameters were used during training:
| Epoch | Train Loss | Validation Loss |
|---|---|---|
| 0 | 2.65 | 1.88 |
| 1 | 1.83 | 1.74 |
| 2 | 1.69 | 1.69 |
| 3 | 1.63 | 1.68 |
| 4 | 1.6 | 1.67 |
| 5 | 1.58 | 1.66 |
| 6 | 1.57 | 1.66 |
| 7 | 1.57 | 1.66 |
| Epoch | f1 | exact_match |
|---|---|---|
| 0 | 0.507 | 0.378 |
| 1 | 0.53 | 0.418 |
| 2 | 0.544 | 0.431 |
| 3 | 0.552 | 0.429 |
| 4 | 0.557 | 0.439 |
| 5 | 0.561 | 0.438 |
| 6 | 0.564 | 0.441 |
| 7 | 0.566 | 0.441 |
This model was trained as part of my Master's Thesis 'Evaluation of transformer based language models for use in service information systems'. The source code is available on Github.