Add Apple Silicon support via vllm-metal#2
Merged
alchemystack merged 3 commits intoalchemystack:mainfrom Mar 8, 2026
Merged
Conversation
Always call .cpu() before .numpy() in _to_numpy() — MPS tensors are not on CPU and the previous CUDA-only check missed them. .cpu() is a no-op on CPU tensors so this is safe for all devices. Add Apple Silicon setup docs to README with vllm-metal install steps.
Owner
|
Great, thanks! |
alchemystack
approved these changes
Mar 8, 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.
Summary
processor.py: always call.cpu()before.numpy()so MPS tensors convert correctlyWhat changed
src/qr_sampler/processor.py— The_to_numpy()method previously only called.cpu()for CUDA tensors. MPS (Metal) tensors hit theelsebranch where.numpy()fails because the tensor isn't on CPU. Fix: always call.cpu()before.numpy()(no-op on CPU tensors).README.md— Added:mlx-community/Qwen3-0.6B-4bit)QRSamplerLogitsProcessor initialized)/v1/completionsand/v1/chat/completionscurl examples.gitignore— Added.webui_secret_key(generated by Open WebUI, should not be committed)Testing
/v1/completionsand/v1/chat/completionsreturn entropy-driven responsesDependencies
Requires vllm-metal PR #124 to be merged for plugin discovery to work. Without it, vllm-metal silently skips custom logits processors. The PR is a 9-line patch that mirrors
GPUModelRunner's existing pattern.