class
GPT2TokenizerFast
extends
ByteLevelBPETokenizerFastGPT2TokenizerFast(vocab: dict[str, int], merges: list[tuple[str, str]], add_prefix_space: bool = False, normalizer: Normalizer | None = None, special_tokens: SpecialTokens | None = None)GPT-2 tokenizer — C++-backed.
Bit-identical to GPT2Tokenizer. The BPE merge loop runs
in C++ via the engine-side BPE binding for production
throughput.
Constructor parameters mirror GPT2Tokenizer — see that
class for the full reference.