Last updated: 2026-07-18
Closeout override (2026-07-21): the lane is paused at the verified
80.820052 tok/s record. This document remains the detailed build and evidence
reference, but its immediate-work sections are historical. Resume only under
the conditions in
notes/2026-07-21-deepseek-v4-flash-frontier-closeout.md.
The promoted entry points are the
result packet and
standalone repro.
This is the manager-facing resume document for handing orchestration to another
AI. It describes the objective, immutable rules, live state, source trees,
record identity, build and run workflow, quality gates, LocalMaxxing policy,
completed experiments, known dead ends, and the next decision tree. Detailed
chronology remains in results/experiment-ledger.md and notes/.
The product objective is throughput for one active generation, never aggregate serving throughput:
The current qualified target-verified record is 80.820052 tok/s. The
three independent strict-suite medians were 80.820052 / 76.900178 /
78.287226 tok/s. All 36 requests were unique and cache-zero, and 24/24 ordered
exact canaries passed around the suites. LocalMaxxing approved
cmrquta9905w3lg013m5vxoqx.
At the current run-of-three center, 100 tok/s still needs roughly 21.7% less time per emitted token or a useful increase in accepted tokens per target cycle. A 200 tok/s result is not credible from micro-fusion alone; it requires both a substantially leaner target cycle and deeper useful speculation.
cached_tokens=0, no prefix cache,
no response reuse, no n-gram/history acceleration, and no warmed repeated
continuation.The detailed anti-cheating specification is
quality/spec-eval-contract-v1.json. It requires two frozen held-out packs,
short and 2K/4K nonrepetitive contexts, request-scoped acceptance and timing,
target-only/current-control/candidate comparisons, and no benchmark-specific
routing.
0,1,2,3.0xSero/DeepSeek-V4-Flash-180B, revision
7c360e1cd4a5168099dbc54d16d929bf6df04990./mnt/fast-ai/llm-models/deepseek-v4-flash-xpu/current-k160./mnt/fast-ai/llm-models/deepseek-v4-flash-xpu/dspark-draft-pack-aa22cb0.aa22cb07426656189b2573b8e77a9b7333b8ae0f./mnt/fast-ai/bench-results/deepseek-v4-flash-xpu/./mnt/fast-ai/deepseek-v4-corpora/./mnt/fast-ai/vllm-cache-exp/deepseek-v4-k160-dspark/vllm and
/mnt/fast-ai/vllm-cache-exp/deepseek-v4-k160-dspark/torchinductor.K160 is the runnable performance target, not the final quality-certified teacher construction. Its hash layers were pruned and its calibration is not fully reproducible. Do not claim it is official REAP. The user nevertheless explicitly chose to continue this K160/DSpark path and does not authorize another model substitution.
main repo /home/steve/llm-optimizations
vLLM /home/steve/src/deepseek-v4-vllm-xpu-dspark
80f1ad820706103d11f095c8a97e42c624c8bad3
XPU kernels /home/steve/src/deepseek-v4-xpu-kernels-mwidth-mhc
2cc25d0ca08d3a76de27ee50c6dda258350e93e8
oneCCL /home/steve/src/oneccl-2021.17.2-b70-sizegate
48fda4f0e074db005596d6899d5227d3f0316c12
runtime /mnt/fast-ai/runtime/oneccl-2021.17.2-b70-wideepoch-48fda4f/lib
venv /home/steve/.venvs/deepseek-v4-xpu
The vLLM and XPU worktrees are clean. The oneCCL tree intentionally contains
untracked local build output (_build-b70/ and generated
include/oneapi/ccl/config.h); do not stage, delete, or mistake it for a
source patch.
No DeepSeek service is currently running. The final candidate was stopped cleanly and all four GPUs are free. Verify rather than assume:
pgrep -af 'vllm|api_server|EngineCore|ray::' || true
ss -ltnp | rg ':18080|:8000' || true
The current source trees include later default-off experiments. The exact public-record source identity remains:
vLLM 264c7f2f7df21ddeeab32ecca0353133344f1ac9
XPU kernels 31315673737d95da0f79179c8f755260ef02c1d6
oneCCL 48fda4f0e074db005596d6899d5227d3f0316c12
For an exact record reproduction, use detached worktrees at those commits. Do not call the newer experimental HEAD the same run identity merely because all newer flags are off. The newer trees are the active development lane and are useful for same-binary control/candidate testing.
The base launcher is:
scripts/serve-k160-dspark-candidate.sh
-> scripts/serve-k160-tp4-smoke.sh
The first script chooses eager/PIECEWISE graph modes, pins experiment flags,
the draft pack, cache paths, and speculative width. The second validates clean
source commits and model structure, loads oneAPI/oneCCL, records the full
identity, runs a four-rank preflight, and launches vllm serve.
The record used target PIECEWISE, private breakable draft PIECEWISE at exact M=7, target verifier M=8, TP4+EP/DP1/PP1/concurrency1, FP8 KV, block 256, seven DSpark proposals, persistent Markov, W1-only replication, exact M8 compressors, M8 W8A16, MXFP4 N128, native M8 router, sharded greedy target argmax, and native rejection/commit. oneCCL preloads the wide-epoch runtime and routes only all-reduces larger than 131,072 bytes through the safe path.
Working-control launch from a compatible clean development tree:
cd /home/steve/llm-optimizations
RUN_DIR=/mnt/fast-ai/bench-results/deepseek-v4-flash-xpu/control-$(date -u +%Y%m%dT%H%M%SZ) \
VLLM_COMMIT="$(git -C /home/steve/src/deepseek-v4-vllm-xpu-dspark rev-parse HEAD)" \
KERNEL_COMMIT="$(git -C /home/steve/src/deepseek-v4-xpu-kernels-mwidth-mhc rev-parse HEAD)" \
DSPARK_GRAPH_MODE=piecewise \
DSPARK_DRAFT_GRAPH_MODE=piecewise \
DSPARK_SPEC_TOKENS=7 \
VLLM_XPU_DSPARK_EXACT_QUERY_CAPTURE=1 \
VLLM_XPU_GREEDY_FUSED_REJECTION=1 \
VLLM_XPU_GREEDY_SHARDED_TARGET_ARGMAX=1 \
VLLM_XPU_DSPARK_FIXED_M7_TARGET_INPUTS=1 \
VLLM_XPU_DSPARK_PERSISTENT_MARKOV=1 \
VLLM_XPU_DSPARK_REPLICATED_MARKOV_W1=1 \
VLLM_XPU_V4_COMPRESSOR_BATCHED_EXACT_MAX_M=8 \
VLLM_XPU_V4_BLOCK_FP8_W8A16_MAX_M=8 \
VLLM_XPU_MXFP4_SMALL_M_N=128 \
VLLM_XPU_V4_ROUTER_NORM_MAX_M=8 \
experiments/deepseek-v4-flash-reap-xpu-b70/scripts/serve-k160-dspark-candidate.sh
Keep rejected flags at zero, especially event/host/sharded Markov transports, M8 DPAS MHC, M8 pair-tile MHC, copy-elision, context-WKV fusion, and the fixed M8 target builder.
Canonical identity dump:
/mnt/fast-ai/bench-results/deepseek-v4-flash-xpu/
dspark7-sharded-target-argmax-candidate-20260718T2100Z/identity.txt
Diff every field against it before interpreting speed.
Most changes need no package rebuild when the active trees lead PYTHONPATH:
export PYTHONPATH=/home/steve/src/deepseek-v4-vllm-xpu-dspark:\
/home/steve/src/deepseek-v4-xpu-kernels-mwidth-mhc:${PYTHONPATH:-}
/home/steve/.venvs/deepseek-v4-xpu/bin/python -m py_compile changed_file.py
Run relevant unit tests before model load. IPC broker example:
cd /home/steve/src/deepseek-v4-vllm-xpu-dspark
/home/steve/.venvs/deepseek-v4-xpu/bin/python -m pytest -q \
tests/distributed/test_xpu_ipc_broker.py
cd /home/steve/src/deepseek-v4-xpu-kernels-mwidth-mhc
source /opt/intel/oneapi/setvars.sh >/dev/null 2>&1
ninja -C build/temp \
csrc/xpu/mhc/xe_2/CMakeFiles/mhc_kernels_xe_2.dir/mhc_pre.cpp.o \
CMakeFiles/_xpu_C.dir/csrc/xpu/torch_bindings.cpp.o \
_xpu_C.abi3.so
install -m 755 build/temp/_xpu_C.abi3.so \
vllm_xpu_kernels/_xpu_C.abi3.so
sha256sum build/temp/_xpu_C.abi3.so vllm_xpu_kernels/_xpu_C.abi3.so
Sampler-only edits usually need topk_topp_sampler.cpp.o,
torch_bindings.cpp.o, and the final link. SYCL device linking is expensive
and may touch generated attention objects. If the Ninja dependency database is
corrupt or causes spurious rebuilds:
ninja -C build/temp -t recompact
Do not copy a binary without recording source commit and binary SHA. The
package .so is ignored by Git; source commits are the durable identity.
Do not replace the runtime casually. The wide collective epoch fixed deterministic failures around positions 28 and 58. Generic communication flag sweeps, recursive doubling, tiny-pair collectives, and resident polling are already rejected.
Use the cheapest valid gate first:
Do not load 96 GiB for a candidate that already fails exactness or its conservative component gate.
Exact canary capture and score:
python experiments/deepseek-v4-flash-reap-xpu-b70/scripts/capture-openai-logprob-corpus.py \
--base-url http://127.0.0.1:18080 --model deepseek-v4-flash-k160 \
--suite experiments/deepseek-v4-flash-reap-xpu-b70/quality/exact-canaries-v1.json \
--out "$RUN_DIR/exact-canaries-pre.json" \
--max-tokens 32 --top-logprobs 0 --label pre
python experiments/deepseek-v4-flash-reap-xpu-b70/scripts/score-exact-canaries.py \
"$RUN_DIR/exact-canaries-pre.json" \
--suite experiments/deepseek-v4-flash-reap-xpu-b70/quality/exact-canaries-v1.json \
--out "$RUN_DIR/exact-canaries-pre-score.json"
The six ordered cases include 1073 -> 437 -> 1073, exact copy, factual, and
strict JSON checks. Every row must be cache-zero.
Strict suite:
python scripts/bench-openai-realistic-suite.py \
--base-url http://127.0.0.1:18080 --model deepseek-v4-flash-k160 \
--suite repro/rapid-model-snapshots-b70/realistic-suite-v1.json \
--max-tokens 128 --metric-tokens 100 --return-token-ids \
--out "$RUN_DIR/strict-screen.json"
The 12-prompt public suite is a continuity screen. Deeper speculation
promotion requires the larger frozen held-out packs in
quality/spec-eval-contract-v1.json; public prompts alone do not prove against
overfitting.
Instructions: /home/steve/llm-optimizations/docs/localmaxxing.md.
Credential: /home/steve/.config/localmaxxing/api_key. Never print, paste, or
commit it. Submission helper:
scripts/submit_localmaxxing_results.py \
--payloads path/to/queue.json --label label-to-submit
Submit only when the result improves the matching GPU-count record, states one
active generation, includes model/revision/quantization/topology/commits/full
flags/hashes/evidence, passes exactness and realistic_final_gate, and uses
primaryMetricName=median_tok_s_1_100_after_ttft. Never submit warmed,
history-assisted, synthetic-only, or diagnostic results. The current approved
DeepSeek record is cmrquta9905w3lg013m5vxoqx.
Reusable technical wins:
Read the named note before reopening a class.
Do not retry transport that adds an eager/host synchronization boundary.
[M,4096] collectives corrupt output; retain segmented M2 collectives.Latest closure: notes/2026-07-18-m8-mhc-rms-fusion-closure.md.
Do not prioritize fused M8 target LM-head+argmax. The local BF16 head reads 252.5 MiB/rank and already takes about 0.452-0.454 ms near bandwidth roof. Its local max is only ~0.009 ms and output traffic is ~517 KiB. Expected fused saving is ~0.01-0.03 ms, with exact BF16-round-before-compare risk. The earlier native argmax packer was itself slower (28.935 vs 25.530 us).
Never sum isolated savings into an endpoint claim. Use frozen same-binary B-A-B.
The post-record eager target profile attributes roughly 27.0-27.6 ms/cycle of noncollective work: routed MXFP4 ~7.19 ms, dense GEMM ~6.51, sparse QK/LSE ~3.54, MHC ~2.80, PV ~1.78, and pre-fusion router selection/sort ~1.06. The eager Markov sampler was ~10.5 ms/cycle under instrumentation, but graph wrapping did not remove its kernels or collective breaks.
The conclusion is architectural: we are not missing a flag. The remaining large opportunity is a fixed-geometry, fixed-address target/speculative decoder transaction—the Intel/SYCL/Level Zero analogue of HIPfire—where vLLM remains loader/API/oracle but no longer owns every hot-loop boundary.
This is the next untried captured-path boundary with a plausible >=0.50 ms floor:
{1,2,7,8}.<=8 guard; gate draft M7 and target M8 independently.Source locations to inspect first:
vllm/models/deepseek_v4/xpu/model.py;vllm_xpu_kernels/fused_moe_interface.py.Integrate exact BF16 DPAS W2 into the incumbent captured collective Markov path, not the rejected event path:
local_w2.t().contiguous() [256,32320] BF16/rank;torch.mm(..., out=local_bias) calls with
deepseek_markov_m1_bf16_dpas_out(..., tiles_per_item=2);This may compound with A but is not a standalone path to 100 tok/s.
Continue Option 4 in
../../plans/2026-07-16-deepseek-v4-flash-b70-100-200-tps-roadmap.md:
Reusable no-model assets:
/mnt/fast-ai/deepseek-v4-corpora/;scripts/replay-m2-cycle-corpus.py;scripts/benchmark-mwidth-cycle-corpus.py;scripts/run-mwidth-cycle-gate.sh.For 200 tok/s, compare emitted tokens per complete wall cycle under the frozen anti-cheating evaluator. Candidate families may include DSpark extension, DFlash/DEAGLE, or external draft, but do not invest until target verifier and draft cycle costs are measured on the same frozen workload.
Parallelize bounded independent tasks: source audit, arithmetic/tie/NaN/alias review, profile/result classification, harness construction, and doc/patch review. The primary agent owns final edits, build, GPU/process safety, service launch, exactness, classification, commits, and LocalMaxxing.
Do not let agents edit the same files concurrently. Inspect git status
before every edit/build; unexplained changes belong to another agent or user
and must be preserved. Report to the user only on a genuine record, major
architectural result, real blocker, or requested status; otherwise continue
through the ordered gate.
Read in order:
/home/steve/AGENTS.md/home/steve/llm-optimizations/AGENTS.md/home/steve/llm-optimizations/CURRENT.mdHANDOFF.mdresults/experiment-ledger.md../../plans/2026-07-16-deepseek-v4-flash-b70-100-200-tps-roadmap.mdquality/spec-eval-contract-v1.jsondocs/localmaxxing.md and docs/local-ops.md before submission or
privileged/runtime work.Key current notes:
notes/2026-07-18-sharded-target-argmax-record.md;notes/2026-07-18-m8-router-fusion-record-and-postrecord-closures.md;notes/2026-07-18-dspark-m7-ipc-dpas-bundle-closure.md;notes/2026-07-18-fixed-m8-target-builder-closure.md;notes/2026-07-18-m8-mhc-rms-fusion-closure.md;results/experiment-ledger.md.Mistake audits live under /home/steve/identified-mistakes/. Secrets live
outside Git. Never print the Hugging Face token, LocalMaxxing key, or sudo
password.
cmrquta9905w3lg013m5vxoqx.