🧾 Model Card: fint5-financeqa

πŸ”Ž Overview

Model Name: fint5-financeqa Base Model: t5-small Domain: Financial Question Answering Fine-tuned by: [Your Name] Training Environment: Google Colab License: MIT (inherits from t5-small)


πŸ“š Description

fint5-financeqa is a fine-tuned version of the t5-small model, tailored for financial question-answering tasks using the sweatSmile/FinanceQA dataset.

The model is capable of answering domain-specific questions when given both the question and relevant context. This makes it suitable for chatbot assistants, enterprise finance automation, or as a component in investment-related QA systems.


πŸ“¦ Intended Use

You can use this model to:

  • Build finance-domain QA bots
  • Help users query financial reports
  • Perform automated FAQ answering for fintech tools

Not recommended for:

  • General-purpose QA tasks (use base T5 instead)
  • Time-sensitive financial forecasting or advice
  • Legal or regulatory decision-making

🧠 Training Details

Detail Value
Base Model t5-small
Dataset sweatSmile/FinanceQA
Dataset Size 3705 total entries (80/20 split)
Preprocessing QUERY + context: CONTEXT
Target Text ANSWER string
Max Input Length 512 tokens
Max Target Length 128 tokens
Epochs 3
Batch Size 4
Optimizer & LR AdamW @ 2e-5
Mixed Precision Enabled (fp16)
Evaluation Strategy Per Epoch
Frameworks πŸ€— Transformers, Datasets, Accelerate

πŸ“ˆ Metrics

Metric Value
Final Eval Loss 0.415
BLEU / ROUGE [Not explicitly printed]
EM / Accuracy [Can be added]

Note: Evaluation beyond loss was mentioned but not shown. Future versions can include BLEU, ROUGE, or exact match scores using evaluate or sacrebleu.


πŸ“‰ Training Curves

Loss chart from the training loop:

Training Curve Placeholder

Replace with actual matplotlib plot or embed image if hosted.


πŸ§ͺ Example Usage

python from transformers import T5Tokenizer, T5ForConditionalGeneration

model = T5ForConditionalGeneration.from_pretrained("./fint5-financeqa") tokenizer = T5Tokenizer.from_pretrained("./fint5-financeqa")

question = "What is the net income of the company?" context = "The company reported a net income of $1.5 million for the last quarter."

input_text = f"{question} context: {context}" input_ids = tokenizer(input_text, return_tensors="pt").input_ids

output = model.generate(input_ids) answer = tokenizer.decode(output[0], skip_special_tokens=True)

print("Answer:", answer)


🌱 Carbon Footprint (Optional)

Tracked using codecarbon:

Metric Value
Emissions (kg COβ‚‚eq) Reported via emissions.csv
Duration ~[training time]
Hardware Google Colab GPU

🧭 Future Improvements

  • Include BLEU / ROUGE / EM scores for comprehensive evaluation
  • Apply to other finance datasets (FinQA, Doc2Dial, etc.)
  • Use larger base model (e.g., t5-base) for better performance
  • Integrate LoRA/PEFT to optimize memory and speed

🏁 Model Access

πŸ“ Directory: ./fint5-financeqa βœ… Includes:

  • pytorch_model.bin
  • config.json
  • tokenizer_config.json
  • spiece.model

You can upload this model to Hugging Face using transformers-cli or huggingface_hub.


Downloads last month
45
Safetensors
Model size
60.5M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for yakul259/fint5-financeqa-customised

Finetuned
(446)
this model

Dataset used to train yakul259/fint5-financeqa-customised