Downloads · 30 days
8
8% of all-time downloads
janani-rane/sinQA-xlm-r-finetuned
sinQA-xlm-r-finetuned is a question answering model from janani-rane. Use it when the input is a question plus a passage.
This model is a fine-tuned version of xlm-roberta-large on SiQuAD + SQuAD V1.0. It is designed to perform extractive QA in Sinhala and is evaluated using both standard and extended QA metrics.
Downloads · 30 days
8
8% of all-time downloads
All-time downloads
96
Public
Parameters
559M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.2 GB · 99%
From the Hugging Face model README
This model is a fine-tuned version of xlm-roberta-large on SiQuAD + SQuAD V1.0. It is designed to perform extractive QA in Sinhala and is evaluated using both standard and extended QA metrics.
The model was evaluated on a Sinhala + English test set using multiple QA performance metrics.
| Model | Data | F1 Score | Exact Match | Jaccard Score | BLEU-1 | BLEU-2 | ROUGE-L |
|---|---|---|---|---|---|---|---|
| XLM-RoBERTa-Large | Sinhala + English | 73.41 | 60.16 | 70.29 | 76.72 | 75.70 | 21.11 |
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
tokenizer = AutoTokenizer.from_pretrained("your-username/xlm-r-sinhala-qa")
model = AutoModelForQuestionAnswering.from_pretrained("your-username/xlm-r-sinhala-qa")
question = "Your Question"
context = "Your Context"
inputs = tokenizer(question, context, return_tensors="pt")
outputs = model(**inputs)
# Extract answer span
start_logits = outputs.start_logits
end_logits = outputs.end_logits
# Extract the Answer
start_idx = outputs.start_logits.argmax()
end_idx = outputs.end_logits.argmax()
answer_tokens = inputs.input_ids[0][start_idx:end_idx+1]
answer = tokenizer.decode(answer_tokens)
print(f"Question: {question}")
print(f"Answer: {answer}")
If you use this model, please cite the following paper:
Ranasinghe, J., & Weerasinghe, R. (2025). Question Answering in a Low-Resource Language: Dataset and Deep Learning Adaptations for Sinhala. In: Hadjali, A., Maiorana, E., Gusikhin, O., & Sansone, C. (eds) Deep Learning Theory and Applications. DeLTA 2025. Communications in Computer and Information Science, vol 2627. Springer, Cham. https://doi.org/10.1007/978-3-032-04339-9_22
@inproceedings{ranasinghe2025sinhalaqa,
author = {Janani Ranasinghe and Ruvan Weerasinghe},
title = {Question Answering in a Low-Resource Language: Dataset and Deep Learning Adaptations for Sinhala},
booktitle = {Deep Learning Theory and Applications (DeLTA 2025)},
series = {Communications in Computer and Information Science},
volume = {2627},
publisher = {Springer},
year = {2025},
doi = {10.1007/978-3-032-04339-9_22}
}