Model Card for FLAN-T5 QA Study Assistant
This model is fine-tuned from the FLAN-T5 model to perform extractive question-answering tasks using the SQuAD dataset. It can generate answers based on the given context and question, which makes it useful for educational purposes, personal assistants, or any task requiring context-based question-answering.
Model Details
Model Description
This is a question-answering model fine-tuned on a subset of the SQuAD dataset using the FLAN-T5 model. It is designed to extract answers from a given context based on a corresponding question.
- Developed by: Tooba Javed
- Funded by [optional]: Not funded
- Shared by [optional]: Tooba Javed
- Model type: Extractive Question-Answering Model (based on FLAN-T5)
- Language(s) (NLP): English
- License: Apache-2.0 License
- Finetuned from model [optional]: google/flan-t5-base
Model Sources [optional]
- Repository: [GitHub link to your notebook if applicable]
- Paper [optional]: N/A
- Demo [optional]: [Hugging Face link: https://huggingface.co/tootooba/flan-t5-qa-study-assistant]
Uses
Direct Use
The model is intended to be used for answering questions based on provided context. It can be used in:
- Education: To help students generate answers from textbooks or lecture notes.
- Customer Support: Answer common questions from provided documentation or user manuals.
- Personal Assistants: Assist users by answering general knowledge questions based on given text.
Downstream Use [optional]
The model can be further fine-tuned for domain-specific question-answering tasks, such as:
- Legal documents
- Medical information
- Company-specific internal knowledge bases
Out-of-Scope Use
This model may not work well for tasks that require deep reasoning or understanding beyond surface-level extraction from text. Additionally, it is not designed for tasks like creative writing or opinion generation.
Bias, Risks, and Limitations
- Bias: The model is trained on general knowledge from the SQuAD dataset, which may include biases present in Wikipedia-style articles.
- Risks: Since the model relies on extracting information from provided context, it may return incomplete or misleading answers if the context is ambiguous or lacks the necessary information.
- Limitations: The model cannot handle complex reasoning or multi-hop question-answering effectively.
Recommendations
Users should ensure that:
- They provide relevant and accurate context for better answers.
- They are aware of potential biases from the dataset.
- The model's limitations are accounted for in critical applications (e.g., legal or medical advice).
How to Get Started with the Model
Use the code below to load the model and tokenizer for question-answering tasks.
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("tootooba/flan-t5-qa-study-assistant").to("cuda")
tokenizer = AutoTokenizer.from_pretrained("tootooba/flan-t5-qa-study-assistant")
context = "The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris, France. It was constructed between 1887 and 1889 as the entrance arch for the 1889 World's Fair."
question = "When was the Eiffel Tower constructed?"
inputs = tokenizer(question, context, return_tensors="pt", truncation=True, padding=True).to("cuda")
outputs = model.generate(inputs.input_ids)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("Answer:", answer)
- Downloads last month
- 108
Model tree for tootooba/flan-t5-qa-study-assistant
Base model
google/flan-t5-base