Skip to content

2.0.8 — security fixes + honest token budget + torch-free

Latest

Choose a tag to compare

@mzau mzau released this 01 Oct 02:46
· 4 commits to main since this release

New since 2.0.7

Two security fixes. A checkpoint whose config.json declares model_file is refused before any backend is called — mlx-lm executes that file on load (CVE-2026-5843, #72). And mlx-knife no longer runs Python found in the directory a command is started in: serve and embed-serve imported a module named like mlxk2 or one of its dependencies from there instead of the installed package, and run --audio ran a multiprocessing/ package found there — a cloned model directory could carry one. Affected are 2.0.0 through 2.0.8b2 (GHSA-3pcp-w323-9wmv). Code a checkpoint declares through auto_map remains outside mlx-knife's control on the vision and audio paths (#71, SECURITY.md).

An empty path no longer means the working directory. mlxk push "" <repo> — easily produced by an unset shell variable — uploaded the directory it was run from, and mlxk convert "" converted it. Both now refuse an empty or whitespace-only path. On an older version, guard the argument in scripts: mlxk push "${DIR:?}" <repo> --private.

The generation budget holds (#66). Without max_tokens, CLI and server generate at most min(32768, context window − prompt) tokens, where run used the whole window and serve half of it. A cut answer says finish_reason: "length", a prompt that fills the window is refused before the first token, and serve --max-tokens reaches every request.

Nothing is dropped in silence. An image or audio file sent to a text-only model gets 422 instead of an answer that ignored it; stop cuts batch answers; usage counts tokens instead of words × 1.3.

Fewer dependencies, more vision models. torch, torchvision and datasets are gone — a 524 MB (36 %) smaller install on mlx-vlm 0.6.10, mlx-audio 0.4.8 and transformers 5.14.1. qwen2_vl, qwen2_5_vl and qwen3_5 checkpoints run as vision models, and list and the server agree on which models can see.

serve behaves under load and on stop. /health and /v1/models answer while a request generates (#64), streaming is no longer many times slower than batch (#73), and no server process outlives its supervisor (#60).

Upgrade Note

Python 3.11 or later is required. On Python 3.10, pip install -U mlx-knife says nothing and leaves 2.0.7 in place, which does not carry this release's security fixes; upgrade the interpreter first. Server clients: GET /health now answers "status": "ok"; every wire change is listed in the SERVER-HANDBOOK under From 2.0.7 → 2.0.8.

Known limits

A stream that arrives as one event runs on after the client closes it (#82); mlxk run on a vision model prints no answer when the generation reaches its 2048-token default (#79); after an inference-backend fault serve keeps answering /health (#65).

Install

pip install -U mlx-knife

Full details: CHANGELOG.md