Fix BatchMambaCache missing size arg for mlx-lm >= 0.30.6#89
Merged
waybarrios merged 1 commit intomainfrom Feb 15, 2026
Merged
Conversation
sooth
pushed a commit
to sooth/vllm-mlx
that referenced
this pull request
Feb 27, 2026
Merge 17 upstream commits including: - KV cache quantization for prefix cache memory reduction (waybarrios#62) - Streaming tool call parsing via ToolParser integration (waybarrios#46) - MTP speculative decoding for Qwen3-Next (waybarrios#82) - GPT-OSS reasoning parser and Harmony format parsers - mlx-lm >= 0.30.5 requirement, transformers >= 5.0.0 - BatchMambaCache fix for mlx-lm >= 0.30.6 (waybarrios#89) - MLLM continuous batching fixes (waybarrios#76) - Force MLLM mode option (waybarrios#81) - Various bug fixes Conflict resolution: - server.py: Replaced local tool_call_buffering with upstream's ToolParser-based streaming (more robust) - cli.py: Deduplicated --mllm, --default-temperature, --default-top-p args (upstream already added them), kept local --embedding-model - mamba_cache.py: Took upstream's conditional HAS_MAMBA_CACHE approach - pyproject.toml: Took upstream's version and dependency changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
mlx-lm 0.30.6 removed MambaCache. The fallback to ArraysCache works but ArraysCache requires a positional size argument that was never passed, causing every inference request to fail with:
ArraysCache.init() missing 1 required positional argument: 'size'
Fixed by passing size conditionally in init and extract when HAS_MAMBA_CACHE is False.
Changes in vllm_mlx/utils/mamba_cache.py:
init now accepts size=2 and passes it to ArraysCache:
def init(self, left_padding=None, size=2):
if HAS_MAMBA_CACHE:
super().init(left_padding=left_padding)
else:
super().init(size=size, left_padding=left_padding)
extract reads size from the existing cache:
size = len(self.cache)
if HAS_MAMBA_CACHE:
cache = MambaCache()
else:
cache = MambaCache(size=size)
merge and _patched_make_cache need no changes since size=2 default covers them.
Closes #87