Silesian - Wikilangs Models
Comprehensive Research Report & Full Ablation Study
This repository contains NLP models trained and evaluated by Wikilangs, specifically on Silesian Wikipedia data. We analyze tokenizers, n-gram models, Markov chains, vocabulary statistics, and word embeddings.
π Repository Contents
Models & Assets
- Tokenizers (8k, 16k, 32k, 64k)
- N-gram models (2, 3, 4, 5-gram)
- Markov chains (context of 1, 2, 3, 4 and 5)
- Subword N-gram and Markov chains
- Embeddings in various sizes and dimensions (aligned and unaligned)
- Language Vocabulary
- Language Statistics
Analysis and Evaluation
- 1. Tokenizer Evaluation
- 2. N-gram Model Evaluation
- 3. Markov Chain Evaluation
- 4. Vocabulary Analysis
- 5. Word Embeddings Evaluation
- 6. Morphological Analysis (Experimental)
- 7. Summary & Recommendations
- Metrics Glossary
- Visualizations Index
1. Tokenizer Evaluation
Results
| Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens |
|---|---|---|---|---|
| 8k | 2.736x | 2.74 | 0.2610% | 366,292 |
| 16k | 3.082x | 3.09 | 0.2940% | 325,183 |
| 32k | 3.462x | 3.47 | 0.3302% | 289,489 |
| 64k | 3.880x π | 3.88 | 0.3701% | 258,336 |
Tokenization Examples
Below are sample sentences tokenized with each vocabulary size:
Sample 1: Antennularia engleriana je grzibDothideomycetes. Crous P.W. et al., Ε»Εdne podgat...
| Vocab | Tokens | Count |
|---|---|---|
| 8k | βantenn ularia βeng leri ana βje βgrzib dothideomycetes . βcrous ... (+20 more) |
30 |
| 16k | βantenn ularia βeng leri ana βje βgrzib dothideomycetes . βcrous ... (+20 more) |
30 |
| 32k | βantenn ularia βeng leriana βje βgrzib dothideomycetes . βcrous βp ... (+18 more) |
28 |
| 64k | βantennularia βengleriana βje βgrzib dothideomycetes . βcrous βp . w ... (+15 more) |
25 |
Sample 2: At-Tall (arab. Ψ§ΩΨͺΩ) - mjasto we Syryji, we muhafaΕΊe Damaszek. Syryji
| Vocab | Tokens | Count |
|---|---|---|
| 8k | βat - t all β( arab . βΨ§Ω Ψͺ Ω ... (+19 more) |
29 |
| 16k | βat - t all β( arab . βΨ§Ω Ψͺ Ω ... (+14 more) |
24 |
| 32k | βat - t all β( arab . βΨ§Ω Ψͺ Ω ... (+13 more) |
23 |
| 64k | βat - tall β( arab . βΨ§Ω Ψͺ Ω ) ... (+10 more) |
20 |
Sample 3: Niechcice - wjeΕ we Polsce, we ΕΕ―dzkim wojewΕ―dztwje, we pjotrkowskim kryΕe, we g...
| Vocab | Tokens | Count |
|---|---|---|
| 8k | βnie ch ci ce β- βwjeΕ βwe βpolsce , βwe ... (+19 more) |
29 |
| 16k | βnie ch ci ce β- βwjeΕ βwe βpolsce , βwe ... (+19 more) |
29 |
| 32k | βnie ch cice β- βwjeΕ βwe βpolsce , βwe βΕΕ―dzkim ... (+13 more) |
23 |
| 64k | βniech cice β- βwjeΕ βwe βpolsce , βwe βΕΕ―dzkim βwojewΕ―dztwje ... (+10 more) |
20 |
Key Findings
- Best Compression: 64k achieves 3.880x compression
- Lowest UNK Rate: 8k with 0.2610% unknown tokens
- Trade-off: Larger vocabularies improve compression but increase model size
- Recommendation: 32k vocabulary provides optimal balance for production use
2. N-gram Model Evaluation
Results
| N-gram | Variant | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage |
|---|---|---|---|---|---|---|
| 2-gram | Word | 1,665 | 10.70 | 41,244 | 51.6% | 67.0% |
| 2-gram | Subword | 377 π | 8.56 | 4,569 | 56.0% | 98.8% |
| 3-gram | Word | 2,887 | 11.50 | 71,514 | 45.8% | 60.1% |
| 3-gram | Subword | 2,569 | 11.33 | 35,586 | 24.6% | 69.8% |
| 4-gram | Word | 5,905 | 12.53 | 130,516 | 38.7% | 52.4% |
| 4-gram | Subword | 9,144 | 13.16 | 182,935 | 21.2% | 50.5% |
| 5-gram | Word | 5,950 | 12.54 | 123,019 | 38.0% | 51.8% |
| 5-gram | Subword | 19,738 | 14.27 | 474,808 | 20.5% | 45.5% |
Top 5 N-grams by Size
2-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | nΕleΕΌy do |
42,907 |
| 2 | co go |
42,145 |
| 3 | do zorty |
41,870 |
| 4 | catalogue of |
38,396 |
| 5 | of life |
37,886 |
3-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | nΕleΕΌy do zorty |
41,864 |
| 2 | catalogue of life |
37,868 |
| 3 | wymianowane we catalogue |
37,821 |
| 4 | we catalogue of |
37,821 |
| 5 | niy sΕm wymianowane |
37,821 |
4-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | wymianowane we catalogue of |
37,821 |
| 2 | podgatΕnki niy sΕm wymianowane |
37,821 |
| 3 | we catalogue of life |
37,821 |
| 4 | sΕm wymianowane we catalogue |
37,821 |
| 5 | niy sΕm wymianowane we |
37,821 |
5-grams (Word):
| Rank | N-gram | Count |
|---|---|---|
| 1 | wymianowane we catalogue of life |
37,821 |
| 2 | sΕm wymianowane we catalogue of |
37,821 |
| 3 | niy sΕm wymianowane we catalogue |
37,821 |
| 4 | podgatΕnki niy sΕm wymianowane we |
37,821 |
| 5 | ΕΌΕdne podgatΕnki niy sΕm wymianowane |
37,649 |
2-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | e _ |
413,277 |
| 2 | . _ |
295,815 |
| 3 | a _ |
245,121 |
| 4 | , _ |
210,014 |
| 5 | o _ |
204,334 |
3-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | _ w e |
97,236 |
| 2 | w e _ |
96,518 |
| 3 | j e _ |
94,089 |
| 4 | n e _ |
83,675 |
| 5 | _ p o |
75,494 |
4-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | _ w e _ |
93,519 |
| 2 | e _ p o |
53,403 |
| 3 | _ j e _ |
49,853 |
| 4 | _ d o _ |
48,583 |
| 5 | _ o f _ |
45,397 |
5-grams (Subword):
| Rank | N-gram | Count |
|---|---|---|
| 1 | l e ΕΌ y _ |
43,779 |
| 2 | n Ε l e ΕΌ |
43,701 |
| 3 | y _ d o _ |
43,515 |
| 4 | Ε l e ΕΌ y |
43,514 |
| 5 | _ n Ε l e |
43,467 |
Key Findings
- Best Perplexity: 2-gram (subword) with 377
- Entropy Trend: Decreases with larger n-grams (more predictable)
- Coverage: Top-1000 patterns cover ~45% of corpus
- Recommendation: 4-gram or 5-gram for best predictive performance
3. Markov Chain Evaluation
Results
| Context | Variant | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability |
|---|---|---|---|---|---|---|
| 1 | Word | 0.7246 | 1.652 | 3.77 | 184,519 | 27.5% |
| 1 | Subword | 0.9527 | 1.935 | 6.66 | 2,047 | 4.7% |
| 2 | Word | 0.2321 | 1.175 | 1.49 | 665,117 | 76.8% |
| 2 | Subword | 0.8520 | 1.805 | 5.22 | 13,622 | 14.8% |
| 3 | Word | 0.0643 | 1.046 | 1.17 | 958,540 | 93.6% |
| 3 | Subword | 0.7901 | 1.729 | 4.14 | 71,008 | 21.0% |
| 4 | Word | 0.0556 π | 1.039 | 1.14 | 1,084,256 | 94.4% |
| 4 | Subword | 0.6711 | 1.592 | 2.92 | 293,910 | 32.9% |
Generated Text Samples (Word-based)
Below are text samples generated from each word-based Markov chain model:
Context Size 1:
we Γ΄polskim wojewΕdztwie we catalogue of life simulans nΕleΕΌy do cylΕw religijnych we xxi stuleΔe xx...i familije dermateaceae species fungorum kirk p m ΕΌΕdne podgatΕnki niy sΕm wymianowane we catalogue ...je grzibh sydow in aust j jap γγ¬γ€γΉγγΌγ·γ§γ³ pureisutΔshon surΔ« skrΕt ps3 xbox 360 mac ΡΡΠΈΠΏ
Context Size 2:
nΕleΕΌy do zorty candida rzyndu saccharomycetales klasy saccharomycetes grΕmady ascomycota i krΕlestw...co go nojprzΕd Γ΄pisoΕ rolf singer a h sm psathyrella incerta je porost co go Γ΄pisoΕ leuchtmdo zorty chytriomyces i familije ophiostomataceae species fungorum kirk p m ΕΌΕdne podgatΕnki niy sΕm...
Context Size 3:
nΕleΕΌy do zorty tetramelas i familije physciaceae lias a global information system for lichenized an...podgatΕnki niy sΕm wymianowane we catalogue of life foliicolasΕm wymianowane we catalogue of life papuanus
Context Size 4:
podgatΕnki niy sΕm wymianowane we catalogue of life minoensiswymianowane we catalogue of life nivaleniy sΕm wymianowane we catalogue of life macarangae
Generated Text Samples (Subword-based)
Below are text samples generated from each subword-based Markov chain model:
Context Size 1:
_je_dym_spΕ―n_s._erzyneso_pongangatewyri_mole_fro
Context Size 2:
e_(cyji,_dogue_op._catisciszkulacca_za.w._henije_go
Context Size 3:
_we_cataceae.speciwe_catalogue_of_cije_catalopara)_β_m
Context Size 4:
_we_Γ΄polsce,_we_cate_podgatΕnki_niy_sΕ_je_grzibp.a._maria
Key Findings
- Best Predictability: Context-4 (word) with 94.4% predictability
- Branching Factor: Decreases with context size (more deterministic)
- Memory Trade-off: Larger contexts require more storage (293,910 contexts)
- Recommendation: Context-3 or Context-4 for text generation
4. Vocabulary Analysis
Statistics
| Metric | Value |
|---|---|
| Vocabulary Size | 92,972 |
| Total Tokens | 2,725,524 |
| Mean Frequency | 29.32 |
| Median Frequency | 3 |
| Frequency Std Dev | 753.54 |
Most Common Words
| Rank | Word | Frequency |
|---|---|---|
| 1 | we | 94,285 |
| 2 | i | 50,989 |
| 3 | je | 50,114 |
| 4 | do | 48,665 |
| 5 | a | 45,622 |
| 6 | of | 45,405 |
| 7 | co | 44,993 |
| 8 | nΕleΕΌy | 43,437 |
| 9 | p | 43,323 |
| 10 | zorty | 42,795 |
Least Common Words (from vocabulary)
| Rank | Word | Frequency |
|---|---|---|
| 1 | luΔani | 2 |
| 2 | reyez | 2 |
| 3 | paderewek | 2 |
| 4 | touraine | 2 |
| 5 | esves | 2 |
| 6 | oussouye | 2 |
| 7 | appanoose | 2 |
| 8 | bielawy | 2 |
| 9 | sentinel | 2 |
| 10 | tetowo | 2 |
Zipf's Law Analysis
| Metric | Value |
|---|---|
| Zipf Coefficient | 1.0230 |
| RΒ² (Goodness of Fit) | 0.995074 |
| Adherence Quality | excellent |
Coverage Analysis
| Top N Words | Coverage |
|---|---|
| Top 100 | 55.5% |
| Top 1,000 | 71.0% |
| Top 5,000 | 81.7% |
| Top 10,000 | 86.3% |
Key Findings
- Zipf Compliance: RΒ²=0.9951 indicates excellent adherence to Zipf's law
- High Frequency Dominance: Top 100 words cover 55.5% of corpus
- Long Tail: 82,972 words needed for remaining 13.7% coverage
5. Word Embeddings Evaluation
5.1 Cross-Lingual Alignment
5.2 Model Comparison
| Model | Dimension | Isotropy | Semantic Density | Alignment R@1 | Alignment R@10 |
|---|---|---|---|---|---|
| mono_32d | 32 | 0.8517 | 0.3158 | N/A | N/A |
| mono_64d | 64 | 0.7384 | 0.2638 | N/A | N/A |
| mono_128d | 128 | 0.3461 | 0.2417 | N/A | N/A |
| aligned_32d | 32 | 0.8517 π | 0.3088 | 0.0380 | 0.2580 |
| aligned_64d | 64 | 0.7384 | 0.2604 | 0.0760 | 0.3540 |
| aligned_128d | 128 | 0.3461 | 0.2496 | 0.1240 | 0.4320 |
Key Findings
- Best Isotropy: aligned_32d with 0.8517 (more uniform distribution)
- Semantic Density: Average pairwise similarity of 0.2733. Lower values indicate better semantic separation.
- Alignment Quality: Aligned models achieve up to 12.4% R@1 in cross-lingual retrieval.
- Recommendation: 128d aligned for best cross-lingual performance
6. Morphological Analysis (Experimental)
This section presents an automated morphological analysis derived from the statistical divergence between word-level and subword-level models. By analyzing where subword predictability spikes and where word-level coverage fails, we can infer linguistic structures without supervised data.
6.1 Productivity & Complexity
| Metric | Value | Interpretation | Recommendation |
|---|---|---|---|
| Productivity Index | 5.000 | High morphological productivity | Reliable analysis |
| Idiomaticity Gap | 0.138 | Low formulaic content | - |
6.2 Affix Inventory (Productive Units)
These are the most productive prefixes and suffixes identified by sampling the vocabulary for global substitutability patterns. A unit is considered an affix if stripping it leaves a valid stem that appears in other contexts.
Productive Prefixes
| Prefix | Examples |
|---|---|
-s |
szczawno, saccatus, synagodze |
-p |
przedmieΕcia, peroxydata, pageant |
-b |
bouvet, bottomleyae, brzygach |
-m |
mozambicki, melanotaeniaceae, macriytrium |
-a |
anulohypha, auriscalpium, apogaeumannomyces |
-k |
koksu, kΕ―Εcowo, krywczyce |
-c |
ceratocephali, canaria, cylindriytridium |
-d |
darwin, dΕminujΕm, dziedzic |
Productive Suffixes
| Suffix | Examples |
|---|---|
-a |
lylea, przedmieΕcia, granulospora |
-s |
saccatus, nonfermentans, luteoumbrinus |
-e |
fajruje, synagodze, melanotaeniaceae |
-m |
dΕminujΕm, macriytrium, ventricosum |
-um |
macriytrium, ventricosum, renatobasidium |
-i |
mozambicki, romellii, ceratocephali |
-is |
rigensis, montis, andreadis |
-la |
subramaniula, chaetomella, hyjdla |
6.3 Bound Stems (Lexical Roots)
Bound stems are high-frequency subword units that are semantically cohesive but rarely appear as standalone words. These often correspond to the 'core' of a word that requires inflection or derivation to be valid.
| Stem | Cohesion | Substitutability | Examples |
|---|---|---|---|
anow |
2.10x | 88 contexts | banowo, banowΓ΅, janowo |
grzi |
2.31x | 52 contexts | grzib, grzibn, grzibj |
rzib |
1.89x | 123 contexts | grzib, grzibn, grzibj |
owan |
2.14x | 55 contexts | cowan, gowan, rowan |
omyc |
2.21x | 37 contexts | ascomyc, oomyces, phomyces |
cata |
2.57x | 18 contexts | catal, catalΓ , falcata |
ilij |
2.07x | 27 contexts | wilijΓ΅, filije, wilijo |
piso |
2.19x | 21 contexts | pisoΕ, pisoΕ, pisorz |
acea |
1.94x | 19 contexts | jaceae, picacea, pinacea |
amil |
1.65x | 24 contexts | kamil, tamil, kamila |
wane |
2.01x | 12 contexts | zwane, dowane, tshwane |
iano |
1.96x | 12 contexts | piano, miano, dianoi |
6.4 Affix Compatibility (Co-occurrence)
This table shows which prefixes and suffixes most frequently co-occur on the same stems, revealing the 'stacking' rules of the language's morphology.
| Prefix | Suffix | Frequency | Examples |
|---|---|---|---|
-p |
-a |
176 words | planifunda, pracowoua |
-s |
-a |
174 words | struna, sΕupska |
-c |
-a |
145 words | cordanophora, carinthiaca |
-c |
-s |
115 words | clypeolarioides, citeromyces |
-a |
-a |
111 words | austrogautieria, armja |
-p |
-s |
111 words | proliferans, poliomopsis |
-p |
-e |
107 words | paxillaceae, poΕoΕΌΕ―ne |
-m |
-a |
101 words | masuka, manisa |
-s |
-s |
100 words | spondylocladiopsis, spargens |
-p |
-m |
100 words | polyrhizum, putaminum |
6.5 Recursive Morpheme Segmentation
Using Recursive Hierarchical Substitutability, we decompose complex words into their constituent morphemes. This approach handles nested affixes (e.g., prefix-prefix-root-suffix).
| Word | Suggested Split | Confidence | Stem |
|---|---|---|---|
| fajrowany | fajrow-a-ny |
7.5 | a |
| spisowany | spisow-a-ny |
7.5 | a |
| ingeniosa | ingenio-s-a |
7.5 | s |
| abbreviata | abbrevi-a-ta |
7.5 | a |
| houbraken | houbrak-e-n |
7.5 | e |
| ukrainian | ukraini-a-n |
7.5 | a |
| floridana | florid-a-na |
7.5 | a |
| kΕmprΕmis | kΕmprΕ-m-is |
7.5 | m |
| publikacyjach | publikacyj-a-ch |
7.5 | a |
| afganistan | afganist-a-n |
7.5 | a |
| zdrzΕ―duach | zdrzΕ―du-a-ch |
7.5 | a |
| leptospira | leptosp-i-ra |
7.5 | i |
| himalajach | himalaj-a-ch |
7.5 | a |
| kΕntaktach | kΕntakt-a-ch |
7.5 | a |
| luteonana | luteon-a-na |
7.5 | a |
6.6 Linguistic Interpretation
Automated Insight: The language Silesian shows high morphological productivity. The subword models are significantly more efficient than word models, suggesting a rich system of affixation or compounding.
7. Summary & Recommendations
Production Recommendations
| Component | Recommended | Rationale |
|---|---|---|
| Tokenizer | 64k BPE | Best compression (3.88x) |
| N-gram | 2-gram | Lowest perplexity (377) |
| Markov | Context-4 | Highest predictability (94.4%) |
| Embeddings | 100d | Balanced semantic capture and isotropy |
Appendix: Metrics Glossary & Interpretation Guide
This section provides definitions, intuitions, and guidance for interpreting the metrics used throughout this report.
Tokenizer Metrics
Compression Ratio
Definition: The ratio of characters to tokens (chars/token). Measures how efficiently the tokenizer represents text.
Intuition: Higher compression means fewer tokens needed to represent the same text, reducing sequence lengths for downstream models. A 3x compression means ~3 characters per token on average.
What to seek: Higher is generally better for efficiency, but extremely high compression may indicate overly aggressive merging that loses morphological information.
Average Token Length (Fertility)
Definition: Mean number of characters per token produced by the tokenizer.
Intuition: Reflects the granularity of tokenization. Longer tokens capture more context but may struggle with rare words; shorter tokens are more flexible but increase sequence length.
What to seek: Balance between 2-5 characters for most languages. Arabic/morphologically-rich languages may benefit from slightly longer tokens.
Unknown Token Rate (OOV Rate)
Definition: Percentage of tokens that map to the unknown/UNK token, indicating words the tokenizer cannot represent.
Intuition: Lower OOV means better vocabulary coverage. High OOV indicates the tokenizer encounters many unseen character sequences.
What to seek: Below 1% is excellent; below 5% is acceptable. BPE tokenizers typically achieve very low OOV due to subword fallback.
N-gram Model Metrics
Perplexity
Definition: Measures how "surprised" the model is by test data. Mathematically: 2^(cross-entropy). Lower values indicate better prediction.
Intuition: If perplexity is 100, the model is as uncertain as if choosing uniformly among 100 options at each step. A perplexity of 10 means effectively choosing among 10 equally likely options.
What to seek: Lower is better. Perplexity decreases with larger n-grams (more context). Values vary widely by language and corpus size.
Entropy
Definition: Average information content (in bits) needed to encode the next token given the context. Related to perplexity: perplexity = 2^entropy.
Intuition: High entropy means high uncertainty/randomness; low entropy means predictable patterns. Natural language typically has entropy between 1-4 bits per character.
What to seek: Lower entropy indicates more predictable text patterns. Entropy should decrease as n-gram size increases.
Coverage (Top-K)
Definition: Percentage of corpus occurrences explained by the top K most frequent n-grams.
Intuition: High coverage with few patterns indicates repetitive/formulaic text; low coverage suggests diverse vocabulary usage.
What to seek: Depends on use case. For language modeling, moderate coverage (40-60% with top-1000) is typical for natural text.
Markov Chain Metrics
Average Entropy
Definition: Mean entropy across all contexts, measuring average uncertainty in next-word prediction.
Intuition: Lower entropy means the model is more confident about what comes next. Context-1 has high entropy (many possible next words); Context-4 has low entropy (few likely continuations).
What to seek: Decreasing entropy with larger context sizes. Very low entropy (<0.1) indicates highly deterministic transitions.
Branching Factor
Definition: Average number of unique next tokens observed for each context.
Intuition: High branching = many possible continuations (flexible but uncertain); low branching = few options (predictable but potentially repetitive).
What to seek: Branching factor should decrease with context size. Values near 1.0 indicate nearly deterministic chains.
Predictability
Definition: Derived metric: (1 - normalized_entropy) Γ 100%. Indicates how deterministic the model's predictions are.
Intuition: 100% predictability means the next word is always certain; 0% means completely random. Real text falls between these extremes.
What to seek: Higher predictability for text generation quality, but too high (>98%) may produce repetitive output.
Vocabulary & Zipf's Law Metrics
Zipf's Coefficient
Definition: The slope of the log-log plot of word frequency vs. rank. Zipf's law predicts this should be approximately -1.
Intuition: A coefficient near -1 indicates the corpus follows natural language patterns where a few words are very common and most words are rare.
What to seek: Values between -0.8 and -1.2 indicate healthy natural language distribution. Deviations may suggest domain-specific or artificial text.
RΒ² (Coefficient of Determination)
Definition: Measures how well the linear fit explains the frequency-rank relationship. Ranges from 0 to 1.
Intuition: RΒ² near 1.0 means the data closely follows Zipf's law; lower values indicate deviation from expected word frequency patterns.
What to seek: RΒ² > 0.95 is excellent; > 0.99 indicates near-perfect Zipf adherence typical of large natural corpora.
Vocabulary Coverage
Definition: Cumulative percentage of corpus tokens accounted for by the top N words.
Intuition: Shows how concentrated word usage is. If top-100 words cover 50% of text, the corpus relies heavily on common words.
What to seek: Top-100 covering 30-50% is typical. Higher coverage indicates more repetitive text; lower suggests richer vocabulary.
Word Embedding Metrics
Isotropy
Definition: Measures how uniformly distributed vectors are in the embedding space. Computed as the ratio of minimum to maximum singular values.
Intuition: High isotropy (near 1.0) means vectors spread evenly in all directions; low isotropy means vectors cluster in certain directions, reducing expressiveness.
What to seek: Higher isotropy generally indicates better-quality embeddings. Values > 0.1 are reasonable; > 0.3 is good. Lower-dimensional embeddings tend to have higher isotropy.
Average Norm
Definition: Mean magnitude (L2 norm) of word vectors in the embedding space.
Intuition: Indicates the typical "length" of vectors. Consistent norms suggest stable training; high variance may indicate some words are undertrained.
What to seek: Relatively consistent norms across models. The absolute value matters less than consistency (low std deviation).
Cosine Similarity
Definition: Measures angular similarity between vectors, ranging from -1 (opposite) to 1 (identical direction).
Intuition: Words with similar meanings should have high cosine similarity. This is the standard metric for semantic relatedness in embeddings.
What to seek: Semantically related words should score > 0.5; unrelated words should be near 0. Synonyms often score > 0.7.
t-SNE Visualization
Definition: t-Distributed Stochastic Neighbor Embedding - a dimensionality reduction technique that preserves local structure for visualization.
Intuition: Clusters in t-SNE plots indicate groups of semantically related words. Spread indicates vocabulary diversity; tight clusters suggest semantic coherence.
What to seek: Meaningful clusters (e.g., numbers together, verbs together). Avoid over-interpreting distances - t-SNE preserves local, not global, structure.
General Interpretation Guidelines
- Compare within model families: Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).
- Consider trade-offs: Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).
- Context matters: Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.
- Corpus influence: All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.
- Language-specific patterns: Morphologically rich languages (like Arabic) may show different optimal ranges than analytic languages.
Visualizations Index
| Visualization | Description |
|---|---|
| Tokenizer Compression | Compression ratios by vocabulary size |
| Tokenizer Fertility | Average token length by vocabulary |
| Tokenizer OOV | Unknown token rates |
| Tokenizer Total Tokens | Total tokens by vocabulary |
| N-gram Perplexity | Perplexity by n-gram size |
| N-gram Entropy | Entropy by n-gram size |
| N-gram Coverage | Top pattern coverage |
| N-gram Unique | Unique n-gram counts |
| Markov Entropy | Entropy by context size |
| Markov Branching | Branching factor by context |
| Markov Contexts | Unique context counts |
| Zipf's Law | Frequency-rank distribution with fit |
| Vocab Frequency | Word frequency distribution |
| Top 20 Words | Most frequent words |
| Vocab Coverage | Cumulative coverage curve |
| Embedding Isotropy | Vector space uniformity |
| Embedding Norms | Vector magnitude distribution |
| Embedding Similarity | Word similarity heatmap |
| Nearest Neighbors | Similar words for key terms |
| t-SNE Words | 2D word embedding visualization |
| t-SNE Sentences | 2D sentence embedding visualization |
| Position Encoding | Encoding method comparison |
| Model Sizes | Storage requirements |
| Performance Dashboard | Comprehensive performance overview |
About This Project
Data Source
Models trained on wikipedia-monthly - a monthly snapshot of Wikipedia articles across 300+ languages.
Project
A project by Wikilangs - Open-source NLP models for every Wikipedia language.
Maintainer
Citation
If you use these models in your research, please cite:
@misc{wikilangs2025,
author = {Kamali, Omar},
title = {Wikilangs: Open NLP Models for Wikipedia Languages},
year = {2025},
doi = {10.5281/zenodo.18073153},
publisher = {Zenodo},
url = {https://huggingface.co/wikilangs}
institution = {Omneity Labs}
}
License
MIT License - Free for academic and commercial use.
Links
- π Website: wikilangs.org
- π€ Models: huggingface.co/wikilangs
- π Data: wikipedia-monthly
- π€ Author: Omar Kamali
- π€ Sponsor: Featherless AI
Generated by Wikilangs Models Pipeline
Report Date: 2026-01-11 00:18:06



















