* feat(quant)!: compress bf16 weights to df11 at load with --online-quant
GLM-4.7 no longer hardwires DF11 attention and embedding; it serves them
bf16 unless --online-quant df11 is passed, and FTW files converted with the
old DF11 tensors must be reconverted.
* fix(quant): skip layers --online-quant cannot convert instead of failing
* feat(spec): add --speculative-token-map for a smaller mtp draft head
* feat(spec): add scripts/make_token_map.py to write a token map
* fix(spec): correct the token map vram note and seed its test
* feat(spec): hand the pending token to Proposer.propose and return a SpecProposal
* feat(engine): Sampler.probs and sparse-q rejection
* feat(spec): let a proposer declare slot states riding the GDN slots
* feat(models): export layer outputs to the feature sink in the qwen3_5 and qwen4_exp families
* feat(attention): record the source slot of each tracked request
* feat(kernel): DFlash2 draft kernels
* feat(models): DFlash2 draft family
* feat(spec): DFlashWindow
* feat(spec): DFlashProposer
* docs(cli): add dflash to the speculative decoding section
* refactor(engine): share the sampling backend choice and drop the extra renorm in Sampler.probs
* fix(models): build the DFlash rope table uncached and refuse draft scalings it does not apply
* refactor(spec): share the draft path check between the MTP and DFlash proposers
* test(e2e): compare rebuilt outputs exactly only without hybrid MoE
* refactor(spec): keep proposer slot states on EngineConfig instead of replacing model_config
* perf(spec): compute the verify distribution once for sparse-q rejection
* perf(models): let the feature sink add the residual on the rows it keeps
* perf(models): share the DFlash draft K/V weights with the ring projection
* fix(kernel): keep the dflash selector off zero-probability candidates
* test(spec): drop the DFlash tests that the draft forward and Monte Carlo tests already cover
* fix(spec): default and cap DFlash steps at the draft's block_size - 1
* fix(models): reject DFlash draft configs the draft forward cannot serve
* test(e2e): read the MoE strategy from the rebuild test's extra args
* docs(spec): say that slot-state owners write their own prefill track snapshot
* test(models): move the DFlash draft parity tests under tests/models/dflash
* refactor(spec): drop the no-op verify handler of the DFlash window
* refactor(models): fold the DFlash candidate top-k into propose
* refactor(spec): declare the draft step limits through Proposer.num_steps only
* refactor(kernel): make the DFlash ring attention stateless and keep its workspace on the ring
* refactor(models): name the DFlash draft submodules like the other model families
* refactor(spec): move SpecProposal next to DraftContext in spec/proposer.py
* refactor(spec): hand the verify the draft distribution over the whole vocabulary
* refactor(spec): call the DFlashRing object dflash_ring and its length ring_len
* refactor(models): split the DFlash draft's propose into compute_candidates and sample_path
* refactor(spec): keep the draft distribution on its support in SpecProposal
* fix(spec): drop the step's proposal once the verify has read it
* refactor(spec): name the DFlash feature sinks DFlashPrefillSink and DFlashVerifySink
* refactor(models): read the declared Batch.features directly instead of through getattr
* test(dflash): check the window rebuild inside the block forward test
* test(spec): share the plain run of the verify contract and run the DFlash draft once per family
* test(kvcache): drop the window cases from the pool tests and check a layerless state's bytes
* test(spec): check the verify probs of each row against a torch top-k and top-p reference
* test(e2e): add an accept-len floor and a prefill chunk knob to the AIME gate
* refactor(scheduler): let callers take the speculative counts from the status reporter
* test(spec): keep the shared plain runs of the verify contract in their own temp dirs
* test(models): give the ricursive test's stand-in batch a features field
* feat(spec): add the MTP proposer for the qwen3_5 family
* test(models): read the qwen3_5 MTP head of bf16 and block-fp8 checkpoints
* feat(spec): verify qwen4_exp targets on qsa_sparse graphs with PLE verify handlers
* feat(spec): add the qwen4_exp MTP draft from the checkpoint or a Strata pack
* docs(cli): document the speculative decoding flags
* fix(spec): refuse MTP draft sources the draft cannot read before the target loads
* docs(qwen4_exp): describe the verify path in the PLE docstrings
* fix(spec): refuse a missing relative MTP draft path before the target loads
* fix(moe): read MTP head experts on the host and require both stacked tensors
* refactor(spec): tell the final prefill chunk from prompt_len instead of the scheduler's ChunkedReq
* refactor(spec): let each MTP draft family check its own weight source
* fix(qwen4_exp): size the disk PLE eager staging for decode and verify rows
* perf(kernel): read the KV-index gather's chunk count from the grid, not a constexpr
* refactor(moe): let each family name its MTP expert tensors
* refactor(spec): force the MTP draft's MoE resident in the proposer and check it after load
* fix(spec): refuse MTP with dummy weights
* refactor(spec): move HiddenRelay under spec/mtp, its only user
* refactor(spec): drop MTPDraft.config, fold its embed hooks into embed_tokens
* refactor(models): note FeatureSink's graph binding, drop its runtime_checkable
* fix(models): read quantized MTP fc projections under the quant config
* refactor: add engine and scheduler seams for multi-row decode steps
* refactor: rename the graph steps argument to rows_per_req
* refactor: drop VerifyInfo and require rows_per_req on verify batches
* refactor: fix stale seam comments and read decode_rows_per_req directly
* refactor: reword two GraphRunner comments for multi-row graphs
* fix(engine): scale the GPU-decode MoE pool limits by decode_rows_per_req
* refactor: drop the unread Context.moe_offload_cache field
* test: trim the multi-row seam tests
* build(kernel): vendor ggml-cuda from llama.cpp 8c2134a8 behind a tvm-ffi binding
* build(deps): vendor the gguf-py reader
* feat(quant): add the GGUF quant kind and an embedding quant method
* feat(gguf): serve Flash-Next and Gemma4 GGUF on the GGUF quant kind and drop the old Q4_0 path
* fix(kernel): build ggml-cuda for plain sm_120 by turning off the native fp4 MMA
* perf(gguf): write ggml results in the activation dtype and keep MoE intermediates in bf16
* build(kernel): compress the ggml fatbin to keep the multi-arch kernel cache small
* fix(gguf): read F32, F16 and BF16 PLE tables without ggml
* fix(moe): pad the offload slot cache for ggml MMQ tail reads
* fix(gguf): support hip builds and runtime devices
* fix(gguf): copy same-type dequantize and check for missing ggml converters
* fix(gguf): load quantized qwen4exp ple_key and ple_value
* feat(gguf): run float parts of a fused GGUF linear as bf16 segments
* fix(gguf): load quantized qwen4exp hyper-connection and gdn ba weights
* fix(moe): zero the prefill staging area after the last prefill layer
---------
Co-authored-by: zihaomu <zihaomu@outlook.com>
* refactor(quant): config, scheme and method layers for checkpoint quantization
QuantConfig parses the checkpoint's quantization_config into a QuantScheme per
projection; every Linear*, ParallelLMHead and MoE layer takes quant_config and a
prefix, declares its tensors through a QuantMethod and selects its kernel at
construction. MoE kernels own the expert bank layout, pack and apply, so the
offload cache, the FTW converter and the CPU executor follow one layout.
- --quant-backend layer[.kind]=name selects kernels (--nvfp4-backend forwards to it)
- --moe-strategy replaces --moe-backend; the old spelling stays as an alias
- --moe-cpu-layers auto for Windows/WSL pin budgets; --moe-cache-auto respects the kernel's slot limit
- removes the per-family quantized layer classes, bank providers, format env switches and GLM runtime fp8