最終更新:2025-03-10 (月) 16:03:15 (105d)
トークナイザ
Top / トークナイザ
https://huggingface.co/learn/nlp-course/ja/chapter2/4
Encode?
- 文字列 → 事前学習モデル入力可能なEncodingオブジェクト
Decode?
- トークン列 (Encoding)→ 元の文字列
粒度
word char subword サブワード
アルゴリズム
BPE(Byte-Pair Encoding)
WordPiece
ユニグラム言語モデル?
ライブラリ
tiktoken
SentencePiece
Tokenizers
- Transformersでも使われてる
- Rust実装
形態素解析
中国語
- jieba?
PLaMo 2
ツール
メモ
LLM別
Llama 2
- sentencepiece.SentencePieceProcessor
https://github.com/meta-llama/llama/blob/main/llama/tokenizer.py