spb/tools-spboucher-ai
Public
1{2 "slug": "mlx-lm",3 "name": "MLX LM",4 "aliases": ["mlx-lm", "mlx_lm"],5 "vendor": { "name": "Apple (MLX contributors)", "slug": "apple", "website": "https://github.com/ml-explore" },6 "homepage_url": "https://github.com/ml-explore/mlx-lm",7 "docs_url": "https://github.com/ml-explore/mlx-lm",8 "repo_url": "https://github.com/ml-explore/mlx-lm",9 "license_url": "https://github.com/ml-explore/mlx-lm/blob/main/LICENSE",10 "product_type": "library",11 "product_status": "active",12 "summary": "Python package and CLI for running, serving, quantizing and fine-tuning large language models on Apple Silicon with MLX",13 "description": "MLX LM is the LLM toolkit of Apple's MLX project: a Python package, published on PyPI as `mlx-lm` under the MIT license, that loads transformer language models from the Hugging Face Hub and runs them on Apple Silicon. It began as part of the `mlx-examples` repository and now lives in its own repository maintained by the MLX contributors.\n\nThe package exposes a small set of command-line entry points and a matching Python API. `mlx_lm.generate` and `mlx_lm.chat` produce text or hold an interactive session; `mlx_lm.convert` downloads a Hub checkpoint, converts it to MLX format and optionally quantizes it (4-bit is the common choice) and uploads the result; `mlx_lm.server` starts a local HTTP server with an OpenAI-style chat completions endpoint; `mlx_lm.lora` performs LoRA or full fine-tuning, including on quantized models. In Python, `load`, `generate` and `stream_generate` cover most scripting needs, with hooks for custom samplers and logits processors. Prompt caching, a rotating KV cache for long contexts and batch generation are built in, and `mx.distributed` lets inference or fine-tuning span several Macs.\n\nMLX LM is the usual way a Mac owner runs a quantized Llama, Qwen, Mistral or Gemma model locally without a GUI, and it underpins many of the pre-converted models in the `mlx-community` Hub organization. Typical users are developers building local assistants, researchers fine-tuning small models, and operators serving models on Mac Studios.\n\nLimits: it only runs on Apple Silicon, only architectures that have been ported are supported (new families need code contributions), very large models are bounded by unified memory, and the server is meant for local or trusted-network use rather than as a hardened production gateway.",14 "capabilities": ["Text generation and interactive chat from the command line or Python", "Conversion and quantization of Hugging Face checkpoints to MLX format", "Local OpenAI-compatible HTTP server", "LoRA and full fine-tuning, including on quantized models", "Prompt caching and rotating KV cache for long contexts", "Distributed inference and fine-tuning across several Macs"],15 "workflows": ["Download, quantize and run a chat model on a MacBook", "Serve a local model to tools that speak the OpenAI API", "Fine-tune a small model on domain data with LoRA", "Publish a converted model to the mlx-community Hub organization"],16 "advantages": ["Minimal setup: pip install and one command", "Direct access to thousands of Hub models", "MIT license and active development alongside MLX", "Python API that fits into existing scripts"],17 "limitations": ["Apple Silicon only", "Only ported model architectures are supported", "Model size is bounded by the Mac's unified memory", "Server is not designed as a production gateway with auth or multi-tenancy"],18 "prerequisites": ["Mac with Apple Silicon", "Python 3.11 or newer", "Hugging Face Hub access for model downloads"],19 "audiences": ["Developers running local LLMs on Macs", "Researchers fine-tuning small models", "Operators serving models on Apple Silicon workstations"],20 "alternatives": ["ollama", "llama-cpp", "lm-studio", "vllm"],21 "comparison_notes": "Ollama and LM Studio wrap llama.cpp-style engines in a packaged runtime or desktop app and run on macOS, Linux and Windows; MLX LM is a Python library tied to MLX and Apple Silicon, which makes it more scriptable and gives it fine-tuning, at the cost of portability. llama.cpp is the C/C++ engine with GGUF quantization that those tools use; MLX LM uses MLX's own quantized format. vLLM targets high-throughput GPU serving on Linux and has no comparable role on a Mac.",22 "categories": [{ "slug": "apple-silicon-ml", "primary": true }, { "slug": "local-inference" }, { "slug": "model-training" }],23 "tags": ["apple-silicon", "macos", "llm", "open-source", "python", "cli", "quantization", "fine-tuning"],24 "use_cases": ["run-local-models", "fine-tune-models", "serve-models"],25 "operating_systems": ["macos"],26 "execution_modes": ["local"],27 "interfaces": ["cli", "library", "api"],28 "deployment_models": ["desktop"],29 "integrations": ["MLX", "Hugging Face Hub", "OpenAI-compatible clients", "exo"],30 "data_formats": ["safetensors", "MLX quantized weights", "JSONL (fine-tuning data)"],31 "languages": ["Python"],32 "source_model": "open-source",33 "license_spdx": "MIT",34 "pricing_model": ["open-source", "free"],35 "self_hostable": true,36 "sources": [37 { "url": "https://github.com/ml-explore/mlx-lm", "type": "official_site", "title": "ml-explore/mlx-lm README", "supports": ["name", "summary", "capabilities", "prerequisites", "limitations"], "checked_at": "2026-11-02" },38 { "url": "https://pypi.org/project/mlx-lm/", "type": "package_registry", "title": "mlx-lm on PyPI", "supports": ["prerequisites", "product_status"], "checked_at": "2026-11-02" },39 { "url": "https://github.com/ml-explore/mlx-lm/blob/main/LICENSE", "type": "license_page", "supports": ["license_spdx", "source_model"], "checked_at": "2026-11-02" }40 ],41 "confidence": "high",42 "discovery_method": "editorial-research",43 "depth": "deep",44 "editorial_status": "reviewed",45 "visibility": "public",46 "featured": false,47 "author": "batch-C"48}49