yogeshpandey586's picture
Upload ModernBertForSequenceClassification
ea0a632 verified
|
Raw
History Blame Contribute Delete
4.63 kB
---
language:
- en
license: apache-2.0
library_name: transformers
pipeline_tag: text-classification
tags:
- modernbert
- intent-classification
- chatbot
- enterprise-chatbot
- nlp
- text-classification
base_model: answerdotai/ModernBERT-base
---
# ModernBERT Chatbot Intent Classifier
A fine-tuned **ModernBERT** model for enterprise chatbot intent classification. This model classifies user queries into predefined intent categories and is designed to be used as the first stage of a chatbot pipeline before Retrieval-Augmented Generation (RAG) or other downstream workflows.
---
# Supported Intents
The model predicts one of the following intents:
- Business
- Greeting
- SmallTalk
- Complaint
- Feedback
- Thanks
- Goodbye
- OutOfDomain
---
# Intended Use
This model is designed for:
- Enterprise AI Chatbots
- Customer Support Bots
- HR Assistants
- Knowledge Base Assistants
- Intent Detection
- Query Routing
- RAG Pipeline Routing
Example flow:
```
User Query
β”‚
β–Ό
Intent Classifier
β”‚
β”œβ”€β”€ Business
β”‚ └── RAG Pipeline
β”‚
β”œβ”€β”€ Greeting
β”‚ └── Greeting Response
β”‚
β”œβ”€β”€ SmallTalk
β”‚ └── Small Talk Response
β”‚
β”œβ”€β”€ Complaint
β”‚ └── Complaint Workflow
β”‚
β”œβ”€β”€ Feedback
β”‚ └── Feedback Workflow
β”‚
β”œβ”€β”€ Thanks
β”‚ └── Thank You Response
β”‚
β”œβ”€β”€ Goodbye
β”‚ └── Goodbye Response
β”‚
└── OutOfDomain
└── Reject Politely
```
---
# Base Model
- **Model:** answerdotai/ModernBERT-base
- **Task:** Sequence Classification
- **Framework:** Hugging Face Transformers
- **Language:** English
---
# Example Usage
```python
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="yogeshpandey586/chatbot-intent-classifier"
)
print(classifier("Hello"))
print(classifier("What services do you provide?"))
print(classifier("Tell me a joke"))
```
Example Output
```python
[
{
"label": "Greeting",
"score": 0.998
}
]
```
---
# Training Dataset
The model was fine-tuned using a custom intent classification dataset containing manually labeled chatbot queries.
Each sample contains:
- User Query
- Intent Label
Example:
| Query | Intent |
|-------|--------|
| Hello | Greeting |
| Hi | Greeting |
| Good Morning | Greeting |
| What services do you provide? | Business |
| How can I reset my password? | Business |
| Tell me a joke | SmallTalk |
| Thanks | Thanks |
| Bye | Goodbye |
| I have feedback | Feedback |
| Your service is bad | Complaint |
| Who won yesterday's IPL match? | OutOfDomain |
---
# Training Details
- Base Model: ModernBERT-base
- Fine-tuning Task: Sequence Classification
- Framework: Hugging Face Transformers
- Optimizer: AdamW
- Loss Function: Cross Entropy Loss
---
# Evaluation
The model was evaluated using a validation dataset.
Evaluation Metric:
- Accuracy
This model is intended for production chatbot routing where low latency and high intent classification accuracy are required.
---
# Limitations
This model is intended only for intent classification.
It is **not** designed for:
- Toxicity Detection
- Sentiment Analysis
- Emotion Detection
- Translation
- Summarization
- Question Answering
- Text Generation
Performance may decrease on:
- Languages other than English
- Ambiguous user queries
- Multi-intent queries
- Queries outside the training domain
---
# Production Architecture
```
User Query
β”‚
β–Ό
ModernBERT Intent Classifier
β”‚
β–Ό
Intent Router
β”‚
β”œβ”€β”€ Business β†’ RAG
β”œβ”€β”€ Greeting β†’ Greeting Service
β”œβ”€β”€ SmallTalk β†’ Small Talk Service
β”œβ”€β”€ Complaint β†’ Complaint Service
β”œβ”€β”€ Feedback β†’ Feedback Service
β”œβ”€β”€ Thanks β†’ Thank You Service
β”œβ”€β”€ Goodbye β†’ Goodbye Service
└── OutOfDomain β†’ Reject Response
```
---
# Technical Specifications
| Property | Value |
|----------|-------|
| Architecture | ModernBERT |
| Base Model | answerdotai/ModernBERT-base |
| Framework | Transformers |
| Task | Sequence Classification |
| Language | English |
| Deployment | CPU / GPU |
---
# Developer
**Yogesh Pandey**
AI Developer
---
# License
Apache-2.0
---
# Citation
```bibtex
@misc{yogeshpandey2026intentclassifier,
title={ModernBERT Chatbot Intent Classifier},
author={Yogesh Pandey},
year={2026},
publisher={Hugging Face}
}
```