Repository navigation
Conversation
|
The implementation and CPU regression are ready. The repository gate requires the |
|
Ran the "Apple Metal server run" the description lists as pending, on this PR's head (34c4378) with the M2 that produced the report in #41211. Apple M2 16 GB, macOS 15.7, Python 3.12.13, PyTorch 2.13.0, MLX 0.32.2, Without
With
|
|
Thanks for running this on the original M2 setup. I've added your results to the validation section, including both sampling modes and the ordinary-generation control. |
Signed-off-by: ZenAlexa <zimingwang945@gmail.com>
Signed-off-by: ZenAlexa <zimingwang945@gmail.com>
Signed-off-by: ZenAlexa <zimingwang945@gmail.com>
This comment has been minimized.
This comment has been minimized.
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This comment has been minimized.
This comment has been minimized.
Keep the MLX output-logprob admission check beside the min_p speculative-decoding check from sgl-project#41916; both abort before queueing.
sglang.srt.disaggregation.utils only re-imports DisaggregationMode, which the check-indirect-imports hook from sgl-project#47992 rejects.
Summary
On the MLX backend,
return_logprob=Truewithout--mlx-enable-samplingproduced empty logprob arrays./v1/scorethen returned an opaque 500 after the score result processor found no output logprobs.The scheduler now rejects this unsupported request before admission with
Output logprobs on the MLX backend require --mlx-enable-sampling.Non-MLX requests and MLX requests with sampling enabled keep their existing paths. The Apple Metal guide lists the flag beside the other MLX serving parameters and describes its logprob requirement.Validation
34c4378,python -m pytest test/registered/unit/managers/test_scheduler_uno_request_validation.py test/registered/unit/managers/test_scheduler_sampling_mask_validation.py -qcompleted with 3 passed and 2 subtests passed.74308cf1at27daff53. Source-isolated execution of the complete production request handler rechecked all eight combinations of MLX, sampling, and output-logprob flags on both main and candidate. Only MLX output-logprob requests with sampling disabled take the new abort path; the request retains the expected error and logprob state.03dd0754, repository pre-commit checks passed for AST validation, import ordering, Ruff, formatting, codespell, CI registry validation, and related hooks.git diff --checkpassed.34c4378on Apple M2 16 GB, macOS 15.7, Python 3.12.13, PyTorch 2.13.0, MLX 0.32.2, andQwen/Qwen2.5-0.5B-Instructbf16. With sampling disabled, logprob requests to/generateand/v1/scorereturn 400 with the flag requirement; ordinary generation returns 200. With sampling enabled, both endpoints return populated logprob and score results.Fixes #41211.
The earlier integration used the source-loaded handler and admission fixtures; full scheduler imports and model-backed endpoints were covered by the historical runs above.
CI States
Latest PR Test (Base): ❌ Run #41783506198
Latest PR Test (Extra): ❌ Run #41783506126
Latest PR Test (AMD ROCm 10): ❌ Run #41783506039
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent:current main integration
merged main
426281d1bc2atca1566654e. #41916 added a speculative-decodingmin_prejection at the same point inhandle_generate_request, so both checks stay as separate blocks before request admission, MLX first, and both use main's abort-and-enqueue path. the resolvedscheduler.pydiffers from main by this PR's ten lines.e0721ceb82fixes the lint failure on3bc5edb, where thecheck-indirect-importshook from #47992 rejected the test'sDisaggregationModeimport throughdisaggregation.utils, so the test now imports it fromsglang.srt.disaggregation.mode. that hook passes on the changed files, along with isort, ruff, ruff-format and codespell.the CPU admission regression and native MLX checks weren't rerun on this revision. please add
run-cifor this head.previous main integration
merged main
c8704818d4f0into3bc5edb67a38through a normal merge. main's scheduler request-holder and step-launch changes remain intact. unsupported MLX logprob requests continue through the existing abort-and-enqueue path before request admission.on macOS arm64 with Python 3.11.18, source-loaded execution of the complete production request handler rechecked all eight combinations of MLX, sampling and output-logprob flags on main and candidate. the candidate rejected the unsupported combination and preserved the other seven paths. the registered admission regression passed with dependency seams, including the error message, logprob state and existing abort queue route.
complete scheduler imports, HTTP/model execution and native MLX checks remain unrun on this revision. please enable the applicable project CI lane for this head. the Apple M2 results above remain tied to
34c4378.