{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "ml-explore-mlx-lm--chat-with-a-local-llm-on-a-mac",
 "repo": "ml-explore/mlx-lm",
 "repo_url": "https://github.com/ml-explore/mlx-lm",
 "repo_slug": "ml-explore-mlx-lm",
 "title": "Chat with an open LLM locally on your Mac",
 "page_title": "How to chat with an open LLM locally on your Mac with MLX LM",
 "summary": "Install MLX LM and generate text or open a chat REPL with any MLX-compatible model from the Hub.",
 "who": "A Mac user who wants a private local assistant without a cloud API.",
 "problem": "Cloud chat sends your data off the machine and costs money per token.",
 "outcome": "A local chat REPL running a quantized model on Apple silicon.",
 "steps": [
  "Install with `pip install mlx-lm` or `conda install -c conda-forge mlx-lm`",
  "Generate text with `mlx_lm.generate --prompt \"How tall is Mt Everest?\"`",
  "Start a chat REPL that keeps context for its lifetime with mlx_lm.chat",
  "Pick another model with --model, for example `mlx_lm.generate --model mistralai/Mistral-7B-Instruct-v0.3 --prompt \"hello\"`",
  "See all options with `mlx_lm.generate -h`"
 ],
 "agent_prompt": "Using ml-explore/mlx-lm on my Mac, install it, run mlx_lm.chat with a model from mlx-community that fits in <RAM> GB, and tell me the tokens per second it reports.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "The default model is mlx-community/Llama-3.2-3B-Instruct-4bit; bigger models need more unified memory.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "A Mac with Apple silicon",
  "Python with pip or conda",
  "macOS 15 or later to speed up models that are large relative to RAM",
  "Optional: a Hugging Face account to upload converted models"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ml-explore-mlx-lm/chat-with-a-local-llm-on-a-mac/",
 "md": "https://dedupedai.com/use-cases/ml-explore-mlx-lm/chat-with-a-local-llm-on-a-mac/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ml-explore-mlx-lm--chat-with-a-local-llm-on-a-mac.json",
 "api_version": "v1"
}
