Framework
07 · Inference & Serving Architecture
Speedup: 2-3xBlock K: 4-8Output: lossless
Speccast Relay
A small drafter sprints ahead; the sovereign model verifies in one pass.
Grounded inSpeculative decoding (draft-and-verify decoding), including self-speculative / Medusa-style multi-head drafting.
Speccast Relay is Hyperbridge's draft-and-verify decoding loop that pairs a lightweight drafter with the full target model to emit multiple tokens per forward pass. It exists to cut wall-clock latency without changing the output distribution of the large model.
How it works
A small, cheap drafter model autoregressively proposes a block of K candidate tokens. The large target model then scores that whole block in a single batched forward pass, computing its own next-token probabilities at each position. A modified rejection-sampling test accepts the longest prefix where the draft agrees with the target distribution, then resamples the first rejected token from a corrected residual distribution. Accepted tokens are committed; the loop restarts from the new position. Because verification is parallel over the block, throughput rises with the acceptance rate while output is provably distribution-equivalent to plain sampling from the target.
Components
- Drafter: small aligned model or Medusa-style extra heads
- Verifier: full target model, single parallel forward pass
- Rejection-sampling acceptance test (distribution-preserving)
- Residual resample on first mismatch
- Block length K + acceptance-rate telemetry
Use whenReach for it when single-stream latency on a large model matters and you can afford a cheap, well-aligned drafter. Best when drafts and target agree often (code, structured text, low-temperature decoding).
Architecture
07 · Inference & Serving Architecture
Block: 16 tokWaste: <4%Prefix: COW-shared
Pagewright KV
Virtual-memory paging for the KV cache: no fragmentation, near-zero waste.
Grounded inPagedAttention-style KV-cache management with block-level paging, copy-on-write sharing, and near-zero memory fragmentation.
Pagewright KV is a KV-cache memory manager that stores attention keys and values in fixed-size non-contiguous blocks addressed through a per-sequence block table. It exists to eliminate the internal and external fragmentation that wastes GPU memory under naive contiguous KV allocation.
How it works
Each sequence's KV cache is split into fixed-size blocks (e.g. 16 tokens) that live anywhere in a global GPU block pool. A per-sequence block table maps logical token positions to physical blocks, so the attention kernel gathers KV by indirection instead of assuming contiguity. Blocks are allocated on demand as sequences grow, so only the last block of each sequence is ever partially full, bounding waste to under one block per sequence. Shared prefixes (system prompts, beam siblings) point at the same physical blocks via copy-on-write, duplicating only on divergent writes. The result packs far more concurrent sequences into the same VRAM.
Components
- Fixed-size KV blocks in a global pool
- Per-sequence block table (logical to physical)
- Paged attention gather kernel
- Copy-on-write prefix sharing
- On-demand allocator + free list
Use whenUse it as the serving memory layer whenever you batch many concurrent sequences with variable, unpredictable lengths or share long common prefixes and need to maximize sequences-per-GPU.
Framework
07 · Inference & Serving Architecture
Throughput: up to 20x vs staticSched: per-iterationLatency: tail-optimized
Flowbatch Loom
Sequences join and leave the batch every step; the GPU never idles.
Grounded inContinuous (in-flight / iteration-level) batching with a token-budget scheduler for LLM serving.
Flowbatch Loom is an iteration-level scheduler that admits and retires requests at every decode step rather than per-request. It exists to keep GPU utilization high under bursty, heterogeneous traffic where naive static batching stalls on the longest sequence.
How it works
Instead of locking a batch until every sequence finishes, the scheduler re-forms the running batch on each forward iteration. Finished sequences are evicted the moment they hit a stop token, freeing slots that newly arrived prompts fill immediately. A token budget per step bounds compute, and prefill (prompt) work is interleaved with or chunked alongside decode work so long prompts don't block short generations. Combined with paged KV, admission is gated by available KV blocks, with preemption/recompute as a fallback under pressure. This raises effective throughput and lowers tail latency because the device processes a near-full batch every step regardless of length skew.
Components
- Iteration-level admit/retire loop
- Per-step token budget
- Prefill-decode interleaving / chunked prefill
- KV-block-aware admission control
- Preemption + recompute under memory pressure
Use whenDeploy it as the request scheduler for any online multi-tenant LLM endpoint with variable prompt and output lengths where you want high throughput without sacrificing time-to-first-token.
Architecture
07 · Inference & Serving Architecture
Mesh: TP x PPTP link: NVLinkBubble: micro-batched
Shardloom Mesh
Split each layer across GPUs, stage the layers in a pipeline — weave both.
Grounded inCombined tensor parallelism (intra-layer sharding with all-reduce) and pipeline parallelism (inter-layer staging with micro-batching) for multi-GPU model execution.
Shardloom Mesh is a hybrid model-parallel execution layout that shards weights within each layer across a group of GPUs and stages groups of layers across pipeline ranks. It exists to serve models too large for one device while keeping both compute and interconnect efficiently saturated.
How it works
Tensor parallelism splits each layer's matmuls along the hidden dimension: attention heads and MLP columns are partitioned across a TP group, and an all-reduce (or reduce-scatter/all-gather) recombines partial results at well-defined boundaries, so per-GPU activations and weights shrink with minimal latency cost on a fast intra-node link. Pipeline parallelism then assigns contiguous layer stages to different GPU groups; activations flow stage to stage as point-to-point sends. Requests are split into micro-batches so multiple stages run concurrently, hiding pipeline bubbles. TP runs over high-bandwidth NVLink within a node; PP spans nodes where bandwidth is lower. The 2D mesh maps a model onto TP_size x PP_size devices.
Components
- Tensor-parallel intra-layer shards + all-reduce
- Pipeline-parallel layer stages
- Micro-batching to fill pipeline bubbles
- Topology-aware placement (NVLink intra, network inter)
- Collective comm schedule (all-reduce / P2P sends)
Use whenReach for it when a model exceeds single-GPU memory and you have a multi-GPU (often multi-node) cluster: TP within fast-linked nodes, PP across nodes.
Terminology
07 · Inference & Serving Architecture
Mem: O(N)Exact: yesBottleneck: HBM IO
Castfuse Kernel
IO-aware attention that never writes the full score matrix to HBM.
Grounded inFlashAttention-style IO-aware, tiled, fused exact attention with online softmax (no materialized N-by-N score matrix).
Castfuse Kernel is Hyperbridge's term for an IO-aware, fused attention kernel that computes exact attention tile-by-tile in fast on-chip SRAM. It exists because attention's bottleneck is memory traffic, not FLOPs, and materializing the full score matrix in HBM is what makes long contexts slow and memory-hungry.
How it works
Queries, keys, and values are loaded in blocks into on-chip SRAM. For each query tile, the kernel streams over key/value tiles, computing partial scores and accumulating the output with an online (running-max, running-sum) softmax that rescales as it goes, so the N-by-N attention matrix is never written to high-bandwidth memory. Softmax normalization, masking, and the score-times-value product are fused into one pass, cutting HBM reads/writes from quadratic to near-linear in sequence length. Memory footprint drops to linear, and the backward pass recomputes tiles on the fly instead of storing them. Numerics remain exact — it is an IO reordering, not an approximation.
Components
- SRAM tiling of Q/K/V blocks
- Online (streaming) softmax with running max/sum
- Fused score-mask-softmax-value pass
- Recompute-in-backward to avoid storing scores
- Linear HBM traffic + linear memory in seq length
Use whenUse it as the attention primitive for long-context training and inference, or anytime attention is memory-bandwidth-bound and you need exact (not approximate) results with a smaller footprint.