Skip to content

WebUI: shouldn't override server side sampling settings by default #16201

Closed

Description

@notgood

SvelteKit WebUI always overrides server side configured model sampling settings like temperature, top_p, top_k, min_p and many others.

Each model typically recommends it's own temperature and sampling settings, so for example running gpt-oss as suggested in @ggerganov guide #15396
llama-server --temp 1.0 --top-p 1.0 --top-k 0 --min-p 0.001 --model gpt-oss-20b-mxfp4.gguf

Yet with WebUI settings reset to default, following parameters are sent to server:

srv log_server_r: request: {"messages":[{"role":"user","content":"hi"}],"stream":true,"reasoning_format":"auto","temperature":0.8,"max_tokens":-1,"dynatemp_range":0,"dynatemp_exponent":1,"top_k":40,"top_p":0.95,"min_p":0.05,"xtc_probability":0,"xtc_threshold":0.1,"typ_p":1,"repeat_last_n":64,"repeat_penalty":1,"presence_penalty":0,"frequency_penalty":0,"dry_multiplier":0,"dry_base":1.75,"dry_allowed_length":2,"dry_penalty_last_n":-1,"samplers":["top_k","typ_p","top_p","min_p","temperature"],"timings_per_token":true}

After editing WebUI settings and leaving most of the relevant input fields empty, zeroes are sent to server, which probably is a bug.

srv log_server_r: request: {"messages":[{"role":"user","content":"hi"}],"stream":true,"reasoning_format":"auto","temperature":0,"max_tokens":-1,"dynatemp_range":0,"dynatemp_exponent":0,"top_k":0,"top_p":0,"min_p":0,"xtc_probability":0,"xtc_threshold":0,"typ_p":0,"repeat_last_n":0,"repeat_penalty":0,"presence_penalty":0,"frequency_penalty":0,"dry_multiplier":0,"dry_base":0,"dry_allowed_length":0,"dry_penalty_last_n":0,"timings_per_token":true}

Expected default behaviour would be empty relevant fields in WebUI settings and only minimal required params sent to server, thus respecting server-side model configuration.

{"messages":[{"role":"user","content":"hi"}],"stream":true,"timings_per_token":true}

Overriding model settings WebUI side should be concious opt-in decision by user, sending a copy of hardcoded values by default is rather confusing.

Activity

  1. changed the title [-]WebUI: shouldn't override server side sampling defaults[/-] [+]WebUI: shouldn't override server side sampling settings by default[/+] on Sep 23, 2025
  2. openingnow commented on Sep 24, 2025

    @openingnow
    Contributor

    Another option is to include a button that lets users choose whether to skip parameters. #13277 (comment) (from prior webui)

  3. ServeurpersoCom commented on Sep 29, 2025

    @ServeurpersoCom
    Contributor

    OK, now that we can explicitly send 0 when we want to, we also need the ability to send nothing at all if the corresponding UI field is left empty. That's the true OpenAI-Compat behavior: either you override, or you leave it blank.

    Currently, if I clear a sampling parameter; for example, the temperature; the outgoing request looks like this:

    ..."reasoning_format":"auto","temperature":0,"max_tokens":-1,"dynatemp_range":0,"dynatemp_exponent":1,"top_k":40,"top_p":0.95,"min_p":0.05,"xtc_probability":0...

    but it should be:

    ..."reasoning_format":"auto","max_tokens":-1,"dynatemp_range":0,"dynatemp_exponent":1,"top_k":40,"top_p":0.95,"min_p":0.05,"xtc_probability":0...

  4. ServeurpersoCom commented on Sep 29, 2025

    @ServeurpersoCom
    Contributor

    I'm currently testing this commit:
    affee99
    I'll open a PR once I’ve validated it thoroughly.

  5. notgood commented on Oct 9, 2025

    @notgood
    Author

    @ServeurpersoCom thank you, it's a big step in the right direction!

    I've tested these changes, the only problem is a handling of "max_tokens": empty field in GUI is still being sent to server as -1 default.

    log_server_r: request: {"messages":[{"role":"user","content":"hi"}],"stream":true,"reasoning_format":"auto","max_tokens":-1,"timings_per_token":true}

    Rest of the empty sampling-related settings are being ignored, perfect!

  6. ServeurpersoCom commented on Oct 9, 2025

    @ServeurpersoCom
    Contributor

    I've tested these changes, the only problem is a handling of "max_tokens": empty field in GUI is still being sent to server as -1 default.

    log_server_r: request: {"messages":[{"role":"user","content":"hi"}],"stream":true,"reasoning_format":"auto","max_tokens":-1,"timings_per_token":true}

    Rest of the empty sampling-related settings are being ignored, perfect!

    Oh, I missed that one! Thanks for catching it: I'll take a look 👀

  7. ServeurpersoCom commented on Oct 9, 2025

    @ServeurpersoCom
    Contributor

    #16489

    Testing

    max_tokens Empty (let server decide)

    {"messages":[{"role":"user","content":"Salut"}],"stream":true,"model":"Llama-3_3-Nemotron-Super-49B-v1_5","reasoning_format":"auto","temperature":0.8,"dynatemp_range":0,"dynatemp_exponent":1,"top_k":40,"top_p":0.95,"min_p":0.05,"xtc_probability":0,"xtc_threshold":0.1,"typ_p":1,"repeat_last_n":64,"repeat_penalty":1,"presence_penalty":0,"frequency_penalty":0,"dry_multiplier":0,"dry_base":1.75,"dry_allowed_length":2,"dry_penalty_last_n":-1,"samplers":["top_k","typ_p","top_p","min_p","temperature"],"timings_per_token":true}

    max_tokens WebUI Default :

    {"messages":[{"role":"user","content":"Salut"}],"stream":true,"model":"Llama-3_3-Nemotron-Super-49B-v1_5","reasoning_format":"auto","temperature":0.8,"max_tokens":-1,"dynatemp_range":0,"dynatemp_exponent":1,"top_k":40,"top_p":0.95,"min_p":0.05,"xtc_probability":0,"xtc_threshold":0.1,"typ_p":1,"repeat_last_n":64,"repeat_penalty":1,"presence_penalty":0,"frequency_penalty":0,"dry_multiplier":0,"dry_base":1.75,"dry_allowed_length":2,"dry_penalty_last_n":-1,"samplers":["top_k","typ_p","top_p","min_p","temperature"],"timings_per_token":true}

  8. notgood commented on Oct 10, 2025

    @notgood
    Author

    Confirming, with a latest build and max_tokens empty in webui settings, nothing being sent to server

    log_server_r: request: {"messages":[{"role":"user","content":"hi"}],"stream":true,"reasoning_format":"auto","timings_per_token":true}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions