Skip to content

Feature Request: server in Router Mode: Multiple presets for the same model (loaded once) #23704

Description

@rtpt-erikgeiser

Prerequisites

  • I am running the latest code. Mention the version if possible as well.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new and useful enhancement to share.

Feature Description

It would be great if we could have multiple presets in router that reference the same model as in the same model process where the model is only loaded once. Of course, that does not work for all settings but it would be specifically useful to be able to offer a reasoning and a non-reasoning version with different sampling parameters for a single model that is only loaded once. This means the router would only have to override request parameters when forwarding the request to a model runner process.

There is already an issue to implement such presets in the web UI (#22523), but I think it would be better to add them to the server/router so that other apps and harnesses can utilize them, because many harnesses do not allow overriding request parameters.

Motivation

Most users are likely constrained by RAM, and being able to offer a reasoning and a non-reasoning model (for apps that don't support request parameter overrides) without having to load the same model twice would be great. Also being able to offer multiple appropriately named presets with different sampling parameters (e.g. for coding vs creative writing) would make for a good user experience.

Possible Implementation

The config could look like this:

[Qwen3.6-35B-A3B-Instruct]
model = /path/to/Qwen3.6-35B-A3B-UD-Q6_K_XL.gguf
ctx-size = 1048576
parallel = 4
mmproj = /path/to/mmproj-F16.gguf
load-on-startup = on
temp = 0.7
top-p = 0.8
min-p = 0
top-k = 20
presence-penalty = 1.5
repeat-penalty = 1.0
reasoning = off

[Qwen3.6-35B-A3B-Thinking]
template = Qwen3.6-35B-A3B-Instruct  # <- reference the original preset
# override parameters of the original preset:
temp = 0.6
top-p = 0.95
min-p = 0
top-k = 20
presence-penalty = 0.0
repeat-penalty = 1.0
reasoning = on
chat-template-kwargs = {"preserve_thinking": true}
# parallel = 2 <- this would not work

Without having looked into the current implementation and as far as I understand the current router mode, it could be possible to check if the requested model is based on a template and then forward the request to the preset configured in template while overriding the specified parameters (unless the user already overrode them in the request).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions