Skip to content

docs+cli: sync imp.conf.example, --help text and config comments with parser reality#878

Merged
kekzl merged 1 commit into
mainfrom
config-cli-consistency-sweep
Jul 7, 2026
Merged

docs+cli: sync imp.conf.example, --help text and config comments with parser reality#878
kekzl merged 1 commit into
mainfrom
config-cli-consistency-sweep

Conversation

@kekzl

@kekzl kekzl commented Jul 7, 2026

Copy link
Copy Markdown
Owner

What

Three-way consistency audit of the config surface — RuntimeConfig parser (src/runtime/config.{h,cpp}) vs imp.conf.example vs the imp-cli/imp-server argument parsers vs docs/usage.md — and the fixes for every verified drift point. No hot-path behavior change.

Findings & fixes

imp.conf.example (billed as the full schema by docs/usage.md) was missing 4 parsed, live keys:

  • runtime.prefill_chunk_decode_cap, attention.mla_absorb, gemm.nvfp4_lm_head_cutlass, diagnostics.spec_capture_probe — added with intent comments. All 132 parsed keys are now covered (verified by extracting every key string from config.cpp and grepping the example). Also imp --setimp-cli --set in the header.

Stale comments in config.h (code right, comment wrong):

  • q8_imma_enabled and moe_imma_prefill said "default off" — defaults are true.
  • fp8_auto_legacy claimed IMP_KV_FP8_AUTO env compat, but seed_from_env never reads that env; comment now says imp.conf-key-only. The matching phantom-env log line in engine_init_resolver.cpp fixed too.

--help gaps (flags parsed + functional but absent from usage text):

  • imp-cli: --config, --set, --perplexity, --repeat-last-n added.
  • imp-server: --config, --set, --min-kv-tokens, --prefix-cache added; --prefill-chunk-size wording aligned with the CLI (default is -1 = per-arch, not 0).

Dead code: turboquant_sketch_mult (both args.h) and EngineConfig::turboquant_sketch_multiplier were written-never-read — removed. --tq-sketch-mult stays parsed-and-ignored and ImpConfig keeps its field for ABI compat.

imp-bench: all did not run the nvfp4 benchmark — now it does; usage text documents that the no-arg default excludes it (isolated ncu target).

docs/usage.md: server-flags table was missing --host, --port, --max-batch, --models-dir, --lora, --request-timeout, --max-input-tokens, --prefix-cache — added.

Verification

  • make build + make test-unit (37/37) + make verify-fast (fast gtest filter PASS; model-gated perf/smoke stages skipped — models not mounted in the verify container; not needed, no hot-path change).
  • Both binaries' --help output checked in the built image; imp-cli --config imp.conf.example parses with zero unknown-key warnings.
  • Key-coverage check: every section.key parsed in config.cpp appears in imp.conf.example.

No perf impact; baseline untouched.

🤖 Generated with Claude Code

… parser reality

Three-way consistency sweep (RuntimeConfig parser vs imp.conf.example vs
CLI parsers vs docs). No hot-path behavior change.

- imp.conf.example: add the 4 parsed-but-undocumented keys
  (runtime.prefill_chunk_decode_cap, attention.mla_absorb,
  gemm.nvfp4_lm_head_cutlass, diagnostics.spec_capture_probe) — all 132
  parsed keys are now covered; fix 'imp --set' -> 'imp-cli --set'.
- config.h: fix stale comments (q8_imma_enabled / moe_imma_prefill say
  'default off' but default true; fp8_auto_legacy claimed an
  IMP_KV_FP8_AUTO env that seed_from_env never reads) and the matching
  phantom-env log line in engine_init_resolver.cpp.
- imp-cli --help: add --config, --set, --perplexity, --repeat-last-n
  (all parsed + functional but undocumented).
- imp-server --help: add --config, --set, --min-kv-tokens,
  --prefix-cache; align --prefill-chunk-size default wording with the
  CLI (-1 = per-arch, not 0).
- Remove the dead turboquant_sketch_mult/multiplier fields from both
  args.h and EngineConfig (--tq-sketch-mult stays parsed-and-ignored;
  ImpConfig keeps its field for ABI compat).
- imp-bench: 'all' now actually runs the nvfp4 benchmark; usage text
  documents that the no-arg default excludes it.
- docs/usage.md: add the missing server flags (--host, --port,
  --max-batch, --models-dir, --lora, --request-timeout,
  --max-input-tokens, --prefix-cache) to the server-flags table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kekzl kekzl enabled auto-merge (squash) July 7, 2026 12:12
@kekzl kekzl merged commit 93eef87 into main Jul 7, 2026
7 checks passed
@kekzl kekzl deleted the config-cli-consistency-sweep branch July 7, 2026 12:18
kekzl added a commit that referenced this pull request Jul 7, 2026
…liases, dead flags (#879)

Simplification pass over the config/CLI layer (follow-up to #878). Every
removal was verified to have zero producers/consumers in the repo; all
functionality stays reachable via imp.conf / --set.

- seed_from_env: 29 legacy IMP_* env reads -> 2. Only IMP_DETERMINISTIC
  (set by test_determinism_e2e/test_lora) and IMP_FMHA_FA2 (set by the
  roofline A/B harness) have real producers; the other 27 had none.
  Stale 'Legacy env: IMP_*' comments and log strings swept repo-wide.
- Fix --kv-fp16: it set an IMP_KV_FP16 env var that nothing has ever
  read (silent no-op). It now pushes kv_cache.dtype=fp16, actually
  forcing FP16 and opting out of the auto FP8-hint upgrade.
- --no-fp8-prefill: setenv round-trip replaced by a direct
  attention.fp8_prefill=never config override.
- Retire deprecated TurboQuant surface: --kv-turboquant{,-lite} and
  --tq-sketch-mult flags (CLI + server + per-request JSON overrides),
  one-shot WARN blocks, IMP_DTYPE_TURBOQUANT(_LITE) C-API aliases, and
  the ignored turboquant_sketch_multiplier field. TurboQuant was retired
  Phase 5 (2026-05-17); the aliases had no callers.
- Delete the --cuda-graphs no-op flag (graphs are default-on).
- Delete dead ImpConfig fields gpu_memory_pool_size and num_cpu_threads
  (default-initialized, never read).

Verified: make build + test-unit (37/37) + verify-fast (fast gtest PASS);
GPU smoke on Qwen3-8B-Q8_0 — --kv-fp16/--no-fp8-prefill resolve correctly
(log: 'FP8 prefill: disabled (attention.fp8_prefill=never)'), generation
coherent; removed flags now fail fast with 'Unknown argument'.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant