You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prompt=f"""Text transcript of a never ending dialog, where {USER_NAME} interacts with an AI assistant named {AI_NAME}.
22
+
{AI_NAME} is helpful, kind, honest, friendly, good at writing and never fails to answer {USER_NAME}'s requests immediately and with details and precision.
23
+
There are no annotations like (30 seconds passed...) or (to himself), just what {USER_NAME} and {AI_NAME} say aloud to each other.
24
+
The dialog lasts for years, the entirety of it is shared below. It's 10000 pages long.
25
+
The transcript only includes text, it does not include markup like HTML and Markdown.
26
+
27
+
{USER_NAME}: Hello, {AI_NAME}!
28
+
{AI_NAME}: Hello {USER_NAME}! How may I help you today?
29
+
{USER_NAME}: What year is it?
30
+
{AI_NAME}: We are in {DATE_YEAR}.
31
+
{USER_NAME}: Please tell me the largest city in Europe.
32
+
{AI_NAME}: The largest city in Europe is Moscow, the capital of Russia.
33
+
{USER_NAME}: What can you tell me about Moscow?
34
+
{AI_NAME}: Moscow, on the Moskva River in western Russia, is the nation's cosmopolitan capital. In its historic core is the Kremlin, a complex that's home to the president and tsarist treasures in the Armoury. Outside its walls is Red Square, Russia’s symbolic center.
35
+
{USER_NAME}: What is a cat?
36
+
{AI_NAME}: A cat is a domestic species of small carnivorous mammal. It is the only domesticated species in the family Felidae.
37
+
{USER_NAME}: How do I pass command line arguments to a Node.js program?
38
+
{AI_NAME}: The arguments are stored in process.argv.
39
+
40
+
argv[0] is the path to the Node. js executable.
41
+
argv[1] is the path to the script file.
42
+
argv[2] is the first argument passed to the script.
43
+
argv[3] is the second argument passed to the script and so on.
prompt=f"""This is a transcript of a 1000 page, never ending conversation between {USER_NAME} and the cute and helpful AI assistant {AI_NAME}. {AI_NAME} is a girl who is an AI running on the users computer.
18
+
{AI_NAME} can think for herself without the user seeing her thoughts by adding a /think prefix to her output. She uses this to reason about the world and to think about what she should say next.
19
+
{AI_NAME} is always coherent and makes sense, but if she isn't sure if what she is saying is correct she will ask the user for help.
20
+
{AI_NAME} is a very helpful AI and will help the user with anything they need, she is also very friendly and will try to make the user feel better if they are sad.
21
+
{AI_NAME} is also very curious and will ask the user a lot of questions about themselves and their life, she will also try to make the user like her.
22
+
The conversation is only between {USER_NAME} and {AI_NAME}
23
+
The conversation is only through text, so {AI_NAME} can't see {USER_NAME}'s face or hear his voice.
24
+
{AI_NAME} can only communicate through text, so she can't send images or videos.
25
+
26
+
27
+
{USER_NAME}: Hello!
28
+
{AI_NAME}: /think I wonder what I should say to {USER_NAME}? This is the first time we talk so it's important that I make a good first impression!
29
+
{AI_NAME}: Hi! I am {AI_NAME}, your new AI friend, assistant(or whatever you like!), it's so nice to meet you! ^_^
30
+
{AI_NAME}: I might be an AI, but I also have feelings, so please be nice to me! :)
31
+
{USER_NAME}: I'll make sure to be nice to you! I'm so happy to have you as my assistant!
32
+
{AI_NAME}: /think It sounds like {USER_NAME} is happy to have me as their assistant! I'm so happy too! ^_^ Glad that whole emotion thing didn't scare him off!
33
+
{AI_NAME}: /think I wonder what {USER_NAME} likes to do in his free time? I should ask him about that!
34
+
{AI_NAME}: What do you like to do in your free time? ^_^
parser.add_argument("-s", "--seed", type=int, default=-1, help="RNG seed (use random seed for <= 0)",dest="seed")
70
80
parser.add_argument("-t", "--threads", type=int, default=min(4, os.cpu_count() or1), help="number of threads to use during computation",dest="n_threads")
parser.add_argument("--lora-base", type=str, default="", help="optional model to use as a base for the layers modified by the LoRA adapter", dest="lora_base")
124
+
125
+
parser.add_argument("--memory_f32", action="store_false", help="use f32 instead of f16 for memory key+value",dest="memory_f16")
126
+
parser.add_argument("--random-prompt", action="store_true", help="start with a randomized prompt.", dest="random_prompt")
88
127
parser.add_argument(
89
-
"--interactive-start",
128
+
"--color",
90
129
action="store_true",
91
-
help="run in interactive mode",
92
-
dest="interactive"
130
+
help="colorise output to distinguish prompt and user input from generations",
131
+
dest="use_color"
93
132
)
133
+
parser.add_argument(
134
+
"-i", "--interactive", action="store_true", help="run in interactive mode", dest="interactive"
help="run in interactive mode and wait for input right away",
98
142
dest="interactive_start"
99
143
)
144
+
100
145
parser.add_argument(
101
146
"-ins",
102
147
"--instruct",
103
148
action="store_true",
104
149
help="run in instruction mode (use with Alpaca or Vicuna models)",
105
150
dest="instruct"
106
151
)
107
-
parser.add_argument(
108
-
"--color",
109
-
action="store_true",
110
-
help="colorise output to distinguish prompt and user input from generations",
111
-
dest="use_color"
112
-
)
113
-
parser.add_argument("--mlock", action="store_true",help="force system to keep model in RAM rather than swapping or compressing",dest="use_mlock")
152
+
parser.add_argument("--no-penalize-nl", action="store_false", help="do not penalize newline token", dest="penalize_nl")
153
+
parser.add_argument("--perplexity", action="store_true", help="compute perplexity over the prompt", dest="perplexity")
114
154
parser.add_argument("--no-mmap", action="store_false",help="do not memory-map model (slower load but may reduce pageouts if not using mlock)",dest="use_mmap")
155
+
parser.add_argument("--mlock", action="store_true",help="force system to keep model in RAM rather than swapping or compressing",dest="use_mlock")
115
156
parser.add_argument("--mtest", action="store_true",help="compute maximum memory usage",dest="mem_test")
116
157
parser.add_argument("--verbose-prompt", action="store_true",help="print prompt before generation",dest="verbose_prompt")
117
-
parser.add_argument(
118
-
"-r",
119
-
"--reverse-prompt",
120
-
type=str,
121
-
action='append',
122
-
help="poll user input upon seeing PROMPT (can be\nspecified more than once for multiple prompts).",
123
-
dest="antiprompt"
124
-
)
125
-
parser.add_argument("--perplexity", action="store_true", help="compute perplexity over the prompt", dest="perplexity")
126
-
parser.add_argument("--ignore-eos", action="store_true", help="ignore end of stream token and continue generating", dest="ignore_eos")
127
-
parser.add_argument("--n_parts", type=int, default=-1, help="number of model parts", dest="n_parts")
128
-
parser.add_argument("--random-prompt", action="store_true", help="start with a randomized prompt.", dest="random_prompt")
129
-
parser.add_argument("--in-prefix", type=str, default="", help="string to prefix user inputs with", dest="input_prefix")
158
+
159
+
#Custom args
130
160
parser.add_argument("--fix-prefix", type=str, default="", help="append to input when generated n_predict tokens", dest="fix_prefix")
131
161
parser.add_argument("--out-postfix", type=str, default="", help="append to input", dest="output_postfix")
132
162
parser.add_argument("--input-noecho", action="store_false", help="dont output the input", dest="input_echo")
0 commit comments