Skip to content

Conversation

@danbev
Copy link
Member

@danbev danbev commented Jan 26, 2026

This commit updates the deprecation warning for multiple model options with a specific message that does not mention comma-separated values as an option.

The motivation for this is that currently it can be confusing if multiple model options are specified with llama-server as this would display the following warning:

DEPRECATED: argument '--model' specified multiple times, use comma-separated values instead (only last value will be used)

But llama-server does not support a comma-separated models option.

With this change the user is informed that multiple models can be supported in router mode if using llama-server:

DEPRECATED: multiple --model options are not supported (only last value will be used). Use router mode for llama-server (see --help)

This commit updates the deprecation warning for multiple model options
with a specific message that does not mention comma-separated values as
an option.

The motivation for this is that currently it can be confusing if
multiple model options are specified with llama-server as this would
display the following warning:
```console
DEPRECATED: argument '--model' specified multiple times, use comma-separated values instead (only last value will be used)
```
But llama-server does not support a comma-separated models option.

With this change the user is informed that multiple models can be
supported in router mode if using llama-server:
```console
DEPRECATED: multiple --model options are not supported (only last value will be used). Use router mode for llama-server (see --help)
```
@danbev danbev requested a review from ggerganov as a code owner January 26, 2026 14:34
@ggerganov ggerganov requested a review from ngxson January 28, 2026 07:18
@ngxson
Copy link
Collaborator

ngxson commented Jan 28, 2026

Unless I missed something, we never support multiple -m, so using the word "deprecated" here make one thinks that it used to be, but now no longer supported

@danbev
Copy link
Member Author

danbev commented Jan 28, 2026

Unless I missed something, we never support multiple -m, so using the word "deprecated" here make one thinks that it used to be, but now no longer supported

Yeah good point, and I was not sure about using "deprecated" here but thought I'd perhaps it was supported at some point that I was not aware of. Let me know and I'll change this to something else, perhaps just Warning or WARNING.

@ngxson
Copy link
Collaborator

ngxson commented Jan 28, 2026

But to start, in which case people may specify multiple -m?

I personally believe that multiple -m has never been an expected behavior since the beginning of this project, so it makes more sense to just throw an error instead.

@danbev
Copy link
Member Author

danbev commented Jan 28, 2026

But to start, in which case people may specify multiple -m?

This was suggested to me by an AI actually (can't recall which model) which is why I looked into this as I did not think this was supported.

so it makes more sense to just throw an error instead.

I agree, and if that is alright to do that here it would be preferred.

@ngxson
Copy link
Collaborator

ngxson commented Jan 28, 2026

This was suggested to me by an AI actually (can't recall which model) which is why I looked into this as I did not think this was supported.

In such case, I think there is no need to change anything at all.

If something need to changed, I expect to throw an error on any args that are not supposed to have multiple values. We have plenty of them: -c, -n, --temp, --top-k, -ngl, ...

This commit updates the argument parsing to check for valid multiple
value options, for example using --file --file with llama-completions is
something that is supported and this is the case for a few other options
as well. But for the majority of options specifying them multiple times
is not supported and this will now thow an error.

For example using multiple --model options will now result in an error:
```console
$ llama-completion -m models/Qwen2.5-0.5B-Instruct.gguf --model models/Qwen2.5-0.5B-Instruct.gguf
error: argument '--model' cannot be specified multiple times
```
But using multiple --file options will only result in a warning:
```console
$ llama-completion -m models/Qwen2.5-0.5B-Instruct.gguf -f test_file.txt -f test_file.txt
DEPRECATED: argument '-f' specified multiple times, use comma-separated values instead (only last value will be used)
...
```
@danbev
Copy link
Member Author

danbev commented Jan 29, 2026

In such case, I think there is no need to change anything at all.

I actually think this is a reason to change this as it might be suggested to users, and it is somewhat confusing as it is right now.

But I agree that throwing an error for all the options that don't actually support being specified multiple times would be nicer. I'll add a commit with a suggestion for this:

For example, using multiple --model options would result in an error:

$ llama-completion -m models/Qwen2.5-0.5B-Instruct.gguf --model models/Qwen2.5-0.5B-Instruct.gguf
error: argument '--model' cannot be specified multiple times

But using multiple --file options would only result in a warning (like it currently does):

$ llama-completion -m models/Qwen2.5-0.5B-Instruct.gguf -f test_file.txt -f test_file.txt
DEPRECATED: argument '-f' specified multiple times, use comma-separated values instead (only last value will be used)
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants