Skip to content

Register DSpark drafter sidecar for deepseek-v4-flash - #528

Closed
nwoolmer wants to merge 2 commits into
warpfront:masterfrom
nwoolmer:feat/deepseek4-dspark-registry
Closed

nwoolmer wants to merge 2 commits into
warpfront:masterfrom
nwoolmer:feat/deepseek4-dspark-registry

Conversation

@nwoolmer

Copy link
Copy Markdown
Collaborator

What

Registers the DSpark 3-stage speculative drafter as a companion of deepseek-v4-flash in the CLI registry, so the runtime's existing DSpark support is actually reachable via hipfire pull / --spec dspark.

The sidecar file (deepseek-v4-flash-dspark.mq2lloyd, ~6.0 GB) is published in the model repo alongside the main + MTP files:
https://huggingface.co/nwoolmer/hipfire-deepseek-v4-flash

Why

The deepseek4 loader already auto-discovers a <stem>-dspark.<ext> sidecar next to the weights and prefers it over the in-trunk MTP head under --spec dspark/auto (see crates/hipfire-arch-deepseek4/src/arch.rs). But nothing downloaded the file — the registry only knew about the main model and the MTP companion. hipfire pull deepseek-v4-flash would fetch main + MTP, never DSpark, so the feature was dark for anyone pulling from the registry.

Changes

  • cli/index.ts — add dspark? to ModelEntry; add a DSpark download block in pull() mirroring the existing MTP one (non-fatal on failure; base model stays usable).
  • cli/registry_loader.ts — add dspark?: RegistrySidecarV1 to RegistryModelEntryV1 and validate it (same validSidecar gate as mtp/triattn).
  • cli/registry.json (bundled) + registry/v1.json (canonical, with sha256 + size_bytes) — add the dspark sidecar entry to deepseek-v4-flash and note it in desc.

Verification

  • bun test cli/registry_loader.test.ts22 pass / 0 fail (incl. the "v1 ⊇ bundled" superset invariant — bundled and v1 stay in sync).
  • Both JSON files parse; dspark entry present in each; desc updated.
  • The published sidecar was integrity-checked before this PR: hfq_dump reports arch_id=9, 2376 tensors, spec-correct DSpark tensors (mtp.0.main_proj, mtp.2.markov_head.*, confidence_head.proj), and the remote blob's sha256 matches the local file bit-for-bit.

No runtime/kernel changes — this is registry plumbing only.

🤖 Generated with Claude Code

nwoolmer and others added 2 commits July 13, 2026 00:05
Registers the DSpark 3-stage speculative drafter
(`deepseek-v4-flash-dspark.mq2lloyd`) as a companion of deepseek-v4-flash
so `hipfire pull` fetches it next to the weights, and the deepseek4 loader
auto-discovers it via the existing `<stem>-dspark.<ext>` sibling convention
(`--spec dspark`/auto prefers it over the in-trunk MTP head when present).

- cli/index.ts: `dspark?` on ModelEntry + pull() download block (mirrors mtp)
- cli/registry_loader.ts: `dspark?` on RegistryModelEntryV1 + validation
- cli/registry.json, registry/v1.json: dspark sidecar entry (+ sha256/size in
  v1) and a desc note

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`logits[0 * vocab + 2]` trips the deny-by-default `clippy::erasing_op`
lint, failing the workspace clippy job (pre-existing on master, unrelated
to the registry change but blocking green CI on this PR). Route the three
row-major writes through a small `at(pos, tok)` index closure so the
`pos * vocab + tok` intent is preserved without a literal `0 *`/`1 *`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Kaden-Schutt added a commit that referenced this pull request Jul 16, 2026
Rebased exact contributor head 650990a onto staging without modifying the contributor branch.

A/B: deployed staging and the original PR both returned early when the base model already existed, leaving newly registered DSpark dark for existing users. Fix-forward dd83d96 makes registered companions run on fresh and repeat pulls.

hipx Bun CLI validation: hipfire pull deepseek-v4-flash fetched 5,996,334,814 bytes; SHA-256 0ec4cdbadfd8f5b1e8eead5b864ec3ec2233839f266221e6111839efd5813375 matched registry/v1.json; repeat pull was idempotent.

Tests: 80 Bun tests pass; targeted naive_sample_chain Rust tests 2/2 pass; diff check clean. No production kernel/dispatch changes and the registry addition is scoped to deepseek-v4-flash.

Copy link
Copy Markdown
Collaborator

Folded into #534 as a cleanly rebased/cherry-picked delta on beta for v0.3.0, preserving the newer Redline and modular-runtime line. Closing this source PR in favor of the consolidated release PR. Thank you for the contribution.

fivetide pushed a commit to fivetide/hipfire that referenced this pull request Aug 29, 2026
Rebased exact contributor head 650990a onto staging without modifying the contributor branch.

A/B: deployed staging and the original PR both returned early when the base model already existed, leaving newly registered DSpark dark for existing users. Fix-forward dd83d96 makes registered companions run on fresh and repeat pulls.

hipx Bun CLI validation: hipfire pull deepseek-v4-flash fetched 5,996,334,814 bytes; SHA-256 0ec4cdbadfd8f5b1e8eead5b864ec3ec2233839f266221e6111839efd5813375 matched registry/v1.json; repeat pull was idempotent.

Tests: 80 Bun tests pass; targeted naive_sample_chain Rust tests 2/2 pass; diff check clean. No production kernel/dispatch changes and the registry addition is scoped to deepseek-v4-flash.
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