Views
No views yet
distilbert-base-multilingual-cased) for 4-class dialogue act classification in English, German, and Russian. Trained on conversational dialogue data, optimized for ASR transcripts.| Index | Label | Description |
|---|---|---|
| 0 | commissive | Promises, commitments ("I'll handle it.") |
| 1 | directive | Commands, requests ("Send the report.") |
| 2 | inform | Statements, facts ("The deadline is Friday.") |
| 3 | question | Questions, inquiries ("What is the timeline?") |
| Language | Test Set | Accuracy | F1 Macro |
|---|---|---|---|
| English | SILICONE dyda_da | 80.8% | 0.725 |
| English | XDailyDialog | 82.5% | 0.750 |
| German | XDailyDialog | 81.8% | 0.738 |
| Russian | xdailydialog-ru | 81.7% | 0.734 |
1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2import torch
3
4model = AutoModelForSequenceClassification.from_pretrained("WSHAPER/distilbert-multilingual-dialogue-act-classifier")
5tokenizer = AutoTokenizer.from_pretrained("WSHAPER/distilbert-multilingual-dialogue-act-classifier")
6
7texts = ["What is the timeline?", "Send the report.", "The meeting went well."]
8inputs = tokenizer(texts, padding=True, truncation=True, return_tensors="pt")
9
10with torch.no_grad():
11 logits = model(**inputs).logits
12 probs = torch.softmax(logits, dim=-1)
13 preds = torch.argmax(probs, dim=-1)
14
15labels = ["commissive", "directive", "inform", "question"]
16for text, pred, prob in zip(texts, preds, probs):
17 print(f"{text} → {labels[pred]} ({prob[pred]:.2f})")distilbert-base-multilingual-cased (277M params)candle-transformers for pure Rust inference:1// Loads model.safetensors + tokenizer.json directly
2let config = DistilBertConfig::from_file("config.json");
3let bert = BertModel::load(vb.pp("distilbert"), &config)?;
4let classifier = candle_nn::linear(config.hidden_size, 4, vb.pp("classifier"))?;