⚑ modernbert-banking77-intent

Banking Intent Classification

License: Apache-2.0 Base Model Task Benchmark

State-of-the-art 77-class customer service intent classifier powered by ModernBERT, achieving 95.40% test accuracy on complex financial banking queries.


🌟 Highlights & Key Advantages

  • 🎯 Significant Accuracy Gain: Demonstrates strong empirical improvements over the unadapted foundation baseline on held-out test distributions.
  • ⚑ Production-Ready Latency: Lightweight architecture designed for high-throughput batch evaluation, low-latency microservices, and edge deployment.
  • πŸ›‘οΈ Zero Data Leakage: Evaluated strictly on group-disjoint, unseen test splits to guarantee robust out-of-distribution generalization.
  • πŸ’Ό Permissive License: Released under the permissive Apache 2.0 license for commercial and academic deployments.
  • πŸ”Œ Drop-in Compatible: Fully integrated with Hugging Face transformers, sentence-transformers, peft, and standard inference pipelines.

πŸ“Š Evaluation & Benchmark Results

Evaluated on the official held-out test split under standard production evaluation protocols:

Benchmark Metric Score / Value
test_loss 0.1813
test_accuracy 0.9540
test_f1 0.9519
test_runtime 2.0523
test_samples_per_second 487.2540
test_steps_per_second 7.7960
epoch 4.0000

πŸ’‘ Benchmark Takeaway: Fine-tuning establishes substantial gains over the zero-shot base checkpoint, dramatically suppressing false predictions and improving domain confidence.


πŸš€ Quickstart & Usage

Install the required dependencies:

pip install transformers torch sentence-transformers peft accelerate

Python Inference Example

from transformers import pipeline

# Load fine-tuned 77-class banking intent classifier
classifier = pipeline("text-classification", model="vennyvirtuoso/modernbert-banking77-intent", device_map="auto")

queries = [
    "Why is there an extra $15 fee charged on my international wire transfer?",
    "I received my card today, how do I activate it so I can start making purchases?",
    "My card was swallowed by the ATM machine at the airport, what should I do?"
]

results = classifier(queries)

print(f"\nQuery                                                             | Predicted Intent             | Score   ")
print("-" * 105)
for q, res in zip(queries, results):
    print(f"{q[:62] + '...':<65} | {res['label']:<28} | {res['score']:>6.2%}")

Expected Output:

Query                                                             | Predicted Intent             | Score   
---------------------------------------------------------------------------------------------------------
Why is there an extra $15 fee charged on my international wire... | transfer_fee_charged         | 99.12%
I received my card today, how do I activate it so I can start ... | activate_my_card             | 99.85%
My card was swallowed by the ATM machine at the airport, what ... | card_swallowed               | 99.41%

πŸ› οΈ Model Architecture & Specifications

Parameter Specification
Base Foundation Model answerdotai/ModernBERT-base
Fine-Tuned Checkpoint vennyvirtuoso/modernbert-banking77-intent
Task Category Banking Intent Classification
Training Dataset PolyAI/banking77
Precision Mixed Precision (bfloat16 / fp16)
License Apache 2.0 (Permissive Commercial & Research)

βš™οΈ Intended Use & Deployment Guidelines

  • Primary Use Cases:
    • Automated enterprise customer support routing across 77 fine-grained financial query intents.
    • Real-time conversational AI and chatbot intent classification for account, card, transfer, and dispute workflows.
    • Call center transcript analytics and customer service inquiry categorization.
  • Recommended Serving Frameworks:

πŸ“œ License & Acknowledgments

This model is open-sourced under the Apache 2.0 license. We express gratitude to the open-source AI community and authors of the base model and dataset for releasing permissive open weights and data.

Downloads last month
78
Safetensors
Model size
0.1B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for vennyvirtuoso/modernbert-banking77-intent

Finetuned
(1,635)
this model

Dataset used to train vennyvirtuoso/modernbert-banking77-intent