question-answering

This model was trained on the bioasq22_es dataset, provided by IIC. It is an automatically translated version of the bioasq dataset. As for the model, it is a fine-tuned version of BETO, a spanish BERT developed by the Catholic University of Chile.

For training the model, we followed the recommendations given in this paper. You can use the model like this:

from transformers import RobertaTokenizer, RobertaForQuestionAnswering
import torch
tokenizer = RobertaTokenizer.from_pretrained("IIC/beto-base-cased-bioasq")
model = RobertaForQuestionAnswering.from_pretrained("IIC/beto-base-cased-bioasq")
question, text = "Quién es el padre de Luke Skywalker?", "En la famosa película, Darth Veider le dice a Luke Skywalker aquella frase que todos recordamos: yo soy tu padre."
inputs = tokenizer(question, text, return_tensors="pt")
start_positions = torch.tensor([1])
end_positions = torch.tensor([3])

outputs = model(**inputs, start_positions=start_positions, end_positions=end_positions)
loss = outputs.loss
start_scores = outputs.start_logits
end_scores = outputs.end_logits

Contributions

Thanks to @avacaondata, @alborotis, @albarji, @Dabs, @GuillemGSubies for adding this model.