AI Today

Reducing Cold Starts in Amazon SageMaker HyperPod with Model Caching

A new feature streamlines serving large models in cloud environments.

Reducing Cold Starts in Amazon SageMaker HyperPod with Model Caching — article image

The Full Story

Amazon has introduced a new feature for Amazon SageMaker HyperPod that addresses the cold start latency issue experienced during the inference of large language models (LLMs). When deploying a sizeable LLM, users typically face significant delays due to the requirement of downloading both the inference server container image and the model weights from their storage backend. These delays can extend to 30 minutes or more for large models like DeepSeek-R1, which is over 600 GB in size. The typical cold start scenario has each new pod going through a time-consuming download cycle whenever traffic spikes, which dramatically hinders autoscaling efficiency.

Model caching significantly improves this experience by proactively pre-loading model weights and container images onto cluster nodes even before the pods are actually needed. This means that when a pod starts, it can pull information from local NVMe storage at speeds around 7 GB/s, leading to rapid availability of inference capability in a matter of seconds rather than minutes. In the presence of large volumes of incoming requests, this function allows new pods to start serving traffic almost instantly.

To understand the impact of this development, consider the previous process: when an inference pod starts without caching, it first needs to fetch the container image from the Amazon Elastic Container Registry (ECR). This process alone can take between 5 to 7 minutes for multi-gigabyte images. Once the image is available, the inference server then must download the associated model weights – a process which, for a 145 GB model, could take an additional 20 minutes based on network conditions. Under heavy load, such as with five new pods requested by a HorizontalPodAutoscaler, the cumulative delay can be substantial, severely affecting the service responsiveness.

With model caching, the bottleneck of initial downloads is avoided. The caching features include both a 'weights cache' and an 'image cache.' The weights cache ensures that model weights are locally stored on the nodes prior to the pod's activation, while the image cache ensures the container images are also readily available. Both caches work synergistically; should there be instances where a pod is placed on a node without pre-cached data, it will still operate accordingly, pulling from the original storage sources with no recorded degradation in performance.

This innovation opens a new chapter for cloud-based AI deployments, focusing on efficiency and speed in operations. With increased demands for quicker processing times and the continuous scaling of AI solutions, such advancements are not just beneficial, but essential for the future of machine learning applications on AWS platforms. As usage increases and models escalate in complexity and size, model caching serves as a crucial tool for maintaining performance standards. The gradual transition toward lower latency and improved operational capabilities marks a significant forward step for users requiring high-performance machine learning solutions.

Why It Matters

The introduction of model caching is critical for improving response times and operational efficiency in AI applications, which is vital for businesses relying on swift data processing and real-time insights in a competitive landscape. This enhancement addresses major delays faced by users when deploying large models, making cloud services more efficient at scale.

What's Next

Users can expect further enhancements and potential updates from AWS as they refine the capabilities of the Amazon SageMaker platform, likely focusing on improving user experience in large model deployments. Continued user feedback will likely shape future iterations of model caching and related features in upcoming releases.

Sources