Skip to content

Commit

Permalink
Add Mistral adapter (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nexesenex authored Jul 9, 2024
1 parent 5b5aa30 commit 1e28ac1
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9407,22 +9407,22 @@

switch(sel)
{
case "1": //alpaca
case "1": //Alpaca
st = defaultsettings.instruct_starttag;
et = defaultsettings.instruct_endtag;
systag = "";
break;
case "2": //vicuna
case "2": //Vicuna
st = "\\nUSER: ";
et = "\\nASSISTANT: ";
systag = "";
break;
case "3": //metharme
case "3": //Metharme
st = `<|user|>`;
et = `<|model|>`;
systag = "";
break;
case "4": //llama 2 chat
case "4": //Llama 2 chat
st = "[INST] ";
et = " [/INST]";
systag = "";
Expand All @@ -9447,21 +9447,26 @@
et = "<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>";
systag = "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>";
break;
case "9": //llama 3 chat
case "9": //Llama 3 chat
st = "<|eot_id|><|start_header_id|>user<|end_header_id|>\\n\\n";
et = "<|eot_id|><|start_header_id|>assistant<|end_header_id|>\\n\\n";
systag = "<|start_header_id|>system<|end_header_id|>\\n\\n";
break;
case "10": // Phi-3 Mini
st = "<|end|><|user|>\\n";
et = "<|end|>\\n<|assistant|>";
case "10": //Phi-3 Mini
st = "<|end|><|user|>\\n";
et = "<|end|>\\n<|assistant|>";
systag = "<|system|>\\n";
break;
case "11": // Gemma 2
st = "<end_of_turn>\\n<start_of_turn>user\\n";
et = "<end_of_turn>\\n<start_of_turn>model\\n";
break;
case "11": //Gemma 2
st = "<end_of_turn>\\n<start_of_turn>user\\n";
et = "<end_of_turn>\\n<start_of_turn>model\\n";
systag = "<start_of_turn>user\\n";
break;
break;
case "12": //Mistral
st = "\\n[INST] ";
et = " [/INST]\\n";
systag = "";
break;
default:
break;
}
Expand Down Expand Up @@ -16978,6 +16983,7 @@
<option value="9">Llama 3 Chat</option>
<option value="10">Phi-3</option>
<option value="11">Gemma-2</option>
<option value="12">Mistral</option>
</select>

<table class="settingsmall text-center" style="font-size:9px; border-spacing: 3px 2px; border-collapse: separate;">
Expand Down

0 comments on commit 1e28ac1

Please sign in to comment.