Spaces:
Runtime error
Runtime error
Update run.py
Browse files
run.py
CHANGED
@@ -152,7 +152,7 @@ else:
|
|
152 |
def extend_prompt(message="", history=None, system=None, RAGAddon=None, system2=None, zeichenlimit=None,historylimit=4): #float("Inf")
|
153 |
if zeichenlimit is None: zeichenlimit=1000000000 # :-)
|
154 |
#https://huggingface.co/docs/transformers/main/chat_templating
|
155 |
-
template0="<s>
|
156 |
template1="[INST] {message} [/INST]" # Leerzeichen um Input, keines nach [/INST]
|
157 |
template2=" {response}</s> " # Variante: Antworten folgen unmittelbar, enden ohne Leerzeichen vor </s>
|
158 |
if("discolm_german_7b" in modelPath): #https://huggingface.co/DiscoResearch/DiscoLM_German_7b_v1
|
@@ -160,11 +160,11 @@ def extend_prompt(message="", history=None, system=None, RAGAddon=None, system2=
|
|
160 |
template1="<|im_start|>user\n{message}<|im_end|>\n<|im_start|>assistant\n"
|
161 |
template2="{response}<|im_end|>\n"
|
162 |
if("mixtral-8x7b-instruct" in modelPath): # https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1
|
163 |
-
template0="<s>
|
164 |
template1="[INST] {message} [/INST]"
|
165 |
template2="{response}</s> "
|
166 |
if("Mistral-7B-Instruct" in modelPath): #https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2
|
167 |
-
template0="<s>
|
168 |
template1="[INST] {message} [/INST]"
|
169 |
template2=" {response}</s> "
|
170 |
if("gemma-" in modelPath): # https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1
|
|
|
152 |
def extend_prompt(message="", history=None, system=None, RAGAddon=None, system2=None, zeichenlimit=None,historylimit=4): #float("Inf")
|
153 |
if zeichenlimit is None: zeichenlimit=1000000000 # :-)
|
154 |
#https://huggingface.co/docs/transformers/main/chat_templating
|
155 |
+
template0="<s>[INST] {system} [/INST] Gerne.</s> " # Variante: Antworten unmittelbar. <s> einleitend wird ergänzt, Leerzeichen um Input und nach </s>
|
156 |
template1="[INST] {message} [/INST]" # Leerzeichen um Input, keines nach [/INST]
|
157 |
template2=" {response}</s> " # Variante: Antworten folgen unmittelbar, enden ohne Leerzeichen vor </s>
|
158 |
if("discolm_german_7b" in modelPath): #https://huggingface.co/DiscoResearch/DiscoLM_German_7b_v1
|
|
|
160 |
template1="<|im_start|>user\n{message}<|im_end|>\n<|im_start|>assistant\n"
|
161 |
template2="{response}<|im_end|>\n"
|
162 |
if("mixtral-8x7b-instruct" in modelPath): # https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1
|
163 |
+
template0="<s>[INST] {system} [/INST] Gerne.</s> " # <s>
|
164 |
template1="[INST] {message} [/INST]"
|
165 |
template2="{response}</s> "
|
166 |
if("Mistral-7B-Instruct" in modelPath): #https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2
|
167 |
+
template0="<s>[INST] {system} [/INST] Gerne.</s> " # <s>
|
168 |
template1="[INST] {message} [/INST]"
|
169 |
template2=" {response}</s> "
|
170 |
if("gemma-" in modelPath): # https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1
|