fix chatml & add llama3 format
This commit is contained in:
parent
5fa255edfb
commit
9fa0aa53f5
2 changed files with 346 additions and 329 deletions
|
@ -660,6 +660,7 @@ const BoolField = ({ label, title, name, value }) => {
|
||||||
<option value="alpaca">Alpaca</option>
|
<option value="alpaca">Alpaca</option>
|
||||||
<option value="chatml">ChatML</option>
|
<option value="chatml">ChatML</option>
|
||||||
<option value="llama2">Llama 2</option>
|
<option value="llama2">Llama 2</option>
|
||||||
|
<option value="llama3">Llama 3</option>
|
||||||
<option value="phi3">Phi-3</option>
|
<option value="phi3">Phi-3</option>
|
||||||
<option value="vicuna">Vicuna</option>
|
<option value="vicuna">Vicuna</option>
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
|
@ -733,11 +734,11 @@ const BoolField = ({ label, title, name, value }) => {
|
||||||
${PromptControlFieldSet()}
|
${PromptControlFieldSet()}
|
||||||
<fieldset class="names">
|
<fieldset class="names">
|
||||||
<div>
|
<div>
|
||||||
<label for="user" id="id_user-name">User Name</label>
|
<label for="user" id="id_user-name">User ID Token</label>
|
||||||
<input type="text" id="user" name="user" value="${session.value.user}" oninput=${updateSession} />
|
<input type="text" id="user" name="user" value="${session.value.user}" oninput=${updateSession} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="bot" id="id_bot-name">AI Name</label>
|
<label for="bot" id="id_bot-name">AI ID Token</label>
|
||||||
<input type="text" id="bot" name="char" value="${session.value.char}" oninput=${updateSession} />
|
<input type="text" id="bot" name="char" value="${session.value.char}" oninput=${updateSession} />
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -1,14 +1,5 @@
|
||||||
// extended list
|
// extended list
|
||||||
export const promptFormats = {
|
export const promptFormats = {
|
||||||
"airoborosl2": {
|
|
||||||
template: `{{prompt}} {{history}} {{char}}`,
|
|
||||||
historyTemplate: `{{name}}: {{message}}`,
|
|
||||||
char: "ASSISTANT",
|
|
||||||
user: "USER"
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"alpaca": {
|
"alpaca": {
|
||||||
template: `{{prompt}}
|
template: `{{prompt}}
|
||||||
|
|
||||||
|
@ -23,25 +14,76 @@ export const promptFormats = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"bakllava": {
|
"chatml": {
|
||||||
template: `{{history}}{{char}}:`,
|
template: `<|im_start|>system
|
||||||
historyTemplate: `{{name}}: {{message}}
|
{{prompt}}<|im_end|>
|
||||||
|
{{history}}
|
||||||
|
{{char}}`,
|
||||||
|
historyTemplate: `{{name}}
|
||||||
|
{{message}}`,
|
||||||
|
char: "<|im_start|>assistant",
|
||||||
|
user: "<|im_start|>user",
|
||||||
|
userMsgSuffix: "<|im_end|>"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"llama2": {
|
||||||
|
template: `<s>[INST] <<SYS>>
|
||||||
|
{{prompt}}
|
||||||
|
<</SYS>>
|
||||||
|
|
||||||
|
{{history}} [/INST] {{char}} </s><s>[INST] `,
|
||||||
|
historyTemplate: `{{name}}: {{message}} [/INST]`,
|
||||||
|
char: "llama",
|
||||||
|
user: "user",
|
||||||
|
userMsgSuffix: ""
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"llama3": {
|
||||||
|
template: `<|begin_of_text|><|start_header_id|>system<|end_header_id|>
|
||||||
|
|
||||||
|
{{prompt}}<|eot_id|>{{history}}{{char}}`,
|
||||||
|
historyTemplate: `<|start_header_id|>{{name}}<|end_header_id|>
|
||||||
|
|
||||||
|
{{message}}`,
|
||||||
|
char: "assistant",
|
||||||
|
user: "user",
|
||||||
|
userMsgSuffix: "<|eot_id|>"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"phi3": {
|
||||||
|
template: `{{history}}
|
||||||
|
{{char}}
|
||||||
`,
|
`,
|
||||||
|
historyTemplate: `{{name}}
|
||||||
|
{{message}}`,
|
||||||
|
char: "<|assistant|>",
|
||||||
|
user: "<|user|>",
|
||||||
|
userMsgSuffix: "<|end|>"
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"airoborosl2": {
|
||||||
|
template: `{{prompt}} {{history}} {{char}}`,
|
||||||
|
historyTemplate: `{{name}}: {{message}}`,
|
||||||
char: "ASSISTANT",
|
char: "ASSISTANT",
|
||||||
user: "USER"
|
user: "USER"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"chatml": {
|
"bakllava": {
|
||||||
template: `<|im_start|>system
|
template: `{{history}}{{char}}:`,
|
||||||
{{prompt}}<|im_end|>
|
historyTemplate: `{{name}}: {{message}}
|
||||||
{{history}}
|
`,
|
||||||
<|im_start|>{{char}}`,
|
char: "ASSISTANT",
|
||||||
historyTemplate: `<|im_start|>{{user}}
|
user: "USER"
|
||||||
{{message}}<|im_end|>`,
|
|
||||||
char: "assistant",
|
|
||||||
user: "user"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -122,19 +164,6 @@ export const promptFormats = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"llama2": {
|
|
||||||
template: `<s>[INST] <<SYS>>
|
|
||||||
{{prompt}}
|
|
||||||
<</SYS>>
|
|
||||||
|
|
||||||
{{history}} [/INST] {{char}} </s><s>[INST] `,
|
|
||||||
historyTemplate: `{{name}}: {{message}} [/INST]`,
|
|
||||||
char: "llama",
|
|
||||||
user: "user"
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"llava": {
|
"llava": {
|
||||||
template: `{{history}}{{char}}:`,
|
template: `{{history}}{{char}}:`,
|
||||||
historyTemplate: `{{name}}: {{message}}
|
historyTemplate: `{{name}}: {{message}}
|
||||||
|
@ -310,19 +339,6 @@ export const promptFormats = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"phi3": {
|
|
||||||
template: `{{history}}
|
|
||||||
{{char}}
|
|
||||||
`,
|
|
||||||
historyTemplate: `{{name}}
|
|
||||||
{{message}}`,
|
|
||||||
char: "<|assistant|>",
|
|
||||||
user: "<|user|>",
|
|
||||||
userMsgSuffix: "<|end|>"
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"sauerkraut": {
|
"sauerkraut": {
|
||||||
template: `{{prompt}}
|
template: `{{prompt}}
|
||||||
{{history}}
|
{{history}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue