Skip to content

Commit dc6510b

Browse files
docs: Update README with YAML config usage and examples
- Add YAML config section with usage examples and precedence rules - Document --config flag and example configurations - Show minimal.yaml and override.yaml usage patterns - Explain flags > yaml > defaults precedence - Document relative path resolution behavior Co-Authored-By: Jaime Mizrachi <[email protected]>
1 parent ba9857d commit dc6510b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,38 @@ llama-cli -hf ggml-org/gemma-3-1b-it-GGUF
5454
llama-server -hf ggml-org/gemma-3-1b-it-GGUF
5555
```
5656

57+
### YAML Configuration
58+
59+
You can use YAML configuration files to set parameters instead of command-line flags:
60+
61+
```bash
62+
llama-cli --config configs/minimal.yaml
63+
```
64+
65+
Example `minimal.yaml`:
66+
```yaml
67+
model:
68+
path: models/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
69+
n_ctx: 256
70+
sampling:
71+
seed: 42
72+
temp: 0.0
73+
prompt: "Hello from YAML"
74+
n_predict: 16
75+
simple_io: true
76+
```
77+
78+
You can override YAML values with command-line flags:
79+
```bash
80+
llama-cli --config configs/minimal.yaml -n 32 --temp 0.8
81+
```
82+
83+
**Precedence rules:** Command-line flags > YAML config > defaults
84+
85+
**Path resolution:** Relative paths in YAML files are resolved relative to the YAML file's directory.
86+
87+
**Error handling:** Unknown YAML keys will cause an error with a list of valid keys.
88+
5789
## Description
5890

5991
The main goal of `llama.cpp` is to enable LLM inference with minimal setup and state-of-the-art performance on a wide

0 commit comments

Comments
 (0)