tokens
(list[int]
)
–The list of tokens to decode.str
–The decoded string.Source code in rigging/tokenizer/base.py
text
(str
)
–The text to encode.list[int]
–A list of tokens representing the encoded text.Source code in rigging/tokenizer/base.py
chat
(Chat
)
–The chat object to format.str
–A string representation of the chat.Source code in rigging/tokenizer/base.py
chat
(Chat
)
–The chat object to tokenize.TokenizedChat
–A TokenizedChat object containing the tokenized chat data.Source code in rigging/tokenizer/base.py
PreTrainedTokenizer
instance.
text
(str
)
–The text to encode.list[int]
–A list of tokens representing the encoded text.Source code in rigging/tokenizer/transformers_.py
tokenizer
(PreTrainedTokenizer
)
–The tokenizer associated with the model.TransformersTokenizer
–The TransformersTokenizer instance.Source code in rigging/tokenizer/transformers_.py
<provider>!<model>,<**kwargs>
(provider is optional and defaults to transformers
if not specified)
Examples:
TransformersTokenizer(model="
meta-llama/Meta-Llama-3-8B-Instruct”)`TransformersTokenizer(model="microsoft/Phi-4-mini-instruct")
identifier
(str
)
–The identifier string to use to get a tokenizer.Tokenizer
–The tokenizer object.InvalidTokenizerError
–If the identifier is invalid.Source code in rigging/tokenizer/base.py
provider
(str
)
–The name of the provider.tokenizer_cls
(type[Tokenizer] | LazyTokenizer
)
–The tokenizer class to register.None
–NoneSource code in rigging/tokenizer/base.py