โ† All Projects

Systems & AI Infrastructure

LightServe

High-Throughput LLM Inference Engine

CUDATritonPagedAttentionSpeculative DecodingPythonC++gRPC
๐Ÿ”’ Private Repo

Problem

Vanilla PyTorch LLM generation suffers from KV-cache memory fragmentation and wastes GPU compute when batching requests of variable sequence lengths.

Solution

Built a custom inference engine implementing PagedAttention for virtual KV-cache paging, iteration-level continuous batching, and a speculative decoding loop using a 100M draft model.

Architecture

gRPC server with token-streaming; scheduler with dynamic batching; block-paged KV-cache memory manager; custom Triton attention kernels; speculative verification logic with rollback.

Real-World Impact

Benchmarked at 3.4x higher throughput over HuggingFace generate() under concurrent load, with 58% reduction in GPU memory fragmentation and sub-80ms TTFT at batch sizes of 32.

Challenges Faced

Implementing online softmax normalization within tiled SRAM processing across non-contiguous KV-cache pages.

Key Learnings

Deep understanding of GPU memory hierarchy (HBM vs SRAM), memory-bandwidth vs. compute-bound regimes, and roofline model analysis.

Engineering Metrics

3.4x throughput over HF generate()58% KV-cache memory reductionTTFT < 80ms @ batch=323.1x speculative token acceptance rate

Demo / Screenshots

Screenshots coming soon: contact me for a demo

โ† Previous

VulnMapper

Next โ†’

KernelForge