Appearance
Local settings
Local settings are optional YAML overrides for engine parameters. They let one machine tune threads, context, or acceleration without changing the public registry. The default file is ~/.ai-server/settings.yml; set AI_SERVER_SETTINGS or pass --settings-file to use another path.
yaml
version: 1
adapters:
ggmlc-custom-decider:
threads: 8
ggmlc-laya:
threads: 6
models:
"decider-vision:2b":
settings:
context_size: 4096
quants:
q8:
flash_attn: "on"Precedence
Values are merged from lowest to highest priority:
- Registry model
settings. - Registry quant settings.
adapters.<adapter>settings in the local file, applied to every model using that adapter.models.<id>.settingsin the local file.models.<id>.quants.<quant>in the local file.- Repeated
--set key=valueflags.
Later layers replace the same key; unrelated keys remain. Use self settings <model> to print the effective values and their source before starting a server.
File rules
An omitted default file is fine. A path supplied explicitly by --settings-file or AI_SERVER_SETTINGS must exist and parse as version 1 YAML. Keep keys within the adapter's supported settings; unknown or invalid values are rejected before the engine starts.
bash
self settings decider-vision:2b@q4
self serve decider-vision:2b@q4 --settings-file ./settings.yml
self serve kev:4b@q8 --set threads=8 --set context_size=4096For Docker, mount the settings file read-only and pass its path inside the container:
bash
docker run --rm -p 8080:8080 \
--gpus=all \
-v "$HOME/.ai-server/models:/models" \
-v "$HOME/.ai-server/settings.yml:/etc/self/settings.yml:ro" \
ghcr.io/k0in/self:latest serve kev:4b@q8 --host 0.0.0.0 \
--settings-file /etc/self/settings.yml