tabby icon indicating copy to clipboard operation
tabby copied to clipboard

Way to provide custom llama.cpp arguments

Open gergelyth opened this issue 3 years ago • 3 comments

Now that v0.5.5 switched the cuda backend to llama.cpp, is there a way to pass arguments to it?

For people with a less capable setup, GPU offloading with --n_gpu_layers x would be really handy to have.

gergelyth avatar Nov 24 '23 19:11 gergelyth

Should be good to add an new environment variable LLAMA_CPP_N_GPU_LAYERS, like what we did in https://github.com/TabbyML/tabby/issues/738

wsxiaoys avatar Nov 25 '23 02:11 wsxiaoys

@wsxiaoys Forgive my ignorance here, as I haven't tooked at the code yet, but wouldn't a more generic solution be more robust? I'm thinking about an environmental variable like LLAMA_CPP_ARGUMENTS, which would pipe all settings included within to llama.cpp, not just the --n_gpu_layers x mentioned.

Considering the rapid development around the project (and local LLMs in general), there is definite potential of new flags appearing in the future as well, which could be useful for user customization. Adding this customizability might get ahead of these and save some time further down the line.

gergelyth avatar Nov 26 '23 21:11 gergelyth

but wouldn't a more generic solution be more robust?

Not all flags inside of llama.cpp are applicable in Tabby. Whitelisting allows us to understand the actual use case for better maintenance.

there is definite potential of new flags appearing in the future as well

Tabby pinned llama.cpp version - so new features introduced requires a release anyway.

wsxiaoys avatar Nov 27 '23 00:11 wsxiaoys