huggingface_tokenizer
HuggingFaceTokenizer
Bases: BaseTokenizer
HuggingFaceTokenizer
Bases: BaseTokenizer
griptape/tokenizers/huggingface_tokenizer.py
max_input_tokens: int = field(default=Factory(lambda self: self.tokenizer.model_max_length, takes_self=True), kw_only=True)
class-attribute
instance-attribute
max_output_tokens: int = field(default=4096, kw_only=True)
class-attribute
instance-attribute
tokenizer: PreTrainedTokenizerBase = field(default=Factory(lambda self: import_optional_dependency('transformers').AutoTokenizer.from_pretrained(self.model), takes_self=True), kw_only=True)
class-attribute
instance-attribute