-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.reference.llmc
More file actions
582 lines (513 loc) · 33.5 KB
/
Copy pathconfig.reference.llmc
File metadata and controls
582 lines (513 loc) · 33.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
# llmconfig — Full Reference Config
# Every supported field is listed with its default value and a description.
# Copy this file into your llmconfig configs directory as <name>.yaml and
# remove what you don't need. Paths are shown as ~/.llmconfig/... for
# brevity; on Windows that resolves to %USERPROFILE%\.llmconfig\...
# Set LLMCONFIG_CONFIG_DIR to override the base directory.
#
# Minimal required fields: version, name, model.source, model.repo + model.file (or model.path / model.url)
# Backend-specific fields (whisper:, sd:) only apply when backend is set accordingly.
# ── Identity ──────────────────────────────────────────────────────────────────
version: 1 # config schema version, always 1
name: my-model # unique name used in all CLI commands
description: "" # optional human-readable description
tags: [] # optional labels, e.g. [instruct, 7b, gguf]
# ── Backend ───────────────────────────────────────────────────────────────────
# Which inference engine to run for this model.
# llama → text generation (llama.cpp) — default
# sd → image generation (stable-diffusion.cpp)
# whisper → speech recognition (whisper.cpp)
backend: llama
meta:
author: "" # optional author name
created_at: "" # optional creation date (free-form string)
updated_at: "" # optional last update date
notes: "" # optional free-form notes
# ── Mode ──────────────────────────────────────────────────────────────────────
# server → starts llama-server, exposes an OpenAI-compatible HTTP API
# interactive → starts llama-cli, opens a terminal chat session (no HTTP server)
mode: server # default: server
# ── Model ─────────────────────────────────────────────────────────────────────
model:
# source controls where the model file comes from
# huggingface → download from huggingface.co (requires repo + file)
# url → download from a direct URL (requires url)
# local → use a file already on disk (requires path)
source: huggingface
# --- HuggingFace (source: huggingface) ---
repo: bartowski/google_gemma-4-E2B-it-GGUF # HuggingFace repo in user/repo format
file: google_gemma-4-E2B-it-Q4_K_M.gguf # exact filename inside the repo
# --- Direct URL (source: url) ---
# url: https://example.com/model.gguf
# --- Local file (source: local) ---
# path: /absolute/path/to/model.gguf
# Optional: sha256 checksum for integrity verification
# Format: "sha256:<hex>" e.g. sha256:abc123...
checksum: ""
download:
resume: true # resume interrupted downloads (default: true)
connections: 4 # parallel download connections (default: 4)
verify_checksum: true # verify checksum after download (default: true; set to false to skip)
model_dir: "" # override models directory (default: ~/.llmconfig/models)
# --- Speculative decoding (optional) ---
# Requires a smaller draft model from the same family.
# draft:
# source: huggingface
# repo: bartowski/some-draft-GGUF
# file: draft-model-Q4_K_M.gguf
# draft_n: 5 # tokens to draft ahead (default: 5)
# draft_min: 0 # minimum draft tokens (default: 0)
# draft_p_min: 0.75 # minimum speculative decoding probability (default: 0.75)
# n_ctx: 0 # draft model context size (0 = same as main model)
# n_gpu_layers: 0 # draft model GPU layers (0 = same as main model)
# devices: [] # draft model GPU devices
# cache_type_k: f16 # draft model KV cache type K
# cache_type_v: f16 # draft model KV cache type V
# spec_replace_target: "" # speculative decoding string replacement target
# spec_replace_draft: "" # speculative decoding string replacement draft
# override_tensor: [] # tensor buffer overrides for draft model
# cpu_moe: false # keep all MoE weights in CPU for draft (default: false)
# n_cpu_moe: 0 # keep first N layers MoE in CPU for draft (0 = not set)
# threads_draft: 0 # draft model generation threads (0 = same as --threads, server only)
# threads_batch_draft: 0 # draft model batch threads (0 = same as threads_draft, server only)
# spec_type: "" # speculative decoding type: none|ngram-cache|ngram-simple|ngram-map-k|...
# spec_ngram_size_n: 0 # ngram lookup size N (0 = use default 12)
# spec_ngram_size_m: 0 # ngram draft size M (0 = use default 48)
# spec_ngram_min_hits: 0 # min hits for ngram-map (0 = use default 1)
# --- LoRA adapters (optional) ---
# lora: [] # LoRA adapter file(s), e.g. ["./adapter.gguf"]
# lora_scaled: [] # LoRA with scaling, format: ["./adapter.gguf:0.8"]
# --- Control vectors (optional) ---
# control_vector: [] # control vector file(s)
# control_vector_scaled: [] # control vector with scaling, format: ["./vector.gguf:0.8"]
# control_vector_layer_start: 0 # layer range start for control vector (default: not set)
# control_vector_layer_end: 0 # layer range end for control vector (default: not set)
# --- Model metadata overrides (advanced) ---
# override_kv: [] # override model metadata, e.g. ["tokenizer.ggml.add_bos_token=bool:false"]
# --- Multimodal projection (optional, for vision models) ---
# mmproj:
# source: huggingface
# repo: user/repo-GGUF
# file: mmproj-model.gguf
# offload: true # GPU offload for mmproj (default: true)
# ── Server ────────────────────────────────────────────────────────────────────
# Only applies when mode: server
server:
host: 127.0.0.1 # bind address (default: 127.0.0.1)
port: 8080 # listen port (default: 8080)
api_key: "" # bearer token for Authorization header (default: none)
# api_key_file: "" # path to file containing API keys (one per line)
parallel: 1 # number of concurrent request slots (default: 1)
cors_origins: [] # allowed CORS origins, e.g. ["https://myapp.com"]
read_timeout: 600s # llmconfig internal timeout (default: 600s)
write_timeout: 600s # llmconfig internal timeout (default: 600s)
# timeout: 0 # llama-server read/write timeout in seconds (0 = not set)
# threads_http: -1 # HTTP request handler threads (-1 = auto)
# reuse_port: false # allow multiple sockets on same port (default: false)
# path: "" # directory to serve static files from
# api_prefix: "" # API path prefix, without trailing slash
# SSL / HTTPS
# ssl_key_file: "" # path to PEM-encoded SSL private key
# ssl_cert_file: "" # path to PEM-encoded SSL certificate
# Prompt cache
# cache_prompt: true # prompt caching (set false to disable, default: true)
# cache_reuse: 0 # min chunk size for KV-shift cache reuse (0 = disabled)
# Slots
# slot_prompt_similarity: 0.10 # slot matching threshold (0.0 = disabled, default: 0.10)
# slot_save_path: "" # directory to save slot KV cache
# sleep_idle_seconds: 0 # sleep after idle seconds (-1 = disabled, 0 = not set)
# lora_init_without_apply: false # load LoRA adapters without applying (apply via POST /lora-adapters)
# KV
# kv_unified: true # unified KV buffer shared across slots (set false to disable)
# clear_idle: true # save and clear idle slots on new task (set false to disable)
# Batching
# cont_batching: true # continuous batching / dynamic batching (set false to disable)
# Model identification
# alias: "" # model name aliases, comma-separated (used by API)
# tags: "" # model tags, comma-separated (informational)
# Web UI
# webui: true # enable Web UI (set false to disable)
# webui_config: "" # JSON string for default WebUI settings
# webui_config_file: "" # path to JSON file for WebUI settings
# webui_mcp_proxy: false # experimental: MCP CORS proxy (do not enable in untrusted env)
# tools: "" # experimental: built-in AI agent tools, comma-separated or "all"
# Embeddings
# pooling: "" # pooling type for embeddings: none | mean | cls | last | rank
# Infill
# spm_infill: false # use Suffix/Prefix/Middle pattern (default: Prefix/Suffix/Middle)
# Response behavior
# prefill_assistant: true # prefill assistant response if last message is assistant (set false to disable)
# Media
# media_path: "" # directory for local media files accessible via file:// URLs
# Router server (for multi-model serving)
# models_dir: "" # directory containing models
# models_preset: "" # path to INI file with model presets
# models_max: -1 # max simultaneous models (-1 = not set, 0 = unlimited, default: 4)
# models_autoload: true # auto-load models (set false to disable)
# Lookup cache (for lookup decoding)
# lookup_cache_static: "" # path to static lookup cache (not updated by generation)
# lookup_cache_dynamic: "" # path to dynamic lookup cache (updated by generation)
endpoints:
metrics: false # enable Prometheus metrics endpoint (default: false)
slots: true # when false, disables slots monitoring endpoint
embeddings: false # restrict to embedding use case only (default: false)
rerank: false # enable reranking endpoint (default: false)
props: false # enable POST /props for dynamic property changes (default: false)
# ── Hardware Profiles ─────────────────────────────────────────────────────────
# llmconfig auto-selects the matching profile at runtime based on detected hardware.
# Override at startup with: llmconfig up <name> --profile cpu
#
# Profile selection order:
# apple_silicon → macOS + ARM64
# nvidia → NVIDIA GPU detected (nvidia-smi)
# amd → AMD GPU detected (sysfs / wmic)
# intel_gpu → Intel GPU detected (sysfs)
# cpu → fallback
hardware_profiles:
apple_silicon:
n_gpu_layers: 99 # layers to offload to GPU (-1 = all, 0 = CPU only)
metal: true # enable Apple Metal backend
threads: 8 # CPU threads for non-GPU layers
threads_batch: 8 # CPU threads for batch processing
nvidia:
n_gpu_layers: 99
cuda: true # enable CUDA backend
threads: 8
threads_batch: 8
# devices: ["0"] # specific CUDA device IDs (default: all)
# tensor_split: [0.5, 0.5] # VRAM split across multiple GPUs (must sum to 1.0)
# split_mode: layer # multi-GPU split: none | layer | row | tensor (default: layer)
# main_gpu: 0 # primary GPU index for split-mode none/row (default: 0)
# priority: 0 # process priority: -1=low, 0=normal, 1=medium, 2=high, 3=realtime
# fit: on # auto-fit layers to device memory: "on" | "off" (default: on)
# fit_target: [1024] # target free margin per device in MiB (default: 1024)
# fit_ctx: 4096 # minimum ctx size --fit can set (default: 4096)
# override_tensor: [] # tensor buffer type overrides, e.g. ["blk\\..*\\.ffn=CPU"]
# cpu_moe: false # keep ALL MoE expert weights in CPU (default: false)
# cpu_mask: "" # CPU affinity mask (hex), e.g. "FF00"
# cpu_mask_batch: "" # CPU affinity mask for batch processing
# cpu_range_batch: "" # CPU range for batch affinity, e.g. "0-3"
# cpu_strict_batch: false # strict CPU placement for batch (default: false)
# poll: 50 # polling level 0-100 (0=no polling, default: 50)
# poll_batch: 50 # polling level for batch (default: same as poll)
# prio_batch: 0 # batch thread priority: 0=normal,1=medium,2=high,3=realtime
# repack: true # weight repacking optimization (default: true)
# no_host: false # bypass host buffer for extra device buffers (default: false)
# op_offload: true # offload host tensor ops to device (default: true)
# rpc: "" # RPC servers for distributed inference, e.g. "host1:50052,host2:50052"
# direct_io: false # use DirectIO if available (default: false)
amd:
n_gpu_layers: 99
rocm: true # enable ROCm backend
threads: 8
threads_batch: 8
intel_gpu:
n_gpu_layers: 99
sycl: true # enable SYCL/oneAPI backend
threads: 8
threads_batch: 8
cpu:
n_gpu_layers: 0 # all layers on CPU
threads: 8
threads_batch: 8
# cpu_range: "0-7" # restrict to specific CPU cores (Linux)
# cpu_strict: false # strict CPU affinity (default: false)
# numa: "" # NUMA strategy: distribute | isolate | numactl | mirror
# ── Context ───────────────────────────────────────────────────────────────────
context:
n_ctx: 4096 # context window size in tokens (default: 4096)
n_batch: 512 # prompt processing batch size (default: 512)
n_ubatch: 512 # physical batch size, <= n_batch (default: n_batch)
n_keep: 0 # tokens to keep from initial prompt on context overflow (default: 0)
cache_type_k: f16 # key cache type: f32 | f16 | bf16 | q8_0 | q4_0 | q4_1 (default: f16)
cache_type_v: f16 # value cache type: same options as cache_type_k (default: f16)
mmap: true # memory-map model file (default: true)
mlock: false # lock model in RAM, prevent swap (default: false)
# flash_attention: on # Flash Attention: "on" | "off" | "auto" (default: auto, recommended: on)
n_cpu_moe: 0 # CPU layers for MoE experts (0 = use n_gpu_layers logic)
# n_predict: 0 # max tokens to generate (-1 = infinity, 0 = not set)
# context_shift: false # enable context shift on infinite generation (default: false)
# kv_offload: true # KV cache GPU offload (set false to disable, default: true)
# swa_full: false # use full-size SWA cache (default: false)
# cache_ram: 8192 # max RAM cache in MiB (-1 = no limit, 0 = not set, default: 8192)
# image_min_tokens: 0 # minimum image tokens for dynamic resolution vision models
# image_max_tokens: 0 # maximum image tokens for dynamic resolution vision models
# check_tensors: false # validate tensor data on load (default: false)
# ctx_checkpoints: 32 # max context checkpoints per slot (default: 32)
# checkpoint_every_n_tokens: 0 # checkpoint interval in tokens (-1 = disable, 0 = not set, default: 8192)
# ── Sampling ──────────────────────────────────────────────────────────────────
sampling:
temperature: 0.8 # randomness; 0 = deterministic, 1 = creative (default: 0.8)
top_k: 40 # sample from top K tokens (default: 40)
top_p: 0.95 # nucleus sampling probability (default: 0.95)
min_p: 0.05 # minimum probability threshold (default: 0.05)
repeat_penalty: 1.0 # penalize repeated tokens (1.0 = disabled, default: 1.0)
repeat_last_n: 64 # tokens to look back for repeat penalty (default: 64)
# presence_penalty: 0.0 # presence penalty — discourages any repeated token (default: 0.0)
# frequency_penalty: 0.0 # frequency penalty — discourages frequent tokens (default: 0.0)
# seed: 0 # RNG seed for reproducible output (0 = random, default: 0)
# DRY (Don't Repeat Yourself) sampling — suppresses repetitive patterns
dry_multiplier: 0.0 # DRY penalty multiplier (0 = disabled, default: 0)
dry_base: 1.75 # DRY exponential base (default: 1.75)
dry_allowed_length: 2 # token sequence length before DRY kicks in (default: 2)
dry_penalty_last_n: -1 # DRY look-back window (-1 = full context, default: -1)
# Mirostat adaptive sampling (alternative to top_k/top_p)
# mirostat: 0 # 0 = disabled, 1 = Mirostat v1, 2 = Mirostat v2
# mirostat_tau: 5.0 # target entropy (default: 5.0)
# mirostat_eta: 0.1 # learning rate (default: 0.1)
# samplers: "" # sampler order override, e.g. "top_k;top_p;temp"
# Dynamic temperature — varies temperature based on entropy
# dynatemp_range: 0.0 # range around base temperature (0.0 = disabled)
# dynatemp_exp: 1.0 # exponent for dynamic temperature curve
# XTC (eXclude Top Choices) sampling — removes high-probability tokens to increase diversity
# xtc_probability: 0.0 # probability of applying XTC (0.0 = disabled)
# xtc_threshold: 0.1 # minimum token probability to be excluded
# Locally typical sampling
# typical: 0.0 # typical-p value (0 = not set, 1.0 = disabled)
# Top-n-sigma sampling
# top_nsigma: 0.0 # sigma threshold (0 = not set, -1 = disabled)
# Adaptive-p sampling — selects tokens near a target probability
# adaptive_target: 0.0 # target probability (0 = not set, -1 = disabled)
# adaptive_decay: 0.9 # decay rate for target adaptation (default: 0.9)
# DRY custom sequence breakers (clears defaults: '\n', ':', '"', '*')
# dry_sequence_breakers: [] # e.g. ["\n", ":"]
# Sampler sequence shorthand
# sampler_seq: "" # simplified sampler order, e.g. "edskypmxt"
# ignore_eos: false # ignore end-of-stream token and continue generating (default: false)
# Backend sampling (experimental)
# backend_sampling: false # enable backend sampling (default: false)
# Structured output — constrains generation to a grammar or schema
# grammar: "" # inline BNF-like grammar string
# grammar_file: "" # path to a grammar file
# json_schema: "" # inline JSON schema string
# json_schema_file: "" # path to a JSON schema file
# ── Chat ──────────────────────────────────────────────────────────────────────
chat:
system_prompt: "" # interactive mode only (llama-cli --system-prompt). llama-server dropped
# this flag upstream (ggml-org/llama.cpp#9811) — for mode: server, send
# the system prompt as a "system" role message in each chat request instead.
template: "" # chat template name (leave empty to use model's built-in)
# examples: llama3, chatml, gemma, mistral, phi3
# jinja: true # true=--jinja, false=--no-jinja, omit=use llama.cpp default (enabled)
template_kwargs: {} # extra key-value pairs passed as JSON to --chat-template-kwargs
# reasoning: auto # thinking/reasoning mode: "on", "off", or "auto" (default: auto)
# reasoning_budget: -1 # thinking token budget: -1 unlimited, 0 immediate end, N>0 budget
# reasoning_budget_message: "" # message injected before end-of-thinking tag when budget exhausted
# reasoning_format: auto # thought tag format: none | deepseek | deepseek-legacy (default: auto)
# template_file: "" # path to a jinja template file (overrides built-in template)
# skip_chat_parsing: false # force pure content parser, output everything in content (default: false)
# ── RoPE (Rotary Position Embedding) ─────────────────────────────────────────
# Only needed to extend context beyond the model's trained limit.
rope:
scaling: "" # scaling type: linear | yarn | longrope (default: none)
# scale: 0 # context scaling factor, expands context by N (--rope-scale)
freq_base: 0 # RoPE frequency base (0 = use model default)
freq_scale: 0 # RoPE frequency scale factor, expands context by 1/N
# YaRN-specific:
yarn_ext_factor: -1.0 # extrapolation mix factor (-1 = auto, default: -1.0)
yarn_attn_factor: 1.0 # attention scaling factor (default: 1.0)
# yarn_beta_slow: 0 # YaRN high correction dim / alpha (default: -1.0)
# yarn_beta_fast: 0 # YaRN low correction dim / beta (default: -1.0)
yarn_orig_ctx: 0 # original context size the model was trained on
# ── Resources ─────────────────────────────────────────────────────────────────
resources:
vram_limit: "" # VRAM cap, e.g. "8GB" (informational, not enforced by llama.cpp)
vram_buffer: 512MB # reserved VRAM headroom (default: 512MB)
memory_limit: "" # RAM cap, e.g. "16GB" (informational)
cpu_limit: "" # CPU usage cap, e.g. "80%" (informational)
cpu_priority: normal # process priority: low | normal | high (default: normal)
fallback_to_cpu: true # fall back to CPU if GPU offload fails (default: true)
request_timeout: 120s # per-request timeout (default: 120s)
max_concurrent: 0 # max concurrent requests (0 = unlimited)
# ── Logging ───────────────────────────────────────────────────────────────────
logging:
level: info # log level: debug | info | warn | error (default: info)
file: "" # log file path (default: ~/.llmconfig/logs/<name>.log)
colors: auto # color output: auto | on | off (default: auto)
# prefix: false # enable prefix in log messages (default: false)
# timestamps: false # enable timestamps in log messages (default: false)
# verbosity: -1 # verbosity threshold: 0=generic,1=error,2=warn,3=info,4=debug (-1 = not set)
# show_timings: true # show timing info after each response (set false to disable)
# ── Backend: whisper ──────────────────────────────────────────────────────────
# Only applies when backend: whisper. Remove this block for other backends.
# whisper:
# # --- Core ---
# language: auto # auto | en | tr | de | fr | ... (default: en)
# task: transcribe # transcribe | translate (default: transcribe)
# processors: 1 # parallel processor count (default: 1)
#
# # --- Timing & segmentation ---
# offset_t: 0 # time offset in milliseconds
# offset_n: 0 # segment index offset
# duration: 0 # audio duration to process in ms (0 = all)
# max_context: -1 # max text context tokens (-1 = all)
# max_len: 0 # max segment length in characters
# audio_ctx: 0 # audio context size (0 = all)
# split_on_word: false # split on word rather than token
#
# # --- Decoder thresholds ---
# word_thold: 0.01 # word timestamp probability threshold
# entropy_thold: 2.40 # entropy threshold for decoder fail
# logprob_thold: -1.00 # log probability threshold
# no_speech_thold: 0.60 # no speech threshold
#
# # --- Sampling ---
# beam_size: 5 # beam search width (default: 5)
# best_of: 5 # best candidates to keep (default: 5)
# temperature: 0.00 # sampling temperature (default: 0.0)
# temperature_inc: 0.20 # temperature increment (default: 0.20)
# no_fallback: false # do not use temperature fallback
#
# # --- Language & prompt ---
# detect_language: false # exit after detecting language
# prompt: "" # initial prompt (max n_text_ctx/2 tokens)
# carry_initial_prompt: false # always prepend initial prompt (cli only)
#
# # --- Diarization ---
# diarize: false # stereo audio diarization
# tinydiarize: false # tdrz model diarization
#
# # --- Word-level timestamps ---
# word_timestamps: false # shorthand: uses dtw=tiny if dtw is empty
# dtw: "" # DTW model: tiny|base|small|medium|large-v1/v2/v3
#
# # --- GPU ---
# no_gpu: false # disable GPU
# device: 0 # GPU device ID
# flash_attention: on # set false to pass --no-flash-attn (default: enabled)
#
# # --- Suppress ---
# suppress_nst: false # suppress non-speech tokens
# suppress_regex: "" # regex matching tokens to suppress (cli only)
#
# # --- Grammar (cli only) ---
# grammar: "" # GBNF grammar to guide decoding
# grammar_rule: "" # top-level grammar rule name
# grammar_penalty: 100.0 # scales down nongrammar token logits
#
# # --- OpenVINO ---
# ov_e_device: CPU # OpenVINO encode device (default: CPU)
#
# # --- Output formats (cli only) ---
# output_txt: false
# output_vtt: false # .vtt subtitle file
# output_srt: false # .srt subtitle file
# output_lrc: false # .lrc lyrics file
# output_csv: false
# output_json: false
# output_json_full: false # include more info in JSON
# output_file: "" # output path without extension
# no_timestamps: false # do not print timestamps
#
# # --- Logging ---
# no_prints: false # suppress output except results (cli)
# print_special: false
# print_colors: false
# print_confidence: false # cli only
# print_progress: false
# print_realtime: false # server only
# log_score: false # log decoder scores (cli only)
# debug_mode: false
#
# # --- VAD (Voice Activity Detection) ---
# vad: false
# vad_model: "" # path to VAD model file
# vad_threshold: 0.50 # speech detection threshold
# vad_min_speech_duration_ms: 250
# vad_min_silence_duration_ms: 100
# vad_max_speech_duration_s: 0 # 0 = unlimited
# vad_speech_pad_ms: 30
# vad_samples_overlap: 0.10
#
# # --- Server-only ---
# public_path: "" # path to public folder (default: examples/server/public)
# request_path: "" # request path prefix
# inference_path: "" # inference path (default: /inference)
# convert: false # convert audio to WAV via ffmpeg
# tmp_dir: "" # temp dir for ffmpeg files
# no_language_probabilities: false # exclude language probs from verbose_json
# ── Backend: sd ───────────────────────────────────────────────────────────────
# Only applies when backend: sd. Remove this block for other backends.
# sd:
# # --- Output (cli mode only) ---
# output: ./output.png # output path; use %d for sequences e.g. output_%03d.png
# preview_path: ./preview.png # preview image path
# preview_interval: 1 # preview update interval in steps
# preview: none # preview method: none | proj | tae | vae
# mode: img_gen # run mode: img_gen | vid_gen | upscale | convert | metadata
#
# # --- Server (server mode only) ---
# serve_html_path: "" # path to HTML file to serve at root
#
# # --- Model components ---
# clip_l: "" # path to clip-l text encoder
# clip_g: "" # path to clip-g text encoder (SDXL)
# clip_vision: "" # path to clip-vision encoder
# t5xxl: "" # path to t5xxl text encoder (SD3/Flux)
# llm: "" # path to LLM text encoder (Flux2/QwenVL)
# llm_vision: "" # path to LLM visual encoder
# diffusion_model: "" # path to standalone diffusion model (split model)
# high_noise_diffusion_model: "" # path to high-noise diffusion model
# vae: "" # path to standalone VAE model
# taesd: "" # path to Tiny AutoEncoder (fast decode, low quality)
# control_net: "" # path to ControlNet model
# embd_dir: "" # embeddings directory
# lora_model_dir: "" # LoRA model directory
# tensor_type_rules: "" # weight type per tensor pattern, e.g. "^vae\.=f16,model\.=q8_0"
# photo_maker: "" # path to PHOTOMAKER model
# upscale_model: "" # path to ESRGAN upscale model
#
# # --- Hardware & weight type ---
# type: "" # weight type: f32 | f16 | q4_0 | q4_1 | q8_0 | q2_K | ...
# rng: cuda # RNG: std_default | cuda | cpu
# sampler_rng: "" # sampler RNG (default: same as --rng)
# prediction: "" # prediction type: eps | v | edm_v | sd3_flow | flux_flow | flux2_flow
# lora_apply_mode: auto # LoRA apply mode: auto | immediately | at_runtime
# offload_to_cpu: false # offload weights to RAM, load to VRAM when needed
# mmap: false # memory-map model file
# control_net_cpu: false # keep ControlNet in CPU
# clip_on_cpu: false # keep CLIP in CPU
# vae_on_cpu: false # keep VAE in CPU
# flash_attention: false # enable flash attention (--fa)
# diffusion_fa: false # flash attention in diffusion model only
# circular: false # circular padding for convolutions
#
# # --- Generation defaults ---
# width: 512 # output width in pixels (default: 512)
# height: 512 # output height in pixels (default: 512)
# steps: 20 # diffusion steps (default: 20)
# clip_skip: -1 # CLIP layers to skip (-1 = auto: 1 for SD1.x, 2 for SD2.x)
# batch_count: 1 # number of images to generate
# cfg_scale: 7.0 # classifier-free guidance scale (default: 7.0)
# guidance: 3.5 # distilled guidance scale for Flux/SD3 (default: 3.5)
# strength: 0.75 # noise strength for img2img (default: 0.75)
# control_strength: 0.9 # ControlNet strength (default: 0.9)
# sampling_method: "" # euler|euler_a|heun|dpm++2m|dpm++2s_a|lcm|tcd|... (default: auto)
# scheduler: discrete # sigma scheduler: discrete|karras|exponential|ays|gits|smoothstep|...
# negative_prompt: "" # default negative prompt
# seed: -1 # RNG seed (-1 = random, default: 42)
#
# # --- VAE tiling (reduce VRAM for high-res) ---
# vae_tiling: false # process VAE in tiles
# vae_tile_size: 32x32 # tile size, format WxH
# vae_tile_overlap: 0.5 # tile overlap fraction (default: 0.5)
#
# # --- SLG (Skip Layer Guidance, SD3.5) ---
# slg_scale: 0.0 # SLG scale (0 = disabled; ~2.5 for SD3.5 medium)
# skip_layer_start: 0.01 # SLG enabling point (default: 0.01)
# skip_layer_end: 0.2 # SLG disabling point (default: 0.2)
# skip_layers: "[7,8,9]" # layers to skip for SLG steps
#
# # --- Cache acceleration ---
# cache_mode: "" # easycache|ucache|dbcache|taylorseer|cache-dit|spectrum
# cache_option: "" # cache params, e.g. "threshold=0.25,reset=0"
#
# # --- High noise stage (two-stage generation, e.g. Wan2.2 MoE) ---
# high_noise_steps: -1 # high noise steps (-1 = auto)
# high_noise_cfg_scale: 7.0 # high noise guidance scale
# high_noise_guidance: 3.5 # high noise distilled guidance
# high_noise_sampling_method: "" # high noise sampling method
#
# # --- Logging ---
# verbose: false
# color: false