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
|
Download README.md from llm-semantic-router/mmbert32k-feedback-detector-lora: direct link, hf CLI and curl.
- Browser
- Download file 1.68 kB
-
https://huggingface.co/llm-semantic-router/mmbert32k-feedback-detector-lora/resolve/035abb4763c4c430e0f622ca45245d0005861790/README.md
- Command line
-
hf download hf://llm-semantic-router/mmbert32k-feedback-detector-lora@035abb4763c4c430e0f622ca45245d0005861790/README.md
-
curl -L -o README.md https://huggingface.co/llm-semantic-router/mmbert32k-feedback-detector-lora/resolve/035abb4763c4c430e0f622ca45245d0005861790/README.md
1.68 kB
| # 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](https://huggingface.co/llm-semantic-router/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](https://huggingface.co/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 | |
| ```python | |
| 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 | |