52 const std::string& text,
bool add_special)
const = 0;
75 return static_cast<int>(
tokenize(text,
false).size());
Pure-virtual tokenizer surface used by the inference backend.
virtual int count_tokens(const std::string &text) const
Count tokens in text without retaining the IDs.
virtual std::string detokenize(int32_t token) const =0
Decode a single token to its surface piece.
virtual std::vector< int32_t > tokenize(const std::string &text, bool add_special) const =0
Encode text to token IDs.
Activate model on GPU (WARM → ACTIVE).