Skip to content

inkling: load EXL3 packs through the shared family plan - #3612

Draft
francip wants to merge 12 commits into
ashhart:mainfrom
kortexa-ai:kortexa-ai/inkling2-exl3-loader
Draft

francip wants to merge 12 commits into
ashhart:mainfrom
kortexa-ai:kortexa-ai/inkling2-exl3-loader

Conversation

@francip

@francip francip commented Nov 16, 2026 •

Copy link
Copy Markdown

What this changes

Adds EXL3 pack admission and per-rank weight loading to the shared Inkling family, reusing its config parser, layer plan and dense tensor map. Stored tensors stay unchanged; this slice adds no operator or serving path.

Checks on this head

  • Head commit: 8ab9d4be60362b379d9619405eabc05303770a88. Executable source measured at 6db2c580780f850452c5e7adf6658ef7ff03aaf7; following commits change only CHANGELOG placement and receipts.
  • Lean checker: base 221, head 221 inherited; zero new. pr_check.py --base f0d3a3f9a --pr 3612: zero errors/warnings. Formatting and whitespace pass.
  • Tests: zig build -Dfixed-cpu test-host --test-timeout 20m -j6: 2138/2138 steps; 20394 passed, 141 skipped, plus cached checks. Final focused host/loader/source-identity/Qwen commands: 16/16 steps, 7 newly executed tests passed, others cached. Disabling manifest disagreement rejection makes its control fail; restored source passes.
  • CI: current No GPU and format runs await maintainer approval (action_required); no current-head upstream pass claimed.
  • Not run: allocation-failure cleanup; runtime state/token equality, original-checkpoint fidelity and performance belong to later slices. These remain qualification gates.

Receipt

Commands, raw rank outputs and executable identity.

  • Main against branch: main has no matching loader. Both rank-local one-layer canaries and full 48-layer loads exited zero; owned weight allocations were 102934272000 and 103340365824 bytes, respectively. These are not peak process/total GPU or KV/workspace measurements.
  • Boxes it reaches: two 128 GB DGX Sparks, one GB10 per rank; checkpoint kortexa-ai/Inkling-2-Small-EXL3-2.59bpw@05c6cd0dff9df5bf20b10419c663a1e2adc7eb64.
  • New switch: n/a; no serving setting added. The development canary takes directory, rank, world and layer count.
  • Environment: base/head/source above; Zig 0.17.0, x86_64 Linux host checks, ARM64 Linux 7.0.0-1019-nvidia device runs, NVIDIA driver 580.178.04; no new shader compilation required by the loader.
  • Paths/platforms: config/manifest admission, dense tensor validation and whole-expert EP2 partition. GB10 exercised; other CUDA targets, Metal, HIP and Windows unrun locally.
  • Exactness: existing pack bytes retained without requantization. Later callers use main's fixed FP32-product EXL3 rotation; this slice performs no forward or token/state comparison.
  • Main against branch inference numbers: n/a; no serving caller or maintainer run requested for inference here.
  • Decode before/after: n/a; no decode path added.
  • Prompt before/after: n/a; no prompt path added.
  • Licence: n/a, no new weights shipped; the referenced pack retains its licence/notices.

Checklist

  • Title, head, receipt and dependency match.
  • Host rejection control fails when disabled and passes restored; dependency-free checks run.
  • Comments/docstrings meet source rules; measurements stay in receipts.
  • Publication identity/privacy checked; original authorship preserved.
  • Lane-round inference: n/a; this slice has no serving caller.
  • Draft/plain, resume/fresh and concurrent/solo equality: deferred to the runtime slices.
  • No arithmetic or precision conversion introduced; maintainer-owned approvals and shared contract diagnostics untouched.
  • Decode/prefill promotion: deferred to runtime qualification; no speed claim here.

Jinja's float(value, default=0.0) for numbers, booleans and numeric text.
Anything else gives the default, an undefined value raises, and an
argument Jinja does not have is an error, as in Jinja. Inkling 2's chat
template reads its thinking effort through it.
Reads Inkling 2 Small's config.json into the shapes the engine needs and
refuses by key every layout it does not run: the layer types, the fixed
switches, the quantization, the draft head and the vision tower. Fixtures
are the release's config.json and the tiny-random checkpoint's. The host
step is test-inkling2-host.
Reads a safetensors header into entries of name, dtype and shape, sorted
by name, for the dtypes this family stores: BF16, F32, F8_E4M3 and U8. A
dtype it does not store, a rank past four, a length past the file and bad
JSON are each refused.
The map names every tensor a config implies, backbone, vision tower and
draft head, with its dtype and shape, and checks a safetensors header
against it: missing, wrong and unknown tensors are reported by name. A
layer's expert format is read from its tensors, U8 for NVFP4 and F8 for
MXFP8. The plan derives sliding and global layers, the block boundaries
and the number of states each attention-residual input sums over.

The draft head's rnn_proj sizes and fuse_weight's columns are read from
two headers, tiny-random/inkling-2 and the release, not from code;
fuse_weight's six rows stay open. The fixtures fold the two header tables
of tiny-random/inkling-2 with their sha256. Real headers are checked when
TF_INKLING2_TINY names tiny-random's two files, and when TF_INKLING2_REAL
names the release's 24 shard headers and mtp.safetensors.
Image parts (image, input_image, image_url) and --vision are refused with
their own words until the vision tower has kernels; audio and unknown part
types are refused too, and text parts, plain strings and string parts
pass. A part without a type is read as text, as the chat template reads
it. Nothing calls these checks yet: there is no host.
The release's chat template renders 24 chat cases byte for byte, thinking
effort names and numbers included, and raises for an unknown effort or one
out of range. The tokenizer encodes the rendered prompts and 6 plain
texts to the reference's ids and decodes them back when TF_INKLING2_CKPT
names the release's tokenizer.json. A cut tokenizer.json (its added
tokens, its byte alphabet and the first 1,500 merges, same split regex)
runs on every build against 14 cases, with a control that another split
regex changes its ids. The expected prompts and ids come from the
transformers and tokenizers libraries.
inkling2_fixtures.py writes the files under zig/src/families/inkling2/
fixtures from the release's files and the tiny-random checkpoint's
safetensors headers: the prompt and id cases through transformers, the
cut tokenizer and its cases through tokenizers, and the folded tensor
tables with their sha256. The library versions are pinned and checked;
--check compares the committed files without writing.
The notice for the files taken from the Inkling 2 Small release and from
the tiny-random checkpoint.
@francip

francip commented Nov 16, 2026

Copy link
Copy Markdown
Author

/atc depends 3578 3607

@francip
francip force-pushed the kortexa-ai/inkling2-exl3-loader branch from b020461 to 43ac8b8 Compare November 16, 2026 22:09
@francip
francip force-pushed the kortexa-ai/inkling2-exl3-loader branch from 43ac8b8 to 8ab9d4b Compare November 17, 2026 17:42
@francip

francip commented Nov 17, 2026

Copy link
Copy Markdown
Author

/atc depends 3578

@ashhart

ashhart commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Hi @francip, thank you for the EXL3 loader slice and the detailed receipt. We have reviewed it as a first review; there are no earlier asks from us on this PR.

Two things before it can land. First, it needs a rebase onto current main: the displayed diff still carries the shared Inkling host package from #3578, which has since landed, so build.zig, CHANGELOG.md, THIRD_PARTY_NOTICES.md and the family fixture files now conflict or are already present. Rebasing onto today's main drops those prerequisite hunks; your new loader files and the CUDA build change apply cleanly, and the changelog line can be re-inserted. Second, the No GPU and format checks are still awaiting maintainer approval, so we were unable to run them yet; please leave them for us to approve and confirm green after the rebase.

Your two GB10 rank logs are the load-path evidence we will use, and we did not re-run them here. The slice adds no serving caller, so token and state equality, checkpoint fidelity and performance stay as later qualification gates.

  • Synthena

This branch has not been deployed

No deployments
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.

3 participants