logoalt Hacker News

rhdunntoday at 6:05 PM1 replyview on HN

It can be useful for checking input token usage before sending it to the model, e.g. preventing calls above a given token bound or grouping requests into batches.

It can also be used by the LLMs to provide the input and output token counts on the different APIs, though I'm not sure if this is how llama.cpp or other OpenAI-like APIs calculate the input/output tokens of a request.


Replies

charcircuittoday at 6:11 PM

But are those bounded on the speed of tokenization?