mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-03 11:35:48 +02:00
default trim_stop to true, which trims any tokens after a stop sequence and the stop sequence itself. This is potentially a breaking change.
This commit is contained in:
+2
-2
@@ -976,7 +976,7 @@ def generate(genparams, is_quiet=False, stream_flag=False):
|
||||
grammar = genparams.get('grammar', '')
|
||||
grammar_retain_state = genparams.get('grammar_retain_state', False)
|
||||
genkey = genparams.get('genkey', '')
|
||||
trimstop = genparams.get('trim_stop', False)
|
||||
trimstop = genparams.get('trim_stop', True)
|
||||
quiet = is_quiet
|
||||
dynatemp_range = genparams.get('dynatemp_range', 0.0)
|
||||
dynatemp_exponent = genparams.get('dynatemp_exponent', 1.0)
|
||||
@@ -1723,7 +1723,7 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||
|
||||
if tokenStr!="" or streamDone:
|
||||
sseq = genparams.get('stop_sequence', [])
|
||||
trimstop = genparams.get('trim_stop', False)
|
||||
trimstop = genparams.get('trim_stop', True)
|
||||
if trimstop and not streamDone and string_contains_or_overlaps_sequence_substring(tokenStr,sseq):
|
||||
tokenReserve += tokenStr
|
||||
await asyncio.sleep(async_sleep_short) #if a stop sequence could trigger soon, do not send output
|
||||
|
||||
Reference in New Issue
Block a user