Instructions to use Akhenaton/sft_banking_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Akhenaton/sft_banking_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Akhenaton/sft_banking_model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Akhenaton/sft_banking_model", dtype="auto") - llama-cpp-python
How to use Akhenaton/sft_banking_model with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Akhenaton/sft_banking_model", filename="unsloth.F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Akhenaton/sft_banking_model with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Akhenaton/sft_banking_model:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Akhenaton/sft_banking_model:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Akhenaton/sft_banking_model:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Akhenaton/sft_banking_model:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Akhenaton/sft_banking_model:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Akhenaton/sft_banking_model:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Akhenaton/sft_banking_model:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Akhenaton/sft_banking_model:Q4_K_M
Use Docker
docker model run hf.co/Akhenaton/sft_banking_model:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Akhenaton/sft_banking_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Akhenaton/sft_banking_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Akhenaton/sft_banking_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Akhenaton/sft_banking_model:Q4_K_M
- SGLang
How to use Akhenaton/sft_banking_model 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 "Akhenaton/sft_banking_model" \ --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": "Akhenaton/sft_banking_model", "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 "Akhenaton/sft_banking_model" \ --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": "Akhenaton/sft_banking_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Akhenaton/sft_banking_model with Ollama:
ollama run hf.co/Akhenaton/sft_banking_model:Q4_K_M
- Unsloth Studio new
How to use Akhenaton/sft_banking_model with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Akhenaton/sft_banking_model to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Akhenaton/sft_banking_model to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Akhenaton/sft_banking_model to start chatting
- Pi new
How to use Akhenaton/sft_banking_model with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Akhenaton/sft_banking_model:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Akhenaton/sft_banking_model:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Akhenaton/sft_banking_model with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Akhenaton/sft_banking_model:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Akhenaton/sft_banking_model:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use Akhenaton/sft_banking_model with Docker Model Runner:
docker model run hf.co/Akhenaton/sft_banking_model:Q4_K_M
- Lemonade
How to use Akhenaton/sft_banking_model with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Akhenaton/sft_banking_model:Q4_K_M
Run and chat with the model
lemonade run user.sft_banking_model-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)Banking AI Assistant - Llama 3.2 1B Fine-tuned
A specialized banking and financial AI assistant fine-tuned on the T2-RAGBench dataset for conversational RAG tasks. This model excels at analyzing financial documents, answering banking-related questions, and providing detailed insights from financial reports.
Model Details
- Developed by: Akhenaton
- Model Type: Causal Language Model (Llama 3.2 1B)
- License: Apache 2.0
- Base Model: unsloth/llama-3.2-1b-instruct-unsloth-bnb-4bit
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
- Training Framework: Unsloth + Hugging Face TRL
- Quantization: 4-bit (BitsAndBytes)
Training Details
Dataset
- Source: G4KMU/t2-ragbench (ConvFinQA subset)
- Size: 32,908 context-independent QA pairs from 9,000+ financial documents
- Domains: FinQA, ConvFinQA, VQAonBD, TAT-DQA
- Focus: Financial documents with text and tables from SEC filings
Training Configuration
LoRA Parameters:
r: 16
lora_alpha: 16
lora_dropout: 0
target_modules: [q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj]
Training Setup:
max_seq_length: 2048
per_device_train_batch_size: 2
gradient_accumulation_steps: 4
max_steps: 60
learning_rate: 2e-4
optimizer: adamw_8bit
lr_scheduler_type: cosine
weight_decay: 0.01
Intended Use
Primary Use Cases
- Financial Document Analysis: Extract insights from financial reports, SEC filings, and earnings statements
- Banking Q&A: Answer questions about financial concepts, regulations, and banking operations
- Conversational RAG: Provide context-aware responses based on financial document context
- Financial Research: Assist with financial research and analysis tasks
Conversation Format
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are a specialized banking AI assistant. Analyze financial documents and provide accurate, detailed answers based on the given context. Focus on numerical accuracy and financial terminology.<|eot_id|><|start_header_id|>user<|end_header_id|>
Financial Document Context:
{context}
Question: {question}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
{response}<|eot_id|>
Usage
Quick Start
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("Akhenaton/sft_banking_model")
tokenizer = AutoTokenizer.from_pretrained("Akhenaton/sft_banking_model")
# Prepare conversation
messages = [
{"role": "user", "content": "Explain the key financial metrics in quarterly earnings."}
]
# Generate response
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=128, temperature=1.5, min_p=0.1)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
With Unsloth (Recommended - 2x faster)
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
"Akhenaton/sft_banking_model",
max_seq_length=2048,
dtype=None,
load_in_4bit=True
)
FastLanguageModel.for_inference(model) # Enable fast inference
Available Formats
This model is available in multiple quantization formats:
- q4_k_m: Recommended for most use cases
- q8_0: Higher quality, more resource intensive
- q5_k_m: Balanced quality and efficiency
- f16: Full precision for maximum accuracy
Performance
- Training Speed: 2x faster with Unsloth optimization
- Memory Efficiency: 4-bit quantization reduces VRAM requirements
- Inference Speed: Optimized for fast response generation
- Accuracy: Specialized for financial domain with >80% context-independent Q&A capability
Limitations
- Domain Specific: Optimized for financial/banking content, may have reduced performance on general topics
- Training Size: Limited to 60 training steps - further training may improve performance
- Context Length: Maximum sequence length of 2048 tokens
- Language: English only
- Numerical Reasoning: While improved for financial calculations, complex mathematical operations may require verification
Ethical Considerations
- Financial Advice: This model should not be used as a substitute for professional financial advice
- Data Source: Trained on public SEC filings and financial documents
- Bias: May reflect biases present in financial reporting and documentation
- Verification: Always verify numerical calculations and financial information from authoritative sources
Citation
If you use this model in your research or applications, please consider citing:
@misc{akhenaton2025sft_banking_model,
author = {Akhenaton},
title = {Banking AI Assistant - Llama 3.2 1B Fine-tuned},
year = {2025},
url = {https://huggingface.co/Akhenaton/sft_banking_model},
note = {Fine-tuned with Unsloth on T2-RAGBench dataset}
}
Acknowledgments
- Unsloth Team for the optimized training framework
- Meta AI for the Llama 3.2 base model
- G4KMU for the T2-RAGBench dataset
- Hugging Face for the transformers library and model hosting
This model was trained 2x faster with Unsloth and Hugging Face's TRL library.
- Downloads last month
- 21
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Akhenaton/sft_banking_model", filename="", )