Repository navigation
Conversation
…ared gate-up, after its router Site f read a MoE layer's router alone. The shared expert's gate-up runs on the same window once the routed experts are done, and its scales and codes now follow the router in the site's rows, inside the same budget. The table's test gives layer 1 a block FP8 shared gate-up and checks where the 12 MiB budget cuts it.
…age cache after load Shard 15 of the NVFP4 checkpoint holds the n-gram table beside 3.27 GiB of load-only tensors (embedding, HC, MTP, vision); the runtimePages guard skipped its release whole, and the final sweep listed only top-level *.safetensors while this checkpoint keeps its shards under tensors/. Now a shard drops everything but the n-gram tensors' pages (releaseExcept), and the sweep walks the index's shards (core.checkpoint.shardFiles).
…; pages read living's lesson_route
Split ling_mla_gpu.zig past 600 lines by job. One-line comments in mla.metal and one-line docstrings in the python oracle. Lean new vs main is 0.
Register tf_ling_mla_rope_cache, tf_ling_mla_rope_q and tf_ling_mla_gate_expand with planted source controls, the way Ling KDA and route were done in #3055.
AutoGPTQ v1 stores a 4-bit symmetric weight as qweight int32 [k / 8, n] with eight inputs a word, scales fp16 [k / 128, n], and qzeros int32 [k / 128, n / 8] whose every nibble is 7, so a weight is (nibble - 8) * scale. core/quant/gptq.zig reads that form. The config side admits quant_method gptq with bits 4, group_size 128, sym, no act order and a quantized lm_head, and keeps its dynamic rules in declaration order, so the last rule matching a module decides whether it is stored quantized. A rule is matched with Python's re.match over the subset the rules use: literals, '.', '\x' escapes, '*' and '+' after an atom and a final '$'. A rule outside that subset, an unprefixed rule key and a rule whose own bits or group_size differ are refused by the rule's name rather than guessed at. Anything else stops the load naming the field, the rule or the tensor: bits, group_size, sym, desc_act, lm_head, a missing or malformed dynamic, a qweight, scales or qzeros of another dtype or shape, a qzeros byte other than 0x77 with its offset and value, and a non-empty g_idx, because act order is not read. read returns the three stored tensors as views and reference writes every dequantized weight as binary64: q - 8 is an integer and the scale an fp16 value, so each product is exact. Host only: no family calls it, no kernel reads it and no setting is added, so every checkpoint served today takes the path it took before. The test builds a synthetic GPTQ checkpoint (config.json and a safetensors image packed by the format's own definition) and checks a binary64 fixture of hand-derived values, every refusal by name, the matcher on the rules a real export writes, and the reader on both modules of the checkpoint. Refs #3368
…nd a non-bool desc_act
A rule's backslash escape was read as the character that followed it, whatever that was,
so ".*layers\.\d+\.mlp.*" matched "layers.d.mlp" here while Python's re matches
"layers.12.mlp" there: a module the rule leaves BF16 could read as int4, or the reverse,
with no error. supported admits an escape only before a non-alphanumeric character, which
is that character itself in Python's re and here, and refuses "\d", "\w", "\s", "\b" and
the rest by the rule's name as "(" and "[" already were.
desc_act went through flag, which answers null for a value that is not a bool, so
"desc_act": "false" was read as false. It is refused by name now, saying what it found in
place of a bool, for the reason sym is.
checkpoint_format was ignored. It is admitted as "gptq" only and refused by name
otherwise, and dialect's doc comment no longer claims every field the reader does not read
is refused.
The tests add the rule above and "\w" and "\s\b" beside it, an escape of a non-alphanumeric
character read as the character, a rule using one admitted, the desc_act refusals, the
checkpoint_format refusals, and checkpoint_format "gptq" on the admitted config.
The published AutoRound export (Qwen3.8-Flash-Next-125B-A5B-INT4-AutoRound, revision
1464274) stores no g_idx tensor: 70 shards, 224454 tensors, none named *.g_idx, so the
refusal of a non-empty one is unchanged.
TENSORFOLD_REQUEST_JOURNAL=PATH journals each chat and completion request as three JSON lines: start before any work (reply id, route, fingerprint, the client's seed, the redacted body), prepared before the engine sees it (the seed and sampling the server resolved, the prompt's token count and SHA-256), and finish once the reply has gone (status, outcome, the reply's size, SHA-256 and token hash, and its bytes when they fit 4 MiB). - Privacy: off unless set. PATH and PATH.lock are created 0600, a link or a file others can read is refused, and one server holds the lock. Image URLs and PDF data are redacted as in TENSORFOLD_REQUEST_LOG, which is unchanged; no header is journaled; benchmark child servers drop the variable. - Size: a file rotates at 64 MiB and four are kept; a record is at most 8 MiB, past which a body or reply keeps its size and hash. Each record is one write with no sync: a failed write loses that record, is logged once, and the request goes on. - Quarantine: the next start flags every request a crash left unfinished. A fingerprint (the API key's label, the route, the body) in flight at two crashes is refused with a 400 request_quarantined before the engine sees it; other keys and other bodies are served. It lapses after a day, a clear record lifts it, and a clean stop flags nothing. - tools/replay_request.py lists, clears and replays a request, adding the drawn seed when the client sent none, and compares the reply's output and token hash, or every byte with --whole-body. With the variable unset the trace hands back the caller's own output and writes nothing. Host tests on a fake engine cover the records and reply bytes, replay by the drawn seed, redaction and file modes, the two-crash rule per key, clean stops, clears, lapses, torn and unreadable lines, rotation, a failing write and the journal-off path (zig build test-request-journal-host). Fixes #3188
…ored between its tensors
…lel fabric, pictures and video settings read through platform/environment.zig
…libnccl.so.2' (review editorial changes)
…hrough a per-warp cp.async ring ncu showed nvfp4_expert_half stalled on long scoreboard (~110k cycles a warp): the register pipeline kept about one k-group in flight and the activation loads missed L1, while DRAM sat near 30% busy. Each warp now keeps a 4-stage cp.async ring in shared memory for its weight words, block scales and x halves, and computes in the same k order, so sums are bit-identical. GLM-5.3 FP4-Local, 2x RTX PRO 6000 TP=2: one-row gate-up 69.8 -> 31.7 us; plain decode 90.0 -> 105.7 tok/s; reply shas unchanged, drafted == plain. Kernel contract: 551 pass gates 1-4, limit problems unchanged. The half gate-up limit records (regs, static shared bytes) come from nvcc 13.4.92.
…per-warp cp.async ring The ring that made the half gate-up kernel bandwidth-bound now feeds the classic and waves decode kernels too (gate-up and down, 1 and 4 warps): one Ring helper streams each warp's words, scales and inputs D = 4 k32 groups ahead, and the sums still run in k order, so every kernel keeps its bits. GLM-5.3 FP4-Local, 2x RTX PRO 6000 TP=2, against the half-kernel ring alone: drafted code 220.1 -> 229.0 tok/s, code-long 172.9 -> 175.9, chat 177.6 -> 182.1; plain 105.7 -> 107.9. Reply shas unchanged, drafted == plain. Decode bench, one row: classic gate-up 88.0 -> 38.5 us, down 19.7 -> 13.1 us. Limit records here are nvcc 13.4.92's; the 13.0 base and 13.2/13.3 sets are still to be re-derived.
…13.2.78 set (13.3.73 compiles as 13.2)
On sm_121 the shared-memory ring halved resident blocks and cost Qwen3.6 code sampled 1.8% at one stream; a D=2 ring restored occupancy and kept the loss. GB10 now loads two stages in registers with no shared memory, level with main. Preprocessed source for sm_80/86/89/120 is unchanged. sm_121 limit records come from real nvcc 13.0.88 and 13.2.78 compiles.
Give the released drafter's, the 660-step run's and each long run's tokens per round with step counts, say up front that no adapted checkpoint beat the released drafter, and move both links to reference definitions so every line in the section stays within 120 columns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI for a landing train: #3869 #3900 #3369 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.