Skip to content

Commit 5dd1025

Browse files
authored
server : ignore --alias when using --models-preset (#21380)
I'm not sure what the purpose of keeping `--alias` was when using `--models-preset`, but the result is really weird, as shown in the following logs: $ build/bin/llama-server --models-preset preset.ini --alias "Gemma 4 E4B UD Q8_K_XL" ... init: using 31 threads for HTTP server srv load_models: Loaded 2 cached model presets srv load_models: Loaded 1 custom model presets from preset.ini main: failed to initialize router models: alias 'Gemma 4 E4B UD Q8_K_XL' for model 'angt/test-split-model-stories260K:F32' conflicts with existing model name So I propose to simply ignore `--alias` too in this case. With this commit, the server starts in routing mode correctly. Signed-off-by: Adrien Gallouët <angt@huggingface.co>
1 parent fb38d6f commit 5dd1025

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

tools/server/server-models.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ static void unset_reserved_args(common_preset & preset, bool unset_model_args) {
9898
if (unset_model_args) {
9999
preset.unset_option("LLAMA_ARG_MODEL");
100100
preset.unset_option("LLAMA_ARG_MMPROJ");
101+
preset.unset_option("LLAMA_ARG_ALIAS");
101102
preset.unset_option("LLAMA_ARG_HF_REPO");
102103
}
103104
}

0 commit comments

Comments
 (0)