llm-semantic-router/feedback-detector-dataset
Viewer • Updated • 20.9k • 54 • 1
How to use llm-semantic-router/mmbert-feedback-detector-lora with PEFT:
from peft import PeftModel
from transformers import AutoModelForSequenceClassification
base_model = AutoModelForSequenceClassification.from_pretrained("jhu-clsp/mmBERT-base")
model = PeftModel.from_pretrained(base_model, "llm-semantic-router/mmbert-feedback-detector-lora")A lightweight LoRA adapter for multilingual 4-class feedback classification, fine-tuned on mmBERT-base using AMD MI300X GPU.
This is a LoRA adapter (27 MB) that can be loaded on top of mmBERT-base for efficient inference and further fine-tuning.
| Label | ID | Description | F1 Score |
|---|---|---|---|
| SAT | 0 | User is satisfied | 100.0% |
| NEED_CLARIFICATION | 1 | User needs more information | 99.7% |
| WRONG_ANSWER | 2 | System gave incorrect response | 96.2% |
| WANT_DIFFERENT | 3 | User wants something different | 95.9% |
| Metric | Value |
|---|---|
| Accuracy | 98.63% |
| F1 Macro | 97.94% |
| Parameter | Value |
|---|---|
| Rank (r) | 32 |
| Alpha | 64 |
| Target Modules | query, key, value, dense |
| Trainable Parameters | 6.7M (2.15% of total) |
| Component | Specification |
|---|---|
| GPU | AMD Instinct MI300X |
| VRAM | 192 GB HBM3 |
| Framework | PyTorch with ROCm |
| Training Time | ~2 minutes |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import PeftModel
# Load base model
base_model = AutoModelForSequenceClassification.from_pretrained(
"jhu-clsp/mmBERT-base",
num_labels=4
)
# Load LoRA adapter
model = PeftModel.from_pretrained(
base_model,
"llm-semantic-router/mmbert-feedback-detector-lora"
)
tokenizer = AutoTokenizer.from_pretrained("llm-semantic-router/mmbert-feedback-detector-lora")
# Classify
labels = ["SAT", "NEED_CLARIFICATION", "WRONG_ANSWER", "WANT_DIFFERENT"]
inputs = tokenizer("Thank you, that was helpful!", return_tensors="pt")
outputs = model(**inputs)
pred = outputs.logits.argmax(-1).item()
print(f"Label: {labels[pred]}")
from peft import PeftModel
# Merge for faster inference
merged_model = model.merge_and_unload()
merged_model.save_pretrained("merged_model")
@model{mmbert_feedback_detector_lora,
title={mmBERT Feedback Detector LoRA},
author={LLM Semantic Router Team},
year={2025},
url={https://huggingface.co/llm-semantic-router/mmbert-feedback-detector-lora}
}
Apache 2.0
Base model
jhu-clsp/mmBERT-base