llm-inference-optimizer
A distributed LLM serving platform that makes LLaMA-3 & Mistral answer faster, cheaper, and at higher volume.
2.3×
throughput vs FP32 baseline
−38%
GPU memory
p50–p99
tail latency, tracked & tuned
The problem. Naive LLM serving runs one request at a time in FP32 — GPUs sit idle between requests and memory is wasted, making inference slow and expensive.
- ▸Dynamic batching: concurrent requests merged into a single forward pass within a max_wait_ms window
- ▸Explicit KV-cache decode loop with a memory estimator for OOM-safe admission control
- ▸FP16/BF16 mixed precision with automatic CPU→FP32 fallback
- ▸Tensor parallelism across GPUs via DeepSpeed, with async batching scheduler and admission control for backpressure
- ▸Prometheus + Grafana observability; deployed on GCP via GKE with horizontal pod autoscaling for zero-downtime serving
architecture sketch
HTTP ─▶ FastAPI ─▶ InferenceEngine ─▶ DynamicBatcher ─▶ ModelBackend
│ │ │
/metrics async queue + prefill + KV-cached
(Prometheus) max_wait window decode, FP16/BF16 · TP Field note: Inference cost is an engineering problem, not a hardware bill you just pay.