Add a verified Swift runtime installer and explicit server launcher

#2
by ukisai - opened

A bare mlx_lm.server command can select Homebrew's separate, unpatched installation. That loader rejects the complete Swift checkpoint with Received 501 parameters not in model for vision entries, even when the correct model snapshot is already cached.

Add a small Python 3.12 setup helper that reuses the local model directory, installs the existing pinned official MLX-LM source and checksum-verified Swift patches into a separate environment, and creates an explicit serve launcher. The launcher verifies architecture/server source hashes and package versions before loading weights, bypasses PATH/PYTHONPATH conflicts, and serves local files with offline mode enabled. Quick-start and troubleshooting links cover the cached-download case.

Validation passed on Apple Silicon: two clean installs (4-bit and 5-bit), actual launcher HTTP generation with tiny existing text/vision/MTP fixtures, conflicting executable and Python search paths, paths with spaces, rejection of an unpatched loader, and refusal to overwrite an existing runtime. Recorded results are in compatibility/launcher-validation.json. These are local checks, not a hosted CI badge or a new full-model run. Earlier complete-model validation remains in FULL_MAC_VALIDATION.md.

No checkpoint weights, quantization, architecture patch, cache patch or tokenizer/config assets change. No requantization or model download is required for an existing complete snapshot. This PR is ready for review; public main is unchanged until merged.

ukisai changed pull request status to merged

Sign up or log in to comment