|
|
--- |
|
|
license: apache-2.0 |
|
|
tags: |
|
|
- text-classification |
|
|
- distilbert |
|
|
- conversation-classification |
|
|
- knowledge-distillation |
|
|
--- |
|
|
|
|
|
# ThradDistilbertConversationClassifier |
|
|
|
|
|
Personal copy of a DistilBERT model for conversation classification with hard labels I developed at [Thrad.ai](https://www.thrad.ai). [Publication](https://huggingface.co/Thrad/thrad-distilbert-conversation-classifier), [Publication GitHub](https://github.com/Thrads/Conversation-Classifiers), [Dev. GitHub](https://github.com/ScottBiggs2/DistilBERT-Convo.-Classifier) |
|
|
|
|
|
## Model Details |
|
|
|
|
|
- **Base Architecture**: DistilBERT |
|
|
- **Task**: Multi-class conversation intent classification |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
from transformers import AutoTokenizer, AutoModelForSequenceClassification |
|
|
|
|
|
model = AutoModelForSequenceClassification.from_pretrained("ScottBiggs2/ThradDistilbertConversationClassifier") |
|
|
tokenizer = AutoTokenizer.from_pretrained("ScottBiggs2/ThradDistilbertConversationClassifier") |
|
|
|
|
|
# Example inference |
|
|
text = "Your conversation text here" |
|
|
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512) |
|
|
outputs = model(**inputs) |
|
|
predictions = outputs.logits.softmax(dim=-1) |
|
|
``` |
|
|
|
|
|
|