Downloads · 30 days
0
peaceboii/gpt2-finance-qa
gpt2-finance-qa is a question answering model from peaceboii. Use it when the input is a question plus a passage. The card lists the license as mit.
This model is a fine-tuned GPT-2 Medium using LoRA on a 10K+ Q&A dataset specific to finance, economics, and investing.
Downloads · 30 days
0
Access
Public
Updated Aug 14, 2025
Repo size
12.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors12.6 MB · 72%
From the Hugging Face model README
This model is a fine-tuned GPT-2 Medium using LoRA on a 10K+ Q&A dataset specific to finance, economics, and investing.
| Metric | Score |
|---|---|
| BLEU | 4.29 |
| ROUGE-L | 0.18 |
| BERTScore-F1 | 0.72 |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("yourname/gpt2-finance-qa")
tokenizer = AutoTokenizer.from_pretrained("yourname/gpt2-finance-qa")
prompt = "What is compounding interest in finance?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
---