Skip to content

kern.toml

kern.toml describes host-local paths and command defaults. Kern finds the nearest file at or above the current directory unless --config names one. Relative paths are resolved from the config file's directory.

Unknown fields are rejected.

Complete shape

toml
gpu = 0
capacity = 4096

[targets.demo]
manifest = "artifacts/candidate/manifest.json"
reference = "artifacts/reference/manifest.json"
kernels = "artifacts/kernels"
weights = ["artifacts/checkpoint"]   # HF snapshot dir(s) or .safetensors files
tokenizer = "artifacts/tokenizer.json"   # optional: defaults to the checkpoint's tokenizer.json

[kernels]
dumps = ["captures/framework-run"]
sources = "tools/kernels-src"

[test]
seed = 0x5eed
decode_steps = 32
logit_ulp = 4
fuzz = 6
prompt = "Optional real-text prompt"

[run]
prompt = "The capital of France is"
steps = 32
chunk = 512

Top-level fields

FieldMeaning
gpuCUDA device ordinal used when the command does not override it
capacityState capacity in tokens
targetsNamed artifact locations
kernelsInputs used by kern kernels
testDefaults for kern test
runDefaults for kern run

Target fields

FieldRequired forMeaning
manifestAll target-based commandsCandidate or runnable manifest
referencekern testTrusted A-side manifest
kernelsRun, test, bench, kernelsDirectory containing device modules
weightsRun, test, benchOne or more Safetensors files
tokenizerRun; test with a promptHugging Face tokenizer JSON; defaults to tokenizer.json in the first weights directory, whose generation_config.json also supplies the stop tokens

Target names have no built-in meaning. If the config contains exactly one target, commands may omit its name; otherwise a target must be selected.

Models ship as verified GPU programs.