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