Instructions to use orucexe/ulduz-morph-128k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use orucexe/ulduz-morph-128k with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("orucexe/ulduz-morph-128k", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from orucexe/ulduz-morph-128k: direct link, hf CLI and curl.
- Browser
- Download file 3.65 kB
-
https://huggingface.co/orucexe/ulduz-morph-128k/resolve/main/README.md
- Command line
-
hf download hf://orucexe/ulduz-morph-128k/README.md
-
curl -L -o README.md https://huggingface.co/orucexe/ulduz-morph-128k/resolve/main/README.md
3.65 kB
| language: | |
| - az | |
| - en | |
| - ru | |
| - tr | |
| - multilingual | |
| license: apache-2.0 | |
| library_name: transformers | |
| tags: | |
| - tokenizer | |
| - azerbaijani | |
| - morphology | |
| - fsm | |
| - embedding | |
| - retrieval | |
| # 🧬 Ulduz Morph 128k (`ulduz-morph-128k`) | |
| **Ulduz-Morph-128k** is the **morphological edition** of the Ulduz `131,072`-vocabulary (**204-language**) tokenizer family, designed specifically for **Azerbaijani Embedding, Retrieval, Reranking, and linguistically grounded NLP**. | |
| - **Runtime 29-State Azerbaijani FSM + 88,516 Verified Roots:** Isolates prefixes and roots cleanly from agglutinative suffix chains (`90.7%` morphological cut precision, `90.4%` intact roots) while keeping suffix chains compact (`1.784` Belebele fertility — more compact than `bge-m3`!). | |
| - **204 World Languages + 100% Lossless:** Context-aware script guard leaves English, Russian, code, math, and 200 world languages untouched (`0.00% <unk>`, `100.0%` lossless). | |
| - Looking for a zero-Python pure Rust `tokenizer.json` (`trust_remote_code=False`)? See **[`orucexe/ulduz-tokenizer-128k`](https://huggingface.co/orucexe/ulduz-tokenizer-128k)**. | |
| ## Quick Start | |
| ```python | |
| from transformers import AutoTokenizer | |
| tok = AutoTokenizer.from_pretrained("orucexe/ulduz-morph-128k", trust_remote_code=True) | |
| text = "müstəqilliyimizin mikroiqtisadiyyatımızdakı zərərsizləşdirmə" | |
| ids = tok.encode(text, add_special_tokens=False) | |
| print([tok.decode([i]) for i in ids]) | |
| # ['müstəqil', 'liyimizin', ' mikro', 'iqtisad', 'iyyatımız', 'dakı', ' zərər', 'sizləşdirmə'] | |
| ``` | |
| ## Official Benchmark | |
| Evaluated on **Meta AI `facebook/belebele` (`azj_Latn`, 900 items)**, **Cohere `CohereForAI/include-base-44` (`Azerbaijani` test, 548 items)**, and **Wikimedia Wikipedia (`EN`, `RU`, `TR`, + `74` world languages)**: | |
| | Tokenizer | Vocab | Belebele-AZ ↓ | INCLUDE-44 AZ ↓ | %Pure ↑ | Morph Prec ↑ | Root Intact ↑ | EN ↓ | RU ↓ | TR ↓ | World-74 B/Tok ↑ | Lossless ↑ | | |
| | :--- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | |
| | **`orucexe/ulduz-tokenizer-128k`** | **131,072** | **1.534** | **3.737** | **75.6%** | **64.6%** | **78.7%** | **1.51** | 2.06 | **1.81** | **4.34** | **100.0%** | | |
| | **`orucexe/ulduz-morph-128k`** | **131,072** | 1.784 | 3.776 | 46.5% | **90.7%** | **90.4%** | 1.52 | 2.05 | 2.07 | **4.37** | **100.0%** | | |
| | `allmalab/aLLMA-2-tokenizer` | 32,000 | 1.572 | 4.326 | 72.4% | 56.4% | 75.5% | 2.27 | 3.94 | 2.65 | 1.43 | 100.0% | | |
| | `nijatzeynalov/gpt2-azerbaijani-small` | 50,257 | 1.489 | 4.228 | 78.4% | 58.1% | 80.2% | 2.08 | 3.16 | 2.53 | 1.55 | 100.0% | | |
| | `LocalDoc/az-en-unigram-tokenizer-50k` | 50,001 | 1.507 | 2.891* | 75.2% | 68.9% | 79.6% | 1.48 | 2.14 | 2.66 | 5.44* | 24.2% | | |
| | `LocalDoc/LocRet-small` | 250,002 | 1.867 | 2.978* | 49.6% | 62.5% | 61.8% | 1.54 | 1.95 | 1.87 | 5.93* | 25.1% | | |
| | `hajili/roberta-base-azerbaijani` | 250,002 | 1.867 | 2.978* | 49.6% | 62.5% | 61.8% | 1.54 | 1.95 | 1.87 | 5.93* | 25.1% | | |
| | `BAAI/bge-m3` | 250,002 | 1.867 | 2.978* | 49.6% | 62.5% | 61.8% | 1.54 | 1.95 | 1.87 | 5.93* | 25.1% | | |
| | `Alibaba-NLP/gte-multilingual-base` | 250,002 | 1.867 | 2.978* | 49.6% | 62.5% | 61.8% | 1.54 | 1.95 | 1.87 | 5.93* | 25.1% | | |
| | `Qwen/Qwen2.5-7B-Instruct` | 151,665 | 3.533 | 4.487 | 9.1% | 25.2% | 24.3% | 1.43 | 2.77 | 2.66 | 2.47 | 100.0% | | |
| *\*Non-lossless tokenizers drop/normalize whitespace or emit `<unk>` (`LocalDoc-50k` has `29.3% <unk>` on World-74; XLM-R `250k` models have `2.4% <unk>`). Both `ulduz` tokenizers achieve **`0.00% <unk>`** and **`100.0%` lossless** reconstruction.* | |
| ## License | |
| Apache-2.0 | |