BaseTokenizer¶
- class torchtune.modules.tokenizers.BaseTokenizer(*args, **kwargs)[source]¶
Abstract token encoding model that implements
encodeanddecodemethods. SeeSentencePieceBaseTokenizerandTikTokenBaseTokenizerfor example implementations of this protocol.