Instructions to use kartikaybagla/functiongemma-bank-sms-parser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kartikaybagla/functiongemma-bank-sms-parser with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kartikaybagla/functiongemma-bank-sms-parser") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("kartikaybagla/functiongemma-bank-sms-parser", dtype="auto") - llama-cpp-python
How to use kartikaybagla/functiongemma-bank-sms-parser with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="kartikaybagla/functiongemma-bank-sms-parser", filename="functiongemma-270m-bank-sms-parser-Q4_K_M.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 kartikaybagla/functiongemma-bank-sms-parser with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M # Run inference directly in the terminal: llama-cli -hf kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M # Run inference directly in the terminal: llama-cli -hf kartikaybagla/functiongemma-bank-sms-parser: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 kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf kartikaybagla/functiongemma-bank-sms-parser: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 kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M
Use Docker
docker model run hf.co/kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use kartikaybagla/functiongemma-bank-sms-parser with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kartikaybagla/functiongemma-bank-sms-parser" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kartikaybagla/functiongemma-bank-sms-parser", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M
- SGLang
How to use kartikaybagla/functiongemma-bank-sms-parser 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 "kartikaybagla/functiongemma-bank-sms-parser" \ --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": "kartikaybagla/functiongemma-bank-sms-parser", "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 "kartikaybagla/functiongemma-bank-sms-parser" \ --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": "kartikaybagla/functiongemma-bank-sms-parser", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use kartikaybagla/functiongemma-bank-sms-parser with Ollama:
ollama run hf.co/kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M
- Unsloth Studio new
How to use kartikaybagla/functiongemma-bank-sms-parser 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 kartikaybagla/functiongemma-bank-sms-parser 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 kartikaybagla/functiongemma-bank-sms-parser to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for kartikaybagla/functiongemma-bank-sms-parser to start chatting
- Pi new
How to use kartikaybagla/functiongemma-bank-sms-parser with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf kartikaybagla/functiongemma-bank-sms-parser: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": "kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use kartikaybagla/functiongemma-bank-sms-parser with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf kartikaybagla/functiongemma-bank-sms-parser: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 kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use kartikaybagla/functiongemma-bank-sms-parser with Docker Model Runner:
docker model run hf.co/kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M
- Lemonade
How to use kartikaybagla/functiongemma-bank-sms-parser with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kartikaybagla/functiongemma-bank-sms-parser:Q4_K_M
Run and chat with the model
lemonade run user.functiongemma-bank-sms-parser-Q4_K_M
List all available models
lemonade list
FunctionGemma Bank SMS Parser
A fine-tuned FunctionGemma-270M-IT model for extracting structured transaction data from bank SMS messages.
Model Description
This model is trained to perform two functions:
extract_transaction- Parse banking SMS and extract structured fields:source: Bank or sender namecurrency: Currency code (INR, USD, etc.)amount: Transaction amount (number)date: Transaction datedestination: Recipient or merchanttype: "debit" or "credit"
skip_message- Identify non-transaction messages:- OTPs and verification codes
- Promotional messages
- Payment requests (not completed transactions)
- Account alerts without transactions
Quantization Options
| File | Quantization | Size | Description |
|---|---|---|---|
functiongemma-270m-bank-sms-parser-Q4_K_M.gguf |
Q4_K_M | ~242MB | Recommended - Best size/quality tradeoff |
functiongemma-270m-bank-sms-parser-Q5_K_M.gguf |
Q5_K_M | ~248MB | Higher quality if Q4 shows issues |
functiongemma-270m-bank-sms-parser-Q8_0.gguf |
Q8_0 | ~280MB | Near-lossless, for validation |
Usage
With llama.cpp server
# Download model
huggingface-cli download kartikaybagla/functiongemma-bank-sms-parser \
functiongemma-270m-bank-sms-parser-Q4_K_M.gguf \
--local-dir ./models
# Run server
llama-server --model ./models/functiongemma-270m-bank-sms-parser-Q4_K_M.gguf \
--host 0.0.0.0 --port 8080 --ctx-size 2048
With Docker
docker run -p 8080:8080 -v ./models:/models \
ghcr.io/ggml-org/llama.cpp:server \
--model /models/functiongemma-270m-bank-sms-parser-Q4_K_M.gguf \
--host 0.0.0.0 --port 8080
API Request
curl http://localhost:8080/v1/completions \
-H "Content-Type: application/json" \
-d '{
"prompt": "<bos><start_of_turn>developer\nYou are a financial transaction extractor. Analyze SMS messages and:\n1. If the message describes a completed financial transaction (money sent, received, debited, or credited), use extract_transaction to capture the details.\n2. If the message is not a transaction (OTP, promotional, application status, payment request, etc.), use skip_message.\n\nOnly extract actual completed transactions with concrete amounts, not payment requests or pending transactions.<start_function_declaration>declaration:extract_transaction{description:<escape>Extract transaction details from a banking SMS message<escape>,parameters:{properties:{source:{type:<escape>STRING<escape>},currency:{type:<escape>STRING<escape>},amount:{type:<escape>NUMBER<escape>},date:{type:<escape>STRING<escape>},destination:{type:<escape>STRING<escape>},type:{type:<escape>STRING<escape>}},required:[<escape>source<escape>,<escape>currency<escape>,<escape>amount<escape>,<escape>date<escape>,<escape>destination<escape>,<escape>type<escape>],type:<escape>OBJECT<escape>}}<end_function_declaration><start_function_declaration>declaration:skip_message{description:<escape>Skip messages that are not financial transactions<escape>,parameters:{properties:{reason:{type:<escape>STRING<escape>}},required:[<escape>reason<escape>],type:<escape>OBJECT<escape>}}<end_function_declaration><end_of_turn>\n<start_of_turn>user\nICICI Bank Acct XX123 debited Rs 450.00 on 15-Jan-25; UPI to SWIGGY. UPI Ref: 123456789012<end_of_turn>\n<start_of_turn>model\n",
"max_tokens": 200,
"stop": ["<end_function_call>"]
}'
Example Output
Input SMS:
ICICI Bank Acct XX123 debited Rs 450.00 on 15-Jan-25; UPI to SWIGGY. UPI Ref: 123456789012
Model Output:
<start_function_call>extract_transaction{"source": "ICICI Bank", "currency": "INR", "amount": 450.00, "date": "15-Jan-25", "destination": "SWIGGY", "type": "debit"}<end_function_call>
Input SMS (non-transaction):
Your OTP for login is 482910. Valid for 5 minutes. Do not share.
Model Output:
<start_function_call>skip_message{"reason": "OTP verification code"}<end_function_call>
Training
- Base Model: google/functiongemma-270m-it
- Training Framework: Hugging Face TRL (SFTTrainer)
- Training Data: Classified bank SMS messages from Indian banks
- Fine-tuning Method: LoRA
Intended Use
This model is designed for:
- Personal finance automation
- Importing transactions into budgeting apps (e.g., Actual Budget)
- SMS-based expense tracking
Limitations
- Primarily trained on Indian bank SMS formats (ICICI, HDFC, SBI, etc.)
- May not generalize well to banks from other countries
- Requires the specific prompt format shown above
- Not suitable for security-critical applications without additional validation
License
This model inherits the Gemma license from the base model.
Links
- Downloads last month
- 31
4-bit
5-bit
8-bit
16-bit
Model tree for kartikaybagla/functiongemma-bank-sms-parser
Base model
google/functiongemma-270m-it