Spaces:
Running
Running
Update run.py
Browse files
run.py
CHANGED
@@ -24,8 +24,8 @@ from huggingface_hub import InferenceClient #multimodal_response
|
|
24 |
# Specify models for text generation and embeddings
|
25 |
#---------------------------------------------------
|
26 |
|
27 |
-
|
28 |
-
myModel="princeton-nlp/gemma-2-9b-it-SimPO"
|
29 |
#mod="mistralai/Mixtral-8x7b-instruct-v0.1"
|
30 |
#tok=AutoTokenizer.from_pretrained(mod) #,token="hf_...")
|
31 |
#cha=[{"role":"system","content":"A"},{"role":"user","content":"B"},{"role":"assistant","content":"C"}]
|
@@ -82,8 +82,8 @@ def format_prompt0(message, history):
|
|
82 |
#-------------------------------------------------------------------------
|
83 |
|
84 |
def format_prompt(message, history=None, system=None, RAGAddon=None, system2=None, zeichenlimit=None,historylimit=4, removeHTML=False,
|
85 |
-
startOfString="",template0="<start_of_turn>user\n{system}<end_of_turn>\n<start_of_turn>model\n<end_of_turn>\n",template1="<start_of_turn>user\n{message}<end_of_turn>\n<start_of_turn>model\n",template2="<end_of_turn>\n"):
|
86 |
-
|
87 |
if zeichenlimit is None: zeichenlimit=1000000000 # :-)
|
88 |
prompt = ""
|
89 |
if RAGAddon is not None:
|
|
|
24 |
# Specify models for text generation and embeddings
|
25 |
#---------------------------------------------------
|
26 |
|
27 |
+
myModel="mistralai/Mixtral-8x7b-instruct-v0.1"
|
28 |
+
#myModel="princeton-nlp/gemma-2-9b-it-SimPO"
|
29 |
#mod="mistralai/Mixtral-8x7b-instruct-v0.1"
|
30 |
#tok=AutoTokenizer.from_pretrained(mod) #,token="hf_...")
|
31 |
#cha=[{"role":"system","content":"A"},{"role":"user","content":"B"},{"role":"assistant","content":"C"}]
|
|
|
82 |
#-------------------------------------------------------------------------
|
83 |
|
84 |
def format_prompt(message, history=None, system=None, RAGAddon=None, system2=None, zeichenlimit=None,historylimit=4, removeHTML=False,
|
85 |
+
#startOfString="",template0="<start_of_turn>user\n{system}<end_of_turn>\n<start_of_turn>model\n<end_of_turn>\n",template1="<start_of_turn>user\n{message}<end_of_turn>\n<start_of_turn>model\n",template2="<end_of_turn>\n"):
|
86 |
+
startOfString="<s>", template0=" [INST] {system} [/INST] </s>",template1=" [INST] {message} [/INST]",template2=" {response}</s>"):
|
87 |
if zeichenlimit is None: zeichenlimit=1000000000 # :-)
|
88 |
prompt = ""
|
89 |
if RAGAddon is not None:
|