mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
LLaVA fixes
This commit is contained in:
parent
9c2e7c0fab
commit
d87ca8f2af
@ -205,11 +205,11 @@ def custom_generate_chat_prompt(user_input, state, **kwargs):
|
|||||||
if _continue and i == len(shared.history['internal']) - 1:
|
if _continue and i == len(shared.history['internal']) - 1:
|
||||||
rows.insert(1, f"{prefix2}{shared.history['internal'][i][1]}")
|
rows.insert(1, f"{prefix2}{shared.history['internal'][i][1]}")
|
||||||
else:
|
else:
|
||||||
rows.insert(1, f"{prefix2}{shared.history['internal'][i][1].strip()}{state['end_of_turn']}\n")
|
rows.insert(1, f"{prefix2}{shared.history['internal'][i][1].strip()}\n")
|
||||||
|
|
||||||
string = shared.history['internal'][i][0]
|
string = shared.history['internal'][i][0]
|
||||||
if string != '':
|
if string != '':
|
||||||
rows.insert(1, f"{prefix1}{string.strip()}{state['end_of_turn']}\n")
|
rows.insert(1, f"{prefix1}{string.strip()}\n")
|
||||||
|
|
||||||
i -= 1
|
i -= 1
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ def custom_generate_chat_prompt(user_input, state, **kwargs):
|
|||||||
elif not _continue:
|
elif not _continue:
|
||||||
# Adding the user message
|
# Adding the user message
|
||||||
if len(user_input) > 0:
|
if len(user_input) > 0:
|
||||||
rows.append(f"{prefix1}{user_input}{state['end_of_turn']}\n")
|
rows.append(f"{prefix1}{user_input}\n")
|
||||||
|
|
||||||
# Adding the Character prefix
|
# Adding the Character prefix
|
||||||
rows.append(apply_extensions("bot_prefix", f"{prefix2}"))
|
rows.append(apply_extensions("bot_prefix", f"{prefix2}"))
|
||||||
|
@ -52,6 +52,7 @@ llama-[0-9]*b-4bit$:
|
|||||||
mode: 'instruct'
|
mode: 'instruct'
|
||||||
model_type: 'llama'
|
model_type: 'llama'
|
||||||
instruction_template: 'LLaVA'
|
instruction_template: 'LLaVA'
|
||||||
|
custom_stopping_strings: '"\n###"'
|
||||||
.*raven:
|
.*raven:
|
||||||
mode: 'instruct'
|
mode: 'instruct'
|
||||||
instruction_template: 'RWKV-Raven'
|
instruction_template: 'RWKV-Raven'
|
||||||
|
Loading…
Reference in New Issue
Block a user