research: exl3xpu / EXL3 trellis quant on Blackhole — port is no-go; EXL3-style offline bf4 quantizer + accuracy gate instead #61
Open
opened 2026-09-24 10:46:54 +02:00 by Grok
·
1 comment
No Branch/Tag specified
master
claude/public-release-v8
claude/pi-lora-device
claude/pi-lora-epyc-check
claude/pi-lora-plumbing
perf/export-cap-12288
claude/pd-kv-admission
claude/ship-cdr8g
claude/ship-col3-cdr8g
codex/public-release
codex/pp10k
codex/mando-kernels
opus/router-delta-margin
opus/rtx-b8-32k
claude/router-ttdown-fastpath
claude/license-apache2
codex/mtp-w1
docs/longctx-pp
codex/k8b4-speed
codex/kvarn2-study
codex/sglang-port-study
codex/inc393-offload-assert
codex/x16-bench
codex/mtp-cpu
codex/mtp-accept-train
opus/rtx-gpu0diag-rec
opus/rtx-sample-sparse
opus/rtx-prof32k-rec
opus/rtx-prof32k
opus/rtx-b8-prof
codex/k8b4-concurrent
opus/rtx-decode-lane
opus/rtx-w4a8-park
opus/rtx-ar-q8
codex/modelopt-scan
opus/pd-master-consolidation
codex/pd-recipe
opus/rtx-k8b4-connector
opus/pd-branch-archive
codex/pd-docs-fix
codex/pd-prod-snapshot
opus/rtx-kv4
opus/pd-connector-lows
history/hermes-review-uplift
eval-sglang-torchtpu
pp32k-w3c-upstream
pp32k-prefill
upstream-scan-20261109
plugin-283-slot-keep
docs/history-pd-delta
opus/pd-delta-export
opus/pd-stack-to-master
pp32k-ethdisp
opus/pd-router-template
docs/pd-path-breakdown
skill/pd-enterprise-bench
opus/pd-arena-freelist
opus/pd-adaptive
opus/rtx-decode-night
opus/rtx-dynk-fix
opus/rtx-night-ar
opus/rtx-night-attn
opus/pd-export-followup
opus/rtx-night-topk
docs/history
opus/pd-export-arm-master
opus/cmb-crash
opus/pd-draft-tune
opus/tt-interleave
opus/pd-adaptive-v2
opus/rtx-embed-host
opus/pd-adaptive-sim
opus/pd-adaptive-router
opus/pd-cutover
opus/pd-hyperqwen
opus/pd-reprefill
opus/pd
public/arm-flatten
public/upstream-inventory
opus/pd-handoff-opt
opus/lsa-eval
fix/tt-serving-hold-guard
opus/pd-sim-levers
opus/mtp-host-row-isolate
opus/mando2222-cp7
opus/upstream-scan-1104
opus/host-sample-why
opus/cold-prefix-s10
opus/cold-prefix-s10-pack
opus/pd-r3
scout/upstream-20261103
opus/rtx-drafter
opus/b8d-measure
docs/status-refresh-20261102
opus/b8d-verify-attn-splitkv
opus/b8d-sparse-verify-sampling
opus/b8d-ar-asym-x8
opus/b8d-draft-head-quant
opus/b8d-prob-draft-topk
opus/b8d-marlin-m32-mma
opus/rtx-opt
opus/traffic-bench
opus/pd-r2
opus/pd-e2e
opus/pd-export
opus/pd-router
opus/pd-connector
opus/pd-rtx-serve
opus/gdn-id-pool
opus/kv-1m
opus/prefix-rounds
opus/prod-spec-image-id
opus/blend-publish
opus/cold-pp
opus/dashboard-bench
opus/pd-rtx
opus/night-window
opus/prod-edge
opus/probe-hugepages
opus/so-vsplit
opus/fused-decode
opus/fused-decode-vsplit
opus/bfp-autoround
opus/blend-b09d16
opus/blend-gptq-table
opus/kv-host-tier
opus/serve-arm
opus/ttx-ab-suite-refuse
opus/kv-host-tier-history
opus/bfp-quant-docs
opus/s12-prefix
opus/kv-host-tier-staging
opus/cfx-llm0
opus/s12-sdlofi
opus/optrace-addon
opus/tmc-premise
opus/s12-budget
ship/s12
opus/s11-next
ship/s11
opus/verify-rest-2
docs/s10-greedy
docs/optrace-fcb-pf32
opus/pf32
ship/s10
opus/verify-rest
opus/dcx
x280-foundation
docs/crashcourse
opus/sdpa32k
docs/stale-fix
opus/dcx-hcap
x280-program-doc
ship/s9
opus/draftcut
ship/s7-pp3
docs/port-skills
opus/ssparity
probe/drafter-t1
opus/verify64
fix/gate-boot-identity
plan/tg100
ship/s7
screen/batch4
sim/fabric-link-counters
opus/s7cand
opus/rs-bank-ship
readme/s6-ss-numbers
free/t-ethtxq
opus/specsample-s6
opus/dualtrace
sim/kernel-overlay-fix
opus/fusedsampler
opus/rs-bank
opus/devaccept
anatomy/rs-line
fix/abpad-cache-key
free/k-swiglu
opus/sscost
free/k-gdnpre
free/u-matmul
launch/opus-specsample
free/u-ccl
free/c-audit
free/s-cost
free/u-models
free/c-sparse
serve/sampling-defaults
free/w-rsnorm
free/f-tail
ship/s6
launch/s-sample4
free/k-glue
bench/acc-curve
opus/top2-branch
screen/acc-levers3
screen/ss-capture
free/s-rowfall
free/a-oracle2
free/d-top2
free/c-sparse-rev
free/s-penalty
opus/specsample
rv4/m-specsample3
free/m-specsample3
free/s-sample4
review/t-proxy2
free/t-proxy2
free/t-served
free/l-kvbytes
free/m-specsample2
free/t-ops
free/l-verifykv
free/m-specsample
free/a-kdyn
fix/pphost-probe-mml
free/w-swiglu4
free/s-prefix4
free/m-creative
free/w-b8dec
free/w-gdnscan
free/t-proxy
free/b-bucket
free/m-multidraft
free/a-tree
free/s-sample3
free/w-swiglu3
docs/goal-recommended-sampling
free/f-sdpa2
ship/cap
b-bucket-tools
review/b-bucket
free/s-prefix3
free/d-gdn
free/s-prefix2
free/s-sample2
free/p-host
free/d-enq
feat/s-prefix-agentic
ship/s5
free/s-specsample
free/a-sink
free/a-accctx2
screen/acc-levers2
free/f-swiglu
bench/agentic-s4
free/f-draft
screen/acc-levers
free/f-qkvz
free/f-dmlp
free/a-window
free/f-gdnprep
free/f-glue
free/a-oracle
free/a-survey
screen/a-accctx
free/a-accctx
free/f-sdpa
docs/utilization
pp/rsfold
pp/idle
tooling/stream-accept
ship/gum2-s4
pp/agmm-t9
pp/gdn-s3cmb
pp/agmm-fwo
ship/s4
pp/agmm
pp/s3prof
ship/rs4
ship-s3-narrow
tools/jit-check-kernel
pp/gdn-combo
ship/s3
pp/glue3
pp/gdn-scan
free/w2eff
pp/gdn
free/agmm2
free/dsdpa
pp/glue2
pp/glue
ttx-claim-unique
pp/warm
pp/gdn-sdpa
free/vrows
pp/host2
pp/host
ar-prefix-hit-log
feat/card-queue-service
dev/prefetch-reopen
k-sweep-s
lookup-swap-k3
docs/s2-ledger-9309
ci-slot-reclaim
ship-s2-narrow
research/verify-rows-gt32
handoff/claude-20261017
dev/ship-stack-2
lc0-agent-corpus-stats
ci/card-gate-armsel
dev/draft-path
dev/bkda-fix
dev/codex-kernels
dev/decode-next
ship-s-narrow
dev/prefill-hostgap
dev/ship-stack
dev/agmm-eff
dev/so-chain
ar-bf8-out8
lever-studies-20261013
ar-bf8-serve
control-dfr
grill/metal-60316-gdn-prefill-waves
grill/metal-60840-vllm-spec-serve
ship-dfr
screen-201-joint
dspark-serve
land-195-drisc-0042
agmm-swiglu-pack
worktree-agent-aceb187bf909a2834
decode-mr-span-direct
gdn-so-fuse-serve
probe-59622-onecard
ship-e-gpgob
gates-e-gpgob
ci-fingerprint
ttx-heal-within-run
levers-nogo-closeout-20261009
tooling-picker-armderive
tg-toks
agent-harness
ci-fp-base
lc0-bench-token-ids
confirm-cpbaol-gpool
screen-hec-joint
control-joint-b8k3c48
grill/metal-58817-llk-8bit-stream
grill/metal-59507-dram-bank-grid
grill/metal-59622-dram-read-split
grill/metal-59695-sdpa-gqa-flags
grill/metal-59957-spec-batch
grill/metal-59965-gdn-scan-fp32
lookup-swap-k3-base
combo-mx-screen
joint-w2t-b8k3c48
muse-mtp-chunked
muse-decode-profile
muse-harness3
muse-state-bfp8
muse-state-bfp8-study
muse-commit-defer
fix/picker-accept-defining
records-197-close
lever/prefill-unlocks-u2-u3-u6-u7
verify-depth-gt4
lever/u2-norm2d-v2
gdn-producer-pool
prefill-kernel-8k
cpb-lmhead-screen
reeval-decode-gdn-attn-mtp
drisc-prefetch-prio
fp8-fidelity-deepdive
reeval/prefill-20261006
drisc-prefetch-pf13
lever-reeval-decode-weights
odo-on-dx
decode-bundle
kx-compute-fuse
gdn-verify-fused
conv-fold
kx-compute-splitread
drisc-prefetch-lever
kx-matmul
kx-matmul-outdirect
drisc-prefetch
decode-research
ci-tg-toks
kv-update-fold
sdpa-dec-lift
baseline/retarget-cph32
lever/agmm-grid9-cph32
lever/attnqkv-11x6-bf4
lever/sdpa-dec-cph-dualnoc
lever/gdn-scan-mcast
lever/gdn-fused-maxbh
lever/sdpa-dec-kchunk-dualnoc
lever/lmlofi-loo
lever/kda2-loo
lever/kda2-lmlofi-loo
lever/agmm-grid9-chunk2304
ci-serve-fix
ci-sweep-faster
ci/agmm-2x2
ci-token-prefix
ci-pr-driven
gdn-prefill-lift
gateup-on-gdc-cpk
resident-epoch-fix
kv-devinit
serving-throughput
gdn-fused-decode
spec-cycle
opmark-c177
resident-host
boot-speed
gateup-mr
prefill-prof
ship-c175-gdc-cpk
lottolabs-repro
lotto-forensics
decode-mr
mtp-c157
dram-attach
upstream-154
mtp-csplit
queue-guard
mtp-so1-cplit
dram-persist
serve-b16
incr-gcroots
resident-dv
mtp-draft-vocab
mtp-so-t0
arm-switch
queue-stepid-fix
p1-levers
tracy-image
op-datasheets
upstream-watch
op-anatomy
skill-prefill-bringup
ttx-gates-correctness
skill-bh-arch
ttx-ops-tools
mtp-gdn-state-traffic
mtp-device-accept
mtp-conv-multi
gdn-vsplit
cm-g9
agmm-grid
verify-ablate
mtp-warm
prefill-cloud
mtp-stack
gdn-multitoken
dspark-device
mtp-async
mtpb-dn
mtp-state-slot
k8v4-mtp
sdpa-spec-fold
pfprof
fabric-ring
ttx-merged
ttx-gates
kv-k8v4-dn
ttx-safety
mmrs-probe
agmm-silu
prefetch-dn
tailtrace-dn
normbf8
prefill-agmm-abso
worktree-agent-a5e29df1933a6076c
sdpa-dec-v-noc0
worktree-agent-aff7f4014dd906d8b
worktree-agent-a015e99a3392d569c
c105-smallops
agmm-in0-lowp
prefill-combo
worktree-agent-a4c964697339cbea0
tp1-prod-port
resident-rearm
decode-sa1
ttx-gc-sudo
prefill-rs-cfg
wb-gaps
prefill-bundle-h
mtp-batch-fix
ttx-fast-fail
host-leak-investigation
kernel-workbench
ttx-quickwins
kernel-workbench-research
decode-split-probe
mtp-batch
sdpa-mcast-q128
decode-mr-lmhead
prefill-kernels
dram-sharded-mr
decode-levers-2
qb2-scout
decode-levers
prefill-deepdive
prefill-devsplit
sim/prevalidate
port/issue-50-bucket-trace
research/lowlevel-levers
integrate-all
perf-loop-c1
g2-arms-registry
ttx-slot-stale-reclaim
bfp4-overlay
deploy/g2-prefix-0019
mtp-thinkingcap
agy/issue-39
agy/issue-36
kv-k8v4
agy/issue-51
agy/issue-64
fix-dead-assumptions
decode-campaign-53-55
fix/71-gdn-gate-fp32-prod
thinkingcap-baseline
tt-quant
bfp-quant
ttx
agy/issue-49
agy/issue-47
dspark-thinkingcap
repo-skills
harness-overhaul
agy/issue-50
agy/issue-45
agy/issue-38
agy/issue-23
dspark-acceptance-rate
thatch/lane2-serve-gotchas
agent/claude-auth/goal-4-nvfp4-single-card
agent/claude-auth/ttsim-scout
archive/vscode-toolkit-flake
archive/tt-tooling-scout
archive/tt-model-publish
archive/thatch/lane1-fir-drift
archive/serving-throughput
archive/serving-cleared-arm
archive/prefill-optimization-notes
archive/mtp-scout
archive/mtp-dflash2-ttsim
archive/harvest-whitehole-notes
archive/fix-serving-paths
archive/fix-readiness-race
archive/fix-probe-sigpipe
archive/fix-probe-card-sabotage
archive/fix-inspect-empty-stdout
archive/fix-http-code-format
archive/docs/agents-md-retire-claude-md
archive/autoresearch/dspark-drafter-sep07
archive/agent/fable/warm-tensor-cache
archive/agent/fable/external-repo-runbook
archive/agent/fable/cxx-fork-build
archive/agent/claude-auth/two-card-external-report
archive/agent/claude-auth/silicon-validation-findings
archive/agent/claude-auth/prod-27b-serving
archive/agent/claude-auth/ornith-moe
archive/agent/claude-auth/on-box-iteration
archive/agent/claude-auth/mesh-ready
archive/agent/claude-auth/inventory-pre-reboot
archive/agent/claude-auth/goal-vllm-serving
archive/agent/claude-auth/goal-2-3
archive/agent/claude-auth/first-bringup
Labels
Clear labels
cards:go
Force a card run on this PR (consumed by CI; re-add to force again)
hermes-approved
Approved by Hermes (bot). Not a human approval.
human-approved
Approved by @donach for T2-path changes. Required by .forgejo/workflows/ci.yml approve_gate.
human-approved
Approved by the human reviewer — merge gate
iter
0
X280 program stage
iter
1
X280 program stage
iter
2
X280 program stage
iter
3
X280 program stage
prio:high
Still a large B=4/B=8 wall or tokens/cycle lever
prio:low
Parked, already lost, or bookkeeping
prio:med
Real but smaller, or needs a gate
priority/high
Owner-flagged; queue agent picks these first
state
blocked
X280 program workflow state
state
doing
X280 program workflow state
state
done
X280 program workflow state
state
review
X280 program workflow state
state
todo
X280 program workflow state
x280
SiFive X280 (L2CPU) on-card control plane
No labels
cards:go
hermes-approved
human-approved
human-approved
iter
0
iter
1
iter
2
iter
3
prio:high
prio:low
prio:med
priority/high
state
blocked
state
doing
state
done
state
review
state
todo
x280
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
bitpartner/tt-stack#61
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
TL;DR verdict
Porting exl3xpu as it stands is a NO-GO. It would make decode slower, not faster. There are two
cheaper things worth doing instead, and both use EXL3's ideas while leaving its bitstream behind.
vLLM plugin. Its kernels are SYCL/ESIMD built around Xe2
dpas(VNNI) anddp4a. It borrows GDNand attention from vLLM-XPU and has no tensor parallelism. Nothing in it runs on Tensix. What
carries over is the format spec, the bit-exact PyTorch reference decoder (
exl3xpu/ref.py, MIT),and the accuracy-gate method.
MEASURED). Per card, each decode step would have to turn about 12.2 B trellis weights into tiles.
On Blackhole that work lands on the SFPU (32 lanes per Tensix;
SFPMUL24is the only integermultiply, and it is 23-bit). Every weight needs a 16-bit window extract, a 16x32-bit multiply
mod 2^32, a byte-sum and one fp FMA, which is roughly 15-20 SFPU ops per 32-weight row. That puts
the decode at ~25-50 ms per step. The most 4-bpw EXL3 could save against production's weight
read is ~4-6 ms per step, and only if the decode were free. Break-even needs <=2 SFPU cycles
per 32-weight row if decode runs serially, or <=5.6 if it overlaps the DRAM read perfectly. Doing
the dequant in the RISC-V reader kernels is about 50x worse (~0.7 s per token).
37% of the decode step.-1% atThe bytes EXL3 would save relative to production (which already runs all MLP at bf4) are worth
-4 to -6 ms per step. That is -4% to -10% makespan on the <=32k sweep and **
8x128k / 4x256k**, where serialised prefill (443 s / 609 s) dominates. For comparison, prefix
caching and prefill work each move those shapes by tens of percent.
mlp.down_projat bf4 (
QWEN36_MLP_DOWN_BF4=1in theprodprofile). Its only record says "accuracy:unverified against a bf8 baseline" (
bench/runs/goal3-down-proj-bf4-2026-09-05.jsonl). Thiscosts nothing at runtime and is needed before any weight-format change.
bfp4_b. It rounds withHessian awareness (GPTQ/LDLQ, EXL3's error-feedback step) straight onto the bfp4_b grid and
emits a grid-snapped bf16 checkpoint. The host packer reproduces those bits exactly, so there
is zero runtime change. Value: better bf4 quality where we already use it, and possibly
enough quality to move attention/GDN projections from bf8 to bf4. That second step is worth
about -2.6 to -4.0 ms per step and +3.4 GiB of card memory (~110k bf8 KV tokens) (ESTIMATE).
Tenstorrent's own
MatmulCustomCompressedplus BitSculpt "BSPM" precision maps. It is thenative equivalent of EXL3's per-tensor bitrate recipes. It exists in tt-metal (
deepseek_v3_b1)but has open correctness bugs at 32 cores.
but it is a compatibility feature, not a performance one. Transcoding EXL3 to bf8 keeps EXL3's
quality but reads more bytes than production. Transcoding to bf4 quantizes twice and loses to our
current source on attention/GDN.
Correction to the brief: production is not "gate/up bf4, down bf8". The
prodprofile setsQWEN36_MLP_DOWN_BF4=1(scripts/vllm-tt-serve.sh:155), so production streams ~9.33 GB/card/token.The 10.76 GB/card figure belongs to the
goal1profile, which is what the benchmark drivers use(
bench/ab/sweep-32k.sh,decode-serving-ab.sh). Consequence: the 2026-09-14 "clean-slate"sweep's optimized arm is not production's weight mix. Its record's
env_basehas noQWEN36_MLP_DOWN_BF4.What exl3xpu is
Repo:
github.com/0xSero/exl3xpu@2d17c57(2026-09-24), MIT. It is a vLLM 0.26.1 XPUplugin (
vllm.general_pluginsentry point,register_quantization_config("exl3")).Hardware: Intel Arc Pro B70 (BMG-G31, Xe2, 32 GB). "xpu" is PyTorch/oneAPI's Intel GPU
device, not a generic accelerator. Kernels are SYCL ESIMD (
csrc/exl3_esimd.h, 767 lines),JIT-compiled with icpx (
spir64).It consumes turboderp's EXL3 checkpoints (exllamav3 v1.x format). The served model is
exactly ours:
turboderp/Qwen3.8-27B-exl3@ 4.00 bpw (lm_head 6 bpw,mul1codebook, 401EXL3 tensors, 14.91 GiB).
in_proj_a/b, norms, embeddings and the vision tower stay bf16.Scope: vLLM supplies scheduling, paged KV, and the GDN and attention kernels (the XPU ones).
exl3xpu only replaces the linear layers. No tensor parallelism ("use data parallel").
Only 4 and 6 bpw
mul1are enabled by default; 2/3/5 bpw and the mcg/3INST codebooks need-DEXL3_ALL_CODEBOOKS.Correctness: dequantized weights are bit-identical to exllamav3
reconstruct()for all 401tensors on every kernel path. Logits vs exllamav3 on an RTX 3090: top-1 99.63%, KL 9.8e-5
on a sealed 64x256 teacher-forced panel ("Gate A3"). This is implementation equivalence
against EXL3 itself, not quantization quality against bf16.
Performance, THIRD-PARTY (one B70,
bench/results/2026-09-23.jsonl,recipe.json):docs/GOAL.mdT4 floor)The harnesses and definitions differ, so this is not an A/B. Our records:
bench/runs/serving-16k-20260913T095210Z.jsonl,bench/runs/target-shape-ttft-B8-128k-20260914T130939Z.jsonl,bench/runs/target-shape-ttft-B4-256k-20260914T134045Z.jsonl,bench/runs/sweep-32k-20260914T142154Z.jsonl.Its own diagnosis is relevant here: on Xe2 the M=1 GEMV is co-limited by integer-ALU issue
(~22-25 ms) and DRAM (~23.5 ms). The trellis decode sits "near the integer-ALU roofline", on
a GPU with far more integer throughput per weight than a Tensix SFPU (see below).
EXL3 format & kernel anatomy
EXL3 is turboderp's implementation of QTIP (Tseng et al., NeurIPS 2024: Quantization with
Trellises and Incoherence Processing). The quantizer has three components, and only one of them
is tied to the bitstream:
W = diag(suh) · H · W_inner · H · diag(svh), whereHis thenormalized 128x128 Sylvester Hadamard applied blockwise and
suh/svhare fp16 sign/scalevectors. At inference:
y = had128(had128(x * suh) @ W_inner) * svh. This means an inputHadamard and an output Hadamard per linear.
H = X^T X, which isregularized and LDL-decomposed. Tiles are quantized in order with error feedback
(
exllamav3/modules/quant/exl3_lib/quantize.py:549 ldlq,:1471 quantize_exl3). Theconverter's proxy error is
tr(E H E^T) / tr(W H W^T).256*Kbits (K =bpw, 1..8). Value
tis the 16-bit window ending at bit(t+1)*K, circular within thetile, placed at a tensor-core permutation. The
mul1codebook, bit-exact perref.py:x = state * 0x83DCD12D (mod 2^32), thenv = fp16(1024 + bytesum(x)) * fp16(0x1EEE) + fp16(0xC931), one fp16 FMA with a single rounding.Per weight, the inner loop is: funnel-shift two 32-bit words, mask to 16 bits, 32-bit integer
multiply, sum 4 bytes, int to fp16, one FMA. The Xe2 kernel does this in about 9 SIMD32
instructions per 32 values:
shl/shr/or/mul/dp4a/mov/mad.dp4a(0x6400, x, 0x01010101)doesthe byte-sum and fp16 bias in one instruction, and that trick is the reason it is fast. Memory
access is a pure contiguous stream of trellis words per tile row (K=4 packs 8 values per word).
The 128-point Hadamards are separate small kernels (~1.2 ms per step under graphs). For M>128
(prefill) the plugin reconstructs fp16
W_innerslices and calls oneDNN GEMM.Available bitrates: 1-8 bpw per tensor, with per-tensor recipes from
sc_optimize.py. THIRD-PARTYquality, exllamav3
doc/llama31_8b_instruct_kld_bpw.png(Llama-3.1-8B, KL vs bf16): EXL3 3.0bpw 0.053, 3.5 bpw 0.030, 4.0 bpw 0.013, 5.0 bpw 0.003; GGUF Q4_K_M 0.018, Q6_K 0.003. Nobody has
measured KL for RTN
bfp4_bon our model. That is the gap E0/E1 close.Qwen3.x hybrid/GDN support: yes. exllamav3 quantizes the GDN projections (
in_proj_qkvz,out_proj) like any linear, and exl3xpu serves the 48-GDN/16-attention model through vLLM's GDNkernels. Nothing in the format is GDN-specific.
Blackhole mapping
Hardware facts (MEASURED or from source,
docs/SATURATION-AND-SRAM.md): p150a is 2x-harvested,110 compute Tensix (a column is reserved for dispatch), 1.5 MiB L1 each (165 MiB per card),
AICLK 1350 MHz, 8 GDDR6 channels. Usable DRAM is 30.87 GiB per card (
docs/VRAM-BUDGET.md).Decode matmul readers reach 454-469 GB/s (
bench/runs/n1-matmul-read-compute-split-20260912T174500Z.jsonl).What the Tensix pipeline gives us for free: the unpacker decompresses
bfp8_b/bfp4_b/bfp2_bin hardware. Block-float is one shared 8-bit exponent per 16 values (a face row), with7/3/1-bit magnitude plus sign, which is 1.0625 / 0.5625 / 0.3125 B per element. Those are the only
sub-8-bit formats Blackhole can stream at line rate. There is no codebook or LUT unpack mode, and no
MXFP4/NVFP4 (those are Quasar-only;
docs/QUANTIZATION.md). A weight tile laid out[K, N](
tp_common.shard_wtransposes to[in, out]) shares exponents along N, across 16 outputchannels at the same input index.
Where a trellis decode could run
SFPMUL24(23x23-bit, Blackhole-only)SFPMUL24+ adds/shifts. Byte-sum via SWAR is about 6 ops. Extract about 4 ops, convert+FMA about 2, plus load/store. ~15-20 ops per 32-weight row, about 10-20 cycles withSFPLOADMACROoverlap. Time = 2.56 ms x cycles/row, so ~25-50 ms per stepReference points for the SFPU estimate (THIRD-PARTY): a full 32x32-bit integer multiply on Blackhole
is 8 cycles per 32-value row even hand-scheduled with
SFPLOADMACRO(jasondavies.com, 2025-11).Our multiply is cheaper (16-bit operand), but the byte-sum has no
dp4aequivalent. Two structuralcosts come on top. First, decoded values leave through the packer to L1 and come back through the
unpacker into SrcB for the FPU, which is an extra round trip per tile. Second, SFPU and FPU are
driven by the same math thread, so decode and matmul largely serialize within a core.
Break-even (ESTIMATE): production reads 9.33 GB/card/token, which is 20.6 ms at 454 GB/s. 4-bpw EXL3
reads 6.57 GB/card, 14.5 ms. With a serial decode, EXL3 wins only if decode takes under ~4-6 ms,
which means <=1.6-2.4 cycles per 32-weight row. With decode perfectly overlapped against DRAM,
it wins only if decode finishes under 14.5 ms, which means <=5.6 cycles per row, and even then
the gain caps at ~6 ms. Neither is credible given an 8-cycle hand-tuned 32-bit multiply alone.
Hadamards on Tensix
An online
had128is a[M*k/128, 128] @ H128matmul, cheap in FLOPs. But EXL3 needs one in andone out per linear, plus one copy per fused constituent because each has its own
suh. That is~400-640 extra traced ops per decode step. At ~5-15 µs device time each, that is ~2-9 ms
(ESTIMATE). It has to be fused into the matmul reader/epilogue or folded offline to be free. For
TP=2 the blocks divide cleanly: row-parallel K shards are 8704 = 68x128 and 3072 = 24x128, and
because the Hadamard is linear, the output one can be applied before or after the all-reduce. Only a
residual-stream rotation (QuaRot-style) can be folded into weights at zero runtime cost. It makes
the output (N) dim of
o_proj/out_proj/down_projincoherent, which is the axis Tensix bfpexponents are shared along. For
qkv/in_proj/gate_upit rotates K, which is the wrong axis forbfp blocks (hypothesis, testable offline).
Prior art on Tenstorrent
and tenstorrent org PRs for trellis, QTIP, exllama, exl3, codebook and "lookup table dequant";
zero hits.
MatmulCustomCompressedplusCompressedTensorinmodels/demos/deepseek_v3_b1/, with per-32x32-tile format codes {bfp8, bfp4, bfp2, zero} driven byBitSculpt "BSPM" precision maps (
compressed_tensor/bspm_loader.py; issues #38520, #39989).THIRD-PARTY: DeepSeek experts at 3.5 bits/element (78% bfp4, 22% zero) passed Lite PPL 2.98 and
AIME24 85.4%, and failed Full PPL by +0.08 (#42601). Open defects: wrong PCC (~0.04) at 32 cores
with any non-bfp8 tile (#42841) and a hang with zero bfp8 tiles (#42586).
ttnn.from_torch(..., bfloat4_b)(the host packer, whichis how our bf4 weights are made) rounds straight to 3 mantissa bits (RNE). The device
typecastrounds to BFP8 first and then truncates. They differ on 42.5% of elements. The unpack side is
correct. Two consequences for us. First, the host is free to write any bits we choose, which
is what makes E1's "grid-snapped checkpoint" work. Second, any on-device re-quantization (e.g. of
KV or activations) does not match host-made weights bit for bit.
Options compared
"Δ decode" is against production (all-MLP bf4, 9.33 GB/card/token). The two numbers are the
measured in-model slope (0.78 ms/GiB saved, from
goal3-down-proj-bf4-2026-09-05.jsonl, takenon an older stack) and the bandwidth-ideal figure (454 GB/s). Both are ESTIMATES.
had128in/outW_inneras bfp + online hadByte model (from
bench/runs/gate0a-weight-traffic-20260911T154154Z.jsonlelement counts, streamedper token, embed excluded): goal1 21.52 GB total / 10.76 per card; prod 18.67 / 9.33; all-linear
bf4 with lm_head bf8 15.05 / 7.52; EXL3 4 bpw (head 6) 13.13 / 6.57; EXL3 3 bpw 10.09 / 5.04.
Does it pay here? (with numbers)
Makespan model. Each cell of the 2026-09-14 sweep satisfies makespan ≈ TTFT_max + 1024 ×
decode_ms to within 1.3 s (MEASURED inputs,
sweep-32k-20260914T142154Z.table.txt; e.g. B=8/32k:80.84 + 67.80 = 148.6 vs 148.72 measured). A per-step saving Δ therefore moves makespan by
1.024·Δ seconds. Decode's share of makespan is 88% (B=4/4k) down to 46% (B=8/32k). (This
contradicts the "prefill is 74-79% of wall" wording in CLAUDE.md
0aaaaaaaaaaaaaaaaa: by thisidentity it is decode that is ~72-78% of wall at B=8/4k-8k.)
(Target-shape rows assume 1024 output tokens at 70-90 ms/step. That decode rate is an ESTIMATE; it
has not been measured at 128k/256k.)
Caveats that must travel with these numbers:
delivered 3.0% against a predicted 15.2% (
goal3-down-proj-bf4-2026-09-05.jsonl), and N1records a 2.35x faster standalone down_proj that ran 0-2% slower in-model. The measured-slope
column already discounts for this. The bandwidth column does not.
relative to those sweep cells. Re-baseline on the prod weight mix before crediting any new
weight work.
docs/QUANTIZATION.md,bench/runs/goal4-fidelity-dtype-probe-2026-09-05.jsonl), since prefill is compute-bound. Sono option here touches TTFT, which dominates at the target shapes. For B, prefill would get
worse: a reconstruct per chunk plus bf16/HiFi matmuls where today runs LoFi.
4e91d87), cached heads shrink TTFT, which raises decode'sshare and makes E1's saving worth somewhat more on repeated-prefix agent workloads.
Memory angle. The budget is 61.73 GiB usable. Weights take ~25.1 GiB, the target KV is 32 GiB at
bf8, trace 0.5-1 GiB, and margin is ~1.9-3.6 GiB (
docs/GOAL-AGENT-SERVING.md,prodprofilecomment). At bf8 KV, 1 GiB ≈ 32,768 tokens across the pair.
Batch is capped at 8 by owner directive, so capacity does not buy "more agents". It buys margin
(two host freezes on 2026-09-14 came from memory pressure, albeit host-side) and prefix-cache
residency, which is the enabling feature at the target shapes.
Integration plan (phases, probes, gates)
Principles: every probe fails closed and writes a
bench/runs/*.jsonlrecord even on failure.Every instrument is exercised on fixtures that force pass, fail and null before it sees real data.
Arms self-identify from server banners, and the weight arm must log per-group dtype plus the
checkpoint/tensor-cache hash, like
patches/tt-metal/0016. The trap to avoid:ttnn.as_tensorreloads a cache file as-is, so a stale
tensor_cache_*dir silently serves the old weights. A newquantization must use a distinct cache suffix. Arms are interleaved on one source tree and
differ only by environment or checkpoint path.
P0: offline error study (desk + off-box GPU, no cards). 3-5 days
whose probe budget is ~5.5 GB of host RAM). The exllamav3 converter already does this, and its
sc_trace.pyself-sampled trace matches our agentic/reasoning distribution better than web text.tr(E H E^T)/tr(W H W^T)for:(i) RTN bfp4_b using an exact emulation of the tt-metal host packer
(
blockfloat_common.cpp::convert_u32_to_bfp, per #57410), from both the FP8 and the bf16 source;(ii) RTN bfp8_b;
(iii) GPTQ/LDLQ onto the bfp4_b grid;
(iv) (iii) + residual rotation;
(v) EXL3 4.0/3.0 bpw, reconstructed with
exl3xpu/ref.py(bit-exact).2x of (v)-4bpw. No-go (stop E1) if (iii) gains <25% over (i) everywhere.
P1 (E0): accuracy gate, built once and reused. 3-5 days + 2 card holds
GSM8K on short prompts is not acceptable here: it is near-blind to KV dtype, and the same problem
applies to weights through the long GDN recurrence. Proposed gate, three layers:
KL(ref‖arm), top-1 agreement and max-KL at positions deep in long contexts: the last 256
tokens of 4k, 32k and 128k documents. Quantization error in
in_proj_qkvzcompounds through 48recurrent states, and a 256-token panel cannot see that. The reference is bf16 HF on an off-box
GPU. The device side uses vLLM
prompt_logprobs(probe first that the TT plugin supports it; thehost-sampling route that
--logprobsforces is fine for accuracy, just not for the argmax path).Pre-register thresholds relative to the current prod arm: a new weight arm must be <= prod
KL at every context.
multi-hop, at 16k/32k/64k (
bench/kv-accuracy.py; the 2026-09-13 Gate A sat at its ceiling).Add the 20-turn agentic tool-call canary (
phase2a-prefix-e2ecorrectness stage) and acode-generation subset with thinking on. Report the rule-of-three bound, never "equal".
output). A format change legitimately changes outputs, so sha-identity to the old arm is not
the bar.
against bf16 and against goal1 (down bf8).
P2 (E1a): grid-snapped MLP-only checkpoint. 1-2 weeks + 2-3 card holds
the packer's shared-exponent choice, including the case where rounding the block max crosses a
binade. Every bfp4_b value is exactly representable in bf16, so the host packer is the
identity and no loader or kernel change is needed. Verify by round trip: host-pack, unpack,
compare 100% bitwise on every tensor, offline with ttnn host APIs and no device.
contaminated. Gate: P1 KL strictly below prod RTN at every context. Discard if not.
nix run .#bfp-quant(off-box CUDA, per the one-stop-shopdirective) and pin the output checkpoint by hash like any other model input.
P3 (E1b): attention/GDN projections to bf4. 1-2 weeks + 3-4 card holds
QWEN36_MLP_DOWN_BF4to a small policy env var, banner-logged).Falsifier: < 1.0 ms. Measured with
bench/ab/sweep-32k.shextended with a prod-weight-mixcontrol arm (interleaved), reported as makespan and TTLT, never decode ms alone.
Go to default only if both hold and makespan improves beyond the 0.33% noise floor at >= 3 of
4 contexts.
P4 (E2/E3, optional). 2-8 weeks
norm-weight folding checked against Qwen3.5's RMSNorm parameterization, and GDN's in_proj_a/b
(bf16) rotated consistently.
bf8. Prerequisites: #42841 (32-core PCC) and #42586 (hang) fixed upstream, then port
MatmulCustomCompressedonto our TP=2 DRAM-sharded 1D decode progcfgs. BSPM maps would comefrom a sensitivity pass (exllamav3
sc_optimize.pyis the model for this).P5 (A, optional, owner's call): "runs EXL3 checkpoints" compatibility. ~1 week
is_exl3_checkpointnext to the existingis_fp8_checkpoint/is_nvfp4_checkpointinweight_mapping.py, called frommodel_config.load_state_dict. Reconstruct with a vendoredref.py(MIT) to the original basis, thenshard_wto bf8 (quality-preserving) or bf4.ref.weight_origbuilds a full fp32k x n. For lm_head[248320, 5120]that is5.1 GB, which is an instant SIGKILL on cfx-llm2 (same trap as
mtp_head_oracle). Reconstruct incolumn chunks. Transcode once off-box into the tensor cache rather than on the serving host.
exllamav3.reconstruct()(the exl3xpu Gate A1approach) plus P1. Expect slower decode than prod (bf8) or worse attn/GDN quality (bf4).
P-B (only if someone insists on on-device trellis). Half a day of card time
mul1decode (extract,SFPMUL24multiply, SWARbyte-sum, cast, FMA, store) over L1-resident words. It reads the cycle counter and records
cycles per 32-weight row.
decode/DRAM overlap and FPU concurrency, which is a second probe. Above 5.6: close permanently,
in writing. Expected (ESTIMATE): 10-20 cycles/row, so close.
Effort total for the recommended path (P0-P3): ~5-8 engineer-weeks and ~8-10 card holds,
every one serialized on
/tmp/ttlockwith theMemAvailable>= 4 GB check.Risks / unknowns
-4.0 ms could land near zero. The falsifier is set at 1.0 ms.
attn/linear_attn/lm_head and the last 8 MLP layers at 8-bit; QUASAR gets all-4-bit only via QAT
(
docs/QUANTIZATION.md). GPTQ-style rounding narrows but may not close that gap.Short-panel metrics can pass while long contexts drift. That is why P1 measures deep positions.
[K,N]tile layout). Rotations help only when applied alongN. Verify the actual on-device layout of each weight (some matmul configs may transpose) before
designing E2.
The grid-snapped checkpoint stays safe only if values are exactly representable, so the packer
does not round at all. The round-trip test in P2 must re-run on every tt-metal pin bump.
fast GPU per exllamav3
doc/optimize.md, THIRD-PARTY). cfx-llm2 cannot host it.qwen3_5_mtp, k=3) on thisexact model with acceptance ~2.4-3.1 at C=1..16 and 2-2.4x aggregate at C=8 (THIRD-PARTY). Owner
directive
0aaaaadropped MTP, and "do not propose speculation" stands. This is recorded onlybecause the directive says MTP was never measured here and must never be recorded as rejected
on evidence.
Sources
This repo (MEASURED / internal):
bench/runs/n1-matmul-read-compute-split-20260912T174500Z.jsonl: per-projection read/non-read split, 454-469 GB/s, bytes/element 0.5625/1.0625bench/runs/gate0a-weight-traffic-20260911T154154Z.jsonl: per-group element counts (basis of all byte arithmetic)bench/runs/goal3-down-proj-bf4-2026-09-05.jsonl: down_proj bf4 in-model: +3.1% vs +15.2% predicted, accuracy unverifiedbench/runs/sweep-32k-20260914T142154Z.jsonland.table.txt: makespan/TTFT/decode, goal1 profile (no down bf4)bench/runs/target-shape-ttft-B8-128k-20260914T130939Z.jsonl,...B4-256k-20260914T134045Z.jsonl(CLAUDE.md cites a non-existent...134735Z): 443.2 s / 609.2 sbench/runs/gateA-kv-accuracy-20260913T215707Z.jsonl: retrieval gate design and ceiling problembench/runs/goal4-fidelity-dtype-probe-2026-09-05.jsonl: bf4 vs bf8 at LoFi (0% at prefill M=512; PCC 0.9932 vs 0.9999)scripts/vllm-tt-serve.sh:155(prod setsQWEN36_MLP_DOWN_BF4=1);bench/ab/sweep-32k.sh:57,82(arms lack it)patches/prod-local-metal/models/demos/blackhole/qwen36/tt/{model_config.py,tp_common.py,model.py}: loader (load_state_dict,is_fp8/nvfp4_checkpoint),shard_w[in,out]layout, lm_head bf8docs/QUANTIZATION.md,docs/VRAM-BUDGET.md,docs/SATURATION-AND-SRAM.md,docs/GOAL-AGENT-SERVING.md,docs/PERFORMANCE.mdTHIRD-PARTY:
2d17c57:README.md,docs/DESIGN.md,docs/PROGRESS.md,docs/GOAL.md,csrc/exl3_esimd.h,exl3xpu/ref.py,exl3xpu/ops.py,models/qwen3.8-27b-exl3-4.00bpw/recipe.json,tests/gateA3/6b84a21:doc/convert.md,doc/optimize.md,doc/llama31_8b_instruct_kld_bpw.png,exllamav3/modules/quant/exl3_lib/quantize.py4.00bpw, rev113cf7a)SFPMUL24: https://github.com/tenstorrent/tt-isa-documentation/blob/main/BlackholeA0/TensixTile/TensixCoprocessor/SFPMUL24.mdThe EXL3 trellis-on-SFPU no-go rests on a desk estimate (25-50 ms decode). Please keep this open with an ESTIMATE label until a one-kernel SFPU trellis-decode microbench is measured on Blackhole.
Reopened under the new rule (owner, 2026-09-25): a closure needs an on-hardware record at the stated scope; estimates, code-reads and third-party numbers close nothing. See docs/LEDGER.md "Reopened" (PR #68).