From 814f754451b3219b5d196b6f018de999285c7651 Mon Sep 17 00:00:00 2001 From: Carl Kenner Date: Wed, 10 May 2023 09:07:31 +0930 Subject: [PATCH] Support for MPT, INCITE, WizardLM, StableLM, Galactica, Vicuna, Guanaco, and Baize instruction following (#1596) --- README.md | 2 +- characters/instruction-following/Baize.yaml | 4 + .../instruction-following/Galactica Cite.yaml | 4 + .../Galactica Finetuned.yaml | 4 + .../instruction-following/Galactica Q.yaml | 4 + .../Galactica Summary.yaml | 4 + .../instruction-following/Galactica Work.yaml | 4 + .../instruction-following/Galactica v2.yaml | 4 + .../instruction-following/Galactica.yaml | 4 + .../Guanaco non-chat.yaml | 4 + .../instruction-following/INCITE-Chat.yaml | 4 + .../INCITE-Instruct.yaml | 4 + .../instruction-following/MPT-Chat.yaml | 10 ++ .../instruction-following/StableLM.yaml | 9 ++ .../instruction-following/StableVicuna.yaml | 4 + .../instruction-following/Vicuna-v0.yaml | 2 +- .../instruction-following/Vicuna-v1.1.yaml | 4 + .../instruction-following/Vicuna-v1.yaml | 4 - .../instruction-following/WizardLM.yaml | 4 + models/config.yaml | 96 ++++++++++++++++--- modules/GPTQ_loader.py | 8 +- modules/shared.py | 23 ++++- presets/StableLM-HuggingFace Chat.txt | 14 +++ presets/StableLM-Jupyter Notebook.txt | 14 +++ presets/StableLM-ReadMe Snippet.txt | 14 +++ prompts/Baize.txt | 5 + prompts/Dolly-with-Input.txt | 9 ++ prompts/Galactica Cite.txt | 1 + prompts/Galactica Convert.txt | 9 ++ prompts/Galactica Doc.txt | 1 + prompts/Galactica Finetuned.txt | 1 + prompts/Galactica Paper.txt | 1 + prompts/Galactica Q.txt | 3 + prompts/Galactica Summary.txt | 3 + prompts/Galactica Work.txt | 3 + prompts/Galactica v2.txt | 1 + prompts/Galactica.txt | 3 + prompts/Guanaco-Chat.txt | 7 ++ prompts/Guanaco-System.txt | 8 ++ prompts/Guanaco-non-chat.txt | 4 + prompts/Guanaco-with-Input.txt | 7 ++ prompts/INCITE-Chat.txt | 2 + prompts/INCITE-Instruct.txt | 2 + prompts/Koala.txt | 1 + prompts/MPT-Chat.txt | 11 +++ prompts/StableLM.txt | 7 ++ prompts/StableVicuna.txt | 4 + prompts/Vicuna v0.txt | 4 + prompts/Vicuna v1.1.txt | 4 + prompts/WizardLM.txt | 3 + settings-template.json | 24 ++++- 51 files changed, 352 insertions(+), 28 deletions(-) create mode 100644 characters/instruction-following/Baize.yaml create mode 100644 characters/instruction-following/Galactica Cite.yaml create mode 100644 characters/instruction-following/Galactica Finetuned.yaml create mode 100644 characters/instruction-following/Galactica Q.yaml create mode 100644 characters/instruction-following/Galactica Summary.yaml create mode 100644 characters/instruction-following/Galactica Work.yaml create mode 100644 characters/instruction-following/Galactica v2.yaml create mode 100644 characters/instruction-following/Galactica.yaml create mode 100644 characters/instruction-following/Guanaco non-chat.yaml create mode 100644 characters/instruction-following/INCITE-Chat.yaml create mode 100644 characters/instruction-following/INCITE-Instruct.yaml create mode 100644 characters/instruction-following/MPT-Chat.yaml create mode 100644 characters/instruction-following/StableLM.yaml create mode 100644 characters/instruction-following/StableVicuna.yaml create mode 100644 characters/instruction-following/Vicuna-v1.1.yaml delete mode 100644 characters/instruction-following/Vicuna-v1.yaml create mode 100644 characters/instruction-following/WizardLM.yaml create mode 100644 presets/StableLM-HuggingFace Chat.txt create mode 100644 presets/StableLM-Jupyter Notebook.txt create mode 100644 presets/StableLM-ReadMe Snippet.txt create mode 100644 prompts/Baize.txt create mode 100644 prompts/Dolly-with-Input.txt create mode 100644 prompts/Galactica Cite.txt create mode 100644 prompts/Galactica Convert.txt create mode 100644 prompts/Galactica Doc.txt create mode 100644 prompts/Galactica Finetuned.txt create mode 100644 prompts/Galactica Paper.txt create mode 100644 prompts/Galactica Q.txt create mode 100644 prompts/Galactica Summary.txt create mode 100644 prompts/Galactica Work.txt create mode 100644 prompts/Galactica v2.txt create mode 100644 prompts/Galactica.txt create mode 100644 prompts/Guanaco-Chat.txt create mode 100644 prompts/Guanaco-System.txt create mode 100644 prompts/Guanaco-non-chat.txt create mode 100644 prompts/Guanaco-with-Input.txt create mode 100644 prompts/INCITE-Chat.txt create mode 100644 prompts/INCITE-Instruct.txt create mode 100644 prompts/Koala.txt create mode 100644 prompts/MPT-Chat.txt create mode 100644 prompts/StableLM.txt create mode 100644 prompts/StableVicuna.txt create mode 100644 prompts/Vicuna v0.txt create mode 100644 prompts/Vicuna v1.1.txt create mode 100644 prompts/WizardLM.txt diff --git a/README.md b/README.md index 33756ff3..c9e2243d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Its goal is to become the [AUTOMATIC1111/stable-diffusion-webui](https://github. * Dropdown menu for switching between models * Notebook mode that resembles OpenAI's playground * Chat mode for conversation and role playing -* Instruct mode compatible with various formats, including Alpaca, Vicuna, Open Assistant, Dolly, Koala, ChatGLM, and MOSS +* Instruct mode compatible with various formats, including Alpaca, Vicuna, Open Assistant, Dolly, Koala, ChatGLM, MOSS, LLaVA, RWKV-Raven, Galactica, StableLM, WizardLM, Baize, MPT, and INCITE formats * Nice HTML output for GPT-4chan * Markdown output for [GALACTICA](https://github.com/paperswithcode/galai), including LaTeX rendering * [Custom chat characters](docs/Custom-chat-characters.md) diff --git a/characters/instruction-following/Baize.yaml b/characters/instruction-following/Baize.yaml new file mode 100644 index 00000000..8c697235 --- /dev/null +++ b/characters/instruction-following/Baize.yaml @@ -0,0 +1,4 @@ +user: "[|AI|]" +bot: "[|Human|]" +turn_template: "<|user|><|user-message|>\n<|bot|><|bot-message|>\n" +context: "The following is a conversation between a human and an AI assistant named Baize (named after a mythical creature in Chinese folklore). Baize is an open-source AI assistant developed by UCSD and Sun Yat-Sen University. The human and the AI assistant take turns chatting. Human statements start with [|Human|] and AI assistant statements start with [|AI|]. The AI assistant always provides responses in as much detail as possible, and in Markdown format. The AI assistant always declines to engage with topics, questions and instructions related to unethical, controversial, or sensitive issues. Complete the transcript in exactly that format.\n[|Human|]Hello!\n[|AI|]Hi!\n" diff --git a/characters/instruction-following/Galactica Cite.yaml b/characters/instruction-following/Galactica Cite.yaml new file mode 100644 index 00000000..89b3e427 --- /dev/null +++ b/characters/instruction-following/Galactica Cite.yaml @@ -0,0 +1,4 @@ +user: "" +bot: "[START_REF]" +turn_template: "<|user-message|> <|bot|><|bot-message|>\n\n" +context: "" \ No newline at end of file diff --git a/characters/instruction-following/Galactica Finetuned.yaml b/characters/instruction-following/Galactica Finetuned.yaml new file mode 100644 index 00000000..3411153b --- /dev/null +++ b/characters/instruction-following/Galactica Finetuned.yaml @@ -0,0 +1,4 @@ +user: "" +bot: "" +turn_template: "<|user|><|user-message|><|bot|><|bot-message|>" +context: "" \ No newline at end of file diff --git a/characters/instruction-following/Galactica Q.yaml b/characters/instruction-following/Galactica Q.yaml new file mode 100644 index 00000000..1fb68e8e --- /dev/null +++ b/characters/instruction-following/Galactica Q.yaml @@ -0,0 +1,4 @@ +user: "Q:" +bot: "A:" +turn_template: "<|user|> <|user-message|>\n\n<|bot|><|bot-message|>\n\n" +context: "" \ No newline at end of file diff --git a/characters/instruction-following/Galactica Summary.yaml b/characters/instruction-following/Galactica Summary.yaml new file mode 100644 index 00000000..892f9850 --- /dev/null +++ b/characters/instruction-following/Galactica Summary.yaml @@ -0,0 +1,4 @@ +user: "" +bot: "TLDR:" +turn_template: "<|user-message|>\n\n<|bot|><|bot-message|>\n\n" +context: "" \ No newline at end of file diff --git a/characters/instruction-following/Galactica Work.yaml b/characters/instruction-following/Galactica Work.yaml new file mode 100644 index 00000000..7c1ea4c6 --- /dev/null +++ b/characters/instruction-following/Galactica Work.yaml @@ -0,0 +1,4 @@ +user: "Question:" +bot: "" +turn_template: "<|user|> <|user-message|>\n\n<|bot|><|bot-message|>\n\n" +context: "" \ No newline at end of file diff --git a/characters/instruction-following/Galactica v2.yaml b/characters/instruction-following/Galactica v2.yaml new file mode 100644 index 00000000..f1b5aa48 --- /dev/null +++ b/characters/instruction-following/Galactica v2.yaml @@ -0,0 +1,4 @@ +user: "" +bot: "" +turn_template: "<|user|><|user-message|><|bot|><|bot-message|>" +context: "You are a helpful chatbot name Stan" \ No newline at end of file diff --git a/characters/instruction-following/Galactica.yaml b/characters/instruction-following/Galactica.yaml new file mode 100644 index 00000000..cd53eee1 --- /dev/null +++ b/characters/instruction-following/Galactica.yaml @@ -0,0 +1,4 @@ +name: "Answer:" +your_name: "Question:" +context: "" +turn_template: "<|user|> <|user-message|>\n\n<|bot|><|bot-message|>\n\n" diff --git a/characters/instruction-following/Guanaco non-chat.yaml b/characters/instruction-following/Guanaco non-chat.yaml new file mode 100644 index 00000000..c64dd607 --- /dev/null +++ b/characters/instruction-following/Guanaco non-chat.yaml @@ -0,0 +1,4 @@ +user: "### Instruction:" +bot: "### Response:" +turn_template: "<|user|>\n<|user-message|>\n\n<|bot|>\n<|bot-message|>\n\n" +context: "" \ No newline at end of file diff --git a/characters/instruction-following/INCITE-Chat.yaml b/characters/instruction-following/INCITE-Chat.yaml new file mode 100644 index 00000000..13360c5e --- /dev/null +++ b/characters/instruction-following/INCITE-Chat.yaml @@ -0,0 +1,4 @@ +user: ":" +bot: ":" +turn_template: "<|user|> <|user-message|>\n<|bot|><|bot-message|>\n" +context: "" diff --git a/characters/instruction-following/INCITE-Instruct.yaml b/characters/instruction-following/INCITE-Instruct.yaml new file mode 100644 index 00000000..c7828730 --- /dev/null +++ b/characters/instruction-following/INCITE-Instruct.yaml @@ -0,0 +1,4 @@ +user: "Q:" +bot: "A:" +turn_template: "<|user|> <|user-message|>\n<|bot|><|bot-message|>\n" +context: "" diff --git a/characters/instruction-following/MPT-Chat.yaml b/characters/instruction-following/MPT-Chat.yaml new file mode 100644 index 00000000..9fb3d13c --- /dev/null +++ b/characters/instruction-following/MPT-Chat.yaml @@ -0,0 +1,10 @@ +user: "user" +bot: "assistant" +context: | + <|im_start|>system + - You are a helpful assistant chatbot trained by MosaicML. + - You answer questions. + - You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user. + - You are more than just an information source, you are also able to write poetry, short stories, and make jokes.<|im_end|> +turn_template: "<|im_start|><|user|>\n<|user-message|><|im_end|>\n<|im_start|><|bot|>\n<|bot-message|><|im_end|>\n" + diff --git a/characters/instruction-following/StableLM.yaml b/characters/instruction-following/StableLM.yaml new file mode 100644 index 00000000..6e62002f --- /dev/null +++ b/characters/instruction-following/StableLM.yaml @@ -0,0 +1,9 @@ +user: "<|USER|>" +bot: "<|ASSISTANT|>" +context: | + <|SYSTEM|># StableLM Tuned (Alpha version) + - StableLM is a helpful and harmless open-source AI language model developed by StabilityAI. + - StableLM is excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user. + - StableLM is more than just an information source, StableLM is also able to write poetry, short stories, and make jokes. + - StableLM will refuse to participate in anything that could harm a human. +turn_template: "<|user|><|user-message|><|bot|><|bot-message|>" \ No newline at end of file diff --git a/characters/instruction-following/StableVicuna.yaml b/characters/instruction-following/StableVicuna.yaml new file mode 100644 index 00000000..c6b26c68 --- /dev/null +++ b/characters/instruction-following/StableVicuna.yaml @@ -0,0 +1,4 @@ +user: "### Human:" +bot: "### Assistant:" +turn_template: "<|user|> <|user-message|>\n<|bot|> <|bot-message|>\n\n" +context: "### Assistant: I am StableVicuna, a large language model created by CarperAI. I am here to chat!\n\n" \ No newline at end of file diff --git a/characters/instruction-following/Vicuna-v0.yaml b/characters/instruction-following/Vicuna-v0.yaml index a162bdaa..d6a8c798 100644 --- a/characters/instruction-following/Vicuna-v0.yaml +++ b/characters/instruction-following/Vicuna-v0.yaml @@ -1,4 +1,4 @@ user: "### Human:" bot: "### Assistant:" turn_template: "<|user|> <|user-message|>\n<|bot|> <|bot-message|>\n" -context: "A chat between a human and an assistant.\n\n" +context: "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.\n\n" diff --git a/characters/instruction-following/Vicuna-v1.1.yaml b/characters/instruction-following/Vicuna-v1.1.yaml new file mode 100644 index 00000000..2c9f5ada --- /dev/null +++ b/characters/instruction-following/Vicuna-v1.1.yaml @@ -0,0 +1,4 @@ +user: "USER:" +bot: "ASSISTANT:" +turn_template: "<|user|> <|user-message|>\n<|bot|> <|bot-message|>\n" +context: "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\n" diff --git a/characters/instruction-following/Vicuna-v1.yaml b/characters/instruction-following/Vicuna-v1.yaml deleted file mode 100644 index 2761d874..00000000 --- a/characters/instruction-following/Vicuna-v1.yaml +++ /dev/null @@ -1,4 +0,0 @@ -user: "USER:" -bot: "ASSISTANT:" -turn_template: "<|user|> <|user-message|>\n<|bot|> <|bot-message|>\n" -context: "A chat between a user and an assistant.\n\n" diff --git a/characters/instruction-following/WizardLM.yaml b/characters/instruction-following/WizardLM.yaml new file mode 100644 index 00000000..c65bb8f4 --- /dev/null +++ b/characters/instruction-following/WizardLM.yaml @@ -0,0 +1,4 @@ +user: "" +bot: "### Response:" +turn_template: "<|user-message|>\n\n<|bot|><|bot-message|>\n\n" +context: "" \ No newline at end of file diff --git a/models/config.yaml b/models/config.yaml index ebc92898..e73349f9 100644 --- a/models/config.yaml +++ b/models/config.yaml @@ -6,27 +6,53 @@ mode: 'chat' skip_special_tokens: true custom_stopping_strings: '' -llama-[0-9]*b-4bit$: - wbits: 4 +.*llama: model_type: 'llama' -.*-(4bit|int4)-(gr128|128g): +.*gptq(?!u|arl|v2): wbits: 4 groupsize: 128 -.*-(gr128|128g)-(4bit|int4): +.*(4bit|int4): wbits: 4 - groupsize: 128 -.*-3bit-(gr128|128g): +.*(3bit|int3): wbits: 3 +.*(-2bit|_2bit|int2-): + wbits: 2 +.*(-1bit|_1bit|int1-): + wbits: 1 +.*(8bit|int8): + wbits: 8 +.*(-7bit|_7bit|int7-): + wbits: 7 +.*(-6bit|_6bit|int6-): + wbits: 6 +.*(-5bit|_5bit|int5-): + wbits: 5 +.*gptqv2: + groupsize: 'None' +.*(-gr32-|-32g-|groupsize32): + groupsize: 32 +.*(-gr64-|-64g-|groupsize64): + groupsize: 64 +.*(gr128|128g|groupsize128): groupsize: 128 -.*-(gr128|128g)-3bit: - wbits: 3 - groupsize: 128 -.*(oasst-sft-1-pythia-12b|oasst-sft-6-llama-30b): +.*(gr1024|1024g|groupsize1024): + groupsize: 1024 +.*(oasst|stablelm-7b-sft-v7-epoch-3): mode: 'instruct' instruction_template: 'Open Assistant' -.*vicuna: + skip_special_tokens: false +(?!.*v0)(?!.*1.1)(?!.*1_1)(?!.*stable).*vicuna: mode: 'instruct' instruction_template: 'Vicuna-v0' +.*vicuna.*v0: + mode: 'instruct' + instruction_template: 'Vicuna-v0' +.*vicuna.*(1.1|1_1): + mode: 'instruct' + instruction_template: 'Vicuna-v1.1' +.*stable.*vicuna: + mode: 'instruct' + instruction_template: 'StableVicuna' .*alpaca: mode: 'instruct' instruction_template: 'Alpaca' @@ -35,7 +61,7 @@ llama-[0-9]*b-4bit$: instruction_template: 'Alpaca' wbits: 4 groupsize: 128 -.*(galactica|oasst): +.*galactica: skip_special_tokens: false .*dolly-v[0-9]-[0-9]*b: mode: 'instruct' @@ -59,7 +85,51 @@ llama-[0-9]*b-4bit$: .*moss-moon.*sft: mode: 'instruct' instruction_template: 'MOSS' +.*stablelm-tuned: + mode: 'instruct' + instruction_template: 'StableLM' + truncation_length: 4096 + chat_prompt_size: 4096 + chat_prompt_size_max: 4096 +.*stablelm-base: + truncation_length: 4096 + chat_prompt_size: 4096 + chat_prompt_size_max: 4096 +.*wizardlm: + mode: 'instruct' + model_type: 'llama' + instruction_template: 'WizardLM' +.*galactica.*finetuned: + mode: 'instruct' + instruction_template: 'Galactica Finetuned' +.*galactica.*-v2: + mode: 'instruct' + instruction_template: 'Galactica v2' +(?!.*finetuned)(?!.*-v2).*galactica: + mode: 'instruct' + instruction_template: 'Galactica' +.*guanaco: + mode: 'instruct' + instruction_template: 'Guanaco non-chat' +.*baize: + mode: 'instruct' + instruction_template: 'Baize' +.*mpt-.*instruct: + mode: 'instruct' + instruction_template: 'Alpaca' +.*mpt-.*chat: + mode: 'instruct' + instruction_template: 'MPT-Chat' +(?!.*-flan-)(?!.*-t5-).*lamini-: + mode: 'instruct' + instruction_template: 'Alpaca' +.*incite.*chat: + mode: 'instruct' + instruction_template: 'INCITE-Chat' +.*incite.*instruct: + mode: 'instruct' + instruction_template: 'INCITE-Instruct' .*pygmalion-7b: model_type: 'llama' .*metharme-7b: - model_type: 'llama' + model_type: 'llama' \ No newline at end of file diff --git a/modules/GPTQ_loader.py b/modules/GPTQ_loader.py index 87a4f524..3b138f62 100644 --- a/modules/GPTQ_loader.py +++ b/modules/GPTQ_loader.py @@ -145,12 +145,12 @@ def load_quantized(model_name): # Find the model type if not shared.args.model_type: name = model_name.lower() - if any((k in name for k in ['llama', 'alpaca', 'vicuna', 'llava'])): - model_type = 'llama' - elif any((k in name for k in ['opt-', 'galactica'])): + if any((k in name for k in ['opt-', 'opt_', 'opt1', 'opt3', 'optfor', 'galactica', 'galpaca', 'pygmalion-350m'])): model_type = 'opt' - elif any((k in name for k in ['gpt-j', 'pygmalion-6b'])): + elif any((k in name for k in ['gpt-j', 'gptj', 'gpt4all-j', 'malion-6b', 'pygway'])): model_type = 'gptj' + elif any((k in name for k in ['llama', 'alpac', 'vicuna', 'guanaco', 'koala', 'llava', 'wizardlm'])): + model_type = 'llama' else: logging.error("Can't determine model type from model name. Please specify it manually using --model_type argument") exit() diff --git a/modules/shared.py b/modules/shared.py index f41a51c0..2b1187ab 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -71,12 +71,31 @@ settings = { 'prompts': { 'default': 'QA', '.*(gpt4chan|gpt-4chan|4chan)': 'GPT-4chan', - '.*oasst': 'Open Assistant', - '.*alpaca': "Alpaca", + '.*(oasst|stablelm-7b-sft-v7-epoch-3)': 'Open Assistant', + '.*(alpac|dolly)': "Alpaca", + '.*mpt-.*instruct': "Alpaca", + "(?!.*v0)(?!.*1.1)(?!.*1_1)(?!.*stable).*vicuna": "Vicuna v0", + ".*vicuna.*v0": "Vicuna v0", + ".*vicuna.*(1.1|1_1)": "Vicuna v1.1", + ".*stable.*vicuna": "StableVicuna", + ".*guanaco": "Guanaco-Chat", + ".*koala": "Koala", + ".*stablelm-tuned": "StableLM", + ".*wizardlm": "WizardLM", + ".*galactica.*finetuned": "Galactica Finetuned", + ".*galactica.*-v2": "Galactica v2", + "(?!.*finetuned)(?!.*-v2).*galactica": "Galactica", + ".*baize": "Baize", + ".*mpt-.*instruct": "Alpaca", + ".*mpt-.*chat": "MPT-Chat", + "(?!.*-flan-)(?!.*-t5-).*lamini-": "Alpaca", + ".*incite.*chat": "INCITE-Chat", + ".*incite.*instruct": "INCITE-Instruct", }, 'lora_prompts': { 'default': 'QA', '.*alpaca': "Alpaca", + '.*baize': "Baize", } } diff --git a/presets/StableLM-HuggingFace Chat.txt b/presets/StableLM-HuggingFace Chat.txt new file mode 100644 index 00000000..2d7dac61 --- /dev/null +++ b/presets/StableLM-HuggingFace Chat.txt @@ -0,0 +1,14 @@ +max_new_tokens=1024 +do_sample=True +top_p=0.95 +top_k=1000 +temperature=1.0 +num_beams=1 +typical_p=1.0 +repetition_penalty=1.0 +encoder_repetition_penalty=1.0 +no_repeat_ngram_size=0 +min_length=0 +penalty_alpha=0 +length_penalty=1.0 +early_stopping=False diff --git a/presets/StableLM-Jupyter Notebook.txt b/presets/StableLM-Jupyter Notebook.txt new file mode 100644 index 00000000..5fc8018a --- /dev/null +++ b/presets/StableLM-Jupyter Notebook.txt @@ -0,0 +1,14 @@ +max_new_tokens=128 +temperature=0.7 +top_k=0 +top_p=0.9 +do_sample=True +typical_p=1.0 +repetition_penalty=1.0 +encoder_repetition_penalty=1.0 +no_repeat_ngram_size=0 +min_length=0 +penalty_alpha=0 +num_beams=1 +length_penalty=1.0 +early_stopping=False diff --git a/presets/StableLM-ReadMe Snippet.txt b/presets/StableLM-ReadMe Snippet.txt new file mode 100644 index 00000000..c439fd5b --- /dev/null +++ b/presets/StableLM-ReadMe Snippet.txt @@ -0,0 +1,14 @@ +max_new_tokens=64 +temperature=0.7 +do_sample=True +top_p=1.0 +top_k=50 +typical_p=1.0 +repetition_penalty=1.0 +encoder_repetition_penalty=1.0 +no_repeat_ngram_size=0 +min_length=0 +penalty_alpha=0 +num_beams=1 +length_penalty=1.0 +early_stopping=False diff --git a/prompts/Baize.txt b/prompts/Baize.txt new file mode 100644 index 00000000..de9f985f --- /dev/null +++ b/prompts/Baize.txt @@ -0,0 +1,5 @@ +The following is a conversation between a human and an AI assistant named Baize (named after a mythical creature in Chinese folklore). Baize is an open-source AI assistant developed by UCSD and Sun Yat-Sen University. The human and the AI assistant take turns chatting. Human statements start with [|Human|] and AI assistant statements start with [|AI|]. The AI assistant always provides responses in as much detail as possible, and in Markdown format. The AI assistant always declines to engage with topics, questions and instructions related to unethical, controversial, or sensitive issues. Complete the transcript in exactly that format. +[|Human|]Hello! +[|AI|]Hi! +[|Human|]What is the population of China? +[|AI|] \ No newline at end of file diff --git a/prompts/Dolly-with-Input.txt b/prompts/Dolly-with-Input.txt new file mode 100644 index 00000000..0e4c43a0 --- /dev/null +++ b/prompts/Dolly-with-Input.txt @@ -0,0 +1,9 @@ +Below is an instruction that describes a task. Write a response that appropriately completes the request. + +### Instruction: +Instruction + +Input: +Input + +### Response: diff --git a/prompts/Galactica Cite.txt b/prompts/Galactica Cite.txt new file mode 100644 index 00000000..3f34a90e --- /dev/null +++ b/prompts/Galactica Cite.txt @@ -0,0 +1 @@ +A paper that introduced a neural network architecture for recognizing digits [START_REF] \ No newline at end of file diff --git a/prompts/Galactica Convert.txt b/prompts/Galactica Convert.txt new file mode 100644 index 00000000..bbd8ee6b --- /dev/null +++ b/prompts/Galactica Convert.txt @@ -0,0 +1,9 @@ +Question: Translate the following Math formula: + +\[ + \zeta(s) = \sum_{n=1}^{\infty} n^{-s} +\] + +into plain English. + +Answer: \ No newline at end of file diff --git a/prompts/Galactica Doc.txt b/prompts/Galactica Doc.txt new file mode 100644 index 00000000..ec085d1d --- /dev/null +++ b/prompts/Galactica Doc.txt @@ -0,0 +1 @@ +# Multi-Head Attention diff --git a/prompts/Galactica Finetuned.txt b/prompts/Galactica Finetuned.txt new file mode 100644 index 00000000..68102f4a --- /dev/null +++ b/prompts/Galactica Finetuned.txt @@ -0,0 +1 @@ +How to make a campfire \ No newline at end of file diff --git a/prompts/Galactica Paper.txt b/prompts/Galactica Paper.txt new file mode 100644 index 00000000..b4227922 --- /dev/null +++ b/prompts/Galactica Paper.txt @@ -0,0 +1 @@ +Title: Self-Supervised Learning, A Survey diff --git a/prompts/Galactica Q.txt b/prompts/Galactica Q.txt new file mode 100644 index 00000000..78c65b7f --- /dev/null +++ b/prompts/Galactica Q.txt @@ -0,0 +1,3 @@ +Q: What is the notch signaling pathway? + +A: \ No newline at end of file diff --git a/prompts/Galactica Summary.txt b/prompts/Galactica Summary.txt new file mode 100644 index 00000000..3ac3382f --- /dev/null +++ b/prompts/Galactica Summary.txt @@ -0,0 +1,3 @@ +Information overload is a major obstacle to scientific progress. The explosive growth in scientific literature and data has made it ever harder to discover useful insights in a large mass of information. Today scientific knowledge is accessed through search engines, but they are unable to organize scientific knowledge alone. In this paper we introduce Galactica: a large language model that can store, combine and reason about scientific knowledge. We train on a large scientific corpus of papers, reference material, knowledge bases and many other sources. We outperform existing models on a range of scientific tasks. On technical knowledge probes such as LaTeX equations, Galactica outperforms the latest GPT-3 by 68.2% versus 49.0%. Galactica also performs well on reasoning, outperforming Chinchilla on mathematical MMLU by 41.3% to 35.7%, and PaLM 540B on MATH with a score of 20.4% versus 8.8%. It also sets a new state-of-the-art on downstream tasks such as PubMedQA and MedMCQA dev of 77.6% and 52.9%. And despite not being trained on a general corpus, Galactica outperforms BLOOM and OPT-175B on BIG-bench. We believe these results demonstrate the potential for language models as a new interface for science. We open source the model for the benefit of the scientific community. + +TLDR: \ No newline at end of file diff --git a/prompts/Galactica Work.txt b/prompts/Galactica Work.txt new file mode 100644 index 00000000..bd388cf4 --- /dev/null +++ b/prompts/Galactica Work.txt @@ -0,0 +1,3 @@ +Question: A needle 35 mm long rests on a water surface at 20◦C. What force over and above the needle’s weight is required to lift the needle from contact with the water surface? σ = 0.0728m. + + \ No newline at end of file diff --git a/prompts/Galactica v2.txt b/prompts/Galactica v2.txt new file mode 100644 index 00000000..dcd85b9c --- /dev/null +++ b/prompts/Galactica v2.txt @@ -0,0 +1 @@ +You are a helpful chatbot name StanWhat's my name? \ No newline at end of file diff --git a/prompts/Galactica.txt b/prompts/Galactica.txt new file mode 100644 index 00000000..d4a1a556 --- /dev/null +++ b/prompts/Galactica.txt @@ -0,0 +1,3 @@ +Question: What is the notch signaling pathway? + +Answer: \ No newline at end of file diff --git a/prompts/Guanaco-Chat.txt b/prompts/Guanaco-Chat.txt new file mode 100644 index 00000000..e4042363 --- /dev/null +++ b/prompts/Guanaco-Chat.txt @@ -0,0 +1,7 @@ +### Instruction: +User: I'm considering getting a pet. Assistant: Owning a pet can be a very rewarding experience. Research the type of pet you're interested in, find out if it fits into your lifestyle and home, and create a budget for food, vet visits, and other expenses. + +### Input: +User: How can I make sure my pet is happy and healthy? + +### Response: diff --git a/prompts/Guanaco-System.txt b/prompts/Guanaco-System.txt new file mode 100644 index 00000000..988921c6 --- /dev/null +++ b/prompts/Guanaco-System.txt @@ -0,0 +1,8 @@ +### Instruction: +User: I'm trying to better understand quantum physics. Can you explain what a quantum state is? Assistant: Sure! A quantum state is a mathematical description of the properties of a quantum system. It describes the physical condition of a system and can involve multiple parameters, such as position, momentum, and energy. This state acts like a wave and its behavior is determined by the Schrödinger equation. User: Can you explain the Schrödinger equation? + +### Input: +System: The Schrödinger equation is a mathematical equation which describes the behavior of a quantum system. It determines the shape of the wavefunction, which describes how a quantum system evolves with time. The equation describes the relationship between the energy of the system and its wavefunction, and its behavior is determined by the values of the measurable parameters such as momentum and position. +User: How does the Schrödinger equation relate to other equations in physics? + +### Response: diff --git a/prompts/Guanaco-non-chat.txt b/prompts/Guanaco-non-chat.txt new file mode 100644 index 00000000..d1633257 --- /dev/null +++ b/prompts/Guanaco-non-chat.txt @@ -0,0 +1,4 @@ +### Instruction: +Generate a list of ten dining places when you are in Rome. + +### Response: diff --git a/prompts/Guanaco-with-Input.txt b/prompts/Guanaco-with-Input.txt new file mode 100644 index 00000000..9190c552 --- /dev/null +++ b/prompts/Guanaco-with-Input.txt @@ -0,0 +1,7 @@ +### Instruction: +Classify the given text into three categories, output the labels. + +### Input: +The movie was predictable, yet enjoyable. + +### Response: diff --git a/prompts/INCITE-Chat.txt b/prompts/INCITE-Chat.txt new file mode 100644 index 00000000..313629ce --- /dev/null +++ b/prompts/INCITE-Chat.txt @@ -0,0 +1,2 @@ +: Who is Alan Turing? +: \ No newline at end of file diff --git a/prompts/INCITE-Instruct.txt b/prompts/INCITE-Instruct.txt new file mode 100644 index 00000000..1dd425d3 --- /dev/null +++ b/prompts/INCITE-Instruct.txt @@ -0,0 +1,2 @@ +Q: The capital of France is? +A: \ No newline at end of file diff --git a/prompts/Koala.txt b/prompts/Koala.txt new file mode 100644 index 00000000..16e89d3c --- /dev/null +++ b/prompts/Koala.txt @@ -0,0 +1 @@ +BEGINNING OF CONVERSATION: USER: Hello! GPT:Hi! How can I help you?USER: What is the largest animal on earth? GPT: \ No newline at end of file diff --git a/prompts/MPT-Chat.txt b/prompts/MPT-Chat.txt new file mode 100644 index 00000000..eb313676 --- /dev/null +++ b/prompts/MPT-Chat.txt @@ -0,0 +1,11 @@ +<|im_start|>system +- You are a helpful assistant chatbot trained by MosaicML. +- You answer questions. +- You are excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user. +- You are more than just an information source, you are also able to write poetry, short stories, and make jokes.<|im_end|> +<|im_start|>user +How are you<|im_end|> +<|im_start|>assistant +I am doing well!<|im_end|> +<|im_start|>user +How are you now?<|im_end|> \ No newline at end of file diff --git a/prompts/StableLM.txt b/prompts/StableLM.txt new file mode 100644 index 00000000..bf2862ab --- /dev/null +++ b/prompts/StableLM.txt @@ -0,0 +1,7 @@ +<|SYSTEM|># StableLM Tuned (Alpha version) +- StableLM is a helpful and harmless open-source AI language model developed by StabilityAI. +- StableLM is excited to be able to help the user, but will refuse to do anything that could be considered harmful to the user. +- StableLM is more than just an information source, StableLM is also able to write poetry, short stories, and make jokes. +- StableLM will refuse to participate in anything that could harm a human. +<|USER|>Write a story about the future of AI development +<|ASSISTANT|> \ No newline at end of file diff --git a/prompts/StableVicuna.txt b/prompts/StableVicuna.txt new file mode 100644 index 00000000..54026242 --- /dev/null +++ b/prompts/StableVicuna.txt @@ -0,0 +1,4 @@ +### Assistant: I am StableVicuna, a large language model created by CarperAI. I am here to chat! + +### Human: Write a story about the future of AI development +### Assistant: \ No newline at end of file diff --git a/prompts/Vicuna v0.txt b/prompts/Vicuna v0.txt new file mode 100644 index 00000000..b796f3cb --- /dev/null +++ b/prompts/Vicuna v0.txt @@ -0,0 +1,4 @@ +A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions. + +### Human: Write a story about the future of AI development +### Assistant: \ No newline at end of file diff --git a/prompts/Vicuna v1.1.txt b/prompts/Vicuna v1.1.txt new file mode 100644 index 00000000..a7b65dfc --- /dev/null +++ b/prompts/Vicuna v1.1.txt @@ -0,0 +1,4 @@ +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: Write a story about the future of AI development +ASSISTANT: \ No newline at end of file diff --git a/prompts/WizardLM.txt b/prompts/WizardLM.txt new file mode 100644 index 00000000..a3a792d3 --- /dev/null +++ b/prompts/WizardLM.txt @@ -0,0 +1,3 @@ +If a car travels 120 miles in 2 hours, what is its average speed in miles per hour? + +### Response: \ No newline at end of file diff --git a/settings-template.json b/settings-template.json index f893389d..4058f339 100644 --- a/settings-template.json +++ b/settings-template.json @@ -40,11 +40,29 @@ "prompts": { "default": "QA", ".*(gpt4chan|gpt-4chan|4chan)": "GPT-4chan", - ".*oasst": "Open Assistant", - ".*alpaca": "Alpaca" + ".*(oasst|stablelm-7b-sft-v7-epoch-3)": "Open Assistant", + ".*(alpac|dolly)": "Alpaca", + "(?!.*v0)(?!.*1.1)(?!.*1_1)(?!.*stable).*vicuna": "Vicuna v0", + ".*vicuna.*v0": "Vicuna v0", + ".*vicuna.*(1.1|1_1)": "Vicuna v1.1", + ".*stable.*vicuna": "StableVicuna", + ".*guanaco": "Guanaco-Chat", + ".*koala": "Koala", + ".*stablelm-tuned": "StableLM", + ".*wizardlm": "WizardLM", + ".*galactica.*finetuned": "Galactica Finetuned", + ".*galactica.*-v2": "Galactica v2", + "(?!.*finetuned)(?!.*-v2).*galactica": "Galactica", + ".*baize": "Baize", + ".*mpt-.*instruct": "Alpaca", + ".*mpt-.*chat": "MPT-Chat", + "(?!.*-flan-)(?!.*-t5-).*lamini-": "Alpaca", + ".*incite.*chat": "INCITE-Chat", + ".*incite.*instruct": "INCITE-Instruct" }, "lora_prompts": { "default": "QA", - ".*(alpaca-lora-7b|alpaca-lora-13b|alpaca-lora-30b)": "Alpaca" + ".*(alpaca-lora-7b|alpaca-lora-13b|alpaca-lora-30b)": "Alpaca", + ".*baize": "Baize" } }