Skip to content

Adopt the MLX Memory API - #204

Merged
mattt merged 1 commit into
huggingface:mainfrom
james-333i:fix/mlx-memory-api
Sep 2, 2026
Merged

Adopt the MLX Memory API#204
mattt merged 1 commit into
huggingface:mainfrom
james-333i:fix/mlx-memory-api

Conversation

@james-333i

Copy link
Copy Markdown
Contributor

mlx-swift has deprecated the GPU memory calls in favor of the new Memory API. GPU.set(cacheLimit:) is now the Memory.cacheLimit property and GPU.clearCache() is Memory.clearCache().

This replaces the six call sites in MLXLanguageModel accordingly. There is no behavior change. Verified against mlx-swift 0.31.4, which resolves today from the existing mlx-swift-lm dependency

@mattt

mattt commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Merging now. Thanks, @james-333i!

@mattt
mattt merged commit 7d12b28 into huggingface:main Sep 2, 2026
0 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants