mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
llamacpp broke
This commit is contained in:
@ -373,7 +373,7 @@ function getCustomTokenBans() {
|
|||||||
} else if (line.startsWith('"') && line.endsWith('"')) {
|
} else if (line.startsWith('"') && line.endsWith('"')) {
|
||||||
// Remove the enclosing quotes
|
// Remove the enclosing quotes
|
||||||
|
|
||||||
banned_strings.push(line.slice(1, -1))
|
banned_strings.push(line.slice(1, -1));
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const tokens = getTextTokens(tokenizer, line);
|
const tokens = getTextTokens(tokenizer, line);
|
||||||
@ -1137,7 +1137,7 @@ export function getTextGenGenerationData(finalPrompt, maxTokens, isImpersonate,
|
|||||||
const logitBiasArray = (params.logit_bias && typeof params.logit_bias === 'object' && Object.keys(params.logit_bias).length > 0)
|
const logitBiasArray = (params.logit_bias && typeof params.logit_bias === 'object' && Object.keys(params.logit_bias).length > 0)
|
||||||
? Object.entries(params.logit_bias).map(([key, value]) => [Number(key), value])
|
? Object.entries(params.logit_bias).map(([key, value]) => [Number(key), value])
|
||||||
: [];
|
: [];
|
||||||
const tokenBans = toIntArray(getCustomTokenBans());
|
const tokenBans = toIntArray(banned_tokens);
|
||||||
logitBiasArray.push(...tokenBans.map(x => [Number(x), false]));
|
logitBiasArray.push(...tokenBans.map(x => [Number(x), false]));
|
||||||
const llamaCppParams = {
|
const llamaCppParams = {
|
||||||
'logit_bias': logitBiasArray,
|
'logit_bias': logitBiasArray,
|
||||||
|
Reference in New Issue
Block a user