text-classification · 135.95 MB WASM q8 · 104 mBERT Languages · 6-Layer DistilBERT · Apache-2.0

DistilBERT Multilingual Cased Sentiments — 104-Language 3-Class Classifier

lxyuan/distilbert-base-multilingual-cased-sentiments-student (served via Xenova/distilbert-base-multilingual-cased-sentiments-student , Apache-2.0) is a 6-layer cased DistilBERT student distilled from MoritzLaurer/mDeBERTa-v3-base-mnli-xnli. It classifies positive, neutral, and negative sentiment across 104 mBERT languages and scripts (EN / ES / FR / DE / JA / ZH / AR / HI) completely offline in 135.95 MB (129.66 MiB) q8 WASM.

Upstream Model lxyuan/distilbert-base-multilingual-cased-sentiments-student
ONNX Artifact Xenova/distilbert-base-multilingual-cased-sentiments-student
Pipeline Task text-classification
Size & Quant 135.95 MB · WASM q8
Classes (id2label) positive · neutral · negative
License Apache-2.0

1. Live Multilingual Cross-Script Sentiment Desk

Pick a cross-script sample (EN / ES / FR / DE / JA / ZH / AR / HI), drop or upload a file, paste (Ctrl/Cmd+V), or type in any of 104 mBERT languages:

Drop a .txt, .md, .csv, or .json file here, or press Ctrl/Cmd+V anywhere outside editable fields. Inference runs locally in a Web Worker.
Inference latency–
Net Polarity–
Shannon entropy–
WordPiece tokens–
NaN score check–
Backend / dtypeWASM · q8

3-Class Multilingual Probability Distribution

Awaiting inference
Initialize the model above to compute live 3-class probabilities.

See Inside · mBERT Cased WordPiece Breakdown

Inspect how the 119,547-vocab cased tokenizer splits Latin accents, CJK characters, Arabic, or Devanagari.

Run inference to inspect WordPiece tokens and vocabulary IDs.

2. Why Distilled Multilingual Sentiment Matters

The teacher MoritzLaurer/mDeBERTa-v3-base-mnli-xnli is powerful across languages but requires multiple NLI passes per label. Distilling it into a 6-layer DistilBERT Multilingual Cased student compresses 104-language sentiment into a single text-classification forward pass (135.95 MB q8 WASM) suitable for global feedback triage, browser extensions, and offline apps.

import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";

const classifier = await pipeline(
  "text-classification",
  "Xenova/distilbert-base-multilingual-cased-sentiments-student",
  { device: "wasm", dtype: "q8" }
);
const scores = await classifier("私はこの映画が大好きで、何度も見ます!", { top_k: 3 });
Show the code · worker.js — classify() (135.95 MB q8 WASM worker)
Show the code · multiling-sentiment-core.mjs — normalizeScores()

3. Model Card & References