Skip to content

Correct mlx-lm example unpacking operator#1786

Merged
RobinPicard merged 1 commit intodottxt-ai:mainfrom
Anri-Lombard:mlx-docs-unpacking
Nov 28, 2025
Merged

Correct mlx-lm example unpacking operator#1786
RobinPicard merged 1 commit intodottxt-ai:mainfrom
Anri-Lombard:mlx-docs-unpacking

Conversation

@Anri-Lombard
Copy link
Contributor

Problem

The mlx-lm example in the Getting Started guide uses ** (keyword unpacking), but mlx_lm.load() returns a tuple, not a dict.

Fix

Change **mlx_lm.load(...) to *mlx_lm.load(...).

Verification

Tested locally on Apple Silicon - the corrected example successfully creates an MLXLM model.

mlx_lm.load() returns a tuple (model, tokenizer), not a dict.
The example incorrectly used ** (keyword unpacking) instead of * (positional unpacking).
Copy link
Contributor

@RobinPicard RobinPicard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@RobinPicard RobinPicard merged commit 1e1c917 into dottxt-ai:main Nov 28, 2025
5 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