Because the user message needs to be identified as such. That takes 4 tokens, the start and end, the user role identifier, and the separator between the role and the message.
The same as 1 without the end which gets generated in the response. That’s 3 tokens.
@_j
So tokens_per_name should be taken into account when using the name optional parameter.
tokens_per_name is not always 1 token.
Do i understand correctly?
tokens_per_name = 1 is correct - unless you provide name inputs that aren’t (where a single token like “:x” demonstrated above, or even “:name” exists and would be utilized).
The overhead of one message = 7 billed tokens, the overhead of two = 11, three = 15.
This is a calculation scheme that is not broken by any inputs that seems reasonable:
Hi. Where did you find out the token IDs for those special tokens? I can only see the IDs of some of the special tokens using tiktoken (like <|endoftext|>) but not the rest. Thanks!