From 8a3d8664012f1add9a486a9638ffe7fd5456faca Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 4 Mar 2026 06:10:51 -0800 Subject: [PATCH] Fix temperature_last having no effect in llama.cpp server sampler order --- modules/llama_cpp_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/llama_cpp_server.py b/modules/llama_cpp_server.py index eb59baf9..baf474bd 100644 --- a/modules/llama_cpp_server.py +++ b/modules/llama_cpp_server.py @@ -119,9 +119,9 @@ class LlamaServer: penalty_found = True # Move temperature to the end if temperature_last is true and temperature exists in the list - if state["temperature_last"] and "temperature" in samplers: - samplers.remove("temperature") - samplers.append("temperature") + if state["temperature_last"] and "temperature" in filtered_samplers: + filtered_samplers.remove("temperature") + filtered_samplers.append("temperature") payload["samplers"] = filtered_samplers