Skip to content

Commit

Permalink
Add the mistral system template
Browse files Browse the repository at this point in the history
  • Loading branch information
synw committed Jan 31, 2025
1 parent cce6463 commit 0fac341
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 95 deletions.
51 changes: 10 additions & 41 deletions codegen/db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@ alpaca:
linebreaks:
system: 2
user: 2
cerebrum:
id: cerebrum
name: Cerebrum
system:
schema: "{system}"
message: "A chat between a user and a thinking artificial intelligence assistant. The assistant describes its thought process and gives helpful and detailed answers to the user's questions."
user: "User: {prompt}"
assistant: "Ai:"
linebreaks:
user: 1
prefix: "<s>"
stop:
- "</s>"
chatml:
id: "chatml"
name: "ChatMl"
Expand Down Expand Up @@ -110,13 +97,6 @@ gemma:
stop:
- "<end_of_turn>"
afterShot: "\n"
guanaco:
id: guanaco
name: Guanaco
user: "### Human: {prompt}"
assistant: "### Assistant:"
linebreaks:
user: 1
human_response:
id: human_response
name: Human response
Expand Down Expand Up @@ -175,6 +155,16 @@ mistral:
stop:
- "</s>"
afterShot: "\n"
mistral-system:
id: mistral-system
name: Mistral system
user: "[INST]{prompt}"
assistant: "[/INST]"
system:
schema: "[SYSTEM_PROMPT]{system_prompt}[/SYSTEM_PROMPT]"
stop:
- "</s>"
afterShot: "\n"
nemotron:
id: nemotron
name: Nemotron
Expand Down Expand Up @@ -237,16 +227,6 @@ orca:
linebreaks:
system: 2
user: 2
phi:
id: phi
name: Phi
user: "Instruct: {prompt}"
assistant: "Output:"
linebreaks:
user: 1
stop:
- "</s>"
- "Instruct:"
phi3:
id: phi3
name: Phi 3
Expand All @@ -269,17 +249,6 @@ phi4:
- "<|im_end|>"
- "<|im_sep|>"
afterShot: "<|im_end|>\n"
synthia-cot:
id: synthia-cot
name: Synthia CoT
system:
schema: "SYSTEM: {system}"
message: "Elaborate on the topic using a Tree of Thoughts and backtrack when necessary to construct a clear, cohesive Chain of Thought reasoning. Always answer without hesitation."
user: "USER: {prompt}"
assistant: "ASSISTANT:"
linebreaks:
system: 1
user: 1
vicuna:
id: vicuna
name: Vicuna
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modprompt",
"version": "0.9.4",
"version": "0.9.5",
"description": "Prompt templates for language models",
"license": "MIT",
"scripts": {
Expand Down
66 changes: 13 additions & 53 deletions src/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,6 @@ const templates: Record<string, LmTemplate> = {
},
"user": "### Instruction:\n{prompt}"
},
"cerebrum": {
"assistant": "Ai:",
"id": "cerebrum",
"linebreaks": {
"user": 1
},
"name": "Cerebrum",
"prefix": "<s>",
"stop": [
"</s>"
],
"system": {
"message": "A chat between a user and a thinking artificial intelligence assistant. The assistant describes its thought process and gives helpful and detailed answers to the user's questions.",
"schema": "{system}"
},
"user": "User: {prompt}"
},
"chatml": {
"afterShot": " <|im_end|>\n",
"assistant": "<|im_start|>assistant",
Expand Down Expand Up @@ -148,15 +131,6 @@ const templates: Record<string, LmTemplate> = {
],
"user": "<start_of_turn>user\n{prompt}"
},
"guanaco": {
"assistant": "### Assistant:",
"id": "guanaco",
"linebreaks": {
"user": 1
},
"name": "Guanaco",
"user": "### Human: {prompt}"
},
"human_response": {
"assistant": "### RESPONSE:",
"id": "human_response",
Expand Down Expand Up @@ -230,6 +204,19 @@ const templates: Record<string, LmTemplate> = {
],
"user": "[INST] {prompt}"
},
"mistral-system": {
"afterShot": "\n",
"assistant": "[/INST]",
"id": "mistral-system",
"name": "Mistral system",
"stop": [
"</s>"
],
"system": {
"schema": "[SYSTEM_PROMPT]{system_prompt}[/SYSTEM_PROMPT]"
},
"user": "[INST]{prompt}"
},
"nemotron": {
"afterShot": "\n\n",
"assistant": "<extra_id_1>Assistant",
Expand Down Expand Up @@ -309,19 +296,6 @@ const templates: Record<string, LmTemplate> = {
},
"user": "### User:\n{prompt}"
},
"phi": {
"assistant": "Output:",
"id": "phi",
"linebreaks": {
"user": 1
},
"name": "Phi",
"stop": [
"</s>",
"Instruct:"
],
"user": "Instruct: {prompt}"
},
"phi3": {
"afterShot": "<|end|>\n",
"assistant": "<|assistant|>",
Expand Down Expand Up @@ -350,20 +324,6 @@ const templates: Record<string, LmTemplate> = {
},
"user": "<|im_start|>user<|im_sep|>{prompt}<|im_end|>"
},
"synthia-cot": {
"assistant": "ASSISTANT:",
"id": "synthia-cot",
"linebreaks": {
"system": 1,
"user": 1
},
"name": "Synthia CoT",
"system": {
"message": "Elaborate on the topic using a Tree of Thoughts and backtrack when necessary to construct a clear, cohesive Chain of Thought reasoning. Always answer without hesitation.",
"schema": "SYSTEM: {system}"
},
"user": "USER: {prompt}"
},
"vicuna": {
"assistant": "### ASSISTANT:",
"id": "vicuna",
Expand Down

0 comments on commit 0fac341

Please sign in to comment.