Tokenization function: text → list of token IDs. Injected to decouple model from tokenizer implementation.
final List<int> Function(String text) tokenize;