Text → integer token ID. byte-pair encoding (BPE), wordpiece (BERT), unigram (T5) 등 알고리즘. 같은 model 에 *반드시 같은 tokenizer*. 안 그럼 vocab id 가 안 맞아 결과 쓰레기.
KerasHub 의 tokenizer: preprocessor = BertClassifier.preprocessor; tokens = preprocessor.tokenizer('hello world'). 또는 model 자체에 string 직접 넘기면 자동 tokenize. 학습 / inference 시 자동.