mmBERT Feedback Detector (LoRA Adapter)

A lightweight LoRA adapter for multilingual 4-class feedback classification, fine-tuned on mmBERT-base using AMD MI300X GPU.

Model Description

This is a LoRA adapter (27 MB) that can be loaded on top of mmBERT-base for efficient inference and further fine-tuning.

Labels

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%

Performance

Metric Value
Accuracy 98.63%
F1 Macro 97.94%

LoRA Configuration

Parameter Value
Rank (r) 32
Alpha 64
Target Modules query, key, value, dense
Trainable Parameters 6.7M (2.15% of total)

Training

Hardware

Component Specification
GPU AMD Instinct MI300X
VRAM 192 GB HBM3
Framework PyTorch with ROCm
Training Time ~2 minutes

Usage

With PEFT

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]}")

Merge LoRA Weights

from peft import PeftModel

# Merge for faster inference
merged_model = model.merge_and_unload()
merged_model.save_pretrained("merged_model")

Advantages of LoRA

  • Small Size: 27 MB vs 1.2 GB (full model)
  • Fast Training: Only 2.15% of parameters trained
  • Easy Deployment: Can swap adapters without reloading base model
  • Further Fine-tuning: Can continue training on domain-specific data

Related Models

Citation

@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}
}

License

Apache 2.0

Downloads last month
28
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for llm-semantic-router/mmbert-feedback-detector-lora

Adapter
(9)
this model

Dataset used to train llm-semantic-router/mmbert-feedback-detector-lora