Instructions to use aleksahet/xlm-r-squad-sr-lat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aleksahet/xlm-r-squad-sr-lat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="aleksahet/xlm-r-squad-sr-lat")# Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("aleksahet/xlm-r-squad-sr-lat") model = AutoModelForQuestionAnswering.from_pretrained("aleksahet/xlm-r-squad-sr-lat") - Notebooks
- Google Colab
- Kaggle
XLM-R-SQuAD-sr-lat
This is XLM-R-based model finetuned on synthetic question answering dataset which is created by translating SQuAD 1.1. This model is the result of my thesis.
Usage
from transformers import pipeline
model_name = 'aleksahet/xlm-r-squad-sr-lat'
pipe = pipeline('question-answering', model=model_name, tokenizer=model_name)
sample = {
'question': 'U kom gradu je rođen Željko Obradović?',
'context': 'Željko Obradović (Čačak, 9. mart 1960) bivši je srpski i jugoslovenski košarkaš. Najuspešniji je trener u istoriji košarke.'
}
res = pipe(sample)
Performance
Model was tested on synthetic question answering dataset, created by automatic translation of SQuAD 1.1 dev split. The model achieved the following results:
- Exact Match:
71.04 - F1:
81.62
Source Code
Source code for synthetic dataset generation and model finetuning can be found on this GitHub repository.
- Downloads last month
- 6