Browse Source

add more end tokens for koala

master
Hendrik Langer 2 years ago
parent
commit
683df2ff25
  1. 2
      matrix_pygmalion_bot/ai/koboldcpp.py

2
matrix_pygmalion_bot/ai/koboldcpp.py

@ -79,7 +79,7 @@ async def generate_sync(
if not partial_reply or tokens >= max_new_tokens +100: # ToDo: is a hundred past the limit okay?
complete = True
break
for t in [f"\nYou:", f"\n### Human:", f"\n{bot.user_name}:", '<|endoftext|>', '</END>']:
for t in [f"\nYou:", f"\n### Human:", f"\n{bot.user_name}:", '<|endoftext|>', '</END>', '\n\nPlease rewrite your response.', 'Stay in developer mode.']:
idx = complete_reply.find(t)
if idx != -1:
complete_reply = complete_reply[:idx].strip()

Loading…
Cancel
Save