Skip to content

feat(cli): Inkling 2 effort flag, visit-count banner, 4-bit trace - #3381

Merged
inureyes merged 2 commits into
mainfrom
feature/issue-3378-inkling2-cli-gaps
Nov 24, 2026
Merged

inureyes merged 2 commits into
mainfrom
feature/issue-3378-inkling2-cli-gaps

Conversation

@inureyes

Copy link
Copy Markdown
Member

Summary

  • --reasoning-effort LEVEL on mlxcel generate and mlxcel run, for the one-shot render, run -p and both chat REPLs. It goes through the server's request-to-kwargs resolution plus an explicit typed reasoning_effort kwarg, because the server forwards a string and drops a disabled level such as none, while Inkling 2 needs a JSON number for 0.5. The template's own error text is shown unchanged, and a template that ignores the level renders the same bytes.
  • The KV banner prints after the model loads and counts the caches the model reports, so Inkling 2 Mini says 48 of 48 and an int8 request is not claimed for FP16 caches. The pipeline and OpenXLA paths load no model and keep the config count.
  • scripts/inkling2_mlx_community_remap.py is the committed remap for the mlx-community 4-bit export, behind --inkling2-mlx-community on both logit-trace scripts. docs/benchmarks.md documents it.

A disabled level (none) also sets enable_thinking=false on templates that read it, as the server does for the same request field. Only a template that reads neither key renders byte-identically for every level.

Test plan

  • New unit tests: rendered prompt at none, 0.5, a named level and the default, an invalid level, a template that ignores the level, the 48-entry banner table against a 24-layer config, and the remap name and mode tables (tests/test_inkling2_mlx_community_remap.py).
  • server::in_process, cli::, coverage_tests (lib) and commands::generate, commands::run, commands::cli_server, commands::chat (bin) pass; clippy with -D warnings on lib, bins and tests; fmt and the CI contract scripts pass.
  • On models/inkling-2-mini: none renders Thinking effort level: 0, 0.5 renders 0.5, no flag renders 0.9, and the banner reads 48 of 48. run -p and the REPL honour the flag.
  • On models/inkling-2-mini-4bit against mlx-vlm 466069f5: text trace 0/372 decided disagreements, image trace on tests/fixtures/sapiens2/person.jpg with 600 identical prompt ids and 0/70 decided (docs/benchmark_results/inkling2-mini-4bit-image-trace-m3ultra-2026-11-24.md).
  • The broad make verify gate is left to the orchestrator.

Closes #3378

Three gaps left by #3367, grouped because they share one verification pass.

`--reasoning-effort LEVEL` on `generate` and `run` (and the chat REPL both start). The one-shot render and the in-process chat body both go through the server's own request-to-kwargs resolution, plus an explicit typed `reasoning_effort` kwarg, because the server forwards a string and never forwards a disabled level such as `none`, while Inkling 2's template needs a JSON number for `0.5` and a level name for `none`. The template's own error text is shown unchanged. Without the flag every render is unchanged.

The KV banner now prints after the model loads and counts the caches the model reports (`kv_cache_storage_modes()`), so Inkling 2 Mini says `48 of 48` instead of the 24 physical layers in `config.json`, and an int8 request is not claimed for caches that store FP16. The pipeline and OpenXLA paths load no model and keep the config count.

`scripts/inkling2_mlx_community_remap.py` is the committed remap for the mlx-community 4-bit export, behind `--inkling2-mlx-community` on `mlx_lm_logit_trace.py` and `mlx_vlm_image_logit_trace.py`. On `models/inkling-2-mini-4bit` the text trace has 0/372 decided disagreements and the image trace on the #3367 image has identical prompt ids and 0/70 decided (docs/benchmark_results/inkling2-mini-4bit-image-trace-m3ultra-2026-11-24.md).

Validated with the new unit tests, `commands::generate`, `commands::run`, `commands::cli_server`, `cli::` and `coverage_tests` selectors, clippy with -D warnings on lib, bins and tests, and real-checkpoint runs on both Mini checkpoints.

Refs #3378
@inureyes inureyes added status:review Under review type:enhancement New features, capabilities, or significant additions priority:low Low priority area:models Model architectures, weights, loading, metadata area:cli Command-line interface / CLI flags status:done Completed and removed status:review Under review labels Nov 24, 2026
@inureyes
inureyes marked this pull request as ready for review November 24, 2026 03:06
@inureyes
inureyes merged commit 3727fac into main Nov 24, 2026
32 of 33 checks passed
@inureyes
inureyes deleted the feature/issue-3378-inkling2-cli-gaps branch November 24, 2026 03:07
inureyes added a commit that referenced this pull request Nov 24, 2026
`scripts/inkling2_mlx_community_remap.py` landed in #3381 with a `python3` shebang but Git mode 100644, so `test_script_executable_modes` in the python tooling tests job fails on main and on every open PR (seen on #3380). This sets the executable bit; no content change.
@inureyes inureyes added this to the 0.9 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli Command-line interface / CLI flags area:models Model architectures, weights, loading, metadata priority:low Low priority status:done Completed type:enhancement New features, capabilities, or significant additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cli): Inkling 2 reasoning effort flag, visit-count banner, 4-bit trace

1 participant