TL;DR
CoCoScale introduces a fine-grained, layer-wise dynamic scaling mechanism for online Large Language Model (LLM) serving. Instead of scaling by deploying full-model replicas—which incurs massive cold-start latencies—CoCoScale selectively replicates "hot" transformer layers onto idle resources harvested from underutilized devices. This approach slashes scale-up latency by over 97% and ensures 100% Service Level Objective (SLO) attainment under highly volatile production workloads.
What Problem Does This Paper Address?
Online LLM serving infrastructure frequently encounters highly dynamic traffic spikes and severe workload skewness, where a small fraction of popular models receives the vast majority of requests. Current state-of-the-art serving systems rely on instance-wise scaling, treating the entire LLM as an indivisible unit.
This coarse granularity introduces two major hurdles:
- Prohibitive Cold Starts: Deploying a new full-model replica requires container initialization and loading tens of gigabytes of weights, creating a pronounced temporal lag during sudden traffic bursts.
- Resource Inefficiency: Because systems can only scale in large, integer units (e.g., adding an entire GPU), they often over-provision resources, leaving valuable computing power fragmented and locked up in underutilized instances.
As a result, traditional autoscalers exhibit a "staircase pattern" that fails to keep pace with sharp traffic spikes, leading to frequent SLO violations.
Methods
CoCoScale breaks down the scaling unit from the entire model to individual Transformer layers, introducing three core innovations:
- Layer-wise Replication: Instead of redeploying a full model, CoCoScale replicates a subset of consecutive layers ($N$) from a heavily loaded ("hot") instance onto underutilized ("cold") devices, creating layer-wise data parallelism (DP). Incoming request batches are split into sub-batches and processed concurrently across these partial replicas.
- Optimized Data Transfer (Scatter-then-Exchange): To minimize setup latency, CoCoScale utilizes a bidirectional chunked multicast mechanism based on a ring topology. It leverages the full-duplex capabilities of high-speed interconnects (like NVLink) to broadcast weights rapidly. For dynamic KV caches, it partitions data into fine-grained chunks transmitted via parallel streams, masking communication behind ongoing computation to avoid "resend" conflicts.
- Distance-Aware Unified Scaling: The system features a mathematical modeling framework based on an adaptation of Amdahl's Law to rank candidate configurations. A unified scaling algorithm continuously monitors latency deviations and selects the "nearest" valid configuration using an L1 norm distance metric, minimizing data migration overhead for both scaling up and scaling down.
- CUDA Graph Compatibility: CoCoScale maintains compatibility with static computation graphs by treating each layer replica as an independent, static execution unit and employing a persistent memory pool to eliminate expensive device memory reallocation.
Datasets
The authors evaluated CoCoScale using real-world production request traces:
- Alibaba Trace: A 60-minute production trace characterized by moderate burstiness (average RPS: 1.62, peak RPS: 11).
- Azure Trace: A 130-minute public dataset trace representing a highly intensive and severely bursty scenario (average RPS: 7.09, peak RPS: 23).
- LongBench & Alpaca: Prompts from LongBench were used to preserve realistic long-context behavior during trace evaluations, while the Alpaca dataset was utilized for baseline ablation studies.
Key Insights and Ideas
- Decoupled Communication Overhead: A key "aha moment" is that treating multiple consecutive layers as a monolithic unit confines cross-device transfers exclusively to segment boundaries. This keeps the communication footprint fixed and predictable, regardless of the number of replicated layers ($N$).
- Diminishing Marginal Returns: Ablation studies revealed that while increasing the layer count ($N$) significantly reduces computational latency, the performance gains narrow as $N$ approaches the full model size. This is because non-parallelizable residual components eventually emerge as bottlenecks, validating the choice to scale fractionally rather than fully.
- Exploiting "Cold" Memory: Underutilized GPUs often sit idle with allocated memory. CoCoScale effectively turns these fragmented, cold resources into a hot-pluggable pool, allowing active instances to seamlessly borrow compute cycles without displacing resident models.
Key Results
CoCoScale was tested against standard vLLM (Static) allocations and the Alibaba Autoscaler across Qwen3-8B, 14B, and 32B models:
- 97.9%–99.3% Reduction in Scaling Latency: For a Qwen3-32B model, CoCoScale achieved a P50 scaling latency of just 1.52 seconds, compared to the prohibitive 241.1 seconds required for a traditional full-instance startup.
- 100% SLO Attainment: Under the highly volatile Azure trace, where the Alibaba Autoscaler's SLO attainment collapsed to a mere 0.8%–2.4% due to cold-start delays, CoCoScale maintained perfect 100% SLO compliance.
- Lower End-to-End Latency: CoCoScale reduced average end-to-end latency by 20.7%–28.1% on the Alibaba trace and 43.3%–45.7% on the intensive Azure trace compared to the baseline autoscaler.
Limitations and Future Work
- Interconnect Sensitivity: The current implementation relies heavily on high-speed NVLink bandwidth for rapid layer migration. On slower network topologies (e.g., PCIe 4.0 or standard Ethernet), migration latency would scale proportionally, potentially impacting real-time agility.
- Non-Disaggregated Setting: CoCoScale currently operates within a unified architecture. The authors note that extending layer-wise scaling to disaggregated clusters—where the prefill and decode phases of LLM inference are split onto separate hardware—remains a promising direction for future research.
Summary updated