Tools & repositories
40 tools · 9 categories
vLLM
vLLM Project
Runs an open model as an API and groups requests to keep GPUs busy.
Use it when you want to serve your own model to many users on one or more GPUs. It is a useful starting point for measuring capacity.
Getting started
Start with
vllm serve <model>and watch what--max-num-seqs,--max-model-len, and--gpu-memory-utilizationdo to the KV cache budget the engine prints at startup. Readdocs/design/arch_overview.mdand then the V1 scheduler invllm/v1/core/sched/scheduler.pyto see how continuous batching and preemption are actually decided. The trap is tuning flags on a chat workload and shipping the result to a long-prompt one; the two are bottlenecked in different places.SGLang
SGLang Project
Runs models while reusing work from shared prompts and supporting structured responses.
Use it when many requests begin with the same instructions, such as an agent repeatedly using the same tools or a chatbot with a long system prompt.
Getting started
Launch with
python -m sglang.launch_server, send the same system prompt twice, and read the cache hit rate in the server log to see radix caching pay off. The scheduler inpython/sglang/srt/managers/scheduler.pyand the cache inpython/sglang/srt/mem_cache/radix_cache.pyare the two files worth reading end to end. The trap is benchmarking with random prompts; radix caching only wins when traffic shares prefixes, so use a workload that looks like yours.TensorRT-LLM
NVIDIA
NVIDIA’s toolkit for running language models with GPU-specific optimizations.
Use it when you serve a supported model on NVIDIA GPUs and want to test whether specialized kernels and lower precision improve speed.
Getting started
Start with
trtllm-serveand the LLM API (tensorrt_llm.LLM) rather than building engines by hand; the manual build step is where most first attempts die. Runtrtllm-benchon the same model in BF16 and FP8 to see what compiled kernels and low precision buy on Hopper. The trap is assuming a model that runs in vLLM runs here; check the supported models list first, and with the TensorRT backend expect a rebuild whenever the max batch size or sequence length changes.llama.cpp
ggml-org
Runs language models locally using compact GGUF model files.
Use it when you want to run a model on a CPU, a Mac, or a consumer GPU and control how much memory it uses.
Getting started
Build it, run
llama-clion a GGUF model, then readggml/src/ggml-quants.cto see exactly how a Q4_K block stores its scales and minimums.llama-servergives you an OpenAI-shaped endpoint in one process, which makes it the easiest thing to point a benchmark at. The trap is reading its throughput as a serving baseline; it batches poorly next to vLLM, because its design is about fitting on one device, not saturating a GPU.Ollama
Ollama
Downloads, manages, and runs models with a local chat interface and API.
Use it when you want to try a model or connect it to a local app without assembling a serving stack yourself.
Getting started
Run
ollama run llama3.2, thenollama show --modelfile llama3.2to see how the Modelfile encodes the chat template, stop tokens, and parameters that most serving bugs come from. The/api/chatendpoint is a good first target for client code before you point it at a real engine. The trap is treating it as a server; it loads one model at a time with a short keep-alive, and concurrency is capped byOLLAMA_NUM_PARALLEL.FlashAttention
Dao-AILab
Computes attention while moving less data between GPU memory and the processor.
Use it when attention uses too much memory or time, and your model supports this implementation. Start with your framework’s integration.
Getting started
Read the FlashAttention-2 paper's forward pass section first, then
csrc/flash_attn/src/flash_fwd_kernel.hwith the paper beside it; the tiling loop and the online softmax rescale map one to one. Thehopper/directory holds FlashAttention-3, and that is where warp specialization and TMA show up. The trap is opening the kernel without the paper; the code is templated to the point where the algorithm is invisible without the math in front of you.FlashInfer
FlashInfer AI
Provides GPU building blocks for attention, model caches, and choosing the next token.
Use it when you are building or modifying a serving engine and need fast operations that work with its cache layout.
Getting started
Start with
BatchDecodeWithPagedKVCacheWrapperin the Python API and the docs page on the paged KV cache layout; once the indptr and indices arrays make sense you understand how every engine addresses KV blocks. Then read the cascade inference doc to see how a shared prefix gets its own attention pass. The trap is mixing up the wrapper's plan and run stages; it plans once per batch shape, and reusing a plan for a different batch is a silent correctness bug.CUTLASS
NVIDIA
Provides NVIDIA GPU building blocks for matrix multiplication and related operations.
Use it when a specific matrix operation is a bottleneck and you need control over how it uses tensor cores. This is for kernel development.
Getting started
Skip the top level and start with the CuTe quickstart under
media/docs, then run and readexamples/cute/tutorial/sgemm_1.cu; you need CuTe layouts before any GEMM template makes sense. After that,examples/48_hopper_warp_specialized_gemmshows the TMA plus warp-specialized pipeline the engines use. The trap is openinginclude/cutlass/gemm/cold; the template depth is built for generated code, not for reading.Triton
OpenAI
Lets you write GPU kernels using a Python-based language.
Use it when you want to combine several tensor operations into one GPU program to reduce memory traffic and launch overhead.
Getting started
Work through
python/tutorials/in order, starting with01-vector-add.pyand slowing down at03-matrix-multiplication.py; the program id and block pointer model is the whole mental shift. Then read one real kernel, such as vLLM's fused MoE kernel, and notice how the@triton.autotuneconfigs encode hardware assumptions. The trap is believing the compiler handles memory layout for you; a badtl.loadaccess pattern is still a bad access pattern.ThunderKittens
Stanford Hazy Research
A C++ library for writing GPU kernels around small tiles of data.
Use it when you already know GPU programming and want to build or study concise attention and matrix-multiplication kernels.
Getting started
Read the README's explanation of register, shared, and global tiles, then the attention kernel under
kernels/attn/with the FlashAttention-3 paper beside it; it is a few hundred lines doing the same work. What you take away is how a load, compute, store pipeline reads when it is written as tile operations instead of pointer arithmetic. The trap is treating it as portable; it targets Hopper and Blackwell and the abstractions assume that hardware.LLM Compressor
vLLM Project
Creates compressed model checkpoints for inference, including formats used by vLLM.
Use it when your model needs less GPU memory and you want to prepare a lower-precision checkpoint before serving it.
Getting started
Run
examples/quantization_w8a8_fp8first; FP8 needs no calibration data and finishes in minutes, which makes it the right first quantization. Then readexamples/quantization_w4a16to see where the calibration set and theoneshot()recipe come in, and load the result withvllm serveto confirm the compressed-tensors config is picked up. The trap is evaluating on perplexity alone; run your own eval set, because W4 damage shows up on tasks that need exact recall.GPTQModel
ModelCloud
Compresses model weights with GPTQ and provides ways to run the resulting model.
Use it when you need a smaller GPTQ checkpoint. Check that the output format and kernels work with your chosen serving engine.
Getting started
Follow the README's
GPTQModel.loadand.quantize()example and pay attention togroup_sizeanddesc_actin theQuantizeConfig; they decide both accuracy and which inference kernel can load the result. Then serve the output in vLLM and find the log line naming the quantization backend it picked, because Marlin only lights up for specific configs. The trap is assumingdesc_act=Trueis a free accuracy win; it costs kernel compatibility and often speed.torchao
PyTorch
Adds lower-precision weights and operations to PyTorch models.
Use it when you are working directly in PyTorch and want to test quantization without moving to a separate serving engine.
Getting started
Start with
quantize_(model, Int8WeightOnlyConfig())on a small model and benchmark decode with and withouttorch.compile; the compile step is where the speed-up actually comes from. Then readtorchao/quantization/README.mdfor the table of which config targets which hardware and dtype. The trap is measuring the quantized model in eager mode and concluding quantization is slow; the eager path runs reference kernels.bitsandbytes
bitsandbytes foundation
Loads supported models with 8-bit or 4-bit weights through Transformers.
Use it when a model does not fit in memory and you want to try a smaller representation without first preparing a separate checkpoint.
Getting started
Load a model with
BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4")and compare memory and tokens per second against BF16 on the same GPU. Then read the LLM.int8 paper's outlier section to understand why the mixed-precision decomposition exists and why it costs speed. The trap is reaching for it in a serving path; it is the right tool for fitting a model on a small GPU or for QLoRA, and the wrong one when throughput matters.EAGLE
SafeAI Lab
Trains a small draft component that proposes tokens for a larger model to verify.
Use it when you want to experiment with speculative decoding to reduce response time. Measure how often the larger model accepts the suggestions.
Getting started
Read the EAGLE-2 paper's dynamic tree section, then trace the tree construction and verification code under
eagle/model/to see how one draft step produces candidates and how acceptance is decided. The released draft heads on Hugging Face are what vLLM and SGLang load, so try one through vLLM's--speculative-configbefore training your own. The trap is trusting the paper's speed-up; acceptance rate depends on your domain and temperature, so measure it on your traffic.Speculators
vLLM Project
Provides tools to train, evaluate, and package speculative-decoding drafts for vLLM.
Use it when you want to build a draft for your target model and compare its quality before integrating it into serving.
Getting started
Start with the README's train and convert flow, then look at the
speculators_configblock written into the draft checkpoint; that block is what vLLM reads to attach the draft to its verifier. Convert an existing EAGLE-3 checkpoint before training a new one, so you confirm the serving side works first. The trap is training a draft on generic text; drafts trained on the verifier's own outputs for your domain accept far more tokens.Medusa
FasterDecoding
Adds prediction heads that propose several possible next tokens for one verification step.
Use it when you want to learn how a model can check a tree of token suggestions instead of generating strictly one token at a time.
Getting started
Read
medusa/model/medusa_model.pyand thengenerate_candidates,tree_decoding, andevaluate_posteriorinmedusa/model/utils.py; together they are the clearest short implementation of tree attention masks and acceptance. Follow the README's training recipe on a small model to see how cheap the heads are to train. The trap is deploying it in 2026; EAGLE supersedes it in every engine, so treat this as the textbook, not the tool.GuideLLM
vLLM Project
Sends test traffic to a model API and measures response time and throughput.
Use it when you need to find how many requests your server can handle before answers start arriving too slowly.
Getting started
Run
guidellm benchmark --target http://localhost:8000 --rate-type sweepagainst a vLLM server and read the table row by row; the rate where TTFT and inter-token latency bend upward is your saturation point. Then rerun with--dataset to prompt and output token counts that match your traffic. The trap is quoting the synthetic default workload; the numbers only mean something once the token length distribution matches production.AIPerf
NVIDIA
Generates load and reports performance for model-serving endpoints.
Use it when you want to compare servers under the same traffic and measure both response speed and how many requests meet your latency target.
Getting started
Run
aiperf profileagainst any OpenAI-compatible endpoint with--streaming, then add--goodputwith your TTFT and inter-token SLOs and watch how many requests actually meet them. That goodput number, not raw throughput, is what a capacity plan should be built on. The trap is comparing its output to GuideLLM's without matching token distributions and warmup; the two tools default differently.MLPerf Inference
MLCommons
A benchmark suite with shared workloads, measurement rules, and reference implementations.
Use it when you need a standardized hardware comparison or want to reproduce a published benchmark under the same rules.
Getting started
Read the inference rules document first, specifically the Server scenario's latency constraint and the definition of a valid run; it is the clearest statement anywhere of what a defensible throughput claim requires. Then open
language/llama2-70bto see how a submission wires LoadGen to an engine. The trap is attempting a full submission; borrow LoadGen and the rules and ignore the rest unless you are actually submitting.Nsight Systems
NVIDIA
Shows a timeline of CPU work, GPU work, memory copies, and communication.
Use it when a request is slow but you do not yet know why. Use the timeline to find idle gaps, transfers, or work that should overlap.
Getting started
Capture a short decode run with
nsys profile -t cuda,nvtx,osrt --capture-range=cudaProfilerApiand bracket the region you care about withtorch.cuda.profiler.start()andstop()so the trace stays small. Open it in the GUI and look for gaps between kernels on the CUDA stream; those gaps are scheduler and Python overhead, and they are what CUDA graphs remove. The trap is profiling the first hundred steps; warmup and compilation dominate them, so skip ahead.Nsight Compute
NVIDIA
Measures what happens inside an individual NVIDIA GPU kernel.
Use it when you have found a slow kernel and need to understand whether memory access, computation, or stalled threads are limiting it.
Getting started
Profile one kernel with
ncu --set full -k regex:<kernel name> --launch-skip N --launch-count 1and open the Details page; the Speed of Light section says whether you are memory-bound or compute-bound, and the roofline chart shows how far from the ceiling you sit. Then read Warp State Statistics to see why threads are stalled. The trap is running it without a kernel filter; it replays every launch, and a serving step has thousands.PyTorch profiler
PyTorch
Connects PyTorch operations to the CPU and GPU work they trigger.
Use it when you want to locate expensive operations in a PyTorch program before investigating individual kernels.
Getting started
Wrap a few decode steps in
torch.profiler.profile(activities=[CPU, CUDA]), export the trace, and open it in Perfetto; the CPU row above the GPU row shows exactly when the GPU is waiting on Python.prof.key_averages().table(sort_by="cuda_time_total")is the fastest way to find the top kernels. The trap is leavingrecord_shapesandwith_stackon for a long run; the overhead changes the timing you are trying to measure.nvitop
Xuehai Pan
Shows live GPU memory, utilization, and running processes in your terminal.
Use it when you need a quick answer to which process is using the GPU or whether your job is keeping it busy.
Getting started
Run
nvitopwhile a benchmark is going and watch whether SM utilization sits near 100 percent or oscillates; oscillation during decode usually means the batch is too small or the scheduler is the bottleneck. The Python API (nvitop.Device) is a two-line way to log memory and utilization from a test harness. The trap is reading utilization as efficiency; a kernel can keep the SMs busy at a fraction of peak bandwidth, which is what Nsight Compute is for.DCGM exporter
NVIDIA
Exposes NVIDIA GPU health and utilization metrics to Prometheus.
Use it when you operate GPU servers and need dashboards or alerts for memory use, activity, temperature, and hardware errors.
Getting started
Deploy it with the Helm chart, then read the default counter list in
etc/default-counters.csv; the difference betweenDCGM_FI_DEV_GPU_UTILandDCGM_FI_PROF_SM_ACTIVEis the difference between busy and useful. Alert onDCGM_FI_DEV_XID_ERRORSbefore anything else. The trap is dashboarding utilization alone; add tensor core activity and memory bandwidth or you cannot tell a saturated GPU from a stalled one.Triton Inference Server
NVIDIA
Serves models from different frameworks behind a common API. Separate from the Triton kernel language.
Use it when your service runs several model types, such as vision and language, and needs shared model loading, batching, and serving.
Getting started
Start with the model repository layout and one
config.pbtxt; thedynamic_batchingandinstance_groupblocks are where most throughput decisions live. Then read the ensemble and BLS docs to see how a tokenizer, an LLM, and a post-processor get chained in one request. The trap is putting an LLM behind it and expecting vLLM's scheduler; use the vLLM or TensorRT-LLM backend and let that backend own batching, or you get static batching.KServe
KServe Project
Deploys and manages model-serving workloads on Kubernetes.
Use it when your team already uses Kubernetes and needs autoscaling and controlled traffic shifts between model versions.
Getting started
Deploy one
InferenceServicewith the Hugging Face runtime, then read the Deployment and Service it generates to see what the CRD expands into. The autoscaling and canary rollout docs show what a platform team needs from an engine: a health endpoint, a metrics endpoint, and a predictable startup time. The trap is scale-to-zero on an LLM; a cold start that loads 70 GB of weights takes minutes, so setminReplicasto at least one for anything user-facing.Ray Serve
Anyscale
Builds scalable model services and multi-step pipelines in Python.
Use it when one request passes through several models or Python processing steps, and those steps need to scale independently.
Getting started
Write one
@serve.deploymentthat wraps a vLLMAsyncLLMEngine, then a second deployment that calls it, and watch requests flow between actors in the Ray dashboard. Theray_actor_optionsandautoscaling_configfields are the whole resource story. The trap is putting per-request Python logic on the same actor as the engine; keep the engine actor busy and put pre- and post-processing in a deployment in front of it.llm-d
llm-d Project
Coordinates distributed model serving on Kubernetes, including routing and cache reuse.
Use it when you need to spread inference across a cluster or put prompt processing and token generation on separate workers.
Getting started
Read the architecture doc, then the guides under
guides/, starting with prefix cache aware routing; the scheduler scoring pods by how much of the prompt they already have cached is the idea to take away. Then follow the P/D disaggregation guide and watch KV move between prefill and decode pods. The trap is reaching for disaggregation first; the guides themselves say prefix-aware routing over a single pool is the first win.NVIDIA Dynamo
NVIDIA
Coordinates inference across GPUs, with routing and transfer of cached model state.
Use it when you are operating a large deployment and want to separate prompt processing from token generation while reusing cached work.
Getting started
Start with the disaggregated serving doc under
docs/and the vLLM backend example underexamples/; run aggregated mode first, then switch to disaggregated and compare TTFT. The KV router doc explains how requests are scored by cached blocks, and the NIXL README shows how KV moves between prefill and decode workers over NVLink or RDMA. The trap is assuming disaggregation lowers cost; it lowers tail latency and only pays for itself at scale, which the docs are honest about.LiteLLM
BerriAI
Puts one API in front of multiple model providers, with routing, fallbacks, and cost tracking.
Use it when your app calls several providers and you want to manage access and spending centrally without rewriting each integration.
Getting started
Run the proxy with a
config.yamlthat lists two deployments under one model name, then read the router docs to see howfallbacks,routing_strategy, and cooldowns decide where a request goes. Put your vLLM server behind it as one deployment and you have the shape most application teams actually consume. The trap is expecting it to fix latency; it adds a hop and its own overhead, and it cannot make a slow backend fast.Vidur
Microsoft
Simulates a model-serving workload to estimate performance under different configurations.
Use it when you want to narrow down GPU and scheduling choices before paying for full experiments. Validate the final choice on real hardware.
Getting started
Run the README's example simulation, then open
vidur/config/to see how a cluster, a model, and a scheduler are specified, andvidur/scheduler/for the replica-level policies. The execution time predictor is the interesting part: the measurements underdata/profiling/are what make simulated latency match real vLLM. The trap is trusting it for a model or GPU it has no profiling data for; the predictor extrapolates and the numbers go soft.llm-analysis
Cheng Li
Estimates model memory use, latency, and throughput from model and hardware settings.
Use it when you need an initial sizing estimate and want to inspect the assumptions behind it before running a benchmark.
Getting started
Run
python -m llm_analysis.analysis infer --model_name <hf id> --gpu_name a100-sxm-80gb --batch_size_per_gpu 8 --seq_len 512 --num_tokens_to_generate 128and compare the printed decode latency to one you measured. Then readllm_analysis/analysis.py; the functions for weight memory, KV cache size, and per-token FLOPs are the formulas the course derives, written down once. The trap is ignoring the efficiency factors; the defaults assume near-peak utilization and real kernels do not get there.GenZ LLM Analyzer
Georgia Tech
Estimates how a language model may perform on different hardware and parallelism setups.
Use it when you want to compare deployment options before testing them, including how many devices to use and how to split the model.
Getting started
Open the hosted app or run it locally, pick a model and a platform, and move the tensor and pipeline parallel degrees while watching TTFT and TPOT; that builds intuition for where communication starts to dominate. Then read the
GenZ/package to see how a platform file encodes compute, bandwidth, and interconnect. The trap is comparing two platforms at the same batch size; pick the batch that meets your latency target on each, then compare throughput.nano-vllm
GeeeekExplorer
A small serving-engine implementation with scheduling and cache management.
Use it when you want to trace how requests become batches and how cached tokens get memory without starting in a large production codebase.
Getting started
Read it in this order:
nanovllm/engine/block_manager.py, thenscheduler.py, thenmodel_runner.py; that sequence is how a request becomes KV blocks, a batch, and a CUDA graph launch. Runbench.pyagainst real vLLM on the same model to see how close a minimal design gets. The trap is thinking the missing 98 percent of vLLM is fat; it is hardware coverage, quantization, and edge cases, and reading this tells you what a core actually needs.Mini-SGLang
SGLang Project
A compact serving engine for studying prompt-cache reuse and overlapping work.
Use it when you want to follow how shared prompts reuse cached state and how scheduling keeps model execution busy.
Getting started
Read the radix cache and the scheduler side by side, then diff the scheduler against nano-vllm's to see where the designs part ways: SGLang overlaps the next batch's CPU scheduling with the current GPU step. The benchmark ablations let you switch overlap scheduling and radix caching off one at a time and watch throughput fall. The trap is reading it before nano-vllm; learn the simpler engine first so the extra machinery has something to contrast with.
llama2.c
Andrej Karpathy
Implements a Llama model’s forward pass and token sampling in a small C program.
Use it when you want to follow every step from model weights to the next token without a deep-learning framework hiding the operations.
Getting started
Read
run.ctop to bottom in one sitting;forward()is the entire forward pass andsample()is the entire decoding loop. Then readrunq.cto see what int8 quantization changes and what it leaves alone. The trap is skimming it as a toy; every engine on this page is doing exactly this plus batching and memory management, and knowing the baseline is what lets you read the others.gpt-fast
PyTorch
A compact PyTorch example of language-model inference optimizations.
Use it when you want to measure what compilation, quantization, or speculative decoding changes in a small program you can modify.
Getting started
Run
generate.pyfour times on the same model: plain, with--compile, with an int8 checkpoint fromquantize.py, and with--speculate_kplus a draft, and write down tokens per second each time. That table is the course's optimization ladder measured by hand. The trap is skipping--compile_prefilland the warmup; the first compiled run is slow and the number you want is the steady state.GPU Puzzles
Sasha Rush
Short Python exercises that teach GPU threads, memory, and parallel operations.
Use it when you are learning how to map work to GPU threads and blocks and want practice with immediate correctness feedback.
Getting started
Open the notebook and do the puzzles in order without skipping; the point of the shared memory and reduction puzzles in the middle is that block boundaries stop being abstract. Each one has a visualizer, so rerun it until the thread picture matches your mental model. The trap is looking at the solutions; the whole value is the hour of confusion before the indexing clicks.
Triton Puzzles
Sasha Rush
Exercises for learning the Triton GPU programming language.
Use it when you want to practice loading blocks of data and writing GPU operations before building your own fused kernel.
Getting started
Do the puzzles in order and sit with the first three until the block model is solid;
tl.arange, masks, and the program id are all of Triton's mental model. The flash attention and quantized matmul puzzles at the end are the same kernels the engines ship, and writing them once is worth more than reading the production versions. The trap is running on CPU with the interpreter and assuming performance intuition transfers; correctness does, timing does not.
Further reading
Documentation & code to explore
30 resources · showing 9
docs.pytorch.org
CUDA semantics
Benchmarking, profiling & correctness
docs.vllm.ai
vLLM - vLLM
Serving engines & runtime internals
docs.nvidia.com
NVIDIA Triton Inference Server — NVIDIA Triton Inference Server
Serving engines & runtime internals
nvidia.github.io
API Reference — TensorRT LLM
Serving engines & runtime internals
docs.vllm.ai
Disaggregated Prefilling (experimental) — vLLM
Batching, scheduling & disaggregation
modal.com
Dynamic batching
Batching, scheduling & disaggregation
huggingface.co
KV cache strategies
KV caches, paging & long context
docs.vllm.ai
prefix caching - vLLM
KV caches, paging & long context
docs.nvidia.com
Efficient GEMM in CUDA — NVIDIA CUTLASS Documentation
GPU programming, GEMM & fusion