Conceptual Architecture · Research Prototype

Where LLM Inference Lives on a KV-Aware Accelerator

A technical specification for the KVFabric concept: an architecture prototype, simulator, and control-plane model for future inference-memory accelerators that orchestrate KV cache residency, compression, prefetch, and tiered memory movement.

01

Reference Diagram

Technical diagram mapping LLM inference operations to accelerator compute and memory hierarchy
Conceptual mapping of LLM inference stages, compute units, KV cache paths, and accelerator memory hierarchy. This is a design/specification diagram, not a production die shot.
02

Executive Technical Summary

Problem

Long-context inference turns KV cache into a dominant memory object. Decode repeatedly reads historical KV state while appending new KV for every generated token.

Observation

Tensor compute remains critical, but end-to-end serving can become bottlenecked by memory residency, data movement, and exposed transfer latency.

KVFabric thesis

Future systems may need a dedicated inference-memory fabric/control plane around accelerators to schedule, stage, compress, and move KV state.

One-line mental model: GPUs do math. KVFabric studies how future systems may orchestrate inference memory.

03

Inference Pipeline Mapping

StageWhat happensPrimary compute/memory placementKVFabric relevance
Input/tokenizationPrompt text becomes token IDs.CPU/runtime, tokenizer memory.Not the main acceleration target, but request metadata becomes useful for scheduling.
PrefillFull prompt is processed once. Q/K/V are produced for each layer and KV cache is written.GPU/ASIC tensor cores; HBM stores weights, activations, active KV.KV write path: allocate KV blocks, select placement, prepare future residency metadata.
DecodeEach new token repeatedly reads prior KV cache and appends new KV state.Attention kernels on accelerator; KV reads from HBM/SRAM/CXL depending on residency.Main target: prefetch, SRAM staging, cold KV compression, CXL demotion, overlap scheduling.
Sampling/outputLogits are sampled into next token.GPU/CPU depending on runtime.Lower priority; output timing can still provide scheduling hints for next-token prefetch.
04

Conceptual KVFabric Accelerator Blocks

Runtime Command Queue

Receives reserve, prefetch, compress, materialize, and release requests from the LLM runtime. This is the software/hardware boundary of the control plane.

Policy Microcontroller

Runs residency and movement policies: hot/warm/cold classification, deadline-aware prefetching, compression eligibility, and CXL demotion decisions.

KV Metadata SRAM

Stores compact per-block metadata: layer/head/token range, tier, compression state, access count, last access step, deadline, and reuse hints.

DMA / Prefetch Engines

Move KV blocks between HBM, SRAM staging buffers, CXL memory, and host DRAM. The goal is to hide movement behind compute.

Compression / Rehydration

Compresses cold KV state and rehydrates selected blocks near compute. This trades capacity and bandwidth against latency/quality assumptions.

SRAM Staging Buffers

Small, fast staging area for active or imminent KV blocks. Useful for next-token attention reads and avoiding exposed HBM/CXL stalls.

05

Conceptual Block-Level Layout

+-----------------------------------------------------------+ | KVFabric Accelerator | |-----------------------------------------------------------| | Runtime Command Queue | Telemetry / Counters | |-----------------------------------------------------------| | Policy Microcontroller | Residency Prediction Engine | |-----------------------------------------------------------| | KV Metadata SRAM | Deadline / Reuse Metadata | |-----------------------------------------------------------| | DMA Engines: HBM DMA | CXL DMA | DRAM DMA | |-----------------------------------------------------------| | Compression Cluster: INT8 | INT4 | Sparse KV | Rehydrate | |-----------------------------------------------------------| | SRAM Staging Banks | Attention Scratchpad Interface | |-----------------------------------------------------------| | PCIe / CXL Interface | NoC / Accelerator Fabric Port | +-----------------------------------------------------------+
06

Memory Hierarchy Specification

TierRoleTypical contentsPolicy concern
SRAMUltra-fast stagingCurrent/next KV blocks, attention scratchpad, DMA buffersVery limited capacity; must be deadline-aware.
HBMHigh-bandwidth active memoryModel weights, active KV, activationsExpensive and finite; pressure rises with context and concurrency.
CXL / pooled memoryCapacity expansion tierWarm/cold KV, compressed KV, less urgent blocksHigher latency; useful only with prefetch and overlap.
Host DRAMLarge spill/control tierEvicted KV, metadata backing, traces, runtime queuesCan rescue capacity but may add exposed latency if accessed synchronously.
07

Overlap-Aware Execution Model

KVFabric’s value is not simply moving KV to cheaper memory. The key is whether movement and rehydration can be hidden behind accelerator compute.

Time ───────────────────────────────────────────────────────> GPU Compute: [ Token N compute ][ Token N+1 compute ][ Token N+2 compute ] KVFabric DMA: [ Prefetch N+1 ][ Prefetch N+2 ] Rehydration: [ Rehydrate N+1 ][ Rehydrate N+2 ] Exposed Stall: [ only uncovered transfer ]

Design target: reduce exposed transfer latency, not merely total transfer volume. A movement policy is only valuable if it improves the critical path or improves density at acceptable latency cost.

08

Runtime API Surface

A future runtime integration would expose KV intent to the orchestration layer. The API below is conceptual but makes the hardware/software contract concrete.

fabric.reserve(request_id, layer_id, head_id, token_start, token_count, size_bytes) fabric.mark_hot(block, expected_reuse_steps=2) fabric.prefetch(blocks, target_tier="SRAM", deadline_ns=250_000) fabric.compress(blocks, policy="int8", max_exposed_latency_ns=50_000) ptr = fabric.materialize(block, target_tier="SRAM", blocking=False) fabric.release(block)
09

What This Is — and Is Not

Current repository scope

  • Architecture prototype
  • Systems simulator
  • Control-plane model
  • Policy experimentation framework
  • Memory hierarchy study

Not currently implemented

  • No production silicon
  • No final hardware
  • No RTL/FPGA datapath
  • No real GPU kernels
  • No production runtime integration
10

Roadmap: Simulator to Accelerator Architecture

StageScopeStatus
Stage 1Simulator, memory tiers, workload models, residency policiesCurrent
Stage 2Trace-driven replay, policy comparison, overlap refinement, visualizationIn progress
Stage 3Runtime API contract, integration shims, vLLM/SGLang trace adaptersPlanned
Stage 4Cost-aware tiering, multi-tenant workloads, hardware-grounded profilesPlanned
Stage 5FPGA/datapath experiments, compression engines, DMA offload studiesFuture research
Stage 6Production die studies, final hardware architecture, silicon implementation researchLong-term exploration
11

Key Technical Questions

Granularity

What is the optimal KV block size for staging, compression, and metadata overhead?

Policy

When should the system prefer SRAM residency, HBM residency, CXL demotion, or compression?

Overlap

How much transfer and rehydration time can be hidden under token compute?

Economics

When is trading latency for HBM capacity economically beneficial?

Runtime hooks

What minimal API must serving runtimes expose to make KV orchestration practical?

Accelerator design

Which blocks are worth hardware acceleration: DMA scheduling, compression, metadata lookup, or staging?

12

Recommended Repo Integration

Add this specification as:

docs/accelerator_mapping_spec.html README.md → link: “Accelerator Mapping Technical Spec” blog/kv-cache-is-the-new-memory-hierarchy.md → embed selected sections results/README.md → link diagram + latency breakdown

For the pinned X post or README hero, use the simplified line: “GPU does math. KVFabric studies how future systems may orchestrate inference memory.”