Skip to content
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

Is llama.cpp batching prompts size setted by the parameter -b? #1

Open
5symx opened this issue Nov 22, 2024 · 0 comments
Open

Is llama.cpp batching prompts size setted by the parameter -b? #1

5symx opened this issue Nov 22, 2024 · 0 comments

Comments

@5symx
Copy link

5symx commented Nov 22, 2024

Hi there, I am also working on the performance comparison through different LLM inference framework. For the batching prompt, the llama.cpp perform quite worse then I expected. I found that your method use the -b of ./llama-bench to set up the batch size. However, it's not quite clear to me that this parameter is the same as the batch_size of other framework.

n_batch (-b) don't affect how much of the context you can use, it is just a limit to how many tokens you can put in a single batch.. If I understand it correctly, it means that if I set -b to 32 means that there is 32 token input in a single llama_decode(), other than set 32*1024 tokens to the input batch.

Here are some other related links from llama.cpp. batch_prompt , batch-size and ubatch-size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant