New Tool Radar

Local AI

How to Check the Installed mlx and mlx_lm Versions

Check the installed mlx and mlx_lm versions before running a model, so version problems are caught early.

Schematic with three steps: Activate the environment; Run the version command; Compare with the guide you follow.

MLX commands change between releases, and a tutorial written for one version can fail on another. One version command tells you exactly what is installed before you run a model or follow a guide.

What you need

  • A Mac with Apple Silicon
  • A Python environment with mlx-lm installed
  • A terminal with the virtual environment activated

Step 1: Activate the environment

Activate the virtual environment where you installed mlx-lm, for example source ~/mlx-env/bin/activate. The version command only works inside that environment.

Step 2: Run the version command

Run python -m mlx –version && python -m mlx_lm –version. Each part prints the version of one package.

Step 3: Compare with the guide you follow

Note both version numbers and compare them with the versions the guide you are following was written for. If they differ by a major version, check the current docs for changed flags.

Worked example: synthetic version check

The table below is a synthetic example. It shows the expected result of checking versions; no command was run.

Package Command Expected
mlx python -m mlx –version Prints a version
mlx_lm python -m mlx_lm –version Prints a version
Both match guide Compare numbers Yes or note the gap

Expected result (UNTESTED). both commands print version numbers, and the numbers are compared with the guide being followed. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • The commands must run inside the virtual environment; outside it they report the package as missing.
  • A version number alone does not prove a model will run; the model must also be downloaded.
  • Current mlx-lm releases need Python 3.11 or newer, so an old system Python will fail the install.

Sources

See all