From 4a5d0df92ff7795bf29b8f21067e55baafc2d12f Mon Sep 17 00:00:00 2001
From: DocShotgun <126566557+DocShotgun@users.noreply.github.com>
Date: Tue, 6 May 2025 09:31:55 -0700
Subject: [PATCH] Translate nsigma 0 to -1 to disable for llama.cpp
---
public/index.html | 4 ++--
public/scripts/textgen-settings.js | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/public/index.html b/public/index.html
index 5fae60354..004139eb3 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1313,8 +1313,8 @@
Top nsigma
-
-
+
+
diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js
index cbdfc0a5a..c1813f2e7 100644
--- a/public/scripts/textgen-settings.js
+++ b/public/scripts/textgen-settings.js
@@ -806,7 +806,7 @@ jQuery(function () {
'dry_penalty_last_n_textgenerationwebui': 0,
'xtc_threshold_textgenerationwebui': 0.1,
'xtc_probability_textgenerationwebui': 0,
- 'nsigma_textgenerationwebui': [LLAMACPP].includes(settings.type) ? -0.01 : 0,
+ 'nsigma_textgenerationwebui': 0,
'min_keep_textgenerationwebui': 0,
};
@@ -1335,8 +1335,8 @@ export async function getTextGenGenerationData(finalPrompt, maxTokens, isImperso
'sampler_order': settings.type === textgen_types.KOBOLDCPP ? settings.sampler_order : undefined,
'xtc_threshold': settings.xtc_threshold,
'xtc_probability': settings.xtc_probability,
- 'nsigma': settings.nsigma,
- 'top_n_sigma': settings.nsigma,
+ 'nsigma': [LLAMACPP].includes(settings.type) && settings.nsigma === 0 ? -1 : settings.nsigma,
+ 'top_n_sigma': [LLAMACPP].includes(settings.type) && settings.nsigma === 0 ? -1 : settings.nsigma,
'min_keep': settings.min_keep,
};
const nonAphroditeParams = {