Ranjit0034/finee-dataset
Viewer β’ Updated β’ 153k β’ 46
FinEE Llama 8B is a fine-tuned version of Llama 3.1 8B Instruct, specialized for extracting financial entities from Indian banking messages (SMS, emails, statements).
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"Ranjit0034/finee-llama-8b",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Ranjit0034/finee-llama-8b")
message = "HDFC Bank: Rs.2,500 debited from A/c XX1234 on 12-Jan-26. UPI:swiggy@ybl. Ref:123456789012"
prompt = f"""Extract financial entities from this message:
{message}
JSON:"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
from mlx_lm import load, generate
model, tokenizer = load("Ranjit0034/finee-llama-8b")
output = generate(model, tokenizer, prompt, max_tokens=256)
print(output)
from finee import FinancialExtractor
extractor = FinancialExtractor(model="Ranjit0034/finee-llama-8b")
result = extractor.extract("HDFC Bank: Rs.2,500 debited...")
print(result)
# {'amount': 2500.0, 'type': 'debit', 'merchant': 'Swiggy', 'category': 'food'}
{
"amount": 2500.0,
"type": "debit",
"account": "1234",
"bank": "HDFC",
"date": "2026-01-12",
"reference": "123456789012",
"merchant": "Swiggy",
"vpa": "swiggy@ybl",
"category": "food",
"is_p2m": true
}
| Metric | Score |
|---|---|
| Amount Accuracy | 99.2% |
| Type Accuracy | 98.5% |
| Merchant Detection | 92.3% |
| Category Accuracy | 88.7% |
| Overall F1 | 94.8% |
Apache 2.0
Base model
meta-llama/Llama-3.1-8B