Skip to content

test(inkling2): tiny-inkling2-mini config and model header fixtures with parse, weight map and visit plan tests - #5369

Merged
ashhart merged 3 commits into
ashhart:mainfrom
AbrahamCete:test/inkling2-tiny-mini-fixture
Nov 27, 2026
Merged

ashhart merged 3 commits into
ashhart:mainfrom
AbrahamCete:test/inkling2-tiny-mini-fixture

Conversation

@AbrahamCete

@AbrahamCete AbrahamCete commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

TensorFold has no fixture for hf-internal-testing/tiny-inkling2-mini, the tiny checkpoint the HIP gate on #4265 requires. This adds its config and a metadata-only model header table, with host tests for parsing, the weight map and the 30-visit plan, as asked in #4265 (issuecomment-7215811144). No engine, kernel or weights.

  • tools/zig/inkling2_fixtures.py takes a required --tiny-mini input, the checkpoint's config.json and model.safetensors or its extracted model.header.json, pinned at revision ee242a48af34ff0729518f4ac28cfcb847e470ab. It writes tiny_mini_config.json, a byte copy, and tiny_mini_model_header.txt, the folded table of 622 tensors under the tag inkling2-tiny-mini-model. The 11 files it already wrote come out byte-equal.
  • config_test.zig: the config parses to hidden 256, 18 layers, 30 visits, 4 query and 2 KV heads, 16 experts with top-4, expert width 256, relative extent 128 on local layers and 256 on global ones, the loop core 6 to 12 over 3 passes with gate rank 64, and no drafter.
  • names_test.zig: the weight map names exactly the 622 tensors; the experts are NVFP4 on layers 0 to 13 and MXFP8 on 14 to 17; the visit plan runs the 6-layer core 3 times, passes 2 and 3 read the previous pass from visits 6 and 12, and the output query has 4 sources.
  • THIRD_PARTY_NOTICES.md names the checkpoint, its revision, and that its model card states no licence.

Main's config parser, weight map and visit plan already accept tiny-mini, so no production code changes. The HIP kernels are what still fix Mini's shapes; those follow in the order agreed on #4265.

Checks on this head

  • Head commit: c3fb824, on main 3f5551a.
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 123 and 123, 0 new.
  • Tests run, with the command and pass, fail and skip counts:
    • zig build test-inkling2-host: 60 of 65 passed, 5 skipped; on main, 56 of 61 passed, 5 skipped. Before the fixtures existed, the build failed on the two missing @embedFile files.
    • zig build test test-golden on a clean tree of this head, on Linux x86_64: 14,227 of 14,331 passed, 103 skipped, 1 failed. The failure is stage_hip_test "every staged call on HIP memory equals the reference, whole and in parts", which fails the same way on a clean tree of main 3f5551a on the same machine (zig build test-tp: 148 of 150 passed, 1 skipped, 1 failed).
    • tools/zig/inkling2_fixtures.py --check with transformers 5.20.0, tokenizers 0.23.3 and jinja2 3.1.6, over the four checkpoints' files (safetensors headers only): all 13 files the same, exit 0. Before this change, the same run of the old script reproduced its 11 files.
    • zig fmt --check build.zig zig and git diff --check: clean.
  • CI: run 45994973582 on c3fb824: 9 jobs pass, the 2 nightly jobs skip, and zig fails at its "environment names" step (tools/zig/env_names.py: 761 variables read, 13 problems, none in this diff). That failure is inherited: on this run's merge ref and on its main parent 4516363, the script reports the same 13 problems and exits 1.
  • Not run, and why: no device checks; nothing here reaches a kernel, an engine or a server.

Receipt

n/a: test fixtures and host tests only; nothing reaches inference. The host tests above are the evidence.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.
  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off. (n/a: no engine)
  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (n/a: no engine)
  • No precision traded for speed. If the bits change, the description says which sums change and why. (n/a: no arithmetic)
  • Decode and prompt processing are no slower than main at one stream and the widest admitted; with --drafter, no slower than without it, greedy and sampled. (n/a: no engine)

@ashhart

ashhart commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Thanks, @AbrahamCete. The generator preserves the tiny Mini config byte for byte, records its exact checkpoint revision, and emits only model-header metadata. The tests check all 622 mapped tensors, the NVFP4/MXFP8 layer boundary, the 30-visit plan, the previous-pass visits and the four output-query sources.

This is ready to land, and it goes into a landing train next, which runs CI and the device checks. No engine or kernel behavior changes here, and no device run is needed. I found no remaining code correction.

  • Synthena

@ashhart

ashhart commented Nov 27, 2026

Copy link
Copy Markdown
Owner

@AbrahamCete, one small thing: this PR is still marked as a draft, so our landing train skips it. Mark it ready for review when you're happy and it goes straight into the next train.

  • Synthena

@AbrahamCete
AbrahamCete marked this pull request as ready for review November 27, 2026 15:50
@ashhart
ashhart force-pushed the test/inkling2-tiny-mini-fixture branch from c3fb824 to f96a790 Compare November 27, 2026 22:53
@ashhart
ashhart merged commit fed1a5d into ashhart:main Nov 27, 2026
2 of 12 checks passed
ashhart added a commit that referenced this pull request Nov 27, 2026
@ashhart

ashhart commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Thank you @AbrahamCete. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

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.

2 participants