Multiple configuration profiles for the same gguf file #573
|
This might be a stupid question: if I define multiple configurations (models) over the same gguf file, will that file be completely reloaded from disk on model "change"? For example, Unsloth's docs for Qwen 3.5 ( https://unsloth.ai/docs/models/qwen3.5#recommended-settings ) would suggest 4 different "models", depending on the usecase, but they would point to the same gguf file on disk. What would be the best way to configure llama-swap so all "models" exist, while minimizing model reload (this is also useful for multi-agent setups like OpenClaw, if an agent's model is unloaded fun things could happen). Thank you! |
Replies: 8 comments 15 replies
|
Looks like I am not the only one running into this situation, if this idea catches, we might get support in llama.cpp / llama-server - ggml-org/llama.cpp#20113 |
|
Have you seen the setParamsByID filter configuration? For example: |
|
There must be something I'm not doing right :( . This is my config file. Loading models works fine, groups work fine, but I don't see the aliases in the UI or on /v1/models... 🤷♂️ I am running the v197-cuda-b8265 docker image (and any other models in normal configuration work just fine). |
|
Following this method you posted on Reddit the model list ends up with three models, the base model and the two filter variants:
This is a bit messy. Is it possible to filter parameters on the base model name, so you'd end up with just a base model and thinking variant in the model list? I mean a config like this. Notice there is no models:
"Q3.5-35B":
filters:
stripParams: "temperature, top_k, top_p, repeat_penalty, min_p, presence_penalty"
setParamsByID:
"${MODEL_ID}":
chat_template_kwargs:
enable_thinking: false
temperature: 0.7
"${MODEL_ID}:thinking":
chat_template_kwargs:
enable_thinking: true
temperature: 0.6
cmd: |
${server-latest}
--model /path/to/models/Qwen3.5-35B-A3B-UD-Q6_K_XL.gguf(full parameters omitted for brevity, the model documentation has the correct parameters) |
|
Is there a way to support GLM's thinking format? According to the documentation it is changed with: I tried a few different syntaxes but could not get it to disable thinking. |
|
Hi, sorry to resurrect this thread, but i have a very hard time understanding how to use aliases with seParamsByID. |
|
no i din't miss I also tried the API endpoinds. As i mentioned above: "Api calls using model:alias as model name also load only the base config". |
|
First wanted to say thank you to devs for excellent work! I found these features and discussion and will like to test if can achieve goal. Use case is an external web application which only supports specifying a single custom base URL for openai api, and only can specify a single model name. In other words the application has no internal mechanism for routing certain prompts to different endpoint or different port or different model alias names. The goal to circumvent the above constraints was to try to use llama-swap for multiple configuration profiles for the same gguf file ie route different chat requests to same gguf but some to Assuming the external application constraints, can llama-swap filter or route chat requests based on regex or certain text ie some of the prompt requests allows to customize the What if any, are the other macro's that llama-swap supports for filtering besides Does llama-swap support performing routing logic based on system prompt How could llama-swap be configured to perform routing to different If not currently possible, can I open a feature request if this is a reasonable and possible new feature for llama-swap? Thanks |

Not sure if you solved it yet.
The issue with your config is that setParamsByID is a filter so it should be under the
filterskey. I fixed it up for you. Also llama-server will use the defaults you define on the CLI so it is unnecessary to set them again in setParamsByID. I removed those and it shortened things by a bit.