"fair_dev/testing/testing.py" did not exist on "c9fdf50602c6e46413770ff0575f52cff27c6d7d"
Commit 93e0ffc9 authored by Bruce MacDonald's avatar Bruce MacDonald
Browse files

move prompts to json file

parent 0fc80e0f
{
"alpaca": "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:\n\n",
"oasst": "{prompt}",
"vicuna": "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n\nUSER: {prompt}\nASSISTANT:",
"hermes": "### Instruction:\n{prompt}\n\n### Response:\n",
"gpt4": "### Instruction:\n{prompt}\n\n### Response:\n",
"qlora": "### Human: {prompt}\n### Assistant:",
"tulu": "\n{prompt}\n\n(include newline)",
"wizardlm-7b": "{prompt}\n\n### Response:",
"wizardlm-13b": "{prompt}\n\n### Response:",
"wizardlm-30b": "{prompt}\n\n### Response:"
}
\ No newline at end of file
from difflib import SequenceMatcher
import json
model_prompts = {
"alpaca": """Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
{prompt}
### Response:
""",
"oasst": "<|prompter|>{prompt}<|endoftext|><|assistant|>",
"vicuna": """A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
USER: {prompt}
ASSISTANT:""",
"hermes": """### Instruction:
{prompt}
### Response:
""",
"gpt4": """### Instruction:
{prompt}
### Response:
""",
"qlora": """### Human: {prompt}
### Assistant:""",
"tulu": """<|user|>
{prompt}
<|assistant|>
(include newline)""",
"wizardlm-7b": """{prompt}
### Response:""",
"wizardlm-13b": """{prompt}
### Response:""",
"wizardlm-30b": """{prompt}
### Response:""",
}
with open("model_prompts.json", "r") as f:
model_prompts = json.load(f)
def template(model, prompt):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment