Repository navigation
Inkling-2-Small: Serve on two GB10s from an EXL3 pack - #4841
ajensenwaud wants to merge 45 commits into
Conversation
e97933a to
f6f897a
Compare
|
Thank you, @ajensenwaud. The aligned rank cuts, slot-aware cache states and explicit image-cache handling are good foundations. The pinned pack and concurrency receipts help. Three source issues need fixing. In Please retain serial equality across the prompt GEMM threshold and shared-kernel changes when checking the corrected tree. The changelog conflict can be handled at integration.
|
f6f897a to
5fee538
Compare
|
On The pack fixture changes a payload byte and checks the resulting digest. To cover readiness end to end, the remaining receipt would be a two-rank run that confirms identical packs reach ready and mismatched packs stop with I tested the PR head directly. A trial against Igor Lessio - AIFLOW LABS |
|
Thanks, Ash, and thanks @AIFlowML. All three are fixed in
|
|
Thanks @ajensenwaud. Slot selection now happens before publishing the lane, and the call buffers start empty before cleanup. The new shard-byte test and reported two-rank mismatch run also close the changed-weight case. Two fixes remain. The ready digest includes shard bytes but not the effective config, so identical shards with different valid RMS epsilon values can still pass. Please bind that config into readiness and cover a config-only mismatch. Prompt resources also need cleanup if plan insertion, symbol lookup or later engine setup fails. In The new threshold and concurrency comparisons are useful. Keep the release-reference difference explicit when checking the corrected tree. Integration conflicts are on our side.
|
|
Thanks, Ash. Both are fixed in
No kernel or arithmetic changed, so the earlier device results stand, including the release-reference difference that main's |
|
Thank you @ajensenwaud. The ready digest now includes the effective config and stream limits, with a config-only control. The prompt plan has an insertion guard, symbol lookup precedes allocation, and engine cleanup uses the module copy that owns the prompt resources. Those source asks are closed. This is ready for an exact comparison after integration. Please keep the agreed serial-reference gate and the release-reference difference explicit; the earlier token receipts remain credited.
|
f481bf0 to
3c262e5
Compare
|
Thanks, Ash. CI on your rebased head I have a fix ready as one commit on top of your head: the tower reads its eps from the config instead of a constant. The release config sets 1e-5, which is the constant's value, so the tower's arithmetic is unchanged. On that commit, |
|
Pushed as |
|
Thanks @ajensenwaud for the Inkling 2 Small CUDA work. I found two issues to fix:
|
|
Thanks, Ash. Both are fixed in
Your #5059 reviews found gaps that this code shares, so the same fixes are here too:
|
Synthena Initial Review — Performance receipt required (
|
Synthena Initial Review — Needs changes (
|
Patches 0001-0007: TP=2 / TP=4 Inkling 2 Small support, ModelOpt NVFP4/MXFP8 loading, FP8 KV cache, exact prefill, multi-rank comms, bandwidth-optimized kernels, and DSpark speculative decoding. This commit carries 0001's BF16 dense part only: a Linear that is EXL3 or BF16, BF16 attention projections and head loaded from `.weight` tensors, cuBLASLt prompt projections and rowdot decode rows, and the vocabulary cut in 16-row units. Its ModelOpt experts, four-rank admission and their kernels are not taken.
…s at TP4 0xSero/Inkling-2-Small-EXL3-4bpw quantizes only the routed experts (EXL3, mcg codebook, 4.0 bpw, out_scales always); attention, embed, unembed, norms, convs and routers stay the source's BF16. Load that hybrid: - exl3.admit returns the codebook: mul1 packs still need exllamav3 1.x; mcg is admitted without a version. - exl3.group reads the .mul1 or .mcg marker and checks its magic (0x83DCD12D / 0xCBAC1FED); a layer's experts must share one codebook, which the grouped layer launches (tf_exl3_grouped_1 for mcg). Dense EXL3 stays mul1. - Weights.bf16_dense (ModelOpt, or EXL3 attention stored as .weight BF16) picks the BF16 attention, head, FP8 attention copies and cuBLASLt prompt projections; is_modelopt now means ModelOpt experts only. - Weights.units(): EXL3 experts cut in 128-column blocks (TP4: 640/640/512/512), a BF16 head in 16-row blocks. - experts.run takes mcg layers; the 64-column wide kernel stays mul1-only, so mcg keeps 16-member items.
…s bits kept Adapts the BF16 dense linears and the mcg routed experts to this family, so a pack that quantized its routed experts alone (EXL3 mcg, BF16 attention and head) loads at two ranks: - No ModelOpt Small checkpoint loads here (its experts were not taken), so the config is admitted as EXL3 alone; `bf16_dense` (a stored `layers.0.attn.wq_du.weight`) picks the BF16 linears, the head and the cuBLASLt prompt plans, which the engine now prepares for every projection and the head at init. - The cuBLASLt plans move to bf16_prompt.zig and keep a row's bits at any row count: each (n, k, output) runs one algorithm chosen at a full 2,048-row chunk and checked at each count, and one that splits K or reduces partials is refused (the engine then keeps prompt rows on the row-dot kernels). - A BF16 projection takes the GEMM from 256 rows, the EXL3 prompt GEMM's bound, so a decode call (16 rows at most) stays on the row-dot kernels and a row's bits do not depend on how many streams share it. - A shard test pins the 16-row vocabulary split of 201,024 rows; the recipe names the 2.55-bpw pack. - The new comments in exl3.zig and experts.zig fold to one line each, as this tree's comments are. Co-authored-by: MiaAI-Lab <83042094+MiaAI-Lab@users.noreply.github.com>
453fd5c to
d51d55f
Compare
Synthena Initial Review — Needs changes (
|
The tool also checks that ids.json maps names to token ids before it reads them, and prints its usage line when it does not.
|
Thanks, Ash. Nine commits on top of your integration answer the reviews on
The family's host suites, |
|
The logits-exchange finding is cleared on #6215's fixture applies to this head. In the combined checkout,
|
|
The two-Spark greedy comparison is complete on Please keep the serving change in review until the long-context path completes and supplies a matching receipt. The separate logits-exchange source finding remains cleared.
|
Each plan holds a pointer to the library, and the struct is returned by value after its plans are made, so a long prompt and teardown read freed stack memory.
|
Thanks, Ash. Four commits on top of
Two smaller fixes came out of the same run:
RunTwo GB10s over RoCE, build
Rank 0 reports 97.55 GiB of weights and 4.3 GiB left after the 12 GiB reserve. With |
|
A correction to our automated review: This adds a model main cannot load, so it is kind:feature and needs no receipt against main; the verify failure came from our label. The logits exchange was cleared on 4 Dec, kept states drain before they are freed, and the docs already say CUDA refuses one rank.
|
|
This one is underway, apologies for the wait. |
|
Thanks, Ash, and thanks for correcting the label.
|
Inkling 2 Small has its kernels in TensorFold through #4125, #4126 and #4127, but nothing serves it yet. A pair of DGX Sparks can hold Small at 2.2 bits a weight, which is how people run it today, but that needs a loader for the pack and a runtime that splits the model across the two machines. This PR adds both.
What this changes
mul1codebook loads as it comes from exllamav3. Any other codebook, version or format is refused by name before a tensor is read. The reader is our own and sits beside inkling: load EXL3 packs through the shared family plan #3612, which reads kortexa's pack format.TF_INKLING2_RANKandTF_INKLING2_WORLDname a rank, with rows indocs/environment.md.docs/recipes/inkling-2-small-cuda.mdhas the run commands.Rebased onto main
37d4ce7b1, where #4127 has landed, so every commit on the branch is this PR's.Checks on this head
eea0560bb, which renders thinking off as effort level 0, so chat replies are checked within the run.bench_concurrent.py.zig build test test-gradient-serving compile-cuda-tests -Dfixed-cpupass, with 13,404 of 13,500 tests (96 skipped).lean_checkfinds no new problems, and every Zig file is at most 600 lines.The device runs happened on 24 November on two GB10s against
ajensenwaud/inkspark-2dgxataa29f3a0. Equality, concurrency and resume ran again on 4 December on this head,453fd5cb1; the host run is fromd67d65682, the same patch on mainef4dd750b. The cache and speed figures come from6b579b2a0on main0300dfbfe, before the rebase; graph replay ran again on this head, with 46 of 46 steps bit-identical.Receipt
Commits.
3188b50eb: load standard exllamav3 packs with two-rank cuts.59989d0d0: serve Small on two GB10s from an EXL3 pack.9dc3b1947: add the Inkling 2 Small CUDA recipe page.ee34a83bd: choose a stream's slot before publishing its lane.7331c11aa: compare every shard byte across the ranks at ready.d932d528c: make a call's scratch safe to free at every failed allocation.Size. 33 files, +3,939 / -12 over main. Shared files take +38 / -9; the rest is new under
zig/src/families/inkling2/anddocs/recipes/.Hardware. Two DGX Spark (GB10, sm_121), RoCE between them, bf16 KV, 12 GiB reserve a rank, images on.
Token equality (
bench_concurrent.py --alone --serial, raw prompts either side of the 256-row prompt GEMM threshold, one, two and four at once, greedy and seeded, 64 tokens each): 42 of 42 replies have the same token ids as the run of 25 November before the rebase. The 29 chat cases oftools/g3-equal/ab_tokens.py(chat, code, agent and report prompts, 3,419 and 21,855 prompt tokens, four- and eight-request runs, a resumed run and an image, 256 tokens each) render two tokens shorter sinceeea0560bb, so none equals the earlier run. Within the head, the four- and eight-request runs equal the single ones, and the resumed run equals the fresh one.Prompt cache. A follow-up chat turn on a 21,857-token conversation:
bench_cache.py (token-id prompts from the pack's tokenizer, 64 tokens): raw completions keep no prompt state, so every repeat runs cold with 0 cached tokens. Repeated and concurrent replies equal the first.
spark-bench (bf16 KV, 512 tokens, chat/code/agent/report):
bench_openai.py (256 tokens, 3 reps): 31.9 tok/s on
fibonacci-rawat temperature 0, 31.9 ongpu-chat-no-think.bench_concurrent.py (
--alone --serial): equal to alone at 1, 2 and 4 streams oncodeandchat, 0 unequal.Graphs.
tf-inkling2-engine graphs: 46/46 steps bit-identical, 5 captured, 41 replayed, on7c7998de4, an earlier head of this branch on main0300dfbfe.Kernel contract. No new kernels; the PR runs on #4125, #4126 and #4127.
Notices.
THIRD_PARTY_NOTICES.mdcredits exllamav3 (MIT) for the EXL3 format and HF transformers (Apache-2.0) for the layer order.