Skip to content
This repository was archived by the owner on Oct 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3709a45
fix(roce): accept torch.dtype at the oneshot launcher boundary
randomvariable Sep 14, 2026
5538c73
fix(preparation): annotate PCIe launcher closures and retain opaque v…
randomvariable Sep 14, 2026
c39c592
fix(pcie): attach program carrier to twoshot fp8 launcher
randomvariable Sep 15, 2026
71cadbc
feat(preparation): collective entry barrier for priming lockstep
randomvariable Sep 15, 2026
40be008
chore(preparation): drop unused Mapping import
randomvariable Sep 15, 2026
1702e4b
fix(preparation): key memory extension build by source hash
randomvariable Sep 15, 2026
d6c02e4
test: isolate collective barrier failure cases
randomvariable Sep 16, 2026
0660c60
docs: document prepared launcher closures
randomvariable Sep 16, 2026
97553a0
fix: contain collective barrier failures
randomvariable Sep 16, 2026
98f390f
fix: validate collective barrier deadlines
randomvariable Sep 16, 2026
129458b
fix(roce): fail unsupported dtypes alike at the launcher boundary
randomvariable Sep 21, 2026
db6bcaf
Preserve launcher ownership with scoped preparation caches
voipmonitor Sep 29, 2026
07d7448
Serve DS4.1 X4T with native W4A16 and fused scale expansion
voipmonitor Sep 29, 2026
872a9a4
Support Kimi-K3 geometry in the lossless X4T checkpoint reader
voipmonitor Sep 30, 2026
b571347
Declare compressed-scale programs in fused MoE preparation
voipmonitor Sep 30, 2026
c62107a
Merge remote-tracking branch 'canonical/master' into review/kimi-x4t-…
voipmonitor Sep 30, 2026
b39de28
Merge remote-tracking branch 'canonical/master' into review/kimi-prep…
voipmonitor Sep 30, 2026
552da21
Declare Kimi compressed-scale preparation for runtime releases
voipmonitor Sep 30, 2026
e4084d2
1.5.0 release
lukealonso Sep 30, 2026
c2797ba
Decode losslessly compressed NVFP4 expert scales into shared native s…
voipmonitor Sep 30, 2026
5c13c2e
Name compressed FP4 scale interfaces MXFP4-CSF and NVFP4-CSF
Oct 1, 2026
8cb43b9
Preserve FP32 NVFP4 calibration under BF16 model loading
voipmonitor Oct 1, 2026
1b32d92
Support canonical CSF checkpoints and native NVFP4 scale expansion
voipmonitor Oct 1, 2026
9e6c26f
Allow FP32 dense MLA split partials in prepared plans (#441)
voipmonitor Oct 1, 2026
b02dae3
perf(moe): full-codeword lookup for prepared K2 Trellis decode (#436)
lukealonso Oct 1, 2026
a321f9a
Retain prepared Trellis route-pack programs across live row counts (#…
voipmonitor Oct 1, 2026
d3b8eae
Merge b12x master a321f9a6 (#441, #436, #442) into beta
voipmonitor Oct 1, 2026
748fa9e
Merge b12x#384: retain prepared launchers and coordinate collectives
voipmonitor Oct 1, 2026
403f9e9
Merge b12x#446 and b12x#450: canonical FP4-CSF scale decoding (DS4.1/…
voipmonitor Oct 1, 2026
4ee6a2f
Keep the beta b12x version at 1.3.0
voipmonitor Oct 1, 2026
b524e3b
Merge integration/karmic-kraken-beta (PLE host allocator, #454)
voipmonitor Oct 1, 2026
8f0f018
docs(release): describe the 2026-10-01 master sync
voipmonitor Oct 1, 2026
157cfd2
Separate CSF tensor preparation from model checkpoint discovery
voipmonitor Oct 1, 2026
096464c
Prepare CSF scales through fused-MoE weight post-processing
voipmonitor Oct 1, 2026
7dc9174
Preserve native MXFP8 expert execution for compressed MXFP4 scales
voipmonitor Oct 1, 2026
2fa9fef
Reconstruct NVFP4-CSF scale operands in dynamic MoE
voipmonitor Oct 1, 2026
bb5f4c4
Document CSF serving results and remaining decode overhead
voipmonitor Oct 1, 2026
778ca21
Compress native FP4 expert scale bytes during weight preparation
voipmonitor Oct 2, 2026
c41b255
Link the online scale preparation change to its pull request
voipmonitor Oct 2, 2026
0cb79c4
Reduce NVFP4-CSF operand reconstruction overhead
voipmonitor Oct 2, 2026
7125b0b
Qualify Qwen CSF operand reconstruction against TP1 and TP2 controls
voipmonitor Oct 2, 2026
e646d0d
Vectorize indexed NVFP4 scale reconstruction and exception lookup
voipmonitor Oct 2, 2026
566e288
Qualify indexed scale reconstruction with Qwen TP1 and TP2 serving
voipmonitor Oct 2, 2026
654f7a6
Build NVFP4 scale indices on GPU and group narrow MXFP4 rows
voipmonitor Oct 2, 2026
01c40d6
Document native Kimi and GLM scale preparation validation
voipmonitor Oct 2, 2026
3ab8663
Measure DS4.1 and Qwen online scale preparation
voipmonitor Oct 2, 2026
c207548
docs: qualify native DeepSeek-V4-Flash online CSF serving on TP2
voipmonitor Oct 2, 2026
c716eff
Merge CSF preparation and expert execution repairs into beta composition
voipmonitor Oct 2, 2026
c598a2d
Merge online FP4 scale preparation into beta composition
voipmonitor Oct 2, 2026
9650277
Merge NVFP4-CSF operand reconstruction optimizations into beta compos…
voipmonitor Oct 2, 2026
6f5a147
Reserve Trellis codebook shared memory only for Trellis weights
voipmonitor Oct 2, 2026
3e51c96
Document combined beta CSF component qualification
voipmonitor Oct 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .lil/changes/b12x-450-csf-canonical.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-450-csf-canonical",
"category": "feature",
"summary": "Load canonical MXFP4-CSF and NVFP4-CSF checkpoints, including Qwen3.8-Flash-Next",
"models": [
"Kimi-K3",
"DeepSeek-V4.1-Flash",
"GLM-5.3-Flash",
"Qwen3.8-Flash-Next"
],
"compatibility": "Requires CSF schema, tensor suffixes, and loader names. Predecessor X4T/LSC schemas require migration. Original FP4 values and calibration are preserved.",
"details": [
"TP-independent checkpoint slices preserve native expert arithmetic.",
"NVFP4-CSF stores resident offsets in native scale order and initializes micro-kernel barriers during scale expansion."
],
"pull_requests": [
450
],
"requires": []
}
15 changes: 15 additions & 0 deletions .lil/changes/b12x-450-csf-mxfp8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-450-csf-mxfp8",
"category": "fix",
"summary": "Prepare MXFP4-CSF scales for native MXFP8 expert activations",
"models": ["DeepSeek-V4.1-Flash", "GLM-5.3-Flash", "Qwen3.8-Flash-Next"],
"compatibility": "Canonical checkpoint bytes are unchanged. Pair with the vLLM DS4.1 activation-policy update. Kimi retains BF16 expert activations.",
"details": [
"MXFP4-CSF supports the native W4A8 prepared scale layout, including compact N64 tails, native E8M0 clamping and caller-owned shared scratch.",
"Compressed-scale expansion skips absent experts using a bounded presence mask instead of repeatedly scanning route prefixes or assuming every expert is active.",
"The DS4.1 TP4 batch execution-rate regression is reduced to approximately 1.4 percent or less at concurrency 8 through 32 in the measured configuration. NVFP4 serving retains a material regression; its complete repair is not claimed."
],
"pull_requests": [450],
"requires": ["b12x-450-csf-preparation"]
}
22 changes: 22 additions & 0 deletions .lil/changes/b12x-450-csf-preparation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-450-csf-preparation",
"category": "compatibility",
"summary": "Prepare compressed scale planes through the fused-MoE weight API",
"models": [
"Kimi-K3",
"DeepSeek-V4.1-Flash",
"GLM-5.3-Flash",
"Qwen3.8-Flash-Next"
],
"compatibility": "Install the paired vLLM/B12X CSF preparation changes. Canonical CSF checkpoint files and launch commands remain compatible.",
"details": [
"CsfScalePlanes carries rank-local CPU fixed and exception tensors; prepare_weights creates resident scale batches and retains the ordinary weight and scale preparation paths.",
"CSF checkpoint readers and tensor-store interfaces are removed from B12X; vLLM owns file access, model mapping and TP slicing.",
"Scale decoders, expert kernels and shared scratch ownership are unchanged."
],
"pull_requests": [
450
],
"requires": []
}
15 changes: 15 additions & 0 deletions .lil/changes/b12x-450-csf-tensor-sources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-450-csf-tensor-sources",
"category": "compatibility",
"summary": "Load compressed FP4 expert tensors without model-specific checkpoint readers in B12X",
"models": ["Kimi-K3", "DeepSeek-V4.1-Flash", "GLM-5.3-Flash", "Qwen3.8-Flash-Next"],
"compatibility": "Requires the companion vLLM tensor-source loader. The B12X root/path reader API is replaced; canonical CSF checkpoint bytes and serving flags are unchanged.",
"details": [
"CsfMatrix sources carry lazy packed weight views, compressed scales and optional FP32 NVFP4 calibration.",
"B12X performs generic TP slicing and GPU preparation; vLLM owns manifests, model tensor names and file handles.",
"Compute kernels, scale layouts and caller-owned scratch reuse are unchanged."
],
"pull_requests": [450],
"requires": []
}
15 changes: 15 additions & 0 deletions .lil/changes/b12x-450-moe-routing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-450-moe-routing",
"category": "fix",
"summary": "Preserve route broadcasts and shared-input token addressing in dynamic MoE",
"models": [],
"compatibility": "Applies to native and compressed weights. Deterministic W4A8 M32 execution now reads the correct token activation for each routed pair.",
"details": [
"A CTA barrier prevents reuse of the shared work-claim slot before every warp has retained its value.",
"Shared W4A8 payload and scale gathers convert deterministic routed-pair indices back to token indices before computing Int64 global offsets.",
"Preparation retains the separate deterministic top-k reduction as well as every selected scale decoder before frozen graph replay."
],
"pull_requests": [450],
"requires": []
}
15 changes: 15 additions & 0 deletions .lil/changes/b12x-450-nvfp4-csf-cooperative.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-450-nvfp4-csf-cooperative",
"category": "performance",
"summary": "Reconstruct NVFP4-CSF scale operands inside dynamic expert kernels",
"models": ["GLM-5.3-Flash", "Qwen3.8-Flash-Next"],
"compatibility": "Canonical checkpoint bytes, FP32 calibration and A4 arithmetic are unchanged. Preparation retunes its versioned decoder choice; no launch flag changes are required.",
"details": [
"Typed preparation selects complete-plane expansion or cooperative reconstruction in shared operand slots. N64 intermediate tails are supported.",
"Short-route expansion uses equal-size output spans and the prepared exception-word index. Scratch remains caller-owned and graph replay does not allocate.",
"The serving report records measured concurrency, hardware, source identities and remaining overhead; component decoder timings alone do not establish model throughput."
],
"pull_requests": [450],
"requires": ["b12x-450-csf-mxfp8"]
}
14 changes: 14 additions & 0 deletions .lil/changes/b12x-456-block-codec-shared-memory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-456-block-codec-shared-memory",
"category": "fix",
"summary": "Reserve Trellis lookup-table shared memory only for Trellis weights",
"models": ["all"],
"compatibility": "No user action required.",
"details": [
"Block-codec and ordinary FP4 expert kernels do not allocate an unused Trellis codebook table.",
"IQ2_XS and Q8_0 tuning candidates retain the shared-memory capacity checked by their preparation contract; Trellis table selection is unchanged."
],
"pull_requests": [456],
"requires": []
}
14 changes: 14 additions & 0 deletions .lil/changes/b12x-456-csf-tuning-contract.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-456-csf-tuning-contract",
"category": "compatibility",
"summary": "Retain native MXFP8 and Trellis tuning with compressed FP4 scale operands",
"models": ["all"],
"compatibility": "No user action required.",
"details": [
"MoE tuning preserves native MXFP8 backend restrictions and Trellis decode-table validation while accepting NVFP4-CSF operand reconstruction.",
"Separate query and configuration schema versions invalidate cached choices from incompatible recipe contracts."
],
"pull_requests": [456],
"requires": ["b12x-450-nvfp4-csf-cooperative"]
}
15 changes: 15 additions & 0 deletions .lil/changes/b12x-csf-indexed-vectors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-csf-indexed-vectors",
"category": "performance",
"summary": "Share NVFP4-CSF address and exception lookup across four adjacent scale words",
"models": ["Qwen3.8-Flash-Next", "GLM-5.3-Flash"],
"compatibility": "Checkpoint schemas, prepared scale storage, activation arithmetic and decoder launch geometry are unchanged.",
"details": [
"Load eight packed code bytes and four row bases together, then store sixteen reconstructed scale bytes.",
"Use one bitmap and prefix lookup per four-word group while preserving individual exception words.",
"Keep expert-scaled addresses in 64-bit arithmetic, including output regions beyond 4 GiB."
],
"pull_requests": [459],
"requires": ["b12x-csf-operand-reconstruction"]
}
22 changes: 22 additions & 0 deletions .lil/changes/b12x-csf-operand-reconstruction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-csf-operand-reconstruction",
"category": "performance",
"summary": "Reduce synchronization and redundant reads in NVFP4-CSF scale reconstruction",
"models": [
"Qwen3.8-Flash-Next",
"GLM-5.3-Flash"
],
"compatibility": "Checkpoint schemas, activation precision, preparation API and scale storage sizes are unchanged.",
"details": [
"Reconstruct ready gate/up operands with one pair of consumer barriers.",
"Reconstruct only the consumed 64-row halves when a gate crosses 128-row scale atoms.",
"Select exact zero padding for partial K atoms inside the shared scale reader."
],
"pull_requests": [
459
],
"requires": [
"b12x-450-nvfp4-csf-cooperative"
]
}
18 changes: 18 additions & 0 deletions .lil/changes/b12x-dense-mla-fp32-partials.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-dense-mla-fp32-partials",
"category": "feature",
"summary": "Allow dense MLA split partials to remain FP32 until the output merge",
"models": [
"Kimi-K3"
],
"compatibility": "Set Caps.partial_dtype=torch.float32; torch.bfloat16 remains the default.",
"details": [
"FP32 doubles partial-output scratch without changing KV dtype, output dtype or split-selection policy."
],
"pull_requests": [],
"requires": [],
"authors": [
"voipmonitor"
]
}
16 changes: 16 additions & 0 deletions .lil/changes/b12x-kimi-x4t-prepared-scales.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-kimi-x4t-prepared-scales",
"category": "feature",
"summary": "Prepare lossless Kimi-K3 X4T experts and retain compressed-scale programs for frozen serving.",
"models": [
"Kimi-K3"
],
"compatibility": "Adds Kimi TP1/2/4/8/12/16 geometry to the DS4.1 X4T reader. TP16 serving is measured; other topologies require separate qualification.",
"pull_requests": [
446
],
"authors": [
"voipmonitor"
]
}
19 changes: 19 additions & 0 deletions .lil/changes/b12x-master-sync-20261001.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-master-sync-20261001",
"category": "performance",
"summary": "Carry current B12X master into beta: shared Trellis/EXL3 expert preparation with full-codeword K2 decoding",
"models": [
"Kimi-K3"
],
"compatibility": "No user action required. The beta keeps version 1.3.0, which vLLM's b12x extra pins; master's 1.5.0 release bump is not carried.",
"details": [
"Uniform EXL3 and native Trellis experts share one preparation path, and prepared K2 Trellis decoding looks up full codewords (b12x #436). It removes the 82.56 tok/s regression of the uniform two-bit Kimi-K3 EXL3 checkpoint with unchanged acceptance.",
"The same sync brings FP32 dense-MLA split partials as an explicit option (b12x #441) and retained Trellis route-pack programs (b12x #442), described in their own notes."
],
"authors": [
"lukealonso"
],
"pull_requests": [],
"requires": []
}
20 changes: 20 additions & 0 deletions .lil/changes/b12x-online-csf-scale-preparation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-online-csf-scale-preparation",
"category": "feature",
"summary": "Compress native FP4 expert block scales losslessly during weight preparation",
"models": [
"Kimi-K3",
"DeepSeek-V4.1-Flash",
"GLM-5.3-Flash",
"Qwen3.8-Flash-Next"
],
"compatibility": "Opt-in scale_compression=csf requires caller-owned serialized scale scratch. Default preparation and checkpoint codecs are unchanged.",
"details": [
"GPU byte packing preserves native scale bytes and activation arithmetic; no per-request encoding."
],
"pull_requests": [
458
],
"requires": []
}
11 changes: 11 additions & 0 deletions .lil/changes/b12x-preparation-launch-ownership.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-preparation-launch-ownership",
"category": "fix",
"summary": "Retain compiled collective launchers and coordinate cross-rank priming",
"models": ["all"],
"compatibility": "No user action required.",
"details": ["Preserves scoped program-cache reclamation and shared RoCE compile results, and rejects unsupported RoCE dtypes before launcher construction."],
"pull_requests": [384],
"requires": []
}
15 changes: 15 additions & 0 deletions .lil/changes/b12x-trellis-route-pack-ownership.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"schema": "local-inference-release-change/v1",
"id": "b12x-trellis-route-pack-ownership",
"category": "fix",
"summary": "Retain full-rotation Trellis route-pack programs in materialized MoE plans",
"models": ["Kimi-K3"],
"compatibility": "No user action required.",
"details": [
"Transfers compiled route-pack carriers from the preparation result to caller-owned scratch plans.",
"Tests carrier identity, numerical parity, poisoned scratch, and CUDA Graph replay at capacities 1, 8, and 129 with uneven expert extents."
],
"pull_requests": [],
"authors": ["voipmonitor"],
"requires": []
}
9 changes: 9 additions & 0 deletions b12x/_lib/compile_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from contextvars import ContextVar
from dataclasses import dataclass, field
from typing import Any
from types import FunctionType


@dataclass(frozen=True)
Expand Down Expand Up @@ -203,10 +204,12 @@ def launch_triton(kernel, grid, *args, **kwargs):


def planning() -> bool:
"""Report whether the caller is collecting compiler program identities."""
return _PLANNING.get() is not None


def record_program(program: ProgramKey, owner: Any = None) -> None:
"""Record a compiled program identity for active planning observers."""
captured = _PLANNING.get()
if captured is not None:
captured.add(program)
Expand All @@ -219,6 +222,7 @@ def record_program(program: ProgramKey, owner: Any = None) -> None:


def program_keys(value: Any) -> tuple[ProgramKey, ...]:
"""Return compiler program identities retained by ``value``."""
if value is None or isinstance(value, (str, int, float, bool)) or type(value).__module__ == "torch":
return ()
if isinstance(value, Mapping):
Expand All @@ -228,6 +232,11 @@ def program_keys(value: Any) -> tuple[ProgramKey, ...]:
keys = getattr(value, "__b12x_programs__", None)
if keys is not None:
return tuple(keys)
if isinstance(value, FunctionType):
# A launch closure produced outside a compile factory carries no
# program identity of its own; retain it rather than failing an
# unrelated sweep.
return ()
from triton.compiler.compiler import CompiledKernel
if isinstance(value, CompiledKernel):
return (ProgramKey("triton", value.hash, value.name),)
Expand Down
Loading