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
cli : auto activate conversation mode if chat template is available (#11214)
* cli : auto activate conversation mode if chat template is detected
* add warn on bad template
* update readme (writing with the help of chatgpt)
* update readme (2)
* do not activate -cnv for non-instruct models
You can either manually download the GGUF file or directly use any `llama.cpp`-compatible models from Hugging Face by using this CLI argument: `-hf <user>/<model>[:quant]`
249
+
248
250
After downloading a model, use the CLI tools to run it locally - see below.
249
251
250
252
`llama.cpp` requires the model to be stored in the [GGUF](https://github.com/ggerganov/ggml/blob/master/docs/gguf.md) file format. Models in other data formats can be converted to GGUF using the `convert_*.py` Python scripts in this repo.
@@ -263,21 +265,12 @@ To learn more about model quantization, [read this documentation](examples/quant
263
265
#### A CLI tool for accessing and experimenting with most of `llama.cpp`'s functionality.
264
266
265
267
- <detailsopen>
266
-
<summary>Run simple text completion</summary>
267
-
268
-
```bash
269
-
llama-cli -m model.gguf -p "I believe the meaning of life is" -n 128
270
-
271
-
# I believe the meaning of life is to find your own truth and to live in accordance with it. For me, this means being true to myself and following my passions, even if they don't align with societal expectations. I think that's what I love about yoga – it's not just a physical practice, but a spiritual one too. It's about connecting with yourself, listening to your inner voice, and honoring your own unique journey.
272
-
```
273
-
274
-
</details>
275
-
276
-
- <details>
277
268
<summary>Run in conversation mode</summary>
278
269
270
+
Models with a built-in chat template will automatically activate conversation mode. If this doesn't occur, you can manually enable it by adding `-cnv` and specifying a suitable chat template with `--chat-template NAME`
271
+
279
272
```bash
280
-
llama-cli -m model.gguf -p "You are a helpful assistant" -cnv
273
+
llama-cli -m model.gguf
281
274
282
275
# > hi, who are you?
283
276
# Hi there! I'm your helpful assistant! I'm an AI-powered chatbot designed to assist and provide information to users like you. I'm here to help answer your questions, provide guidance, and offer support on a wide range of topics. I'm a friendly and knowledgeable AI, and I'm always happy to help with anything you need. What's on your mind, and how can I assist you today?
@@ -289,17 +282,28 @@ To learn more about model quantization, [read this documentation](examples/quant
289
282
</details>
290
283
291
284
- <details>
292
-
<summary>Run with custom chat template</summary>
285
+
<summary>Run in conversation mode with custom chat template</summary>
293
286
294
287
```bash
295
-
# use the "chatml" template
296
-
llama-cli -m model.gguf -p "You are a helpful assistant" -cnv --chat-template chatml
288
+
# use the "chatml" template (use -h to see the list of supported templates)
To disable conversation mode explicitly, use `-no-cnv`
301
+
302
+
```bash
303
+
llama-cli -m model.gguf -p "I believe the meaning of life is" -n 128 -no-cnv
304
+
305
+
# I believe the meaning of life is to find your own truth and to live in accordance with it. For me, this means being true to myself and following my passions, even if they don't align with societal expectations. I think that's what I love about yoga – it's not just a physical practice, but a spiritual one too. It's about connecting with yourself, listening to your inner voice, and honoring your own unique journey.
0 commit comments