Hecemen Tokenizer — BPE 96k

Why "Hecemen"?

The name Hecemen is inspired by the Turkish word hece (syllable) combined with the Turkish agentive suffix -men, which denotes mastery or profession — as in öğretmen (teacher, literally "one who teaches") or yazman (secretary, "one who writes"). Hecemen thus translates roughly as "one who masters syllables" or "the segmenter."

Although tokens are not syllables, a well-designed tokenizer for Turkish often learns segmentations that align with natural linguistic boundaries — making the name both meaningful and fitting for a Turkish-native tokenizer.

Why a Turkish-specific tokenizer?

Turkish has a highly regular agglutinative morphology. Instead of relying on large multilingual corpora, Hecemen was designed specifically for Turkish using a carefully curated corpus that balances general language with domain-specific terminology from areas such as law, medicine, sports, technology and education. The objective is not only to reduce token counts, but to preserve meaningful lexical units whenever possible.

Design Goals

Hecemen was designed around four principles:

  • Preserve complete lexical units whenever possible.
  • Produce linguistically natural segmentations when splitting is necessary.
  • Minimize token count for Turkish text.
  • Generalize well across different domains.

Token Efficiency

Example sentence: "Kitapçılıktan kazandığı parayla yeni bir dükkan açtı."

Tokenizer Token Count
Gemma (multilingual) 19
Hecemen BPE 96k 10
Hecemen Unigram 128k 9

52% fewer tokens than Gemma for the same Turkish text — meaning faster inference, lower cost, and better semantic representation per token.

Gemma 7B — 27 tokens for a complex Turkish sentence: Gemma tokenizer

Hecemen Unigram — 10 tokens for the same sentence: Hecemen tokenizer

Training Data

  • ~1GB of Turkish text
  • Sources: news, books, web corpora, law, medicine
  • Character coverage: 1.0 (full Turkish alphabet support)
  • Byte fallback: enabled

Model Details

Property Value
Algorithm BPE (SentencePiece)
Vocabulary size 96,000
Normalization nmt_nfkc_cf
Byte fallback True
Character coverage 1.0

Usage

import sentencepiece as spm
from huggingface_hub import hf_hub_download

model_path = hf_hub_download(
    repo_id="mursideaki/hecemen-tokenizer-bpe-96k",
    filename="turk_spm.model"
)

sp = spm.SentencePieceProcessor()
sp.load(model_path)

text = "Kitapçılıktan kazandığı parayla yeni bir dükkan açtı."
tokens = sp.encode_as_pieces(text)
ids    = sp.encode_as_ids(text)

print(f"Tokens : {tokens}")
print(f"IDs    : {ids}")
print(f"Count  : {len(tokens)}")

Companion Models

Citation

@misc{hecemen2026,
  author    = {Mürşide Aki},
  title     = {Hecemen: A Turkish-Specific Tokenizer Suite},
  year      = {2026},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/mursideaki/hecemen-tokenizer-bpe-96k}
}

License

MIT

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support