Skip to content

[mlx_lm] Expose 'strict' parameter in load() function#1284

Open
zyguy wants to merge 1 commit into
ml-explore:mainfrom
zyguy:feat-load-strict-arg
Open

[mlx_lm] Expose 'strict' parameter in load() function#1284
zyguy wants to merge 1 commit into
ml-explore:mainfrom
zyguy:feat-load-strict-arg

Conversation

@zyguy
Copy link
Copy Markdown

@zyguy zyguy commented May 18, 2026

Motivation: Currently, the high-level mlx_lm.load() function does not expose the strict parameter. This makes it impossible to pass strict=False when loading certain converted models or "abliterated" models that contain harmless orphaned weights.

The underlying load_model() function already supports the strict argument. This PR simply surfaces it to the main load() entrypoint, maintaining True as the default to ensure full backward compatibility. This will allow dependent projects like oMLX to load a wider variety of fine-tuned or abliterated models without crashing.

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.

1 participant