Force your name to be "You" for pygmalion (properly)
This commit is contained in:
parent
7bd2ae05bf
commit
405dfbf57c
1 changed files with 3 additions and 3 deletions
|
|
@ -505,9 +505,6 @@ def clean_chat_message(text):
|
||||||
return text
|
return text
|
||||||
|
|
||||||
def generate_chat_prompt(text, tokens, name1, name2, context, chat_prompt_size, impersonate=False):
|
def generate_chat_prompt(text, tokens, name1, name2, context, chat_prompt_size, impersonate=False):
|
||||||
if 'pygmalion' in model_name.lower():
|
|
||||||
name1 = "You"
|
|
||||||
|
|
||||||
text = clean_chat_message(text)
|
text = clean_chat_message(text)
|
||||||
rows = [f"{context.strip()}\n"]
|
rows = [f"{context.strip()}\n"]
|
||||||
i = len(history['internal'])-1
|
i = len(history['internal'])-1
|
||||||
|
|
@ -576,6 +573,9 @@ def generate_chat_picture(picture, name1, name2):
|
||||||
return text, visible_text
|
return text, visible_text
|
||||||
|
|
||||||
def chatbot_wrapper(text, tokens, do_sample, max_new_tokens, temperature, top_p, typical_p, repetition_penalty, top_k, min_length, no_repeat_ngram_size, num_beams, penalty_alpha, length_penalty, early_stopping, name1, name2, context, check, chat_prompt_size, picture=None):
|
def chatbot_wrapper(text, tokens, do_sample, max_new_tokens, temperature, top_p, typical_p, repetition_penalty, top_k, min_length, no_repeat_ngram_size, num_beams, penalty_alpha, length_penalty, early_stopping, name1, name2, context, check, chat_prompt_size, picture=None):
|
||||||
|
if 'pygmalion' in model_name.lower():
|
||||||
|
name1 = "You"
|
||||||
|
|
||||||
if args.picture and picture is not None:
|
if args.picture and picture is not None:
|
||||||
text, visible_text = generate_chat_picture(picture, name1, name2)
|
text, visible_text = generate_chat_picture(picture, name1, name2)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue