Expand description
One GGUF path in, one embedding vector out.
Binds a tokenizer to a TextEncoder and owns the two steps
between them that neither half should own alone: adding the model’s
own special tokens ([CLS] … [SEP]) around the tokenizer’s pieces,
and pooling the hidden states the way the checkpoint’s
pooling_type says.
This is the type /v1/embeddings and the CLI both hold. It exists
so neither of them has to know that bert is an encoder, that
WordPiece does not add its own specials, or that CLS pooling means
row zero.
Structs§
- Embedding
Model - A loaded embedding model: tokenizer + encoder + the checkpoint’s own pooling rule.
Enums§
Functions§
- is_
embedding_ arch - True when
general.architecturenames an encoder / embedding model rather than something with an output head.