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
- Add default system prompt templates for phi2, phi3, phi4, llama2, and
llama3 models to improve the user experience and provide more accurate
responses.
- Improve chat templates for phi2, phi3, phi4, llama2 and llama3 models
to enhance the user experience
- Add info about system prompt
print(f"Prompt length: {len(input_tokens)}, New tokens: {len(new_tokens)}, Time to first: {(prompt_time):.2f}s, Prompt tokens per second: {len(input_tokens)/prompt_time:.2f} tps, New tokens per second: {len(new_tokens)/run_time:.2f} tps")
105
119
106
-
# Rewind the generator to the system prompt
120
+
# Rewind the generator to the system prompt, this will erase all the memory of the model.
print(f"Prompt length: {len(input_tokens)}, New tokens: {len(new_tokens)}, Time to first: {(prompt_time):.2f}s, Prompt tokens per second: {len(input_tokens)/prompt_time:.2f} tps, New tokens per second: {len(new_tokens)/run_time:.2f} tps")
91
112
92
-
# Rewind the generator to the system prompt
113
+
# Rewind the generator to the system prompt, this will erase all the memory of the model.
93
114
ifargs.rewind:
94
115
generator.rewind_to(system_prompt_length)
95
116
@@ -108,6 +129,6 @@ def main(args):
108
129
parser.add_argument('-g', '--timings', action='store_true', default=False, help='Print timing information for each generation step. Defaults to false')
109
130
parser.add_argument('-c', '--chat_template', type=str, default='', help='Chat template to use for the prompt. User input will be injected into {input}')
110
131
parser.add_argument('-s', '--system_prompt', type=str, default='You are a helpful AI assistant.', help='System prompt to use for the prompt.')
111
-
parser.add_argument('-r', '--rewind', action='store_true', default=False, help='Rewind to the system prompt after each generation. Defaults to false')
132
+
parser.add_argument('-r', '--rewind', action='store_true', default=True, help='Rewind to the system prompt after each generation. Defaults to true')
0 commit comments