Downloads · 30 days
0
mia-project-2025/T5-base-LoRA-natural-questions-shortQA
T5-base-LoRA-natural-questions-shortQA is a machine learning model from mia-project-2025. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This repository contains a LoRA-adapted, fine-tuned for question answering on the Natural Questions Short QA dataset.
Downloads · 30 days
0
Access
Public
Updated Aug 24, 2025
Repo size
22.4 MB
Likes
0
Public
Click a slice to open those files.
.pt14.4 MB · 41%
From the Hugging Face model README
This repository contains a **LoRA-adapted, fine-tuned for question answering on the Natural Questions Short QA dataset.
The model uses LoRA (Low-Rank Adaptation) on attention matrices and 4-bit quantization to reduce GPU memory usage while maintaining good performance.
lucadiliello/naturalquestionsshortqaquestion: <QUESTION> context: <CONTEXT>from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
# Load the model
model_name = "mia-project-2025/T5-base-LoRA-natural-questions-shortQA"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
# Example input
question = "Who is the founder of Tesla?"
context = "Tesla, Inc. was founded by Elon Musk, JB Straubel, Martin Eberhard, Marc Tarpenning, and Ian Wright."
inputs = tokenizer(f"question: {question} context: {context}", return_tensors="pt")
outputs = model.generate(**inputs, max_length=128)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("Answer:", answer)
## Evaluation Results
The model was evaluated using SQuAD metrics on the 20% test split of the Natural Questions dataset:
Metric Score
Eval Loss| 0.3431
Exact Match|57.72%
F1 Score |71.20%
Eval Runtime |567.3 sec
Eval Samples/sec |36.69
Eval Steps/sec| 1.15
Epoch| 10.0