-
Notifications
You must be signed in to change notification settings - Fork 12.2k
llama : add llama_model_load_from_splits
#11255
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 : add llama_model_load_from_splits
#11255
Conversation
src/llama-model-loader.h
Outdated
// return a list of splits for a given path | ||
// for example, given "<name>-00002-of-00004.gguf", returns list of all 4 splits | ||
std::vector<std::string> llama_get_list_splits(const std::string & path, const int n_split); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be static
function in the source file only - no need to add it in the header.
There is also an existing a llama_split_
prefix which seems suitable to use for this function: llama_split_get_list()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, I wanted to use this in llama.cpp
but decided not to do that in the end. Forgot to delete it in the header file.
It should be fixed with 49822ba
How to use it in command line? |
I don't add this to CLI for now, as this is only useful for downstream users. For |
It would be very helpful to start with: |
* llama : add `llama_model_load_from_splits` * update
* llama : add `llama_model_load_from_splits` * update
* llama : add `llama_model_load_from_splits` * update
Some downstream program may want to use non-conventional file name. For example, ollama is using SHA256 as file name. This can make adding support for multi-splits GGUF become tricky.
This PR adds a new API
llama_model_load_from_splits
that allow user to manually specify a list of GGUF files: