modernjev-8k - fast bank request classifier for 8192 tokens
2 min readupdated
The modernjev-8k model by developer vennyvirtuoso handles the text-classification task, identifying user intent across 77 categories in financial and banking requests (such as transfer fee issues, card activation, or card blocking). It is built on a compact 149M-parameter bidirectional ModernBERT-base architecture supporting up to 8,192 tokens of context with FlashAttention-2. Compared to the unadapted base model, accuracy on the Banking77 test increased from 26.60% to 94.20% while maintaining high response speed and low probability calibration error. This solution is useful for fintech bot developers, ticket routing systems, and RAG pipelines.
Key features
- Context up to 8,192 tokens: bidirectional encoder with FlashAttention-2 processes long documents and chat histories without truncation.
- High throughput: up to 494 inferences per second on GPU in batch mode and a latency of 14.74 ms per single request (Batch=1).
- Noticeable accuracy boost: fine-tuning on
Open-Jev-v1.1,boolq, andbanking77raised Macro-F1 on the holdout set from 0.1698 to 0.6183. - Open license: distributed under Apache 2.0 and compatible with the standard
transformerspipeline, as well as ONNX Runtime and TensorRT.
What you can do
- Support routing: automatically distribute incoming bank client tickets across 77 categories in real time.
- AI agent routing: select the required tool or scenario branch without generating extra tokens.
- RAG filtering and validation: perform quick Boolean gating checks and hallucination filtering on documents up to 8k tokens long.
Example
from transformers import pipeline
classifier = pipeline("text-classification", model="vennyvirtuoso/modernjev-8k", device_map="auto")
queries = [
"Why is there an extra $15 fee charged on my international wire transfer?",
"My card was swallowed by the ATM machine at the airport, what should I do?"
]
print(classifier(queries))Read more
DetailsBanking77 accuracy: 94.20% (versus 26.60% for the zero-shot base), Jev Noul Boolean Gating: 75.20%, overall Macro Accuracy: 63.90%.
Expected Calibration Error (ECE): 0.0221, Cross-Entropy Loss: 0.8350.
Parameters: 149M (0.15B), weight precision bfloat16 / fp16, context 8,192 tokens.
License: Apache 2.0.










Comments