Instructions to use ccortezb/FinOptix-14B-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ccortezb/FinOptix-14B-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ccortezb/FinOptix-14B-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ccortezb/FinOptix-14B-v2") model = AutoModelForCausalLM.from_pretrained("ccortezb/FinOptix-14B-v2", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ccortezb/FinOptix-14B-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ccortezb/FinOptix-14B-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccortezb/FinOptix-14B-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ccortezb/FinOptix-14B-v2
- SGLang
How to use ccortezb/FinOptix-14B-v2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ccortezb/FinOptix-14B-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccortezb/FinOptix-14B-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ccortezb/FinOptix-14B-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccortezb/FinOptix-14B-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use ccortezb/FinOptix-14B-v2 with Docker Model Runner:
docker model run hf.co/ccortezb/FinOptix-14B-v2
FinOptix-14B v2 — Your FinOps Architect in 14 Billion Parameters
FinOptix-14B v2 is an open-weights FinOps specialist fine-tuned on Qwen 2.5 14B Instruct. It audits infrastructure-as-code, reasons about AWS cost and commitments, triages incidents into remediation-as-code, and analyzes data-pipeline cost — fully offline on a single GPU.
v2 is a re-train of the original FinOptix-14B (HF "Build Small" hackathon, Jun 2026). The v1 repo stays as the historical baseline.
- 16-bit model:
ccortezb/FinOptix-14B-v2(this repo) - GGUF (Ollama / llama.cpp):
ccortezb/FinOptix-14B-v2-GGUF— Q4_K_M (9GB, portable) and Q6_K (12GB, higher fidelity)
What's new in v2
v1 was trained for a stack that has since evolved. v2 re-aligns the model to the current ecosystem and adds three new domains:
| Capability | v1 | v2 |
|---|---|---|
| Terraform HCL audit (rightsizing, tagging, Graviton, gp2→gp3, lifecycle) | ✅ | ✅ updated |
| AWS Cost Explorer JSON + anomalies | ✅ | ✅ |
| Savings Plans / Reserved Instances coverage & utilization | — | ✅ new |
| BYaML v2 Architecture Graph reasoning (blast radius, cost chains, owner attribution) | YAML lint only | ✅ graph-first |
| Remo — incident triage + remediation-as-code | — | ✅ new |
| sofe-dbt — data-engineering FinOps (Athena bytes scanned, incremental vs full-refresh, partitioning) | — | ✅ new |
| FinOps Q&A | ✅ | ✅ |
Key shift: BYaML moved from "validate this YAML" to "reason over the derived Architecture Graph" — the model computes blast radius and cost propagation over nodes (aws.<resource>) and typed edges, matching the real byaml-spec v0.4 schema.
Training
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen2.5-14B-Instruct (4-bit via Unsloth) |
| Method | QLoRA (r=16, α=32, dropout=0.05) |
| Framework | Unsloth + TRL (SFTTrainer) |
| Dataset | 966 examples (265 v1 + 701 new, deterministic generators) |
| Hardware | Modal A100-80GB |
| Duration | ~20 minutes, 3 epochs, 183 steps |
| Final train loss | 0.28 |
| Cost | ~$2 |
The dataset was built with deterministic per-domain generators faithful to the real policy definitions (sofe-dbt policies, SOFE savings collectors, the byaml-spec v0.4 schema) — every cost figure is derived from the input, never fabricated.
Usage
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("ccortezb/FinOptix-14B-v2", device_map="auto")
tok = AutoTokenizer.from_pretrained("ccortezb/FinOptix-14B-v2")
messages = [
{"role": "system", "content": "You are FinOptix-14B, a FinOps specialist. Costs are derived from real data, never invented."},
{"role": "user", "content": "Audit this dbt model: fct_events runs daily with --full-refresh, bytes_scanned_last_run=1.2TB, is_incremental=1."},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=350, do_sample=False, repetition_penalty=1.1)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
Ollama (GGUF)
ollama run hf.co/ccortezb/FinOptix-14B-v2-GGUF:Q4_K_M
# or higher fidelity:
ollama run hf.co/ccortezb/FinOptix-14B-v2-GGUF:Q6_K
Requires ~10GB RAM/VRAM (Q4_K_M) or ~13GB (Q6_K).
Example tasks
dbt cost audit → detects --full-refresh on a 1.2TB incremental model, recommends partition_by + removing the daily full-refresh (~$180/mo Athena savings), classifies as Optimize.
Incident triage (Remo) → classifies severity, finds root cause, and emits remediation-as-code (e.g. Terraform aws_s3_bucket_public_access_block for a recurring public bucket).
Architecture Graph blast radius → given a BYaML v0.4 graph, computes which nodes break if a node fails and which cost chains drive spend.
Limitations
- Trained on synthetic data modeled after real patterns — no customer data.
- Does not execute commands or call live AWS APIs; it reasons and recommends.
- Not a substitute for professional financial/compliance advice.
- Cost figures are illustrative unless real scan stats are provided in the prompt.
Related reading
Full 3-part build log: BLOG.md in this repo.
- Re-training: Axolotl → Unsloth, and why the framework matters less than dependency resolution
- 966 training examples without writing any by hand (deterministic data factory)
- Teaching a 14B to reason over architecture graphs (not validate YAML)
License
Apache-2.0. Built by Carlos Cortez — AWS Community Hero. LinkedIn · X · GitHub · AWS Heroes
- Downloads last month
- 30