Skip to content

Commit

Permalink
Version 0.7.0: add Llava and Llama 3 prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
synw committed Apr 18, 2024
1 parent d201bbc commit 4e6cab0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
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.6.2",
"version": "0.7.0",
"description": "Prompt templates for language models",
"license": "MIT",
"scripts": {
Expand Down
27 changes: 26 additions & 1 deletion src/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ const templates: Record<string, LmTemplate> = {
},
"afterShot": "\n",
},
"llava": {
"id": "llava",
"name": "Llava",
"user": "USER: {prompt}",
"assistant": "ASSISTANT:",
"linebreaks": {
"user": 1,
},
},
"synthia-cot": {
"id": "synthia-cot",
"name": "Synthia CoT",
Expand Down Expand Up @@ -258,7 +267,23 @@ const templates: Record<string, LmTemplate> = {
"system": {
"schema": "<|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>{system}<|END_OF_TURN_TOKEN|>"
}
}
},
"llama3": {
"id": "llama3",
"name": "Llama 3",
"user": "<|start_header_id|>user<|end_header_id|>\n\n{prompt}<|eot_id|>",
"assistant": "<|start_header_id|>assistant<|end_header_id|>",
"prefix": "<|begin_of_text|>",
"stop": [
"<|end_of_text|>",
"<|eot_id|>",
"!assistant"
],
"afterShot": "<|eot_id|>\n\n",
"system": {
"schema": "<|start_header_id|>system<|end_header_id|>\n\n{system}<|eot_id|>"
}
},
};

export { templates }

0 comments on commit 4e6cab0

Please sign in to comment.