Skip to content

train 1120231343: #4259 (CI only) - #4269

Closed
ashhart wants to merge 9 commits into
mainfrom
lead/train-1120231343
Closed

ashhart wants to merge 9 commits into
mainfrom
lead/train-1120231343

Conversation

@ashhart

@ashhart ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #4259 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

shantanugoel and others added 9 commits November 20, 2026 23:13
exl3_weights reads split mul1 experts (trellis/suh/svh/mul1) and rejects
affine or mixed markers; moe_exl3_cuda runs them on the shared EXL3 kernels
with Hy4's sigmoid router, correction bias, top-16 and scaled combine.
bf16_rows gathers 192-byte Engram rows with aligned O_DIRECT reads and a
prefetch worker (Linux host tests). mla_weights exposes splitBf16.
tf_hy4_index_groups pools a closed group's four token keys through the FP32
value/gate projections with intra_group_ape, then key_norm. index_cuda caches
token keys, pools and rotates closed groups, and scores and recalls with the
draft's rotate and recall kernels. Against an FP64 oracle on layer 1 over 2,304
keys: recall of 511 of 575 groups identical on 4/4 rows, scores 6.2e-4 relative
L2, draft rollback byte-exact.
hy4_engram mirrors engram.metal's rounding: lookup (optional stock FP8 round
trip, per-head RMSNorm) and apply (key/query norms, signed-sqrt gate, per-stream
scales), with the reference nn.RMSNorm epsilon (2^-23). On real layer-1 rows:
strict BF16 4.9e-3 and stock FP8 4.3e-3 relative L2 vs the torch reference.
cuda_model loads the BF16 trunk and 512 mul1 experts per sparse layer (slab
uploads, per-layer page release, TF_HY4_MEM_FLOOR_GIB guard) and runs embedding,
four streams, 42 layers, hyper head and LM head on one sequence: causal keys to
2,048, the 512-key window on sliding layers. tf-hy4-cuda-generate prefills and
decodes greedily. LibertAIDAI Hy4-flash-EXL3-4bpw on GB10: 85.38 GiB, 34-token
prefill 884 ms, 98.6 ms/token; all 32 greedy tokens equal ExLlamaV3's.
openDirect took whatever row count the shard's header declared and rowOffset
bounds-checked against it, so a table read for the wrong layer, or one repacked
or truncated by another tool, loaded cleanly. The four released tables hold
164,994,380 / 164,999,008 / 165,004,086 / 165,008,942 rows: a wrong shard stays
inside the count for almost every lookup and addresses rows silently, which is
audible only as a small quality loss. The Metal path already derives the count
from the config (engram_rows.zig, weights.zig); this gives the CUDA reader the
same rule, as RowCountMismatch at load rather than BadTable mid-forward.

The test fails with TestUnexpectedResult without the check (26 pass, 1 fail) and
passes with it.
@ashhart

ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner Author

Landed: #4259 as main e3efa80. This PR only carried their CI.

@ashhart ashhart closed this Nov 21, 2026
@ashhart
ashhart deleted the lead/train-1120231343 branch November 21, 2026 00:34
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