Skip to content

Server: min_p is read as int, so fractional values (e.g. 0.05) become 0 #887

Closed

Description

@LalaDango

In configure_chat_engine_parameters (src/server/rest_handler.cpp, lines 814-816 at tag v1.0.11; same on main as of 2026-10-31):

if (has_value(request, "min_p")) {
    int min_p = request["min_p"];
    auto_chat_engine->set_minp(min_p);
}

set_minp takes a float (src/include/AutoModel/automodel.hpp:509), and the flm run path parses the value with std::stof (src/runner/runner.cpp:600). Because of the int, a usual value such as "min_p": 0.05 is truncated to 0 before it reaches the sampler, so min_p has no effect through the server API. In the same function, temperature and top_p are read as float.

Expected: float min_p = request["min_p"];

Found by reading the source; not checked at runtime.

Activity

  1. tawei-amd commented on Oct 31, 2026

    @tawei-amd
    Collaborator

    Thanks @LalaDango for the clear report. Confirmed by reading the source: int min_p truncates fractional values to 0. Fix is up in #906 (float min_p).

  2. added 2 commits that reference this issue on Nov 3, 2026
    b3538dd
    65a5f64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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