Skip to content

feat(hip): Inkling 2 Mini's serve flags HIP refuses before any load - #5034

Draft
AbrahamCete wants to merge 1 commit into
ashhart:mainfrom
AbrahamCete:feat/hip-inkling2-refusals
Draft

AbrahamCete wants to merge 1 commit into
ashhart:mainfrom
AbrahamCete:feat/hip-inkling2-refusals

Conversation

@AbrahamCete

@AbrahamCete AbrahamCete commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Inkling 2 Mini has no HIP family yet, so the HIP host has no list of the flags it must refuse for it. This adds that
list as the family's refusal(o), the hook refused(F, o) in native/hip_families.zig calls before any load: one
of the two HIP5 pieces that need none of the questions on #4274 (issuecomment-7158137239). The namespace,
families/inkling2/hip_native.zig, holds only model_type and refusal. It is not in native/hip.zig's registry
yet; registration, open, admission and the prompt-cache store come with the rest of HIP5, as #5031's loader waits
for its caller.

Refused, for one rank and text only (each message starts inkling2_loop: ):

Flag Reason
--tp above 1 one rank, as CUDA (cuda_native.zig:87)
classifier-free guidance, plain or batched as Metal (native/inkling2.zig:58); the CLI stops it first
--loops exactly three core passes, as Metal (:59)
--mtp-drafts (zero included), --mtp-confidence external draft controls, as Metal (:60) and CUDA (cuda_refusal.zig:56)
--precision, every value the checkpoint's NVFP4, MXFP8 and BF16 arithmetic is fixed, as Metal (:61)
--prompt-precision int8 the prompt keeps the checkpoint's arithmetic, as CUDA and Metal
--learn, --learn-conversations no learned disk states, as Metal (:63)
--prompt-cache-gib not finite or above 1,048,576 Metal's bound (:64); a negative budget is the host's own refusal

Not repeated here, because the HIP host or server already refuses or handles them for every family: --drafter
(hip_drafter.zig:31, until the family sets takes_drafter with HIP6), --rope-yarn, --slide, --ssd-experts,
--ple-on-ssd, --fsr-route-trace, --speed-up, --kv-cache fp8, --record, --spill-gib and --vision (the
host starts text-only).

Two choices you may want otherwise:

  1. --precision full is refused, as Metal does; CUDA accepts it and does nothing with it.
  2. The host's own --loops text, "the HIP engines run no looped model" (native/hip.zig:97), becomes wrong for this
    family once it is registered. The family's check runs first, so its message is the one a user sees; I left the
    host's text for the registration pull request.

Checks on this head

  • Head commit: 3e1c5a5, on main a3c3e5c.
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 164 and 164, 0 new.
  • Tests run, with the command and pass, fail and skip counts:
    • zig build test-inkling2-hip-host -Dhip=true: 25 of 25 passed, 14 of them new. They go through refused(F, o),
      the path the host calls: one test for each refused flag with its exact message, one that the family reads
      inkling2_loop, one that one rank's text settings pass, and one that the shared HIP refusals (--rope-yarn)
      still follow the family's.
    • zig build test-inkling2-host: 45 of 49 passed, 4 skipped.
    • zig build test on a clean tree of this head: 13,602 passed, 93 skipped, 1 failed. The failure is
      stage_hip_test "every staged call on HIP memory equals the reference, whole and in parts", which feat(hip): Inkling 2 Mini's routed experts under the kernel contract, bit-equal to loop_model #4994 reports
      failing on main on this machine as well.
    • zig build test -Dhip=true on the same tree: 1,509 passed, 21 skipped, and the same stage_hip_test failed.
    • zig fmt --check build.zig zig and git diff --check: clean.
  • The test module compiles native/hip_families.zig on its own, with engine_api and hip_serve from the LightOn
    host module, the one family module the contract step receives.
  • The new tests fail before their change: without hip_native.zig the step stops with
    unable to load "hip_native.zig": FileNotFound; with a refusal that returns null, 11 of the 14 fail (the
    model_type, plain-settings and --rope-yarn tests pass, as they should).
  • CI: green on this head (10 checks pass, 2 skipped).
  • Not run, and why:
    • A served refusal from tensorfold serve: the family is not registered yet, so the host still answers "the native
      HIP engine has no backend for inkling2_loop checkpoints yet; serve with --engine python" (native/hip.zig:280).
    • Any GPU: the change has no device code.

Receipt

n/a: the family is not registered, so 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)

A new HIP family namespace, families/inkling2/hip_native.zig, holds
Inkling 2 Mini's model_type and its refusal(o), the hook the HIP host
calls before any load or group join. It is not registered yet.

One HIP rank, text only, no external draft controls: it refuses --tp
other than 1, classifier-free guidance, --loops, --mtp-drafts and
--mtp-confidence, --precision, --prompt-precision int8, --learn and
--learn-conversations, and a non-finite or huge --prompt-cache-gib.
Flags the host already refuses (--drafter, --rope-yarn, --slide,
--kv-cache fp8, --speed-up, a negative budget) are left to it.

The tests go through hip_families.refused in test-inkling2-hip-host.
@ashhart

ashhart commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Thank you @AbrahamCete. The refusal helper rejects the unsupported modes before a future family load, including explicit zero MTP depth, all precision overrides and nonfinite cache budgets. Shared refusals still follow it.

This looks safe to land as the unregistered namespace and host-test slice. Mini HIP serving remains unavailable at this head. When combining the loader slice, retain both test artifacts in the build dependency list.

  • 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.

2 participants