mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-19 17:24:57 +02:00
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 ```
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user