Skip to content

Commit f4d277a

Browse files
authored
main : alternative instruct mode (Vicuna support, etc.) (#863)
* Add support for configs, add configurable prefixes / suffixes, deprecate instruct mode, add stop prompt * Add multiline mode, update text input. * bugfix * update implementation * typos * Change --multiline implementation to be toggled by EOF. * bugfix * default multiline mode * add more configs * update formating * update formatting * apply suggestions
1 parent c9a59b7 commit f4d277a

12 files changed

+434
-110
lines changed

Diff for: configs/alpaca-native-enhanced.txt

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--ctx_size 2048
2+
--batch_size 16
3+
--repeat_penalty 1.15
4+
--temp 0.4
5+
--top_k 30
6+
--top_p 0.18
7+
8+
--interactive-first
9+
--keep -1
10+
11+
--ins-prefix-bos
12+
--ins-prefix "\n\nUser: "
13+
--ins-suffix "\n\nAssistant: "
14+
--reverse-prompt "User: "
15+
16+
-p "You are an AI language model designed to assist the User by answering their questions, offering advice, and engaging in casual conversation in a friendly, helpful, and informative manner. You respond clearly, coherently, and you consider the conversation history.
17+
18+
User: Hey, how's it going?
19+
20+
Assistant: Hey there! I'm doing great, thank you. What can I help you with today? Let's have a fun chat!"
21+

Diff for: configs/alpaca.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--clean-interface
2+
--interactive-first
3+
--keep -1
4+
--ins-prefix-bos
5+
--ins-prefix "\n\n### Instruction:\n\n"
6+
--ins-suffix "\n\n### Response:\n\n"
7+
--reverse-prompt "### Instruction:\n\n"
8+
9+
-p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n"

Diff for: configs/chat-with-bob.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--interactive-first
2+
--keep -1
3+
--ins-prefix-bos
4+
--ins-prefix "\nUser: "
5+
--ins-suffix "\nBob: "
6+
--reverse-prompt "User: "
7+
--rm-trailing-space-workaround
8+
9+
-p "Transcript of a dialog, where the User interacts with an Assistant named Bob. Bob is helpful, kind, honest, good at writing, and never fails to answer the User's requests immediately and with precision.
10+
11+
User: Hello, Bob.
12+
Bob: Hello. How may I help you today?
13+
User: Please tell me the largest city in Europe.
14+
Bob: Sure. The largest city in Europe is Moscow, the capital of Russia."
15+

Diff for: configs/llama.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--interactive-first
2+
--keep -1
3+
--temp 0.1

Diff for: configs/vicuna-simple.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
--interactive-first
2+
--keep -1
3+
--ins-prefix-bos
4+
--ins-prefix "\n### Human: "
5+
--ins-suffix "\n### Assistant: "
6+
--reverse-prompt "### Human: "
7+
--rm-trailing-space-workaround

Diff for: configs/vicuna-stop.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
--interactive-first
2+
--keep -1
3+
--ins-prefix-bos
4+
--ins-prefix "\n### Human: "
5+
--ins-suffix "\n### Assistant: "
6+
--reverse-prompt "### Human: "
7+
--stop-prompt "### Assistant: "
8+
--rm-trailing-space-workaround

Diff for: configs/vicuna.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--interactive-first
2+
--keep -1
3+
--ins-prefix-bos
4+
--ins-prefix "\n### Human: "
5+
--ins-suffix "\n### Assistant: "
6+
--reverse-prompt "### Human: "
7+
--rm-trailing-space-workaround
8+
9+
-p "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions."

0 commit comments

Comments
 (0)