-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the Llama-2-7b-chat-hf-q4f32_1-1k model, the number of tokens in the prefill is 36 when inputting 'hello'. #396
Comments
They are due to the system prompt as shown in the If you'd like not to use a system prompt, try overriding it with an empty string: const request: webllm.ChatCompletionRequest = {
messages: [
{"role": "system", "content": ""},
{ "role": "user", "content": "Hello" },
],
}; |
got it!thank you very much! |
Why is the number of tokens in the prompt's output different from the actual number of tokens produced by the tokenizer?
I used the LLaMA 2 tokenizer, and the prompt 'hello' is only split into 2 tokens. However, the prefill count provided by the project is 36 tokens, and experiments have confirmed that all prefill outputs have 34 more tokens than the original prompt's token count. Please explain the reason.
The text was updated successfully, but these errors were encountered: