Basics · Cross-Lingual Alignment & Logit Calibration · 135.95 MB WASM q8 · Apache-2.0

Inside Multilingual Sentiment: 5-Language Alignment & Logit Margin Calibration

Test whether lxyuan/distilbert-base-multilingual-cased-sentiments-student (Apache-2.0) assigns consistent sentiment when the same review is written in EN / FR / ES / DE / JA, then inspect raw logits vs temperature-scaled softmax and cased/accented token sensitivity.

1. Same Review Across 5 Languages (EN / FR / ES / DE / JA)

Dominant Polarity–
5-Lang Agreement–
Mean Net Polarity–
Cross-Lingual Spread–
NaN Score Check–
5-Pass Latency–

Polarity Consistency Chart (Positive · Neutral · Negative Distribution)

Initialize the model above to plot live 5-language alignment.
Cross-lingual sentiment probabilities across English, French, Spanish, German, and Japanese
Lang Verdict Pos / Neu / Neg Net Polarity Tokens Parallel Text
Run the 5-language alignment check above.

2. Raw Softmax vs Logit Margin Calibration & Casing Sensitivity

Because do_lower_case: false, capitalization and French/German diacritics alter WordPiece tokenization. Inspect the model’s unnormalized raw logits, logit margin (z_top − z_second), and live temperature scaling (T) without re-running inference.

Logit Margin (z₁ − z₂)–
Raw Logits (P/N/Ng)–
Raw Entropy–
Scaled Entropy (T)–
WordPiece Tokens–
Lowercase Drift–

Raw Model Softmax (T = 1.00)

Run raw logit inspection above.

Temperature-Scaled Calibration (T = 1.00)

Adjust temperature slider after inspection to see probability calibration.

3. Inspect Alignment & Calibration Math

Show the code · multiling-sentiment-core.mjs — computeCrossLingualAlignment()
Show the code · multiling-sentiment-core.mjs — softmaxLogits()