Server system prompt parameter bug
It seems like the -spf / --system-prompt-file argument doesn't work in the server code.
The parameters are processed at the start of main() https://github.com/ggerganov/llama.cpp/blob/594fca3fefe27b8e95cfb1656eb0e160ad15a793/examples/server/server.cpp#L2486
While initialize() is called later. https://github.com/ggerganov/llama.cpp/blob/594fca3fefe27b8e95cfb1656eb0e160ad15a793/examples/server/server.cpp#L2621
It seems like the system prompt has a deferred loading controlled by the "system_need_update = true" flag. However, process_system_prompt_data() has the condition "slots.size() > 0", which results in that being skipped, because the slots are only added during initialize(). I'm not sure what the purpose of this condition is. https://github.com/ggerganov/llama.cpp/blob/594fca3fefe27b8e95cfb1656eb0e160ad15a793/examples/server/server.cpp#L810
Also, for some reason, initialize() empties the system prompt, so even if it's successfully set in server_params_parse(), it gets cleared. https://github.com/ggerganov/llama.cpp/blob/594fca3fefe27b8e95cfb1656eb0e160ad15a793/examples/server/server.cpp#L440
Same as this issue? https://github.com/ggerganov/llama.cpp/issues/3997
Yes, it's probably the same. It's easy to fix, but I'm not sure what slots.size() > 0 is there for and why initialize() clears the system prompt.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
this is still broken in llama-server.exe
getting "error: invalid argument: --system-prompt-file" tried --sysf as well, tried full path for the file as well without any luck
Well, the parameter --system-prompt-file is no longer listed in the help -h text.
However some reasoning models require the system prompt modified, this means the system prompt must be changed for each model in the webui settings.