fix: graceful degradation when EAGLE draft pool fails to register with Mooncake standalone storage - #29035
fix: graceful degradation when EAGLE draft pool fails to register with Mooncake standalone storage#29035HyeonjeCho wants to merge 3 commits into
Conversation
…h Mooncake standalone storage When using EAGLE speculative decoding with Mooncake L3 storage in standalone (dummy client) mode, the server crashes during startup because the draft host pool is allocated with the default allocator (mmap) instead of MooncakeHostTensorAllocator. This causes register_buffer() to fail with error code -1, since the buffer is outside Mooncake's shared memory segment. Wrap the register_mem_host_pool_v2() call in _maybe_register_draft_with_storage() with a try/except. On failure, log a warning and return early so that draft_page_get_func and draft_page_set_func remain None. This disables draft L3 (SSD offload) while keeping draft L2 (host DRAM) and target L2/L3 fully functional.
There was a problem hiding this comment.
Code Review
This pull request wraps the registration of the draft memory host pool in a try-except block to gracefully handle registration failures with Mooncake Store, falling back to L2 cache. The reviewer suggests catching Exception instead of only RuntimeError to ensure all potential exceptions from C++ bindings are caught, preventing startup failures.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Add test_draft_l3_graceful_degradation.py covering: - Mooncake register_mem_host_pool_v2() failure keeps draft funcs None - Any exception type (not just RuntimeError) is caught - Successful registration sets v2 funcs correctly - Non-mooncake backends remain unaffected
There was a problem hiding this comment.
An extra unit test is unnecessary.
This issue likely stems from the dummy client's lack of draft model offloading support in standalone mode. MooncakeHostTensorAllocator could be a potential solution. |
|
Thanks for pointing out the issue. Because the draft didn't specify an allocator type, an inconsistent allocator was used, causing an error when registering the buffer. I have now fixed this problem. #29823 |
Motivation
Fixes #28873
When using EAGLE speculative decoding with Mooncake L3 storage in standalone (dummy client) mode, the server crashes during startup. The draft host pool is allocated with the default allocator (mmap) instead of MooncakeHostTensorAllocator, causing
register_buffer()to fail with error code -1 because the buffer is outside Mooncake's shared memory segment.Modifications
Wrap the
register_mem_host_pool_v2()call in_maybe_register_draft_with_storage()with a try/except. On failure, log a warning and return early so thatdraft_page_get_funcanddraft_page_set_funcremain None.This disables draft L3 (SSD offload) while keeping:
Accuracy Tests
Not applicable — no changes to model forward code.
Speed Tests and Profiling
Not applicable — no changes to inference kernels. The fix only affects startup behavior.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Run #28023230096
Latest PR Test (Extra): ❌ Run #28023229767