Skip to content

dsv41 Zig: dense bf16 linears of a mixed EXL3 pack (EAQ v1.1 indexer path) - #44

Merged
Elevatormusic merged 6 commits into
dsv41-zig-devfrom
dsv41-zig-dense
Oct 24, 2026
Merged

Elevatormusic merged 6 commits into
dsv41-zig-devfrom
dsv41-zig-dense

Conversation

@Elevatormusic

Copy link
Copy Markdown
Owner

What this changes

Two commits that let the Zig dsv41 engine load a mixed EXL3 pack whose some whole linears are plain bf16 <prefix>.weight [n, k] tensors, not trellis parts (Mia-AiLab EAQ v1.1: wq_a, the indexer wq_b and wk, and the compressor wkv and wgate of the indexer layers).

  • 29f91f69: plan.wantsDense plans a dense linear as one bf16 .weight entry (a TP-split dense linear is refused); the rank cache builder takes the dense set from the shards, the checker from the cache. weights.Linear.dense: linear() loads a dense entry when the source has no trellis for the prefix. Dense linears run through cuBLAS GemmEx (bf16 operands, COMPUTE_32F, bf16 or fp32 out) in grouped(), mm and the decode q_proj.
  • 64bb1e48: the dense plan test's context is a byte, not a type (test fix).

Serving target E serves from this branch (image tensorfold-dsv41-zig:dense-64bb1e48, top commit 64bb1e48). These two commits are not rebased or changed here: the running image is built from them.

Base is dsv41-zig-dev so that #42 (based on this branch) can land after it.

Receipt

  • Environment: TensorFold dsv41-zig-dev @ cc9be34e plus these 2 commits. Zig 0.17.0. Two NVIDIA GB10 nodes at TP=2 (serving target E).
  • Exactness, speed and memory: the serving target E results (see the EAQ bench notes of 2026-10-24); no new run for this pull request.
  • Tests run: the CI checks on this pull request.
  • Not run: no GPU window tonight (the EAGLE training chain has the GPUs).

Checklist

  • Every token still goes through the lane rounds.
  • Drafted output equals "draft": false: not checked in this pull request.
  • No precision traded for speed (bf16 operands with fp32 accumulate, as the pack stores them).
  • A new or changed GPU kernel is registered with the kernel contract: no new kernel (cuBLAS GemmEx).
  • Prompt processing is no slower than the last release: not measured in this pull request.
  • Platforms: CUDA on GB10 at TP=2. TP=4 and Metal not run.
  • New tests fail before the change, pass after it: the dense plan test is new.
  • Comments and docstrings are one line: see the CI lean check.
  • No personal data, machine names, internal hosts or local paths. No AI attribution lines.

This change was written with help from an AI coding assistant.

A mixed EXL3 pack stores some whole linears as a plain bf16 <prefix>.weight
[n, k] instead of trellis parts (Mia-AiLab EAQ v1.1: wq_a, the indexer wq_b
and wk, and the compressor wkv and wgate of the indexer layers).

- plan: wantsDense plans a dense linear as one bf16 .weight entry; a split
  (TP column or row part) dense linear is refused. The rank cache builder
  takes the dense set from the shards, the checker from the cache.
- weights: Linear.dense; linear() loads a dense entry when the source has no
  trellis for the prefix.
- prompt / round: dense linears run through cuBLAS GemmEx (bf16 operands,
  COMPUTE_32F, bf16 or fp32 out) in grouped(), mm and the decode q_proj (the
  indexer wq_b from q's normed rows); no counters, rotated rows or partials.
…very pull request)

zig fmt 0.17.0 changes only layout and @intFromEnum to @backingInt.
The Zig format check fails on these five base-branch files in every
open dsv41-zig pull request, also where the pull request does not touch them.
@Elevatormusic Elevatormusic added the type: feature new code (feature, tool, add-on) label Oct 24, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T19:19:34.717367Z 52173ea Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Elevatormusic

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1104203a46

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread zig/src/families/dsv41/weights.zig Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1104203a46

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread zig/src/families/dsv41/plan.zig Resolved
…run path for it yet)

Round.init copies each wo_a slice's suh, and the wo_a decode runs
groupedRotated, which refuses dense layers. A mixed pack with a dense
wo_a slice thus planned and loaded, then failed at init. plan.denseRunnable
now refuses it in the planner (error.DenseLinearUnsupported) and the
loader checks it too. New test case in the dense plan test.
@Elevatormusic

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 52173eadd2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Elevatormusic
Elevatormusic merged commit 7f2eacf into dsv41-zig-dev Oct 24, 2026
6 checks passed
@Elevatormusic
Elevatormusic deleted the dsv41-zig-dense branch October 24, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature new code (feature, tool, add-on)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant