A
multilingual 4-class user feedback classifier built on
jhu-clsp/mmBERT-base. This model classifies user responses into satisfaction categories to help understand user intent in conversational AI systems.
This is the
merged model (LoRA weights merged into base model) for direct inference without PEFT. For the LoRA adapter version, see
llm-semantic-router/mmbert-feedback-detector-lora.
Thanks to mmBERT's multilingual pretraining (256k vocabulary, 100+ languages), this model achieves excellent cross-lingual transfer:
1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2import torch
3
4model_name = "llm-semantic-router/mmbert-feedback-detector-merged"
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForSequenceClassification.from_pretrained(model_name)
7
8# Example: Classify user feedback
9text = "Thanks, that's exactly what I needed!"
10inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
11
12with torch.no_grad():
13 outputs = model(**inputs)
14 probs = torch.softmax(outputs.logits, dim=-1)
15 pred = probs.argmax().item()
16
17labels = ["SAT", "NEED_CLARIFICATION", "WRONG_ANSWER", "WANT_DIFFERENT"]
18print(f"Prediction: {labels[pred]} ({probs[0][pred]:.1%})")
19# Output: Prediction: SAT (100.0%)
1from transformers import pipeline
2
3classifier = pipeline(
4 "text-classification",
5 model="llm-semantic-router/mmbert-feedback-detector-merged"
6)
7
8# English
9result = classifier("Thanks, that's helpful!")
10print(result) # [{'label': 'SAT', 'score': 0.999...}]
11
12# Spanish (cross-lingual transfer)
13result = classifier("¡Gracias, eso es muy útil!")
14print(result) # [{'label': 'SAT', 'score': 0.999...}]
15
16# Chinese
17result = classifier("谢谢,这很有帮助!")
18print(result) # [{'label': 'SAT', 'score': 0.98...}]
1@misc{mmbert-feedback-detector,
2 title={mmBERT Feedback Detector},
3 author={vLLM Semantic Router Team},
4 year={2025},
5 publisher={Hugging Face},
6 url={https://huggingface.co/llm-semantic-router/mmbert-feedback-detector-merged}
7}