SıradakiSonraki rehber
Tokenizasyon ve Bayt Çifti Kodlaması
Teknik
Dil AI KILAVUZU
Byte-pair encoding builds larger symbols by repeatedly merging frequent adjacent pairs during training.
Bu kılavuzu dinleyinAI tarafından anlatılan · ~3 min
Its learned vocabulary and merge priorities support subword encoding, while byte-level variants use a byte alphabet rather than a character-only base.
BPE was developed for data compression and adapted to word segmentation in the translation research by Sennrich, Haddow, and Birch, published in 2016. In a common subword-training procedure, text is represented through initial symbols such as characters. Adjacent pairs are counted over the training representation, and a frequent pair is merged into a larger symbol. Repeating the procedure learns reusable pieces. More frequent sequences can gain larger units, while an unfamiliar word may remain split into smaller ones. The precise behavior depends on the training data and implementation; not every common word must become one token. Training produces a vocabulary and an ordered collection of merge rules. GPT-2's published encoder applies eligible pairs according to learned ranks rather than recounting the new input to invent a new vocabulary. It first represents UTF-8 bytes through a reversible byte-to-symbol mapping. The byte alphabet covers 256 values, permitting valid UTF-8 input to be represented through its constituent bytes when larger merged pieces are unavailable. This avoids the character-alphabet coverage limitation under that configuration, but encoding success does not establish that the model knows the text's meaning. Vocabulary accounting can be explicit. In an illustrative configuration with 256 base byte tokens, two distinct additional merge tokens, and one separate special token, the total is 259. Decoding has another important order: GPT-2's implementation joins decoded token pieces, reconstructs the complete byte sequence, then decodes that sequence as UTF-8. Individual pieces need not each correspond to an independently complete Unicode character.
Studying the BPE word-segmentation method in Sennrich and colleagues' translation research.
Inspecting GPT-2's published byte mapping and ranked merge implementation.
Calculating vocabulary size for a stated base, unique merges, and special-token allocation.
Reconstructing a byte sequence before decoding its UTF-8 text.
BPE configurations can be compared through sequence lengths, coverage, and effects on a trained model rather than assumed to be optimal for every language or input type. Changes to the byte alphabet, preprocessing, vocabulary, or merge rules alter the actual encoding. A reproducible comparison should preserve those details and identify any normalization applied before tokenization. Other segmentation methods offer different design choices, while byte-level coverage remains distinct from semantic understanding. Inspecting the learned pieces and reconstruction process is useful for diagnosing representational behavior without attributing every model failure to BPE alone.
Ücretsiz bülten
Hafta içi her sabah sade İngilizce yazılmış, doğrulanmış üç yapay zeka hikayesi. Sonsuza kadar ücretsiz, reklam yok.
Hafta içi her gün bir e-posta. Tek tıklamayla aboneliğinizi iptal edin. Adresinizi asla satmayız veya paylaşmayız.
Kendinizi test edin
Her yanıtla ilgili anında geri bildirim ve bir kursu geçtiğinizde doğrulanabilir bir kimliğe sahip paylaşılabilir bir sertifika.
Ücretsiz AI eğitimini destekleyin. AI Understanding, bir 501(c)(3) kâr amacı gütmeyen kuruluştur; hiçbir zaman reklam yoktur, ödeme duvarı yoktur. Bağış yap
Byte-pair encoding builds larger symbols by repeatedly merging frequent adjacent pairs during training. Its learned vocabulary and merge priorities support subword encoding, while byte-level variants use a byte alphabet rather than a character-only base.
The training procedure counts adjacent symbol pairs and learns merges; encoding later uses the saved rules.
BPE en küçük birimlerden (karakterler veya ham baytlar) başlar ve birleştirmeler yoluyla daha büyük jetonlar büyütür.
The complete byte alphabet supplies the stated fallback; this does not apply to every character-only subword vocabulary.
BPE, 1994 yılında bir veri sıkıştırma tekniği olarak tanıtıldı ve daha sonra 2016 yılında alt kelime tokenizasyonu için uyarlandı.
Its implementation selects eligible pairs through saved BPE ranks rather than re-learning corpus frequencies at encoding time.
Öğrenmeye devam et
Bu konu için daha fazla rehber seçildi
SıradakiSonraki rehber
Tokenizasyon ve Bayt Çifti Kodlaması
Teknik