Text Classification
PEFT
Safetensors
Transformers
feedback-detection
user-satisfaction
lora
modernbert
mmbert
32k-context
Eval Results (legacy)
Instructions to use llm-semantic-router/mmbert32k-feedback-detector-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use llm-semantic-router/mmbert32k-feedback-detector-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("llm-semantic-router/mmbert-32k-yarn") model = PeftModel.from_pretrained(base_model, "llm-semantic-router/mmbert32k-feedback-detector-lora") - Transformers
How to use llm-semantic-router/mmbert32k-feedback-detector-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="llm-semantic-router/mmbert32k-feedback-detector-lora")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("llm-semantic-router/mmbert32k-feedback-detector-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
mmBERT-32K Feedback Detector (LoRA Adapter)
LoRA adapter for 4-class user feedback/satisfaction classification based on mmBERT-32K-YaRN.
Model Description
This is the LoRA adapter version. For the merged model, see mmbert32k-feedback-detector-merged.
Classes
- SAT: User is satisfied
- NEED_CLARIFICATION: User needs more explanation
- WRONG_ANSWER: System provided incorrect information
- WANT_DIFFERENT: User wants alternative options
Base Model
- Base: llm-semantic-router/mmbert-32k-yarn
- Architecture: ModernBERT with YaRN RoPE scaling
- Context Length: 32,768 tokens
LoRA Configuration
- Rank: 8
- Alpha: 16
- Dropout: 0.1
- Target Modules: attn.Wqkv, attn.Wo, mlp.Wi, mlp.Wo
- Trainable Parameters: 1.69M (0.55% of base model)
Performance
| Metric | Score |
|---|---|
| Accuracy | 98.46% |
| F1 Macro | 97.69% |
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import PeftModel
# Load base model and adapter
base_model = "llm-semantic-router/mmbert-32k-yarn"
adapter = "llm-semantic-router/mmbert32k-feedback-detector-lora"
tokenizer = AutoTokenizer.from_pretrained(adapter)
model = AutoModelForSequenceClassification.from_pretrained(base_model, num_labels=4)
model = PeftModel.from_pretrained(model, adapter)
# Inference
text = "Thanks, that's exactly what I needed!"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
License
Apache 2.0