diff --git a/public/index.html b/public/index.html
index 1a93e0c31..775fd38fc 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1167,7 +1167,7 @@
-
-
+
-
+
-
+
Min Length
@@ -1284,20 +1284,22 @@
-
+
-
- Smoothing Factor
-
-
-
-
-
+
-
+
CFG
diff --git a/public/script.js b/public/script.js
index 9d71f2b81..e319cce64 100644
--- a/public/script.js
+++ b/public/script.js
@@ -4575,6 +4575,7 @@ function parseAndSaveLogprobs(data, continueFrom) {
logprobs = data?.completion_probabilities?.map(x => parseTextgenLogprobs(x.content, [x])) || null;
} break;
case textgen_types.APHRODITE:
+ case textgen_types.MANCER:
case textgen_types.TABBY: {
logprobs = parseTabbyLogprobs(data) || null;
} break;
@@ -4629,7 +4630,7 @@ function extractMultiSwipes(data, type) {
return swipes;
}
- if (main_api === 'openai' || (main_api === 'textgenerationwebui' && textgen_settings.type === textgen_types.APHRODITE)) {
+ if (main_api === 'openai' || (main_api === 'textgenerationwebui' && [MANCER, APHRODITE].includes(textgen_settings.type))) {
if (!Array.isArray(data.choices)) {
return swipes;
}
diff --git a/public/scripts/logprobs.js b/public/scripts/logprobs.js
index 44884b898..2aef6e61b 100644
--- a/public/scripts/logprobs.js
+++ b/public/scripts/logprobs.js
@@ -139,7 +139,7 @@ function renderTopLogprobs() {
const candidates = topLogprobs
.sort(([, logA], [, logB]) => logB - logA)
.map(([text, log]) => {
- if (log < 0) {
+ if (log <= 0) {
const probability = Math.exp(log);
sum += probability;
return [text, probability, log];
diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js
index 7f22d0311..b16b67173 100644
--- a/public/scripts/textgen-settings.js
+++ b/public/scripts/textgen-settings.js
@@ -850,6 +850,7 @@ export function parseTextgenLogprobs(token, logprobs) {
switch (settings.type) {
case TABBY:
case APHRODITE:
+ case MANCER:
case OOBA: {
/** @type {Record[]} */
const topLogprobs = logprobs.top_logprobs;
@@ -971,6 +972,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
'typical_p': settings.typical_p,
'typical': settings.typical_p,
'sampler_seed': settings.seed,
+ 'seed': settings.seed,
'min_p': settings.min_p,
'repetition_penalty': settings.rep_pen,
'frequency_penalty': settings.freq_pen,
@@ -1000,12 +1002,12 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
'skip_special_tokens': settings.skip_special_tokens,
'top_a': settings.top_a,
'tfs': settings.tfs,
- 'epsilon_cutoff': settings.type === OOBA ? settings.epsilon_cutoff : undefined,
- 'eta_cutoff': settings.type === OOBA ? settings.eta_cutoff : undefined,
+ 'epsilon_cutoff': [OOBA, MANCER].includes(settings.type) ? settings.epsilon_cutoff : undefined,
+ 'eta_cutoff': [OOBA, MANCER].includes(settings.type) ? settings.eta_cutoff : undefined,
'mirostat_mode': settings.mirostat_mode,
'mirostat_tau': settings.mirostat_tau,
'mirostat_eta': settings.mirostat_eta,
- 'custom_token_bans': settings.type === textgen_types.APHRODITE ?
+ 'custom_token_bans': [APHRODITE, MANCER].includes(settings.type) ?
toIntArray(getCustomTokenBans()) :
getCustomTokenBans(),
'api_type': settings.type,
@@ -1022,7 +1024,6 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
'penalty_alpha': settings.type === OOBA ? settings.penalty_alpha : undefined,
'temperature_last': (settings.type === OOBA || settings.type === APHRODITE || settings.type == TABBY) ? settings.temperature_last : undefined,
'do_sample': settings.type === OOBA ? settings.do_sample : undefined,
- 'seed': settings.seed,
'guidance_scale': cfgValues?.guidanceScale?.value ?? settings.guidance_scale ?? 1,
'negative_prompt': cfgValues?.negativePrompt ?? substituteParams(settings.negative_prompt) ?? '',
'grammar_string': settings.grammar_string,
@@ -1045,6 +1046,17 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
//'logprobs': settings.log_probs_aphrodite,
//'prompt_logprobs': settings.prompt_log_probs_aphrodite,
};
+
+ if (settings.type === MANCER) {
+ params.n = canMultiSwipe ? settings.n : 1;
+ params.epsilon_cutoff /= 1000;
+ params.eta_cutoff /= 1000;
+ params.dynatemp_mode = params.dynamic_temperature ? 1 : 0;
+ params.dynatemp_min = params.dynatemp_low;
+ params.dynatemp_max = params.dynatemp_high;
+ delete params.dynatemp_low, params.dynatemp_high;
+ }
+
if (settings.type === APHRODITE) {
params = Object.assign(params, aphroditeParams);
} else {