Text Generation
fastText
Dagbani
wikilangs
nlp
tokenizer
embeddings
n-gram
markov
wikipedia
feature-extraction
sentence-similarity
tokenization
n-grams
markov-chain
text-mining
babelvec
vocabulous
vocabulary
monolingual
family-atlantic_gur
Run this model with HF Jobs
Run wikilangs/dag on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/wikilangs/dag. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/wikilangs/dag on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/wikilangs/dag. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/wikilangs/dag. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use wikilangs/dag with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- fastText
How to use wikilangs/dag with fastText:
from huggingface_hub import hf_hub_download import fasttext model = fasttext.load_model(hf_hub_download("wikilangs/dag", "model.bin")) - Notebooks
- Google Colab
- Kaggle
Upload all models and assets for dag (20251201)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+6
- README.mdAdded+556
- models/embeddings/monolingual/dag_128d.binAdded+3
- models/embeddings/monolingual/dag_128d.meta.jsonAdded+1
- models/embeddings/monolingual/dag_128d_metadata.jsonAdded+13
- models/embeddings/monolingual/dag_32d.binAdded+3
- models/embeddings/monolingual/dag_32d.meta.jsonAdded+1
- models/embeddings/monolingual/dag_32d_metadata.jsonAdded+13
- models/embeddings/monolingual/dag_64d.binAdded+3
- models/embeddings/monolingual/dag_64d.meta.jsonAdded+1
- models/embeddings/monolingual/dag_64d_metadata.jsonAdded+13
- models/subword_markov/dag_markov_ctx1_subword.parquetAdded+3
- models/subword_markov/dag_markov_ctx1_subword_metadata.jsonAdded+7
- models/subword_markov/dag_markov_ctx2_subword.parquetAdded+3
- models/subword_markov/dag_markov_ctx2_subword_metadata.jsonAdded+7
- models/subword_markov/dag_markov_ctx3_subword.parquetAdded+3
- models/subword_markov/dag_markov_ctx3_subword_metadata.jsonAdded+7
- models/subword_markov/dag_markov_ctx4_subword.parquetAdded+3
- models/subword_markov/dag_markov_ctx4_subword_metadata.jsonAdded+7
- models/subword_ngram/dag_2gram_subword.parquetAdded+3
- models/subword_ngram/dag_2gram_subword_metadata.jsonAdded+7
- models/subword_ngram/dag_3gram_subword.parquetAdded+3
- models/subword_ngram/dag_3gram_subword_metadata.jsonAdded+7
- models/subword_ngram/dag_4gram_subword.parquetAdded+3
- models/subword_ngram/dag_4gram_subword_metadata.jsonAdded+7
- models/tokenizer/dag_tokenizer_16k.modelAdded+3
- models/tokenizer/dag_tokenizer_16k.vocabAdded
- models/tokenizer/dag_tokenizer_32k.modelAdded+3
- models/tokenizer/dag_tokenizer_32k.vocabAdded
- models/tokenizer/dag_tokenizer_64k.modelAdded+3
- models/tokenizer/dag_tokenizer_64k.vocabAdded
- models/tokenizer/dag_tokenizer_8k.modelAdded+3
- models/tokenizer/dag_tokenizer_8k.vocabAdded
- models/vocabulary/dag_vocabulary.parquetAdded+3
- models/vocabulary/dag_vocabulary_metadata.jsonAdded+16
- models/word_markov/dag_markov_ctx1_word.parquetAdded+3
- models/word_markov/dag_markov_ctx1_word_metadata.jsonAdded+7
- models/word_markov/dag_markov_ctx2_word.parquetAdded+3
- models/word_markov/dag_markov_ctx2_word_metadata.jsonAdded+7
- models/word_markov/dag_markov_ctx3_word.parquetAdded+3
- models/word_markov/dag_markov_ctx3_word_metadata.jsonAdded+7
- models/word_markov/dag_markov_ctx4_word.parquetAdded+3
- models/word_markov/dag_markov_ctx4_word_metadata.jsonAdded+7
- models/word_ngram/dag_2gram_word.parquetAdded+3
- models/word_ngram/dag_2gram_word_metadata.jsonAdded+7
- models/word_ngram/dag_3gram_word.parquetAdded+3
- models/word_ngram/dag_3gram_word_metadata.jsonAdded+7
- models/word_ngram/dag_4gram_word.parquetAdded+3
- models/word_ngram/dag_4gram_word_metadata.jsonAdded+7
- visualizations/embedding_isotropy.pngAdded
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines33343536373839404132 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textvisualizations/embedding_similarity.png filter=lfs diff=lfs merge=lfs -textvisualizations/performance_dashboard.png filter=lfs diff=lfs merge=lfs -textvisualizations/position_encoding_comparison.png filter=lfs diff=lfs merge=lfs -textvisualizations/tsne_sentences.png filter=lfs diff=lfs merge=lfs -textvisualizations/tsne_words.png filter=lfs diff=lfs merge=lfs -textvisualizations/zipf_law.png filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556---language: daglanguage_name: DAGlanguage_family: atlantic_gurtags: - wikilangs - nlp - tokenizer - embeddings - n-gram - markov - wikipedia - monolingual - family-atlantic_gurlicense: mitlibrary_name: wikilangspipeline_tag: feature-extractiondatasets: - omarkamali/wikipedia-monthlydataset_info: name: wikipedia-monthly description: Monthly snapshots of Wikipedia articles across 300+ languagesmetrics: - name: best_compression_ratio type: compression value: 3.798 - name: best_isotropy type: isotropy value: 0.7945 - name: vocabulary_size type: vocab value: 144073generated: 2025-12-29---
# DAG - Wikilangs Models## Comprehensive Research Report & Full Ablation Study
This repository contains NLP models trained and evaluated by Wikilangs, specifically on **DAG** 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-gram)- Markov chains (context of 1, 2, 3 and 4)- Subword N-gram and Markov chains- Embeddings in various sizes and dimensions- Language Vocabulary- Language Statistics
### Analysis and Evaluation
- [1. Tokenizer Evaluation](#1-tokenizer-evaluation)- [2. N-gram Model Evaluation](#2-n-gram-model-evaluation)- [3. Markov Chain Evaluation](#3-markov-chain-evaluation)- [4. Vocabulary Analysis](#4-vocabulary-analysis)- [5. Word Embeddings Evaluation](#5-word-embeddings-evaluation)- [6. Summary & Recommendations](#6-summary--recommendations)- [Metrics Glossary](#appendix-metrics-glossary--interpretation-guide)- [Visualizations Index](#visualizations-index)
---## 1. Tokenizer Evaluation

### Results
| Vocab Size | Compression | Avg Token Len | UNK Rate | Total Tokens ||------------|-------------|---------------|----------|--------------|| **8k** | 3.288x | 3.27 | 0.0331% | 869,625 || **16k** | 3.508x | 3.49 | 0.0353% | 815,031 || **32k** | 3.685x | 3.66 | 0.0371% | 775,924 || **64k** | 3.798x 🏆 | 3.78 | 0.0383% | 752,740 |
### Tokenization Examples
Below are sample sentences tokenized with each vocabulary size:
**Sample 1:** `Soyauxia velutina nyɛla Soyauxia zuliya la puuni zaɣa yini.`
| Vocab | Tokens | Count ||-------|--------|-------|| 8k | `▁soya u xia ▁v el ut ina ▁nyɛla ▁soya u ... (+7 more)` | 17 || 16k | `▁soya u xia ▁vel ut ina ▁nyɛla ▁soya u xia ... (+6 more)` | 16 || 32k | `▁soya u xia ▁vel ut ina ▁nyɛla ▁soya u xia ... (+6 more)` | 16 || 64k | `▁soya u xia ▁vel utina ▁nyɛla ▁soya u xia ▁zuliya ... (+5 more)` | 15 |
**Sample 2:** `Dagbanli Wikipedia nyɛla Wikipedia yaɣishɛli din sabbu nyɛla Dagbanli ka di tiri...`
| Vocab | Tokens | Count ||-------|--------|-------|| 8k | `▁dagbanli ▁wikipedia ▁nyɛla ▁wikipedia ▁yaɣi shɛli ▁din ▁sabbu ▁nyɛla ▁dagbanli ... (+23 more)` | 33 || 16k | `▁dagbanli ▁wikipedia ▁nyɛla ▁wikipedia ▁yaɣishɛli ▁din ▁sabbu ▁nyɛla ▁dagbanli ▁ka ... (+19 more)` | 29 || 32k | `▁dagbanli ▁wikipedia ▁nyɛla ▁wikipedia ▁yaɣishɛli ▁din ▁sabbu ▁nyɛla ▁dagbanli ▁ka ... (+18 more)` | 28 || 64k | `▁dagbanli ▁wikipedia ▁nyɛla ▁wikipedia ▁yaɣishɛli ▁din ▁sabbu ▁nyɛla ▁dagbanli ▁ka ... (+18 more)` | 28 |
**Sample 3:** `Kaʒiya nyɛla Yaa Naa paɣa ŋun pahiri ayi yuli.TaarihiKundivihira`
| Vocab | Tokens | Count ||-------|--------|-------|| 8k | `▁ka ʒi ya ▁nyɛla ▁yaa ▁naa ▁paɣa ▁ŋun ▁pahiri ▁ayi ... (+4 more)` | 14 || 16k | `▁ka ʒi ya ▁nyɛla ▁yaa ▁naa ▁paɣa ▁ŋun ▁pahiri ▁ayi ... (+4 more)` | 14 || 32k | `▁ka ʒiya ▁nyɛla ▁yaa ▁naa ▁paɣa ▁ŋun ▁pahiri ▁ayi ▁yuli ... (+3 more)` | 13 || 64k | `▁ka ʒiya ▁nyɛla ▁yaa ▁naa ▁paɣa ▁ŋun ▁pahiri ▁ayi ▁yuli ... (+3 more)` | 13 |
### Key Findings
- **Best Compression:** 64k achieves 3.798x compression- **Lowest UNK Rate:** 8k with 0.0331% 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 | Perplexity | Entropy | Unique N-grams | Top-100 Coverage | Top-1000 Coverage ||--------|------------|---------|----------------|------------------|-------------------|| **2-gram** | 24,966 🏆 | 14.61 | 188,164 | 17.0% | 36.0% || **2-gram** | 423 🏆 | 8.72 | 7,859 | 55.8% | 97.7% || **3-gram** | 60,310 | 15.88 | 362,741 | 14.0% | 28.1% || **3-gram** | 4,210 | 12.04 | 70,197 | 17.9% | 59.2% || **4-gram** | 110,926 | 16.76 | 665,471 | 13.6% | 24.8% || **4-gram** | 26,280 | 14.68 | 408,931 | 8.8% | 29.5% |
### Top 5 N-grams by Size
**2-grams:**
| Rank | N-gram | Count ||------|--------|-------|| 1 | `| |` | 134,746 || 2 | `align =` | 45,935 || 3 | `| align` | 45,817 || 4 | `= "` | 42,517 || 5 | `" |` | 41,324 |
**3-grams:**
| Rank | N-gram | Count ||------|--------|-------|| 1 | `| align =` | 45,817 || 2 | `align = "` | 38,202 || 3 | `| | align` | 38,026 || 4 | `= " center` | 23,000 || 5 | `" center "` | 23,000 |
**4-grams:**
| Rank | N-gram | Count ||------|--------|-------|| 1 | `| align = "` | 38,119 || 2 | `| | align =` | 38,026 || 3 | `align = " center` | 23,000 || 4 | `= " center "` | 22,999 || 5 | `" center " |` | 22,948 |
### Key Findings
- **Best Perplexity:** 2-gram with 423- **Entropy Trend:** Decreases with larger n-grams (more predictable)- **Coverage:** Top-1000 patterns cover ~29% of corpus- **Recommendation:** 4-gram or 5-gram for best predictive performance
---## 3. Markov Chain Evaluation


### Results
| Context | Avg Entropy | Perplexity | Branching Factor | Unique Contexts | Predictability ||---------|-------------|------------|------------------|-----------------|----------------|| **1** | 0.5033 | 1.417 | 4.95 | 440,521 | 49.7% || **1** | 1.2280 | 2.342 | 7.57 | 3,894 | 0.0% || **2** | 0.3109 | 1.241 | 1.99 | 2,180,092 | 68.9% || **2** | 0.7059 | 1.631 | 5.02 | 29,465 | 29.4% || **3** | 0.1506 | 1.110 | 1.33 | 4,328,117 | 84.9% || **3** | 0.8636 | 1.820 | 4.71 | 148,003 | 13.6% || **4** | 0.0788 🏆 | 1.056 | 1.15 | 5,753,766 | 92.1% || **4** | 0.7332 🏆 | 1.662 | 3.29 | 697,702 | 26.7% |
### Generated Text Samples
Below are text samples generated from each Markov chain model:
**Context Size 1:**
1. `, trevor jones and circulation . " | 2019 . taylor sheridan , bruxelles ’ shεli`2. `| g | jim sturgess , emma thompson , kabɛ zani mi binyahiri maalibu mini queens`3. `. > ŋɔ ka tuunvɛla tumbu bee yahibu zuɣu o ŋmai jia , domin bɛ yεli`
**Context Size 2:**
1. `| | 2 . 2the price is rightvirtuosthe price is right : the voyage of sinbad ted`2. `align = center | | align = " top " | north carolina arts coalition 1979 :`3. `| align = " center " | | - | align = " center " | -`
**Context Size 3:**
1. `| align = " left " | kentucky | | align = center | | - | align`2. `align = " left " | real madrid | align = " left " | grambling state |`3. `| | align = " center " | | | align = center | | - | align`
**Context Size 4:**
1. `| align = " left " | tulsa | | align = " left " | liu brooklyn |`2. `| | align = " center " | 1 | | align = " center " | f |`3. `align = " center " | 1 | | align = " left " | utah | | align`
### Key Findings
- **Best Predictability:** Context-4 with 92.1% predictability- **Branching Factor:** Decreases with context size (more deterministic)- **Memory Trade-off:** Larger contexts require more storage (697,702 contexts)- **Recommendation:** Context-3 or Context-4 for text generation
---## 4. Vocabulary Analysis



### Statistics
| Metric | Value ||--------|-------|| Vocabulary Size | 144,073 || Total Tokens | 6,561,803 || Mean Frequency | 45.54 || Median Frequency | 4 || Frequency Std Dev | 780.34 |
### Most Common Words
| Rank | Word | Frequency ||------|------|-----------|| 1 | ni | 105,049 || 2 | the | 93,758 || 3 | of | 89,633 || 4 | daa | 75,893 || 5 | o | 71,379 || 6 | ka | 70,354 || 7 | n | 52,468 || 8 | nyɛla | 50,022 || 9 | din | 48,371 || 10 | align | 46,328 |
### Least Common Words (from vocabulary)
| Rank | Word | Frequency ||------|------|-----------|| 1 | hadja | 2 || 2 | labcitoyen | 2 || 3 | yikonim | 2 || 4 | fiqhi | 2 || 5 | sapuhi | 2 || 6 | hoti | 2 || 7 | xai | 2 || 8 | coloboma | 2 || 9 | ziɛ | 2 || 10 | bɔɔlɔ | 2 |
### Zipf's Law Analysis
| Metric | Value ||--------|-------|| Zipf Coefficient | 1.0748 || R² (Goodness of Fit) | 0.994305 || Adherence Quality | **excellent** |
### Coverage Analysis
| Top N Words | Coverage ||-------------|----------|| Top 100 | 31.7% || Top 1,000 | 59.4% || Top 5,000 | 78.0% || Top 10,000 | 84.7% |
### Key Findings
- **Zipf Compliance:** R²=0.9943 indicates excellent adherence to Zipf's law- **High Frequency Dominance:** Top 100 words cover 31.7% of corpus- **Long Tail:** 134,073 words needed for remaining 15.3% coverage
---## 5. Word Embeddings Evaluation




### Model Comparison
| Model | Vocab Size | Dimension | Avg Norm | Std Norm | Isotropy ||-------|------------|-----------|----------|----------|----------|| **mono_32d** | 82,599 | 32 | 3.850 | 1.140 | 0.7771 || **mono_64d** | 82,599 | 64 | 4.436 | 1.061 | 0.7860 || **mono_128d** | 82,599 | 128 | 5.151 | 0.960 | 0.7945 🏆 || **embeddings_enhanced** | 0 | 0 | 0.000 | 0.000 | 0.0000 |
### Key Findings
- **Best Isotropy:** mono_128d with 0.7945 (more uniform distribution)- **Dimension Trade-off:** Higher dimensions capture more semantics but reduce isotropy- **Vocabulary Coverage:** All models cover 82,599 words- **Recommendation:** 100d for balanced semantic capture and efficiency
---## 6. Summary & Recommendations

### Production Recommendations
| Component | Recommended | Rationale ||-----------|-------------|-----------|| Tokenizer | **32k BPE** | Best compression (3.80x) with low UNK rate || N-gram | **5-gram** | Lowest perplexity (423) || Markov | **Context-4** | Highest predictability (92.1%) || 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
1. **Compare within model families:** Metrics are most meaningful when comparing models of the same type (e.g., 8k vs 64k tokenizer).2. **Consider trade-offs:** Better performance on one metric often comes at the cost of another (e.g., compression vs. OOV rate).3. **Context matters:** Optimal values depend on downstream tasks. Text generation may prioritize different metrics than classification.4. **Corpus influence:** All metrics are influenced by corpus characteristics. Wikipedia text differs from social media or literature.5. **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](https://huggingface.co/datasets/omarkamali/wikipedia-monthly) - a monthly snapshot of Wikipedia articles across 300+ languages.
### Project
A project by **[Wikilangs](https://wikilangs.org)** - Open-source NLP models for every Wikipedia language.
### Maintainer
[Omar Kamali](https://omarkamali.com) - [Omneity Labs](https://omneitylabs.com)
### Citation
If you use these models in your research, please cite:
```bibtex@misc{wikilangs2025, author = {Kamali, Omar}, title = {Wikilangs: Open NLP Models for Wikipedia Languages}, year = {2025}, publisher = {HuggingFace}, url = {https://huggingface.co/wikilangs} institution = {Omneity Labs}}```
### License
MIT License - Free for academic and commercial use.
### Links
- 🌐 Website: [wikilangs.org](https://wikilangs.org)- 🤗 Models: [huggingface.co/wikilangs](https://huggingface.co/wikilangs)- 📊 Data: [wikipedia-monthly](https://huggingface.co/datasets/omarkamali/wikipedia-monthly)- 👤 Author: [Omar Kamali](https://huggingface.co/omarkamali)---*Generated by Wikilangs Models Pipeline*
*Report Date: 2025-12-29 09:14:13*123version https://git-lfs.github.com/spec/v1oid sha256:f945153d1b68b1edb75044321cd587df1d48f52d17c013af1cf4c9c49e22894asize 11099897601{"lang": "dag", "dim": 128, "max_seq_len": 512, "is_aligned": false}12345678910111213{ "language": "dag", "dimension": 128, "version": "monolingual", "training_params": { "dim": 128, "min_count": 5, "window": 5, "negative": 5, "epochs": 5 }, "vocab_size": 82599}123version https://git-lfs.github.com/spec/v1oid sha256:18d0cd46a86dd79214da91f2a3df6ef9c65e6668b1587cc98559a3965acaea04size 2785537281{"lang": "dag", "dim": 32, "max_seq_len": 512, "is_aligned": false}12345678910111213{ "language": "dag", "dimension": 32, "version": "monolingual", "training_params": { "dim": 32, "min_count": 5, "window": 5, "negative": 5, "epochs": 5 }, "vocab_size": 82599}123version https://git-lfs.github.com/spec/v1oid sha256:4c1cd35ff33daa04fd2ea99f66368e3d72df9a82f6064c7f3608a3c63502d1a0size 5556990721{"lang": "dag", "dim": 64, "max_seq_len": 512, "is_aligned": false}12345678910111213{ "language": "dag", "dimension": 64, "version": "monolingual", "training_params": { "dim": 64, "min_count": 5, "window": 5, "negative": 5, "epochs": 5 }, "vocab_size": 82599}123version https://git-lfs.github.com/spec/v1oid sha256:623eda077da228d68a78166343d09134ce1dcb888ad8cd2f1464875c5e0e46d3size 2117901234567{ "context_size": 1, "variant": "subword", "language": "dag", "unique_contexts": 3894, "total_transitions": 44529804}123version https://git-lfs.github.com/spec/v1oid sha256:4e60104fd123c8a08af274dda2b93e9b7ec3ac0aaf6d4b2cf60bbe31242b5c3esize 12066471234567{ "context_size": 2, "variant": "subword", "language": "dag", "unique_contexts": 29465, "total_transitions": 44514709}123version https://git-lfs.github.com/spec/v1oid sha256:36f8027ca4fce4bf3dadd51e460200e88d4d0c095c79b05cb7e29c0433dbbc00size 51529981234567{ "context_size": 3, "variant": "subword", "language": "dag", "unique_contexts": 148003, "total_transitions": 44499614}123version https://git-lfs.github.com/spec/v1oid sha256:8cc197777a522334fc267d067bc251625a1e1aec095e9c28aeb8aebc0427f549size 174479771234567{ "context_size": 4, "variant": "subword", "language": "dag", "unique_contexts": 697702, "total_transitions": 44484519}123version https://git-lfs.github.com/spec/v1oid sha256:cb0c9ee865f5f6be5e336b948ef653abe84f4b00a044b3f849814d785b4c56ffsize 1031071234567{ "n": 2, "variant": "subword", "language": "dag", "unique_ngrams": 7859, "total_ngrams": 44529804}123version https://git-lfs.github.com/spec/v1oid sha256:2b3ae8520f2bc9d1853d7afb79b2d8606e3a534e55ee2e6c2ecd1a3f0d4a46d3size 8387051234567{ "n": 3, "variant": "subword", "language": "dag", "unique_ngrams": 70197, "total_ngrams": 44514709}123version https://git-lfs.github.com/spec/v1oid sha256:450f1defa9f633d782a23a168973c56bd4a2fefbe9636636351d8921fef62725size 45104381234567{ "n": 4, "variant": "subword", "language": "dag", "unique_ngrams": 408931, "total_ngrams": 44499614}123version https://git-lfs.github.com/spec/v1oid sha256:e9ecc269bcbaa87293a060665c9d55554adbe20cf6dad26e8a96452182e839c1size 501542123version https://git-lfs.github.com/spec/v1oid sha256:32bf5d9ccbeca9630e8a4ee3eda874ad86b4af05fbc5ceb2f64cd5008c99a529size 769222123version https://git-lfs.github.com/spec/v1oid sha256:db01cc19b1f2a063f377218ef2aa4b890dfe31d0b042d85e25b0671d520b399esize 1315381123version https://git-lfs.github.com/spec/v1oid sha256:699db67fe4c4771bf34490bf448d9f572320a09c154f290db947c051b0a39145size 368785123version https://git-lfs.github.com/spec/v1oid sha256:8d3b25fc3f84ce57bfb425cde12b6f3a252bf57664a8f82c09a765343f6e31bdsize 238804212345678910111213141516{ "language": "dag", "vocabulary_size": 144073, "statistics": { "type_token_ratio": 0.06420470311600282, "coverage": { "top_100": 0.30289941060496944, "top_1000": 0.5684920011507646, "top_5000": 0.7466727053131291, "top_10000": 0.81046446299815 }, "hapax_count": 296246, "hapax_ratio": 0.6727985846624833, "total_documents": 15095 }}123version https://git-lfs.github.com/spec/v1oid sha256:2f8098ae8deaca8d79c06abc15a50a7517d52588c5c5f08a1f6a662c91e1ed8csize 212414371234567{ "context_size": 1, "variant": "word", "language": "dag", "unique_contexts": 440521, "total_transitions": 9137164}123version https://git-lfs.github.com/spec/v1oid sha256:0b9ae3f14904e83c67214891ce4a5fc0e08e02185ba34e98c7c699e62759917dsize 502838911234567{ "context_size": 2, "variant": "word", "language": "dag", "unique_contexts": 2180092, "total_transitions": 9122070}123version https://git-lfs.github.com/spec/v1oid sha256:c33e13f6ecdcab9ecdfdb177aae0bcfa10561d97c94703f794569223fdf05503size 789722431234567{ "context_size": 3, "variant": "word", "language": "dag", "unique_contexts": 4328117, "total_transitions": 9106976}123version https://git-lfs.github.com/spec/v1oid sha256:2f9d66bf01d7d81cbb020388e788098cddbd001073b91bfa7c3174907bff6809size 1011897951234567{ "context_size": 4, "variant": "word", "language": "dag", "unique_contexts": 5753766, "total_transitions": 9091884}123version https://git-lfs.github.com/spec/v1oid sha256:2f90b4781fcb918be75d01d6c48f05d91a2ab2648ea71dcc044a1abc74abb9b5size 24258081234567{ "n": 2, "variant": "word", "language": "dag", "unique_ngrams": 188164, "total_ngrams": 9137164}123version https://git-lfs.github.com/spec/v1oid sha256:c9294c1403b148eba8a2f3113a3bc3d04e557dedd3d271356f88c8b21eae2bc4size 49213951234567{ "n": 3, "variant": "word", "language": "dag", "unique_ngrams": 362741, "total_ngrams": 9122070}123version https://git-lfs.github.com/spec/v1oid sha256:49868e930c1db710141544ca286252fd76d98cf8e8f5b2b36a174c9d3558ebc4size 96397841234567{ "n": 4, "variant": "word", "language": "dag", "unique_ngrams": 665471, "total_ngrams": 9106976}.gitattributes+6
README.mdAdded+556
models/embeddings/monolingual/dag_128d.binAdded+3
models/embeddings/monolingual/dag_128d.meta.jsonAdded+1
models/embeddings/monolingual/dag_128d_metadata.jsonAdded+13
models/embeddings/monolingual/dag_32d.binAdded+3
models/embeddings/monolingual/dag_32d.meta.jsonAdded+1
models/embeddings/monolingual/dag_32d_metadata.jsonAdded+13
models/embeddings/monolingual/dag_64d.binAdded+3
models/embeddings/monolingual/dag_64d.meta.jsonAdded+1
models/embeddings/monolingual/dag_64d_metadata.jsonAdded+13
models/subword_markov/dag_markov_ctx1_subword.parquetAdded+3
models/subword_markov/dag_markov_ctx1_subword_metadata.jsonAdded+7
models/subword_markov/dag_markov_ctx2_subword.parquetAdded+3
models/subword_markov/dag_markov_ctx2_subword_metadata.jsonAdded+7
models/subword_markov/dag_markov_ctx3_subword.parquetAdded+3
models/subword_markov/dag_markov_ctx3_subword_metadata.jsonAdded+7
models/subword_markov/dag_markov_ctx4_subword.parquetAdded+3
models/subword_markov/dag_markov_ctx4_subword_metadata.jsonAdded+7
models/subword_ngram/dag_2gram_subword.parquetAdded+3
models/subword_ngram/dag_2gram_subword_metadata.jsonAdded+7
models/subword_ngram/dag_3gram_subword.parquetAdded+3
models/subword_ngram/dag_3gram_subword_metadata.jsonAdded+7
models/subword_ngram/dag_4gram_subword.parquetAdded+3
models/subword_ngram/dag_4gram_subword_metadata.jsonAdded+7
models/tokenizer/dag_tokenizer_16k.modelAdded+3
models/tokenizer/dag_tokenizer_16k.vocabAdded
models/tokenizer/dag_tokenizer_32k.modelAdded+3
models/tokenizer/dag_tokenizer_32k.vocabAdded
models/tokenizer/dag_tokenizer_64k.modelAdded+3
models/tokenizer/dag_tokenizer_64k.vocabAdded
models/tokenizer/dag_tokenizer_8k.modelAdded+3
models/tokenizer/dag_tokenizer_8k.vocabAdded
models/vocabulary/dag_vocabulary.parquetAdded+3
models/vocabulary/dag_vocabulary_metadata.jsonAdded+16
models/word_markov/dag_markov_ctx1_word.parquetAdded+3
models/word_markov/dag_markov_ctx1_word_metadata.jsonAdded+7
models/word_markov/dag_markov_ctx2_word.parquetAdded+3
models/word_markov/dag_markov_ctx2_word_metadata.jsonAdded+7
models/word_markov/dag_markov_ctx3_word.parquetAdded+3
models/word_markov/dag_markov_ctx3_word_metadata.jsonAdded+7
models/word_markov/dag_markov_ctx4_word.parquetAdded+3
models/word_markov/dag_markov_ctx4_word_metadata.jsonAdded+7
models/word_ngram/dag_2gram_word.parquetAdded+3
models/word_ngram/dag_2gram_word_metadata.jsonAdded+7
models/word_ngram/dag_3gram_word.parquetAdded+3
models/word_ngram/dag_3gram_word_metadata.jsonAdded+7
models/word_ngram/dag_4gram_word.parquetAdded+3
models/word_ngram/dag_4gram_word_metadata.jsonAdded+7
visualizations/embedding_isotropy.pngAdded
