Downloads · 30 days
0
besmabakirci01/turkish-poem-bpe-tokenizer
turkish-poem-bpe-tokenizer is a machine learning model from besmabakirci01. 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.
Sıfırdan yazılmış byte-level BPE tokenizer (ödev notebook: poemTokenizer.ipynb).
Downloads · 30 days
0
Access
Public
Updated Jul 20, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json6.8 KB · 45%
From the Hugging Face model README
Sıfırdan yazılmış byte-level BPE tokenizer (ödev notebook: poemTokenizer.ipynb).
| Dosya | Açıklama |
|---|---|
vocabulary.txt | Token ID → okunabilir metin + length + merge frequency |
merges.txt | Öğrenme sırasıyla birleşme kuralları |
tokenizer.json | HF-benzeri BPE dışa aktarımı (latin-1 anahtarlar) |
tokenizer_config.json | Yapılandırma |
poem_bpe.py | Notebook ile birebir encode/decode |
| Ölçüm | Değer |
|---|---|
| Base vocab | 256 (UTF-8 byte) |
| Merges | 44 |
| Vocab size | 300 |
| Örnek sıkıştırma | 381 byte → 231 token (≈ %39.4) |
Byte-level olduğu için tokenizer hiçbir karakteri <unk> yapmak zorunda değildir.
from poem_bpe import encode, decode
text = "Sonu güzel olan, mutlaka hayırla gelecektir."
ids = encode(text)
assert decode(ids) == text
Hub'dan indirdikten sonra:
from huggingface_hub import hf_hub_download
import importlib.util
path = hf_hub_download("besmabakirci01/turkish-poem-bpe-tokenizer", "poem_bpe.py")
# merges.txt / vocabulary türevi aynı klasörde olmalı
tokenizer.json inceleme / HF dosya düzeni içindir.
Kesin notebook parity için poem_bpe.py kullanın (UTF-8 byte → merge sırası).