Repository navigation
Description
Tracking issue for the inference research program. Principle: build on what exists (packed PQ2_0/PTQ1_0 MMQ, CUDA graph replay, GDN, LSA, adaptive block drafting, prefix caching, prompt lookup) and bring that efficiency to every hardware class, then attack memory bandwidth, repeated agent prefill, long-context attention and unnecessary decoding work.
Where to invest by hardware (item numbers = the linked issues in order): iPhone/Android 3,4,7,8,19; Apple M-series 1,5,6,9,15; Strix Halo 2,5,6,7,15; consumer RTX 5,6,11,12,13; datacenter NVIDIA 9,11,12,14,16; multi-node 14,16,17,18,9.
First six experiments and their proof: Metal native ternary GEMM (faster end-to-end 4B/9B than the existing Metal route, identical outputs); Strix Halo HIP vs Vulkan (fastest correct backend per shape); ARM ternary LUT (better sustained tokens/s and joules/token); LSA + CUDA graphs (lower 30K decode latency, no graph-lifetime or state corruption); cross-turn KV/GDN-state reuse (lower warm TTFT on the 20-turn agent without recomputing unchanged prefixes); FlashInfer/FA4/CuTe comparison (measurable end-to-end datacenter speedup).
Architecture bet: a hardware-aware execution plan = f(model, device, context, batch, memory, power) chosen from reproducible per-hardware measurements and bounded runtime feedback, leaving model semantics and tenant isolation intact, so one model family ships across phones, laptops, Strix Halo, consumer GPUs and datacenter accelerators.
Secondary queue (raise when the workload is common): multi-LoRA serving, browser/WebGPU inference, faster model loading and conversion, sparse expert pruning, multimodal encoder fusion, structured-output constrained decoding, cross-device distributed inference. Portability baselines to keep: MLC LLM and llama.cpp.
Issues:
- Native packed-ternary Metal kernels for Apple Silicon: Native packed-ternary Metal kernels for Apple Silicon ml#38
- Strix Halo: native RDNA3.5 low-bit inference (HIP vs Vulkan): Strix Halo: native RDNA3.5 low-bit inference (HIP vs Vulkan) ml#39
- Table-lookup ternary inference on ARM and x86 CPUs (T-MAC style): Table-lookup ternary inference on ARM and x86 CPUs (T-MAC style) ml#40
- NPU-native low-bit inference for phones and AI PCs: NPU-native low-bit inference for phones and AI PCs #48
- Kernel laboratory: automatic shape-specialised tuning for CUDA, HIP and Metal: Kernel laboratory: automatic shape-specialised tuning for CUDA, HIP and Metal ml#41
- Fused Gated DeltaNet and recurrent-state kernels: Fused Gated DeltaNet and recurrent-state kernels ml#42
- Mixed-precision and activation-aware quantization per layer: Mixed-precision and activation-aware quantization per layer #49
- 2-bit and 4-bit KV cache compression: 2-bit and 4-bit KV cache compression #50
- Persistent, shareable prefix caches for multi-turn agents: Persistent, shareable prefix caches for multi-turn agents #51
- Long-context cache selection: retrieval heads vs streaming heads: Long-context cache selection: retrieval heads vs streaming heads #52
- Hardware-specialised attention: FlashAttention-4, FlashInfer, cascade attention: Hardware-specialised attention: FlashAttention-4, FlashInfer, cascade attention #53
- CUDA graphs for the linear-attention decode path, verification and variable shapes: CUDA graphs for the linear-attention decode path, verification and variable shapes #54
- Next-generation speculative decoding: feature-level drafts (EAGLE-3) and workload-aware draft selection: Next-generation speculative decoding: feature-level drafts (EAGLE-3) and workload-aware draft selection #55
- Continuous batching, chunked prefill and latency-aware scheduling: Continuous batching, chunked prefill and latency-aware scheduling #56
- Heterogeneous memory, CPU/GPU offload and cold-start minimisation: Heterogeneous memory, CPU/GPU offload and cold-start minimisation #57
- Fused MoE execution, expert paging and expert-parallel communication: Fused MoE execution, expert paging and expert-parallel communication #58
- Native sparse attention and multi-head latent attention: Native sparse attention and multi-head latent attention #59
- Disaggregated prefill/decode and KV transport: Disaggregated prefill/decode and KV transport #60
- Power-aware inference: DVFS and thermal stability policy: Power-aware inference: DVFS and thermal stability policy #61
- Model co-design for the edge: early exits, structured sparsity, quantization-aware distillation: Model co-design for the edge: early exits, structured sparsity, quantization-aware distillation #62
Activity