finndot/finnai-slm-data
Viewer β’ Updated β’ 21.7k β’ 183 β’ 2
How to use finndot/finnai-slm-v2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="finndot/finnai-slm-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("finndot/finnai-slm-v2")
model = AutoModelForCausalLM.from_pretrained("finndot/finnai-slm-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]:]))How to use finndot/finnai-slm-v2 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "finndot/finnai-slm-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": "finndot/finnai-slm-v2",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/finndot/finnai-slm-v2
How to use finndot/finnai-slm-v2 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "finndot/finnai-slm-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": "finndot/finnai-slm-v2",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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-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": "finndot/finnai-slm-v2",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use finndot/finnai-slm-v2 with Docker Model Runner:
docker model run hf.co/finndot/finnai-slm-v2
On-device model for Indian bank SMS β JSON and personal finance Q&A.
Useful when you want structured spends from bank SMS on the phone, without uploading messages to a cloud LLM.
| Model | finndot/finnai-slm-v2 |
| Dataset | finndot/finnai-slm-data |
| Base | Qwen/Qwen3-1.7B |
| License | Apache 2.0 |
| App | FinnDot |
| 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 (this) | finnai-slm-v2 |
β | finnai-slm-data |
Prefer v4 for new projects.
| Capability | How it helps |
|---|---|
| SMS β JSON | Extracts amount, merchant, type, account, balance, category from Indian bank SMS |
| Noise refusal | Returns {} for OTP / promo / KYC instead of inventing spends |
| Finance coach | Short answers about spending, SIP, EMI, budgeting |
| Privacy | Designed for on-device expense tracking (FinnDot) |
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "finndot/finnai-slm-v2"
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)
output = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
| Metric | FinnAI v2 | Untuned Qwen3-1.7B |
|---|---|---|
| Strict R-EM % | 97.97 | ~28 |
| Amount EM % | 99.53 | high but over-parses noise |
| JSON valid % | 100.0 | β |
@misc{finnai-slm-v2,
title={FinnAI SLM: On-device Indian bank SMS parsing},
author={FinnDot Team},
year={2026},
url={https://huggingface.co/finndot/finnai-slm-v2}
}
Apache 2.0 β same as Qwen3-1.7B.