The article discusses a comprehensive approach to optimizing the Time To First Token Sent (TTFTS) in large language model (LLM) inference, focusing on reducing cold-node startup times for models running on Kubernetes with NVIDIA GPUs. The optimization strategy is divided into six layers:
-
Platform Fixes:
- Use pre-compiled drivers and libraries instead of compiling them at runtime.
- Optimize Docker image transfer using parallel pull to reduce the time from minutes to seconds.
-
Kubernetes Configuration:
- Utilize Karpenter for efficient node provisioning, ensuring nodes are provisioned with exactly the required hardware resources without unnecessary overhead.
-
Image Optimization:
- Use large container images that include necessary dependencies and configurations pre-installed, reducing the need for runtime installations or compilations.
-
Model Weights Download:
- Optimize S3 downloads by splitting model files into small chunks (e.g., 4 GB) and downloading them concurrently to saturate network bandwidth.
- Implement aggressive timeouts and retries for slow requests to avoid bottlenecks caused by stalled connections.
-
GPU Kernel Compilation Cache:
- Leverage the
torch.compilecache, storing compiled CUDA kernels on
- Leverage the
Read the full article at The New Stack
Want to create content about this topic? Use Nemati AI tools to generate articles, social posts, and more.



