mom-multilingual-classifier
Collection
long context models for mom multilingual classifier (domain, jailbreak, pii, factual, feedback)
•
10 items
•
Updated
LoRA adapter for intent classification based on mmBERT-32K-YaRN (32K context, multilingual).
biology, business, chemistry, computer science, economics, engineering, health, history, law, math, other, philosophy, physics, psychology
| Metric | Score |
|---|---|
| Test Accuracy | 80.0% |
| Adapter Size | 27 MB |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from peft import PeftModel
# Load base model and LoRA adapter
base_model = AutoModelForSequenceClassification.from_pretrained(
"llm-semantic-router/mmbert-32k-yarn", num_labels=14
)
model = PeftModel.from_pretrained(base_model, "llm-semantic-router/mmbert32k-intent-classifier-lora")
tokenizer = AutoTokenizer.from_pretrained("llm-semantic-router/mmbert32k-intent-classifier-lora")
# Inference
inputs = tokenizer("How do neural networks learn?", return_tensors="pt")
outputs = model(**inputs)
predicted_class = outputs.logits.argmax().item()
Base model
jhu-clsp/mmBERT-base