Views
No views yet
| Özellik | Değer |
|---|---|
| Tokenizer algoritması | Byte-Level BPE |
| Dil | Türkçe |
| Vocabulary Size | 512 |
| Minimum Frequency | 2 |
| Pre-tokenizer | ByteLevel |
| Decoder | ByteLevel |
| Transformers uyumluluğu | Evet |
| AutoTokenizer desteği | Evet |
| Token | Amaç |
|---|---|
<unk> | Bilinmeyen token |
<pad> | Padding |
<bos> | Sequence başlangıcı |
<eos> | Sequence sonu |
1flowchart LR
2
3 A["📝 Türkçe Metin"]
4 B["🔡 Byte-Level Encoding"]
5 C["✂️ Pre-Tokenization"]
6 D["🔗 BPE Merge İşlemleri"]
7 E["📚 Token Vocabulary"]
8 F["🔢 Token IDs"]
9
10 A --> B
11 B --> C
12 C --> D
13 D --> E
14 E --> F1from transformers import AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained(
4 "sedayzc/turkish-bpe-tokenizer"
5)1text = "Bu bilmecenin anlamını çözmek günler sürdü"
2
3token_ids = tokenizer.encode(
4 text
5)
6
7tokens = tokenizer.convert_ids_to_tokens(
8 token_ids
9)
10
11decoded = tokenizer.decode(
12 token_ids
13)
14
15print("Tokens:", tokens)
16print("Token IDs:", token_ids)
17print("Decoded:", decoded)Bu bilmecenin anlamını çözmek günler sürdü1[
2 'B',
3 'u',
4 'Ġb',
5 'i',
6 'lm',
7 'e',
8 'c',
9 'en',
10 'in',
11 ...
12]Bu bilmecenin anlamını çözmek günler sürdüĠ benzeri semboller tokenizer'ın
byte-level iç temsilinden kaynaklanmaktadır.1tokenizer.json
2tokenizer_config.json
3special_tokens_map.jsontokenizer.jsontokenizer_config.jsonspecial_tokens_map.json<unk>, <pad>, <bos> ve <eos> özel tokenlarının eşlemesini içerir.512 olarak belirlenmiştir.