Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveTokenizerPath ¶
ResolveTokenizerPath returns the best tokenizer asset path for a model path. It searches the model's directory for tokenizer.json then vocab.txt, falling back to the provided path when no asset is found.
Types ¶
type Tokenizer ¶
type Tokenizer struct {
// contains filtered or unexported fields
}
Tokenizer implements a basic WordPiece tokenizer
func NewTokenizer ¶
NewTokenizer creates a new tokenizer from a vocab file
func NewTokenizerForModel ¶
NewTokenizerForModel creates a tokenizer resolved relative to a model path.