Downloads · 30 days
0
alakxender/deberta-dhivehi-tokenizer-extended
deberta-dhivehi-tokenizer-extended is a machine learning model from alakxender. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
This repository contains a custom extension of the microsoft/deberta-v3-base tokenizer, enhanced with 10,000 frequent Dhivehi tokens. It significantly improves tokenization coverage and accuracy for Dhivehi while pres…
Downloads · 30 days
0
Access
Public
Updated Jun 12, 2025
Repo size
46.8 MB
Likes
1
Public
Click a slice to open those files.
.json14.8 MB · 100%
From the Hugging Face model README
This repository contains a custom extension of the microsoft/deberta-v3-base tokenizer, enhanced with 10,000 frequent Dhivehi tokens. It significantly improves tokenization coverage and accuracy for Dhivehi while preserving English behavior.
microsoft/deberta-v3-base (vocab size: 128001)Input:
The quick brown fox jumps over the lazy dog.
Tokens (STOCK & CUSTOM):
['▁The', '▁quick', '▁brown', '▁fox', '▁jumps', '▁over', '▁the', '▁lazy', '▁dog', '.']
✔️ Token IDs identical — English tokenization is preserved.
Input:
އީދުގެ ހަރަކާތް ފެށުމަށް މިރޭ ހުޅުމާލޭގައި އީދު މަޅި ރޯކުރަނީ
STOCK Tokens (fragmented):
['▁', 'އ', 'ީދ', 'ު', 'ގ', 'ެ', '▁', 'ހ', 'ަ', 'ރ', 'ަ', ...]
CUSTOM Tokens (clean and meaningful):
['އީދުގެ', '▁', 'ހަރަކާތް', '▁', 'ފެށުމަށް', ...]
✔️ Long, language-meaningful tokens reduce fragmentation and UNKs.
STOCK (fragmented):
Token IDs: [..., 3, 3, 3, ...] # many unknowns
CUSTOM (extended):
Token IDs: [137561, 130775, 129048, ...]
Clean and consistent token IDs for Thaana tokens.
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("alakxender/deberta-dhivehi-tokenizer-extended")
tokens = tokenizer.tokenize("އީދުގެ ހަރަކާތް")
print(tokens)