krishna-finance-7b

A fine-tuned Qwen2.5-7B-Instruct model specialized for financial question answering and quantitative reasoning. Trained on a combination of financial QA and instruction-following datasets to handle earnings analysis, ratio calculations, financial statement interpretation, and investment reasoning.

Key Details

Base model Qwen/Qwen2.5-7B-Instruct
Method QLoRA (4-bit NF4, rank 16, alpha 16)
Library Unsloth + TRL SFTTrainer
Datasets TheFinAI/flare-finqa (5K) + Sujet-Finance-Instruct-177k (5K)
Total examples 10,000
Hardware NVIDIA RTX A5000 (24GB VRAM) on RunPod
Training time ~2.75 hours
Parameters trained 40.4M of 7.66B (0.53%)
Format ChatML (<|im_start|> / <|im_end|>)
Output Merged 16-bit safetensors

Dataset Composition

The training data blends two complementary sources:

  • FinQA (5,000 examples) — financial question answering requiring numerical reasoning over earnings reports, balance sheets, and financial tables. Teaches the model to extract numbers, perform calculations, and explain financial logic step by step.

  • Sujet Finance Instruct (5,000 examples) — broad financial instruction data covering investment analysis, market concepts, risk assessment, portfolio management, and financial planning. Gives the model general financial fluency.

Usage

Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("sriksven/krishna-finance-7b")
tokenizer = AutoTokenizer.from_pretrained("sriksven/krishna-finance-7b")

messages = [
    {
        "role": "system",
        "content": "You are a financial analyst. Answer questions about financial data with precise calculations and step-by-step reasoning.",
    },
    {
        "role": "user",
        "content": "A company reported revenue of $120M and cost of goods sold of $75M. Operating expenses were $25M. Calculate the gross margin and operating margin.",
    },
]

inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Unsloth (faster inference)

from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="sriksven/krishna-finance-7b",
    max_seq_length=2048,
    load_in_4bit=True,
)
FastLanguageModel.for_inference(model)

Example Capabilities

  • Financial ratio calculation — gross margin, operating margin, ROE, P/E, debt-to-equity
  • Earnings analysis — interpreting revenue trends, YoY growth, segment performance
  • Financial statement reading — balance sheet, income statement, cash flow analysis
  • Investment reasoning — valuation approaches, risk factors, portfolio considerations
  • Quantitative QA — multi-step numerical reasoning over financial data

Intended Use

  • Financial question answering systems
  • Building finance-focused chatbots or copilots
  • Quantitative analysis assistants for analysts and students
  • Research on domain-specific LLM fine-tuning in finance

Limitations

  • Not a financial advisor — outputs should not be used as investment advice
  • Trained on English-language financial data only
  • May hallucinate financial figures not present in the input context
  • No real-time market data access — knowledge limited to training data patterns
  • Not evaluated against established financial NLP benchmarks (FinQA leaderboard, etc.)
  • Best results when using the system prompt format matching training

Training Infrastructure

GPU NVIDIA RTX A5000 24GB
Cloud RunPod ($0.27/hr)
Framework Unsloth 2026.5.2 + TRL + Transformers 5.5.0
Precision BF16 training, 4-bit NF4 base quantization
Optimizer AdamW 8-bit
Learning rate 2e-4, linear decay
Batch size 16 effective (4 per device × 4 accumulation)
Packing Enabled

Source Code

Training scripts and configs: github.com/sriksven/LLM-FineTune-Suite

License

Apache 2.0

Downloads last month
1
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sriksven/FinanceForge-8b

Base model

Qwen/Qwen2.5-7B
Finetuned
(3316)
this model

Datasets used to train sriksven/FinanceForge-8b