Repository navigation
Description
Pre-registered experiment E1 (Sci, 2026-11-22)
Hypothesis H1: on a served hybrid model at 32K context on GB10, ENGINE_KV_PHASE_POLICY=phase_aware:4096 (BF16 KV during prefill, FP8 E4M3 during decode) has three effects:
- (a) it cuts measured attention-KV resident memory by at least 1.8×
- (b) it raises steady-state decode throughput by at least 10%
- (c) it isn't worse on output quality by more than the pre-set margin
Falsifiers:
- (a) is false if the measured KV-allocation reduction is below 1.5×.
- (b) is false if the 95% CI of the decode-throughput ratio includes 1.0 at the final look.
- (c) fails if greedy-token agreement with the BF16 baseline is below 97%, or if long-context retrieval accuracy drops by more than 1 percentage point.
Model: the Qwen3.8-27B Q4_K_M GGUF that #134 already benchmarks, served by hanzo-engine 1.7.109 on GB10 (dgx.local). If it doesn't fit at 32K, use the largest hybrid GDN model that does, and record the substitution before the run.
Baseline / control:
- Baseline: same binary, same model, same seed, policy off (BF16 KV).
- Control: A/A (off vs off) to measure run-to-run noise.
- Arms run in an alternating ABAB… order on a quiet device; prefix cache disabled for the timing arms.
Smallest informative test:
- Memory: load the model, prefill one 32,768-token prompt, then read the KV-cache allocator's bytes and
cudaMemGetInfo. 3 reps per arm. These numbers are deterministic, so the 3 reps only check for leaks. - Throughput: 10 paired trials. Each trial is a 32,768-token prefill followed by 256 decoded tokens; decode tok/s is measured excluding prefill.
- Quality: 32 long-context prompts from the pre-registered set (synthetic needle-in-haystack at 8K, 16K and 32K, seeded), 256 greedy tokens each. Measure token agreement against BF16 and needle retrieval accuracy.
Statistics and stopping rule:
- Throughput: paired log-ratio per trial, mean with a 95% t-CI. Look 1 at 10 pairs: stop if the CI excludes 1 in either direction or sits entirely inside ±3% (practical equivalence). Otherwise extend once to 30 pairs, with the critical value split between the two looks (O'Brien–Fleming-style split, two looks).
- Quality: decided on the 32 prompts once; no extension. Abort the throughput arm early if agreement is below 90% on the first 8 prompts.
Cost: about 2–3 GPU-hours on one GB10, no training.
Provenance: engine and hanzo-ml commits, model sha256, env (ENGINE_*), driver and CUDA, clocks, prompt-set sha256, raw per-trial CSV. Everything is logged through hanzo-research with hardware_class = gb10 and ctx = 32768.
Next action by outcome:
- (a, b, c all hold): propose enabling it by default for ctx ≥ 16K behind the rollback env, after QA replication on a second device class. Transfer: test combining it with ML M1's Split-KV result, since FP8 halves the bytes that M1 shows are under-used.
- (a holds, b fails): decode is compute- or occupancy-bound at 32K, which agrees with M1. Ship as a memory-only feature for longer contexts and batch capacity.
- (c fails): keep it opt-in. Test per-head or per-channel FP8 scaling, or KIVI-style INT4/2 (paged-attn: KIVI 2-bit and 4-bit asymmetric KV cache quantization (#50) #114), as the next hypothesis.
Links: #134 · #63 · hanzoai/ml#77 (ledger)
Activity