From 51107a0b6329994c720aadf1200b59f1e3e04d72 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 27 Nov 2025 09:18:43 +0100 Subject: [PATCH] sampling : fix temperature check to allow zero temperature This commit modifies the temperature sampling check to allow a temperature value of zero. Previously, the check only allowed positive temperature values, which excluded the valid case of zero temperature. The motivation for this is to enable a zero temperature setting which is also currently causing the following test to fail: ```console (venv) $ cd tools/server/tests (venv) $ ./tests.sh unit/test_basic.py::test_load_split_model ``` --- common/sampling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/sampling.cpp b/common/sampling.cpp index 9f1ce46680..2dea7aec17 100644 --- a/common/sampling.cpp +++ b/common/sampling.cpp @@ -207,7 +207,7 @@ static bool is_sampler_enabled(enum common_sampler_type type, const struct commo } break; case COMMON_SAMPLER_TYPE_TEMPERATURE: - if (params.temp <= 0.0f) { + if (params.temp < 0.0f) { return false; } break;