OsamaAli313/CFO-Agent-14B
010
CFO-Agent-14B
A fine-tuned language model trained to function as an AI Chief Financial Officer. It provides expert-level financial analysis, forecasting, risk assessment, scenario planning, and executive-level financial communication.
Proof-of-Concept: This version uses Qwen2.5-0.5B-Instruct as the base model for budget-efficient validation. A production version on Qwen2.5-14B-Instruct is planned.
Capabilities
Quick Start
With PEFT (Recommended)
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-0.5B-Instruct",
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, "OsamaAli313/CFO-Agent-14B")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
messages = [
{"role": "system", "content": "You are CFO-Agent, an expert Chief Financial Officer AI assistant."},
{"role": "user", "content": "Analyze this: Revenue $500K, COGS $200K, OpEx $150K. What are our margins?"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))With 4-bit Quantization (Low VRAM)
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel
import torch
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-0.5B-Instruct",
quantization_config=bnb_config,
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, "OsamaAli313/CFO-Agent-14B")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")Training Details
Dataset
Trained on OsamaAli313/CFO-Agent-14B-Dataset — a curated dataset of 47,481 training samples across three layers:
All data formatted in ChatML with a CFO-Agent system prompt.
Training Configuration
Training Results
Training metrics are available on the Trackio dashboard.
Example Prompts
Analyze our income statement: Revenue $500K, COGS $200K, Operating Expenses $150K.
What's our gross margin and operating margin?We have $100K cash with $20K monthly burn rate. When do we run out of cash?
What cost reduction targets should we set?Compare two scenarios: Base case 20% revenue growth / 15% margin vs
Worst case 5% growth / 10% margin. What's the year-end profitability impact?Our revenue grows 10% quarterly starting from $1M.
Project revenue for the next 4 quarters and calculate CAGR.Limitations
- Proof-of-concept model — built on 0.5B parameter base, limited reasoning depth compared to larger models
- Not financial advice — outputs should be validated by qualified financial professionals
- Training subset — trained on 5,000 of 47,481 available samples due to compute budget
- Context window — trained with max 512 tokens, longer inputs may degrade quality
- No real-time data — cannot access live market data or financial feeds
Roadmap
- [ ] Train on full 47K dataset
- [ ] Scale to Qwen2.5-14B-Instruct base model
- [ ] Add tool-use capabilities (calculator, spreadsheet, API calls)
- [ ] GGUF export for local deployment (Ollama, LM Studio)
- [ ] Evaluation benchmark on financial reasoning tasks
Links
Citation
@misc{cfo-agent-14b,
title={CFO-Agent-14B: An AI Chief Financial Officer},
author={Osama Ali},
year={2026},
url={https://huggingface.co/OsamaAli313/CFO-Agent-14B}
}