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
##### One-and-done query using jinja with custom system prompt and a starting prompt
74
+
75
+
```powershell
76
+
./llama-cli.exe -m models\gemma-1.1-7b-it.Q4_K_M.gguf --jinja --single-turn -sys "You are a helpful assistant" -p "Hello"
53
77
```
54
78
55
79
#### Infinite text from a starting prompt (you can use `Ctrl-C` to stop it):
@@ -77,6 +101,8 @@ The `llama-cli` program provides several ways to interact with the LLaMA models
77
101
78
102
-`--prompt PROMPT`: Provide a prompt directly as a command-line option.
79
103
-`--file FNAME`: Provide a file containing a prompt or multiple prompts.
104
+
-`--system-prompt PROMPT`: Provide a system prompt (will otherwise use the default one in the chat template (if provided)).
105
+
-`--system-prompt-file FNAME`: Provide a file containing a system prompt.
80
106
-`--interactive-first`: Run the program in interactive mode and wait for input right away. (More on this below.)
81
107
82
108
## Interaction
@@ -89,7 +115,10 @@ In interactive mode, users can participate in text generation by injecting their
89
115
90
116
-`-i, --interactive`: Run the program in interactive mode, allowing users to engage in real-time conversations or provide specific instructions to the model.
91
117
-`--interactive-first`: Run the program in interactive mode and immediately wait for user input before starting the text generation.
92
-
-`-cnv, --conversation`: Run the program in conversation mode (does not print special tokens and suffix/prefix, use default chat template) (default: false)
118
+
-`-cnv, --conversation`: Run the program in conversation mode (does not print special tokens and suffix/prefix, use default or provided chat template) (default: true if chat template found)
-`-st, --single-turn`: Only process a single conversation turn (user input) and then exit.
121
+
-`--jinja`: Enable jinja chat template parser, will use the model's built-in template or a user-provided one (default: false)
93
122
-`--color`: Enable colorized output to differentiate visually distinguishing between prompts, user input, and generated text.
94
123
95
124
By understanding and utilizing these interaction options, you can create engaging and dynamic experiences with the LLaMA models, tailoring the text generation process to your specific needs.
@@ -125,6 +154,8 @@ When --in-prefix or --in-suffix options are enabled the chat template ( --chat-t
125
154
126
155
Example usage: `--chat-template gemma`
127
156
157
+
`--chat-template-file FNAME`: Load a custom jinja chat template from an external file, useful if the model contains outdated or incompatible template, some examples can be found in models/templates. Up-to-date chat templates can be downloaded from Hugging Face using scripts/get_chat_template.py
158
+
128
159
## Context Management
129
160
130
161
During text generation, LLaMA models have a limited context size, which means they can only consider a certain number of tokens from the input and generated text. When the context fills up, the model resets internally, potentially losing some information from the beginning of the conversation or instructions. Context management options help maintain continuity and coherence in these situations.
0 commit comments