feat: memory-aware admission controller#207
Closed
Thump604 wants to merge 1 commit intowaybarrios:mainfrom
Closed
Conversation
This was referenced Mar 23, 2026
Standalone admission controller that gates request admission based on available GPU memory. Prevents OOM under concurrent load by queuing requests until memory is available. Components: - MemoryMonitor: reads Metal GPU memory via mx.get_active_memory/cache - RequestQueue: pluggable policies (fifo, shortest_first, priority) - AdmissionController: gates requests by free_memory >= prefill + headroom Key design: load affects latency, never quality. Once a request starts generating, it runs to completion. The controller only decides WHEN to start. Features: - kv_per_token estimation for MoE, dense, and hybrid (Mamba/Attention) models - shortest_first policy with 120s starvation guard - priority policy with numeric priority + FIFO tiebreak - Eviction callback for prefix cache pressure relief - Cancellation-safe (raises CancelledError, not silent proceed) - 600s admission timeout (raises TimeoutError) - 30 unit tests
16fa54a to
272d7a7
Compare
Collaborator
Author
|
Closing — BatchedEngine admission controller built on unreproducible venv state. Will resubmit when BatchedEngine work is properly tracked and tested. |
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.
Summary
Standalone admission controller that gates request admission based on available GPU memory. Prevents OOM under concurrent load by queuing requests until memory is available.
Zero dependencies on other PRs — this is a self-contained module.
Components
MemoryMonitor: reads Metal GPU memory viamx.get_active_memory()/mx.get_cache_memory()RequestQueue: pluggable policies —fifo,shortest_first(with 120s starvation guard),priorityAdmissionController: gates requests byfree_memory >= prefill_bytes + headroomDesign principle
Files
vllm_mlx/admission.py— 376 linestests/test_admission.py— 30 testsStatus
Draft — running functional and quality validation. Test results incoming.