mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 00:46:38 +01:00
Limit NAI stop sequences count
This commit is contained in:
parent
c4462cc8bb
commit
e6d5b5a8a1
@ -516,8 +516,9 @@ export function getNovelGenerationData(finalPrompt, settings, maxLength, isImper
|
||||
stoppingStrings.push(...additionalStopStrings);
|
||||
}
|
||||
|
||||
const MAX_STOP_SEQUENCES = 1024;
|
||||
const stopSequences = (tokenizerType !== tokenizers.NONE)
|
||||
? stoppingStrings.map(t => getTextTokens(tokenizerType, t))
|
||||
? stoppingStrings.slice(0, MAX_STOP_SEQUENCES).map(t => getTextTokens(tokenizerType, t))
|
||||
: undefined;
|
||||
|
||||
const badWordIds = (tokenizerType !== tokenizers.NONE)
|
||||
|
Loading…
Reference in New Issue
Block a user