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

Llama-bench: allow benchmarking lora impact #11410

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IMbackK
Copy link
Collaborator

@IMbackK IMbackK commented Jan 25, 2025

Allows benchmarking a with a lora loaded.

As i dont know how loras are applied exactly in lcpp (esp in the case of quantized weights, where it seams just merging in ram would not be trivial) im not sure if that makes sense to do, so this is a draft.

@slaren
Copy link
Collaborator

slaren commented Jan 25, 2025

Yes absolutely, having a way to measure performance with one or more loras applied would be very useful. Loras are not merged into the weights, they are applied during inference, see the function llm_build_lora_mm for an example of how this is done.

@IMbackK
Copy link
Collaborator Author

IMbackK commented Jan 25, 2025

Great, i will undraft this then.

This pr only allows one lora as the llama-bench permutation interface, ie you can specify --lora none --lora some_file and it will bench first with no lora and then with a lora or --lora a,b as with any bench parameter, makes it a bit hard to come up with a sane way to do 2d permutation with loras.

@IMbackK IMbackK marked this pull request as ready for review January 25, 2025 14:04
@slaren
Copy link
Collaborator

slaren commented Jan 25, 2025

Yes, I don't think it is very useful to have the loras as part of the test grid. Loras are strongly tied to a model, I don't think they can be separated. I would suggest adding some syntax to -m such as -m model.gguf+lora.gguf+lora2.gguf, then it would be possible to test at the same time e.g. a model, and the same model with a lora applied.

@IMbackK
Copy link
Collaborator Author

IMbackK commented Jan 28, 2025

Please dont merge as is, i will make improvements as suggested by @slaren

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

Successfully merging this pull request may close these issues.

3 participants