Downloads · 30 days
15
33% of all-time downloads
AventIQ-AI/roberta-base-intent-classification-for-banking-systems
roberta-base-intent-classification-for-banking-systems is a machine learning model from AventIQ-AI. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains a fine-tuned RoBERTa-Base model for intent classification on the Banking77 dataset. The model identifies user intent from natural language queries in the context of banking services.
Downloads · 30 days
15
33% of all-time downloads
All-time downloads
45
Public
Parameters
125M
249 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors249 MB · 98%
From the Hugging Face model README
This repository contains a fine-tuned RoBERTa-Base model for intent classification on the Banking77 dataset. The model identifies user intent from natural language queries in the context of banking services.
pip install transformers torch datasets
from transformers import RobertaTokenizerFast, RobertaForSequenceClassification
import torch
from datasets import load_dataset
# Load tokenizer and model
tokenizer = RobertaTokenizerFast.from_pretrained("roberta-base")
model = RobertaForSequenceClassification.from_pretrained("path_to_your_fine_tuned_model")
model.eval()
# Sample input
text = "I am still waiting on my card?"
# Tokenize and predict
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
with torch.no_grad():
outputs = model(**inputs)
predicted_class = torch.argmax(outputs.logits, dim=1).item()
# Load label mapping from dataset
label_map = load_dataset("PolyAI/banking77")["train"].features["label"].int2str
predicted_label = label_map(predicted_class)
print(f"Predicted Intent: {predicted_label}")
The Banking77 dataset contains 13,083 labeled queries across 77 banking-related intents, including tasks like checking balances, transferring money, and reporting fraud.
.
├── config.json
├── tokenizer_config.json
├── special_tokens_map.json
├── tokenizer.json
├── model.safetensors # Fine-tuned RoBERTa model
├── README.md # Documentation
The model may not generalize well to domains outside the fine-tuning dataset.
Quantization may result in minor accuracy degradation compared to full-precision models.
Contributions are welcome! Feel free to open an issue or submit a pull request if you have suggestions or improvements.