Back to directory

nanoPD

A from-scratch inference engine that separates the prefill and decode phases of LLM generation onto dedicated GPUs, avoiding the interference between the two phases that limits throughput when they share hardware.

nanoPD

nanoPD implements a custom paged KV cache, chunked prefill, a hand-written CUDA paged-attention kernel, multi-GPU KV cache transfer, and an adaptive router that decides per request whether to run the prefill-heavy or decode-heavy phase together or apart, based on an analytical cost model.

All three serving strategies it implements and benchmarks, collocated, disaggregated and adaptive, are measured against a Poisson-arrival load generator with configurable arrival rate, workload distribution, warmup and drain phases. The router's cost-model parameters, such as prefill and decode speed, interference coefficient and inter-GPU bandwidth, are measured live on the actual hardware at startup rather than assumed in advance.

It is written in Python with a custom CUDA kernel.

More in Inference

See all 770
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • Lifeboat

    iterate.ai

    A local inference server that puts an OpenAI- and Anthropic-compatible API in front of open-weight language models running on hardware you control, from a laptop to a GPU cluster.

  • Claude S40

    github.com

    An unofficial Claude chat client for 2007-era Nokia Series 40 phones, built as a Java ME app plus a small Go relay server, with web search, reading mode and saved chats.