Downloads · 30 days
10
2% of all-time downloads
ilmariky/bert-base-finnish-cased-squad1-fi
bert-base-finnish-cased-squad1-fi is a question answering model from ilmariky. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as gpl-3.0.
This is the bert-base-finnish-cased-v1 model, fine-tuned using an automatically translated Finnish version of the SQuAD2.0 dataset in combination with the Finnish partition of the TyDi-QA dataset. It's been trained on…
Downloads · 30 days
10
2% of all-time downloads
All-time downloads
514
Public
Repo size
992 MB
Likes
0
Public
Click a slice to open those files.
.bin496 MB · 100%
From the Hugging Face model README
This is the bert-base-finnish-cased-v1 model, fine-tuned using an automatically translated Finnish version of the SQuAD2.0 dataset in combination with the Finnish partition of the TyDi-QA dataset. It's been trained on question-answer pairs, excluding unanswerable questions, for the task of question answering.
Another QA model that has been fine-tuned with also unanswerable questions is also available: bert-base-finnish-cased-squad2-fi.
Language model: bert-base-finnish-cased-v1
Language: Finnish
Downstream-task: Extractive QA
Training data: Answerable questions from Finnish SQuAD 2.0 + Finnish partition of TyDi-QA
Eval data: Answerable questions from Finnish SQuAD 2.0 + Finnish partition of TyDi-QA
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
model_name = "ilmariky/bert-base-finnish-cased-squad1-fi"
# a) Get predictions
nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
QA_input = {
'question': 'Mikä tämä on?',
'context': 'Tämä on testi.'
}
res = nlp(QA_input)
# b) Load model & tokenizer
model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
Evaluated with a slightly modified version of the official eval script.
{
"exact": 58.00497718788884,
"f1": 69.90891092523077,
"total": 4822,
"HasAns_exact": 58.00497718788884,
"HasAns_f1": 69.90891092523077,
"HasAns_total": 4822
}