Model Card for Model ID
Model Details
Fine-tuned Flan-T5 for General Knowledge QA
This is a google/flan-t5-base
model that has been fine-tuned using the LoRA method on a small, curated set of general knowledge questions and answers.
Model Description
This model is designed to answer simple, factual questions based on the data it was trained on. It follows an instruction-based format.
Intended Uses & Limitations
- Intended Use: This model is intended for demonstration purposes and as a simple Q&A bot for the specific facts it was trained on.
- Limitations: The model's knowledge is strictly limited to the 20 facts provided during fine-tuning. It will likely fail to answer questions outside of this scope or provide incorrect information. It should not be used for any critical applications.
How to Use
Here is how to load and use the model for inference:
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
from peft import PeftModel
import torch
base_model_name = "google/flan-t5-base"
adapter_path = "shubhamsaini7737/flan-t5-base-gk-finetuned" # <-- IMPORTANT: Change this
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
base_model = AutoModelForSeq2SeqLM.from_pretrained(base_model_name)
model = PeftModel.from_pretrained(base_model, adapter_path)
model.eval()
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
# Prepare the prompt
prompt_instruction = "Answer"
prompt_input = "Who discovered gravity?"
input_text = f"{prompt_instruction}\n{prompt_input}"
inputs = tokenizer(input_text, return_tensors="pt").to(device)
# Generate
outputs = model.generate(**inputs, max_new_tokens=20)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(answer)
Training Procedure
- Base Model:
google/flan-t5-base
- Fine-tuning Method: LoRA
- Key Parameters:
r=16
,lora_alpha=32
,learning_rate=3e-4
- Training Data: Fine-tuned on a list of 20 general knowledge questions.
Model Description
- Developed by: [More Information Needed]
- Funded by [optional]: [More Information Needed]
- Shared by [optional]: [More Information Needed]
- Model type: [More Information Needed]
- Language(s) (NLP): en
- License: apache-2.0
- Finetuned from model [optional]: [More Information Needed]
Model Sources [optional]
- Repository: [More Information Needed]
- Paper [optional]: [More Information Needed]
- Demo [optional]: [More Information Needed]
Uses
Direct Use
[More Information Needed]
Downstream Use [optional]
[More Information Needed]
Out-of-Scope Use
[More Information Needed]
Bias, Risks, and Limitations
[More Information Needed]
Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
Training Details
Training Data
[More Information Needed]
Training Procedure
Preprocessing [optional]
[More Information Needed]
Training Hyperparameters
- Training regime: [More Information Needed]
Speeds, Sizes, Times [optional]
[More Information Needed]
Evaluation
Testing Data, Factors & Metrics
Testing Data
[More Information Needed]
Factors
[More Information Needed]
Metrics
[More Information Needed]
Results
[More Information Needed]
Summary
Model Examination [optional]
[More Information Needed]
Environmental Impact
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
- Hardware Type: [More Information Needed]
- Hours used: [More Information Needed]
- Cloud Provider: [More Information Needed]
- Compute Region: [More Information Needed]
- Carbon Emitted: [More Information Needed]
Technical Specifications [optional]
Model Architecture and Objective
[More Information Needed]
Compute Infrastructure
[More Information Needed]
Hardware
[More Information Needed]
Software
[More Information Needed]
Citation [optional]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
Glossary [optional]
[More Information Needed]
More Information [optional]
[More Information Needed]
Model Card Authors [optional]
[More Information Needed]
Model Card Contact
[More Information Need]
Model Details
This is a google/flan-t5-base
model fine-tuned on a custom General Knowledge dataset.
Intended Use
This model is intended for question-answering on general knowledge topics.
Limitations
The model's knowledge is limited to the data it was trained on and may produce incorrect or biased information.
- Downloads last month
- 4
Model tree for shubhamsaini7737/flan-t5-base-gk-finetuned
Base model
google/flan-t5-base