Downloads · 30 days
3
18% of all-time downloads
rahulsaini0604/t5-small-finetuned-lora-qa-oneword
t5-small-finetuned-lora-qa-oneword is a question answering model from rahulsaini0604. Use it when the input is a question plus a passage. It is set up for peft. The card lists the license as mit.
This model is a LoRA-adapted version of t5-small fine-tuned on a curated dataset of factual questions where each answer is only one word (e.g., country capitals, authors, planets, etc.).
Downloads · 30 days
3
18% of all-time downloads
All-time downloads
17
Public
Repo size
3.2 MB
Likes
0
Public
Click a slice to open those files.
.json2.4 MB · 55%
From the Hugging Face model README
This model is a LoRA-adapted version of t5-small fine-tuned on a curated dataset of factual questions where each answer is only one word (e.g., country capitals, authors, planets, etc.).
t5-smallq, vtransformers, datasets, peftfrom transformers import AutoModelForSeq2SeqLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForSeq2SeqLM.from_pretrained("t5-small")
model = PeftModel.from_pretrained(base_model, "rahulsaini0604/t5-small-finetuned-lora-qa-oneword")
tokenizer = AutoTokenizer.from_pretrained("rahulsaini0604/t5-small-finetuned-lora-qa-oneword")
question = "question: What is the capital of India?"
inputs = tokenizer(question, return_tensors="pt")
output = model.generate(**inputs)
print(tokenizer.decode(output[0], skip_special_tokens=True)) # Output: Delhi