Repository navigation
Conversation
|
Sampled decode, and the drafter on against off, measured after the PR was opened. Same GB10, the PR's base 6c5cef8, bf16 KV, This family has no Drafter on against Greedy, drafter on: with the setting unset the PR is level with main, and with Sampled (temperature 1.0), drafter on, against the mean of 4 boots of main (3 boots each for the PR unset and with
Main's own boots spread by 1.6% to 2.0% in these cells, so the unset arm is inside main's range everywhere. So the last checklist box stays unticked: |
|
Thanks @BadAd84. The host tests pass, and keeping checkpoint as the default looks good. We will run the device check on our side with TF_FLASHNEXT_MTP_WEIGHTS unset, checkpoint and mxfp8. Each mode must preserve the plain target's complete generated tokens for greedy and seeded requests, including resumed turns and one and four streams. We will compare acceptance, resident memory, prompt speed and decode speed against main before merging.
|
|
Thanks. All six are in, as two new commits on top of
The default stays |
|
Thanks @BadAd84, this is a careful follow-up. The receipt on main is thorough: unset and blank match main's replies in every arm, drafted equals Where the head stands against your six points and our last comment:
Needed before it lands:
One optional suggestion:
|
|
Thanks. All four are done, plus the wording you suggested, as new commits on top of Main moved after this branch was cut: 1.2.8 and 1.2.9 were released, and main re-pinned
The changelog line now says "with main's tokens a round on code", as you suggested. Checks on
Not run: the HIP device build ( |
…HTS changes cuda_mtp.zig, cuda_projection.zig, cuda_projection_load.zig and cuda_prompt_wt.zig take their hashes at this head, on main's files, each with a ashhart#3218 note: checkpoint keeps main's bytes.
|
Thanks @BadAd84. All four are in, and merging main rather than rebasing was the right call with On
Needed before it lands:
On a tree with your commits applied,
|
|
Thanks. HIP is moved in one new commit, Following the served path down from the HIP backend showed that the top of The one place ahead of all that is the family's flag refusal: The position test in Checks on |
|
Thanks @BadAd84. Thanks too for merging main in One thing remains before our GB10 check: the seed-1234 chat cell. Your receipt marks chat at one stream, temperature 1.0, seed 1234 as a loss under the #3162 rule: -1.0%, then -1.7% on the rerun, with tokens a round down from 2.39 to 2.31. The gate there asks Once that's in, we'll run the device check we described on a GB10 with the setting unset,
|
The four files this pull request ships under docs/receipts/flashnext-mtp-weights/ carry the narrow variant's window: main 4fda6a0 against head b43b10f, one GB10, 18 boots, 22 cells faster and 10 level of 32 for mxfp8, no cell slower, the gate cell level, every cold cell level and every exactness contract equal.
Narrow re-code: the receipt, on current mainThe branch keeps Measured head The gate cell: chat, temperature 1.0, seed 1234, one stream
Level at +0.34%. Both branch runs sit between main's two (44.1, 44.5 and 44.6, 44.3), so the rule does not even get Every other cell
At one stream Cold prompts, exactness, refusals, memory
Method, so the numbers can be checkedStates M (main), U (branch with the variable unset) and X (branch with |
|
Thank you @BadAd84 for the fresh receipt on current main. The narrow re-code split, the named refusal and the unset default are all as reviewed; the gate cell is level and no cell is slower, with every exactness check equal. Nothing further is needed from you on this PR. We will settle the changelog hunk at landing.
|
aa35a60 to
b2b8d98
Compare
…HTS changes cuda_mtp.zig, cuda_projection.zig, cuda_projection_load.zig and cuda_prompt_wt.zig take their hashes at this head, on main's files, each with a ashhart#3218 note: checkpoint keeps main's bytes.
The four files this pull request ships under docs/receipts/flashnext-mtp-weights/ carry the narrow variant's window: main 4fda6a0 against head b43b10f, one GB10, 18 boots, 22 cells faster and 10 level of 32 for mxfp8, no cell slower, the gate cell level, every cold cell level and every exactness contract equal.
|
I checked Against Igor Lessio - AIFLOW LABS |
…HTS changes cuda_mtp.zig, cuda_projection.zig, cuda_projection_load.zig and cuda_prompt_wt.zig take their hashes at this head, on main's files, each with a ashhart#3218 note: checkpoint keeps main's bytes.
The four files this pull request ships under docs/receipts/flashnext-mtp-weights/ carry the narrow variant's window: main 4fda6a0 against head b43b10f, one GB10, 18 boots, 22 cells faster and 10 level of 32 for mxfp8, no cell slower, the gate cell level, every cold cell level and every exactness contract equal.
b2b8d98 to
20003e9
Compare
|
I trial-merged I also applied the current #2898 at zig build test-environment-host test-gradient-serving test-flashnext-mtp-plan-host \
test-flashnext-loader-host test-kv-pool test-kv-safety-host \
test-flashnext-pages-contract-host check-native-cuda-host \
-Dcpu=apple_m1 -Doptimize=ReleaseSafe -j2 --summary allThe GB10 checkpoint measurements remain separate. Igor Lessio - AIFLOW LABS |
…keeps its BF16 linears The FP4 checkpoint quantizes the backbone and leaves the drafter in BF16, 181 MB that every draft pass reads. TF_FLASHNEXT_MTP_WEIGHTS=mxfp8 re-codes those linears to MXFP8 (E4M3 codes, one power-of-two scale a row of 32 inputs) as they load; checkpoint, the default, keeps the rows as stored and runs no new code. A draft is a proposal the verify forward checks, so a reply is unchanged and only the rounds it takes move.
Decode cells at 1, 2 and 4 streams on main, the branch unset and the branch with mxfp8, and the drafted, resumed and concurrent exactness table for the same three arms.
…drafter has no MXFP8 projection mxfp8 re-codes the drafter's BF16 linears through the MXFP8 projection that an MXFP8 checkpoint's mixers load through, and only the CUDA loader has it. Flash Next on Metal and on HIP now refuse mxfp8 by name when they load, and on CUDA a drafter linear stored as anything but BF16 (MXFP8 or affine already) refuses it at that tensor, naming the setting, the tensor and its stored type, rather than loading it as stored. Unset or blank still reads checkpoint, which runs main's load. The reader moves to mtp_weights.zig so Metal and HIP can ask without CUDA, the startup line gives the MiB re-coded, and the setting has its row on the environment page.
…le and tokens a round Main against the branch rebased on it, as M1 U1 X1 M2 X2 U2 with U2 set blank: greedy and sampled at three seeds, tokens a round beside tok/s, the cold prompts, a malformed start and the exactness table, and the changelog line quotes them. One cell, chat at one stream with seed 1234, is slower again on its rerun and is reported as a loss.
…e any checkpoint or device work HIP asks at the top of Engine.load, ahead of the runtime, the context, the kernel images, RCCL and the checkpoint; Metal asks right after the environment check, ahead of window validation and the checkpoint admission. The test checks that each call comes before its backend's first runtime open or admission check, and the admission order test takes the new line.
…HTS changes cuda_mtp.zig, cuda_projection.zig, cuda_projection_load.zig and cuda_prompt_wt.zig take their hashes at this head, on main's files, each with a ashhart#3218 note: checkpoint keeps main's bytes.
…NEXT_MTP_WEIGHTS The receipt names the rebased commit it measured and gives the engine allocator's resident model from the same boots: 72.73 GiB on main and unset, 72.65 GiB with mxfp8. The changelog line moves under Unreleased after the 1.2.9 release and says main's tokens a round on code.
…g, before the backend opens a device The HIP backend runs ready before any family code: it reads the checkpoint's context, opens a runtime for the card's caps and, under --tp, joins the ranks. A refusal in check or in Engine.load came after that. Flash Next's HIP native now refuses mxfp8 in refusal, the flag check the backend runs on every rank before ready, and Engine.load no longer asks. The position test checks the hook and that no later copy remains.
…pert as stored TF_FLASHNEXT_MTP_WEIGHTS=mxfp8 re-codes the MTP drafter's BF16 linears to MXFP8 as they load: 13 tensors, 170 MiB of them on the NVFP4 checkpoint. Re-coding all of them also moves the sampled draft acceptance at one stream (chat, temperature 1.0, seed 1234: 2.39 tokens a round becomes 2.31), and in a screen on this tree that cell measured 2.5% slower than main, which is the cell the gate asks to stay level. A narrower re-code keeps three of those tensors as the checkpoint stores them and re-codes the rest: - fc_embedding and fc_hidden (25.0 MiB), the two fusion projections that carry the previous token's embedding and the model's hidden state into the drafter; - the layer's shared expert gate, up and down projections (9.4 MiB). The other 135 MiB, the hyper-connection mixers and the attention's q/k/v and o_proj, are re-coded. A screen of thirteen masks over those linears, one fresh server a boot, found every mask that re-coded the two fusion projections 1.2 to 4.7% slower at that cell, where masks that kept them stayed at main's level; keeping the shared expert as stored held the sampled cells at main's level as well. denseFor names the loader's tensor and holds the re-code off for a linear kept as stored, so the six loaders that pack a drafter BF16 tensor decide in one place. The startup line reports both halves: TF_FLASHNEXT_MTP_WEIGHTS=mxfp8 re-coded 135 MiB of the drafter's BF16 linears and left 34 MiB as stored. The kept set is one list with a test over it, a second test holds every loader to denseFor, and the four pinned serving files are re-pinned.
…ting's name The matcher read `for (held) |name|`, and `name` is the file's own constant for TF_FLASHNEXT_MTP_WEIGHTS, so the tree did not compile: "capture shadows declaration of 'name'". The capture is `keep` now; the set it walks is unchanged.
The four files this pull request ships under docs/receipts/flashnext-mtp-weights/ carry the narrow variant's window: main 4fda6a0 against head b43b10f, one GB10, 18 boots, 22 cells faster and 10 level of 32 for mxfp8, no cell slower, the gate cell level, every cold cell level and every exactness contract equal.
20003e9 to
6e53e2f
Compare
What this changes
TF_FLASHNEXT_MTP_WEIGHTS=checkpoint|mxfp8says how the Flash Next MTP drafter's linears are kept in memory.checkpoint, the default (unset or blank too), leaves the rows as stored and runs main's load.mxfp8re-codes the drafter's BF16 linears at load into the MXFP8 projection the mixers already use, leaving its twofusion projections (
fc_embedding,fc_hidden) and the layer's shared expert as the checkpoint stores them: on theNVFP4 checkpoint it logs 135 MiB re-coded and 34 MiB left as stored, so a draft pass reads about half of the 135 MiB
instead of all of it. It applies only on CUDA. Flash Next on Metal or HIP stops the start naming the setting before any checkpoint or device work: Metal right after its environment check, HIP in the flag refusal its backend runs on every rank before reading the checkpoint or opening a device. So does a CUDA drafter linear stored as anything but BF16. A draft is only a proposal the verify forward checks, so replies are the same and only the rounds a reply takes move.
TF_FLASHNEXT_MTP_WEIGHTS) #3162 (the maintainer's gate there: opt-in with six additions, each answered in the receipt).0900b484ethen4fda6a020(the branch carries merge commits rather than a rebase, so nothing already pushed is rewritten;CHANGELOG.mdtakes main's file and the branch carries no bullet). The head on the branch isaa35a60e4be9757c51ee48d5029dbca02aada4a5: the measured headb43b10f46below plus one commit that changes only the receipt files underdocs/receipts/flashnext-mtp-weights/.atc overlap --base up/main --json, run last on headaa35a60e4withup/mainat905ce9b112568fe13182dd86a8c70c5347fde77b:completeis false (itsotherPullRequestsLimit,pullFilesUnavailable,pullRequestsLimitandtimeLimitlimits). It lists 11 overlaps: 3clean, 1unknownand 7 textual conflicts, each checked against the files of both pull requests: lfm3: serve LFM3-1.7B on CUDA: NVFP4 and FP8 weight-only, MLX 4-bit (stacked on #1513, #1492 and #1503) #1508 and lfm3 CUDA: serve the block FP8 export weight-only and the MLX 4-bit export as stored (stacked on #1508) #1634 sharedocs/environment.md,zig/src/platform/environment.zigandzig/tests/fixtures/gradient-serving.tsvwith this change; CUDA: #1764's BF16 prompt tile for Qwen ModelOpt, Nemotron and Dory, plus two exact Qwen prompt kernels (#1762) #2008 shares the last two; MiMo-V2.6-Flash on CUDA (2x GB10) with DFlash as the drafter #728, idol: the octree and Gaussian decoders on CUDA (stacked on #1773, #1767; not yet run on a GPU) #1858 and Nemotron 3.5 Transcribe: audio input, the 65,536-token window, an hour of audio, MTP drafts #1632 share the pin file only; Living Weights: a refused round re-draws wordings and keeps the open fit; fallbacks continue as main does #2650 shareszig/src/platform/environment.zigonly. A pin row is retaken by whichever lands second.Checks on this head
b43b10f46, this pull request's own commits, the merges of0900b484eand4fda6a020, the narrow re-code (the mask the screen picked: the two fusion projections and the layer's shared expert stay as stored) and one line renaming the matcher's loop variable, which shadowed the file'snameconstant and stopped the tree compiling. The headaa35a60e4adds the receipt files only.4fda6a020and head, each tree running its own copy: 6769 files and 191 problems against 6771 and 191, 0 new.python tools/pr_check.py --base 4fda6a020 --pr 3218: merge base4fda6a020, 17 changed files, lean 191 against 191, 0 new; 0 errors, 1 warning (maintainer-ownedCHANGELOG.mdbullet).checked against
git ls-tree -r(mismatches 0 extra_files 0both):zig fmt --check build.zig zig: rc 0.zig build -Dfixed-cpu test-environment-host: rc 0.zig build -Dfixed-cpu test-gradient-serving test-qwen-serving-host: rc 0 (the four re-pinned serving rows pass).zig build compile-config-server -Dtarget=aarch64-linux-gnuandzig build compile-cuda-tests -Dtarget=aarch64-linux-gnu: rc 0 each.python3 -m unittest discover -s tools/zig -p flashnext_batch_serve_test.py: 8 tests, OK.zig build -Dfixed-cpu test-cuda-host --test-timeout 20m: rc 0 on this head, and rc 0 on main as the comparison arm; each prints the same 14 innerfailed commandlines from fixtures that fail a child on purpose.python tools/pr_check.py --base 4fda6a020 --pr 3218: 0 errors.denseForand itskeptcount, the six loader call sites, the log line, the docs row and the four re-pinned serving rows. The refusal paths and their guard-removal mutants recorded on5038aecandcc6fb6bare not among them and are unchanged.aa35a60e4(the head), run on this pull request:fmt,zig,zig-b,zig-windows,pytest,benchmark-clients(ubuntu and windows),release-pathsandzig-macos-dev-toolsall completed successfully;host-nightly-linuxandhost-nightly-macosare skipped by their own conditions. The gates above were run on a 16-thread x86_64 host with Zig 0.17.0 under the same commands the workflows use.-Dhip=true flashnext-hip-gpu-buildneedshipcc), Metal hardware, and a checkpoint whose drafter is not BF16 (the checkpoint measured here keeps BF16 drafters). Host tests cover those refusals.Receipt
docs/receipts/flashnext-mtp-weights/. Main4fda6a020against this head (b43b10f46),alternating M1 U1 X1 M2 X2 U2 (U unset, X
mxfp8), a fresh server per arm, 18 boots. No cell of any comparison wasflagged slower, so the noise rule's rerun was not taken.
b43b10f46df555b1eb9e2b7ba19832c0d4da78f0, this pull request's commits with upstream main mergedtwice. Both images were built inside the window from commit archives whose every blob was checked on the box
(
mismatches 0 extra_files 0), each build log carrying its ownSOURCEline.model N GiB) are 72.71 GiB on main and on thebranch unset, and 72.64 GiB with
mxfp8, at 8 slots (72.73 against 72.67 at 4), somxfp8holds 0.07 GiB less.mtp.*rows). Anywhere elsemxfp8stops the start by name.TF_FLASHNEXT_MTP_WEIGHTS, defaultcheckpoint(unset or blank), acceptedcheckpointormxfp8; anyother text stops the start by name.
4fda6a020and this branch on it, Zig 0.17.0, one DGX Spark (GB10, sm_121, 128 GB unifiedmemory), the recipe's
CHECKPOINT=nvfp4,DRAFTS=1, bf16 KV,MEM_CHECK=0, a 32,768-token window and 8 slots fordecode and the exactness boots, 131,072 and 4 slots with the prompt cache off for the cold prompts.
mxfp8, each with the prompt cache on and off, draftedequals
"draft": false(8 of 8), resumed equals fresh (7 of 7, the resumed turns reporting cached prompt tokens andthe fresh boots none), the golden prompts 5 alone and 8 serial equal, and concurrent equals solo (252 of 252 greedy
and 252 of 252 sampled in every state). Every pass A reply's token ids equal main's, 552 an arm per state, and the
cold prompts' 8.
tools/bench_openai.pyandtools/bench_concurrent.py --alone --serial, 256 tokens, aggregate tok/s,the mean of each arm's two runs against main's two, with tokens a round:
mxfp8against mainmxfp8mxfp8against main is 22 faster, 10 level and 0 slower of 32; the branch unset is 32 level of 32 (gaps -0.90% to+0.42%). At one stream
mxfp8proposes slightly fewer accepted tokens a round and still measures level or faster,so the gain is in the draft and verify passes.
s, 32k 16.032 against 16.038 s, 64k 32.947 against 33.087 s, and
bench_cachequalified on every boot.mtp.*(NVIDIA Open Model Agreement).Checklist
For a change that reaches inference:
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (Run onmain, the branch unset and the branch withmxfp8; see Exactness above.)mxfp8, which only changes which tokens it proposes.--drafter, no slower than without it, greedy and sampled. (Measured at 1, 2, 4, 6 and 8 streams, greedy and at three seeds plus a nine-seed single stream: 22 cells faster, 10 level, 0 slower of 32 against main, the gate cell chat at one stream with seed 1234 level at +0.34%, every cold cell level.--drafterdoes not apply, the drafter is the checkpoint's own head.)