Skip to content

feat: add arch JSON recipes registry - #1606

Merged
inureyes merged 3 commits into
mainfrom
feature/issue-1508-arch-json
Sep 3, 2026
Merged

inureyes merged 3 commits into
mainfrom
feature/issue-1508-arch-json

Conversation

@inureyes

@inureyes inureyes commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds mlxcel arch --json as the machine-readable architecture registry for recipes and commits the first recipes/registry/0.6.0.json snapshot.

What changed

  • Derives stable per-family registry entries from ALL_MODEL_TYPES, including IDs, detection keys, runtimes, modalities, outputs, backend status, tensor and pipeline parallel support, drafters, and KV cache modes.
  • Keeps the existing human mlxcel arch renderer unchanged and adds a JSON writer with focused CLI and registry tests.
  • Corrects DeepSeek V3 and V3.2 to advertise fp16-only KV modes because the MLA resolver downgrades quantized requests at runtime.
  • Makes make recipes-registry rebuild atomically by writing JSON and CURRENT through temporary files and only replacing tracked artifacts after mlxcel arch --json succeeds.
  • Documents the snapshot contract in README.md and docs/supported-models.md, following the vLLM Recipes pattern of static registry data for downstream recipe builds.

Test plan

  • cargo fmt --check
  • cargo test --lib registry --no-default-features
  • cargo test --bin mlxcel arch --no-default-features
  • cargo check --lib --tests --no-default-features
  • cargo clippy --lib --tests --no-default-features -- -D warnings
  • make -n recipes-registry
  • make recipes-registry
  • diff -u /tmp/mlxcel-1606-arch.json recipes/registry/0.6.0.json
  • ./target/release/mlxcel arch --json >/tmp/mlxcel-1606-arch.json 2>/tmp/mlxcel-1606-arch-json.stderr && ./target/release/mlxcel arch >/tmp/mlxcel-1606-arch.txt 2>/tmp/mlxcel-1606-arch.stderr
  • python3 -c "import json, pathlib; data=json.loads(pathlib.Path(\"/tmp/mlxcel-1606-arch.json\").read_text()); fam={f[\"id\"]: f for f in data[\"families\"]}; ids=list(fam); assert len(ids)==len(set(ids)); assert fam[\"deepseek_v3\"][\"kv_modes\"] == [\"fp16\"]; assert fam[\"deepseek_v32\"][\"kv_modes\"] == [\"fp16\"]; assert pathlib.Path(\"/tmp/mlxcel-1606-arch-json.stderr\").read_text() == \"\"; assert pathlib.Path(\"/tmp/mlxcel-1606-arch.stderr\").read_text() == \"\""
  • Atomic failure-path check: a simulated non-zero arch --json write left recipes/registry/0.6.0.json and recipes/registry/CURRENT unchanged.

Refs lablup/mlxcel-internal#1508.

@inureyes inureyes added type:enhancement New features, capabilities, or significant additions priority:high High priority area:cli Command-line interface / CLI flags status:review Under review status:done Completed and removed status:review Under review labels Sep 3, 2026
Add a stable `mlxcel arch --json` registry for recipes and automation, keeping the existing human `mlxcel arch` renderer unchanged.

The registry is derived from `ALL_MODEL_TYPES`, records per-family runtime, modality, backend, distributed, drafter, and KV facts, and commits the v0.6.0 snapshot consumed by downstream recipe builds.

Validated with `cargo test --lib registry --no-default-features`, `cargo test --bin mlxcel arch --no-default-features`, `cargo check --lib --tests --no-default-features`, and `cargo clippy --lib --tests --no-default-features -- -D warnings`.

Refs lablup/mlxcel-internal#1508.
@inureyes
inureyes force-pushed the feature/issue-1508-arch-json branch from 55918f0 to 3019b63 Compare September 3, 2026 07:00
DeepSeek V3 and V3.2 use the MLA latent-cache layout, and the runtime KV resolver downgrades quantized requests for those config keys back to fp16. Remove the advertised int8/turbo4 modes from the arch registry snapshot and add regression coverage that rejects registry KV modes that resolve to fp16 at runtime. Refs #1508.
make recipes-registry previously redirected JSON directly into the tracked snapshot and kept running after mlxcel arch --json failed, so a serialization or write error could leave a partial registry file while refreshing CURRENT. The target now fails fast, writes JSON and CURRENT to temporary files, and replaces tracked artifacts only after the JSON command succeeds.

Validated with cargo fmt --check, cargo test --lib registry --no-default-features, cargo test --bin mlxcel arch --no-default-features, cargo clippy --lib --tests --no-default-features -- -D warnings, make -n recipes-registry, make recipes-registry, and JSON parse checks.

Refs lablup/mlxcel-internal#1508.
@inureyes
inureyes merged commit 8e11f73 into main Sep 3, 2026
13 checks passed
@inureyes
inureyes deleted the feature/issue-1508-arch-json branch September 3, 2026 07:44
@inureyes inureyes mentioned this pull request Sep 3, 2026
4 tasks done
inureyes added a commit that referenced this pull request Sep 3, 2026
## Summary

Adds the English and Korean technical reports that were omitted when #1606 was merged.

The reports document the architecture registry contract, deterministic JSON generation, runtime capability mapping, and the review corrections for DeepSeek MLA KV modes and atomic snapshot rebuilds.

## Validation

- [x] Both reports follow the repository technical-report structure.
- [x] English and Korean reports cover the same implementation and maintenance decisions.
- [x] The commit changes only the two report files.
- [x] No AI attribution is present.

## Links

- Refs #1606
inureyes added a commit that referenced this pull request Sep 3, 2026
## Summary

Adds the standalone RT-DETRv2 detector to the machine-readable architecture registry without presenting it as a text/VLM generation model.

## What Changed

- Added a deterministic standalone-family extension point after the `ALL_MODEL_TYPES` registry entries.
- Registered `rt_detr_v2` with the truthful `detect` runtime, `image` input, `boxes` output, and `detection` category.
- Added collision guards so standalone registry IDs and detection keys cannot shadow loadable `ALL_MODEL_TYPES` families.
- Kept `generate`, `serve`, tensor parallelism, pipeline parallelism, and speculative decoding disabled for the detector.
- Extended registry and CLI tests and regenerated the committed `0.6.0` snapshot.
- Clarified public documentation that the JSON registry includes text/VLM model families plus standalone command runtimes.

## Validation

- [x] `cargo fmt --check`
- [x] `cargo test --lib registry --no-default-features`
- [x] `cargo test --bin mlxcel arch --no-default-features`
- [x] `cargo check --lib --tests --no-default-features`
- [x] `cargo clippy --lib --tests --no-default-features -- -D warnings`
- [x] `make recipes-registry`
- [x] Release `mlxcel arch --json` matches `recipes/registry/0.6.0.json` byte-for-byte.
- [x] The `rt_detr_v2` entry advertises only `detect`, accepts only `image`, and emits `boxes`.
- [x] Standalone registry extensions cannot collide with loadable family IDs or keys.

## Links

- Refs #1606
- Refs lablup/mlxcel-internal#1508
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 priority:high High 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.

1 participant