From 5ce013cd7e9cd3397150795c57ac477758691fcb Mon Sep 17 00:00:00 2001 From: Galunid Date: Tue, 31 Mar 2026 09:14:01 +0200 Subject: [PATCH] common : Disable backend sampling if reasoning budget is enabled (#21209) --- common/sampling.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/sampling.cpp b/common/sampling.cpp index 5259c5f3c6..2f60be1943 100644 --- a/common/sampling.cpp +++ b/common/sampling.cpp @@ -383,6 +383,12 @@ struct common_sampler * common_sampler_init(const struct llama_model * model, st params.backend_sampling = false; } + if (rbudget && params.backend_sampling) { + LOG_WRN("%s: backend sampling is not compatible with reasoning budget, disabling\n", __func__); + + params.backend_sampling = false; + } + auto * result = new common_sampler { /* .params = */ params, /* .grmr = */ grmr,