Instructions to use finndot/finnai-slm-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use finndot/finnai-slm-v4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="finndot/finnai-slm-v4") 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("finndot/finnai-slm-v4") model = AutoModelForCausalLM.from_pretrained("finndot/finnai-slm-v4", 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]:])) - LiteRT
How to use finndot/finnai-slm-v4 with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- LiteRT-LM
How to use finndot/finnai-slm-v4 with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli # A single .litertlm file in the repo is picked automatically; otherwise the CLI asks which one to run # (or pass its name right after the repo id). litert-lm run \ --from-huggingface-repo=finndot/finnai-slm-v4 \ --prompt="Write me a poem"
- PEFT
How to use finndot/finnai-slm-v4 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use finndot/finnai-slm-v4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "finndot/finnai-slm-v4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "finndot/finnai-slm-v4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/finndot/finnai-slm-v4
- SGLang
How to use finndot/finnai-slm-v4 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 "finndot/finnai-slm-v4" \ --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": "finndot/finnai-slm-v4", "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 "finndot/finnai-slm-v4" \ --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": "finndot/finnai-slm-v4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use finndot/finnai-slm-v4 with Docker Model Runner:
docker model run hf.co/finndot/finnai-slm-v4
FinnAI SLM v4
On-device language model for Indian bank SMS → JSON and personal finance coaching.
Use this model when you need private, phone-friendly understanding of Indian banking SMS and short finance answers — without sending user messages to the cloud.
| Model | finndot/finnai-slm-v4 |
| On-device INT4 | finndot/finnai-slm-v4-litertlm |
| Dataset | finndot/finnai-slm-data-v4 |
| Base | Qwen/Qwen3-1.7B |
| License | Apache 2.0 |
| App | FinnDot |
FinnAI model family
| Version | Weights | On-device LiteRT | Data |
|---|---|---|---|
| v4 (latest) | finnai-slm-v4 |
finnai-slm-v4-litertlm |
finnai-slm-data-v4 |
| v3 | finnai-slm-v3 |
finnai-slm-v3-litertlm |
finnai-slm-data-v3 |
| v2 | finnai-slm-v2 |
— | finnai-slm-data |
Prefer v4 for new apps and fine-tunes: broader SMS coverage, Ask / Learn / Analytics chat aligned with FinnDot.
What it helps with
| Capability | How it helps |
|---|---|
| SMS → JSON | Turns UPI / NEFT / IMPS / card / salary / ATM SMS into {amount, merchant, type, account, balance, category} |
| Noise refusal | Returns {} for OTP, promo, KYC — avoids fake transactions |
| Ask | Short answers grounded in a spending ledger |
| Learn | Tutor-style explanations (SIP, EMI, tax, budgeting) |
| Analytics | Spending tips without inventing numbers |
| On-device | INT4 LiteRT build runs on Android; user SMS stays on the phone |
Languages: English, Hindi, Hinglish, and other Indic bank SMS styles in the training mix.
Quick start
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "finndot/finnai-slm-v4"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype="bfloat16", device_map="auto"
)
messages = [
{
"role": "system",
"content": (
"Extract transaction details from this SMS as JSON: "
"{amount, merchant, type, account, balance, category}. "
"type is one of: INCOME, EXPENSE, CREDIT, TRANSFER, INVESTMENT. "
"If this is not a transaction (OTP, promo, KYC), return {}."
),
},
{
"role": "user",
"content": "HDFC Bank: Rs.499.00 debited from A/c XX1234 to SWIGGY via UPI. Avl Bal Rs.15000.50",
},
]
text = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
LoRA adapter: adapter/ in this repo (base: finndot/finnai-slm-v3).
Quality snapshot (held-out test)
| Metric | FinnAI v4 | Untuned Qwen3-1.7B |
|---|---|---|
| SMS R-EM % | 94.87 | 29.39 |
| Amount EM % | 99.7 | 78.75 |
| JSON valid % | 100.0 | 100.0 |
| Chat groundedness % | 80.77 | 47.44 |
Full report: eval/v20261005-finnai-slm-v4.md.
On-device file
For Android / LiteRT-LM, use finndot/finnai-slm-v4-litertlm (~929 MB .litertlm).
Limitations
- Best on Indian banking SMS; weaker on unfamiliar foreign formats.
- Merchant names can still be hard; bank-specific regex parsers may win when available.
- 1.7B — specialized for SMS + finance chat, not a general assistant.
- Thinking / long chain-of-thought is disabled for on-device use.
Citation
@misc{finnai-slm-v4,
title={FinnAI SLM v4: On-device Indian bank SMS parsing and finance coaching},
author={FinnDot Team},
year={2026},
url={https://huggingface.co/finndot/finnai-slm-v4}
}
License
Apache 2.0 — same as Qwen3-1.7B.
- Downloads last month
- 649
Model tree for finndot/finnai-slm-v4
Base model
Qwen/Qwen3-1.7B-BaseDataset used to train finndot/finnai-slm-v4
Evaluation results
- Strict Record Exact-Match (R-EM) on FinnAI v4 SMS test (synthetic, 2028)self-reported94.870
- Amount Exact-Match on FinnAI v4 SMS test (synthetic, 2028)self-reported99.700
- JSON Validity on FinnAI v4 SMS test (synthetic, 2028)self-reported100.000