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

Closed Beginner friendly
#887 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@zaneni6 is already working on this.

Since Oct 30, 2026.

  • #906 by @tawei-amd — merged

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
api, backend

Research direction

In src/server/rest_handler.cpp, inspect configure_chat_engine_parameters around the min_p handling and compare it with the temperature and top_p parsing nearby. The issue identifies the expected type change and notes that set_minp accepts a float; verify the server API preserves a value such as 0.05, then check whether an existing test covers this request parameter.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C++
Stars
2k
Forks
170
Avg merge
16h 2m
Merged PRs (30d)
102

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ROCm/FastFlowLM

All issues in ROCm/FastFlowLM

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.