Skip to content

Misc. bug: Web-Frontend overrides sampling parameters from models preset in router mode #18129

Closed

Description

@rtpt-erikgeiser

Name and Version

$ llama-server --version
[...]
version: 7435 (79dbae034)
built with GNU 14.2.0 for Linux x86_64

Operating systems

Linux

Which llama.cpp modules do you know to be affected?

llama-server

Command line

llama-server --host 127.0.0.1 --port 8000 --jinja --prio 2 --no-mmap --threads -1 -np 3 -fa on --models-preset models.ini

With the following models.ini:


version = 1

[Qwen3-Next-80B-A3A-Thinking-Q4KXL]
model = /path/to/Qwen3-Next-80B-A3B-Thinking-UD-Q4_K_XL.gguf
c = 86016
temp = 0.6
top-p = 0.95
min-p = 0
top-k = 20
cpu-moe = true
presence-penalty = 1.0

[GPT-OSS-20B-F16]
model = /path/to/gpt-oss-20b-F16.gguf
c = 98304
temp = 1.0
top-p = 1.00
min-p = 0
top-k = 100

Problem description & steps to reproduce

I'm running llama-server in router mode with a model preset file containing the recommended sampling parameters for each model. However, the web frontend has different default sampling parameters that are not updated when I switch to a model. While the model's process does use the sampling parameters (as arguments) configured in the preset file, they get overwritten by the web frontend's default sampling parameters in the corresponding /v1/chat/completions request. Clicking "Reset to default" in the web frontend's sampling parameter settings also does not apply the current model's sampling parameters.

The request to /v1/chat/completions sends the following sampling parameters:

temperature: 0.8
top-k: 40
top-p: 0.95
min-p: 0.05

First Bad Commit

This is the first time that I use the model preset feature, so I assume it always behaved like this since the feature was just merged.

Activity

  1. ServeurpersoCom commented on Dec 18, 2025

    @ServeurpersoCom
    Contributor

    Thanks for the issue. Currently we can clean the parameters in the webui. Empty = not sent in the request, following this issue: #16201 / #16330 which works around the problem.
    However, this issue is right to exist, because it should be the default behavior for new UI visitors!

    • Either we clear the sampling parameters in the UI by default, easier and architecturally closer, but webui can override server config with bad remembered user settings
    • Or we purely and simply ignore them when defined server-side (harder to do, but better behavior for users)
  2. rtpt-erikgeiser commented on Dec 18, 2025

    @rtpt-erikgeiser
    Author

    I think it is would be great if a served model works as intended (and optimized) by whoever hosts it, which means that the parameters from the arguments should be the default.

    I also think that it is nice that users can experiment with sampling parameters and override them if they explicitly want to do so. However, I think that the sampling parameters should still be tied to the selected model. For example, custom sampling parameter should be cleared again when the model is changed (and maybe also restored again from local storage when the original model whose sampling parameters were explicitly changed is selected again, but that requires a bit more work of course).

  3. ServeurpersoCom commented on Dec 18, 2025

    @ServeurpersoCom
    Contributor

    I agree that server presets should be the default. That's the whole point of router mode with model presets.
    For the implementation, I think the sanest approach is:

    WebUI sampling parameters empty by default, no override, server is the source of truth
    User sampling parameter overrides saved per model in browser local storage

    This way, server presets work out of the box, and users who explicitly want to experiment with specific models keep their settings without polluting other models. Best of both worlds.

    Same behavior / compatibility with API use cases (default server if not specified, but override possible)

  4. allozaur commented on Dec 18, 2025

    @allozaur
    Contributor
    • Either we clear the sampling parameters in the UI by default, easier and architecturally closer, but webui can override server config with bad remembered user settings

    Yes, we discussed this yesterday with @ngxson and having empty fields in the WebUI that just have the preset-based values in the placeholders is probably the way to go here.

  5. removed their assignment
    on Dec 19, 2025
  6. ZUIcat commented on Dec 28, 2025

    @ZUIcat

    It looks like #18226 fixes this issue. Once it's merged, I feel like the WebUI will be almost perfect.

  7. rtpt-erikgeiser commented on Feb 9, 2026

    @rtpt-erikgeiser
    Author

    This issue has been marked stale but it is very much still present on the current tip of the master branch. From my point of view, it looks like others also have confirmed this, so I guess it could also be re-labeled.

  8. ServeurpersoCom commented on Feb 9, 2026

    @ServeurpersoCom
    Contributor

    Yes managing default settings takes priority after the MCP client merge (large refactor)

  9. ServeurpersoCom commented on Mar 11, 2026

    @ServeurpersoCom
    Contributor

    Now we can continue with this one. I think we need to reboot a #18226 or something similar, because it's obsolete with all the refactorings.

  10. allozaur commented on Mar 14, 2026

    @allozaur
    Contributor

    Now we can continue with this one. I think we need to reboot a #18226 or something similar, because it's obsolete with all the refactorings.

    I'd love you to lead this one @ServeurpersoCom as u also have a great testing infra for multi-model routing, .ini configurations and more. Let's collaborate closely on this one :)

  11. ServeurpersoCom commented on Mar 14, 2026

    @ServeurpersoCom
    Contributor

    I'm working on it… We'll rework the part that colors the different overloaded fields later!

    One of them works here. This is necessary for all overloaded settings. :
    Image
    The code for the "Custom" labels was already there and works again for sampling in the PR

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions