# ixambert-base-cased finetuned for QA

This is a basic implementation of the multilingual model "ixambert-base-cased", fine-tuned on SQuAD v1.1, that is able to answer basic factual questions in English, Spanish and Basque. This model reaches a F1 score of 89.1 on the SQuAD 1.1 dev set.

## Overview

• Language model: ixambert-base-cased
• Languages: English, Spanish and Basque
• Infrastructure: 1x GeForce RTX 2080

## Outputs

The model outputs the answer to the question, the start and end positions of the answer in the original context, and a score for the probability for that span of text to be the correct answer. For example:

{'score': 0.9667195081710815, 'start': 101, 'end': 105, 'answer': '1820'}


## How to use

from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline

# To get predictions
context = "Florence Nightingale, known for being the founder of modern nursing, was born in Florence, Italy, in 1820"
question = "When was Florence Nightingale born?"
pred = qa(question=question,context=context)

# To load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_name)


## Hyperparameters

batch_size = 8
n_epochs = 3
learning_rate = 2e-5