[data][llm] Enable autoscaling GPU stages#61130
Merged
kouroshHakha merged 2 commits intoFeb 19, 2026
Merged
Conversation
Signed-off-by: Jeffrey Wang <jeffreywang@anyscale.com>
Contributor
There was a problem hiding this comment.
Code Review
The pull request enables autoscaling for GPU stages in the Ray Data LLM pipeline, which is crucial for supporting preemption and improving elasticity. The changes involve updating documentation and code comments to reflect this new behavior, as well as modifying the get_concurrency method call in vllm_engine_proc.py and sglang_engine_proc.py to enable autoscaling. A new test case test_vllm_autoscaling_no_starvation has also been added to verify that chained vLLMEngineProcessor instances with autoscaling concurrency can run without starving each other. The changes are well-aligned with the objective of enabling autoscaling for GPU stages and improving the overall elasticity of the LLM pipeline.
e5d1d2e to
dee5c51
Compare
kouroshHakha
approved these changes
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
To support preemption, the entire Ray Data LLM pipeline must be auto-scalable. Currently, GPU stages rely on fixed actor pools which limits elasticity.
In Ray Data, resources are allocated in two phases to prevent starvation:
Phase 1: Reservation: Each operator gets
reservation_ratio * global_limits / num_ops(default 50%), clamped tomin_resource_usage(frommin_size) andmax_resource_usage(frommax_size). Upstream operators are prioritized if resources are insufficient because downstream ops can wait for upstream ops to complete and release resources.ray/python/ray/data/_internal/execution/resource_manager.py
Lines 803 to 819 in f1a1039
Phase 2: Shared Allocation: Remaining resources are allocated in reverse topological order (downstream first). Each operator receives remaining_shared / (num_ops - i), with borrowing allowed for operators below min_scheduling_resources. Total allocation is capped at max_resource_usage.
ray/python/ray/data/_internal/execution/resource_manager.py
Lines 967 to 978 in f1a1039
All operators are guaranteed at least min(reservation_minimum, min_replicas) resources, and downstream operators get priority in shared allocation. Tune via RAY_DATA_OP_RESERVATION_RATIO (default: 0.5). Starvation is not a concern in chained processors.
ray/python/ray/data/context.py
Line 210 in f1a1039
Related issues
Additional information