Skip to content

Design: a private card source for the Loom route table (cards from 1bit-MONSTER/loom-kernels, pinned by sha) #3385

Done

Description

@bong-water-water-bong

Design note only; no code until the orchestrator says. Context: #3158 (gate), #3322 (ZAYA1-8B). Orchestrator ~12Z 23 Nov: ZAYA stays measured-only, because its card carries our private .loom programs, which cannot go public.

Today

  • A config/loom-routes.json entry names card: a loom-fetched package found under --loom-cards DIR, ONEBIT_LOOM_CARDS, or ~/.cache/1bit/loom-cards.
  • Every shipped entry's card is a published Hugging Face repo, pinned in config/loom-cards.json.
  • An entry whose card is not installed is skipped with one line, and the model keeps the llama.cpp route.

Proposal: a second card source, private

"card": "zaya1-8b-loom",
"card_source": {"kind": "private", "repo": "1bit-MONSTER/loom-kernels", "path": "cards/zaya1-8b",
                "commit": "<40 hex>", "tree_sha256": "<64 hex>"}
  • Pin. commit plus tree_sha256 pin the card: a sha256 over the sorted (path, sha256) list of every file in path at that commit. This is the same pinning idea as the published cards' model.json.lock.
  • Fetch. At build time, the build that is allowed private repos (the one that already fetches npu-kernels / gpu-kernels) fetches path at commit, checks tree_sha256, and installs the card into the build's card directory.
    • Fails closed: a mismatch fails the build, and is never skipped silently.
  • Public CI. CI never fetches private repos. tools/loom_cards.py --check validates only the schema and that the GGUF pin is in models/pins.json.
  • Runtime. No change: the card is either in the card directory or the entry is skipped (existing behaviour).
  • Gate. Unchanged. The row must run on this exact commit. The public entry carries routing data only (match, preset, args, gate link); the card content stays private.

The open question this note cannot settle

Where may a build that contains a private card go?

  • loom-serve loads cards as .loom source and compiles them at load.
  • hrx-loom 0.2.0 has no precompiled-artifact input, and command programs cannot be compiled offline.
  • So any package that carries the card carries our source in readable form. A private card in the public release or the live image = publishing it.

Options:

  1. Private builds only: internal/appliance builds made for us. The public release omits private cards; their entries stay in the table and are skipped with the usual one-line reason.
  2. Wait for an SDK artifact path: a compiled-only card that loom-serve accepts. To ask AMD for this, with the owner's word (upstream contact is owner-only).
  3. Server-side only: the card lives on a box we run, never in a distributed package.

1 and 3 need no SDK change. 2 is the only way ZAYA-on-Loom reaches users of the public release while the code stays private. Owner decision needed: which builds may carry private cards.

Not in scope

Any change to published-card handling, the gate rule, or the .loom code itself.

🤖 Generated with Claude Code

Activity

  1. bong-water-water-bong commented on Nov 24, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    The design record this issue asks for has landed: #3473 (648e9e00) adds the "Card sources" section to docs/loom-route.md — the options with their trust/verification consequences, the code a chosen option would need, and the open decision.

    Two findings in it a reader would otherwise get wrong:

    • A private card is servable today with no engine change — serve resolves a card by name and checks no provenance (app/serve.cpp:1662-1688, :1708-1712); the open question is distribution and the installer, not the loader.
    • The two gates disagree today — app/loom_route.h:161 refuses an unknown route key at serve startup (held by tests/loom_route_test.cpp:89-91) while tools/loom_cards.py --check passes one (measured), so a card_source key added alone would stop serve and pass CI.

    This stays open because the decision is the owner's, per CONTRIBUTING ("a change to how pins move" is an RFC in Discussions before code): which builds may carry a private card source, and whether cards come from a private pinned source or are upstreamed to loom-fun first. #3321 hits the same fork in the road (its card publishes our private minicpm starter patch if it goes to public HF), so one decision unblocks both.

  2. bong-water-water-bong commented on Nov 24, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Decided (owner, 2026-11-24): cards are public. Recorded in docs/loom-route.md "Card sources" (PR #3502, merged 572acb70): a route entry's card is a published Hugging Face repository, as every entry's card is today. No private card source is built, and no card_source field is added to the table or the gates.

    What that commits us to, and what is left:

    Re-open criterion: if the terms above are reversed (cards stay private), or a kit's programs cannot be relicensed, this decision is void and the private-source options in the design note become live again.

  3. bong-water-water-bong commented on Nov 27, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Correction (orchestrator, 2026-11-27): the "cards are public" decision recorded in #3502 was not the owner's, and the owner has withdrawn it (#3526). Nothing from the private Loom kits is to be published as a public card. That covers the GLM-4.7-Flash, ZAYA1-8B and MiniCPM4/5 kits named above. Whether the cards already on Hugging Face stay up is with the owner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions