{
  "kind": "recipe",
  "id": "chat",
  "title": "A private ChatGPT",
  "what": "Chat, write and brainstorm. Nothing leaves your computer.",
  "html": "https://insidethemachine.ai/do/chat",
  "md": "https://insidethemachine.ai/do/chat.md",
  "json": "https://insidethemachine.ai/do/chat.json",
  "memory": {
    "min_gb": 8,
    "good_gb": 16
  },
  "minutes": 10,
  "platform_priority": [
    "macos-apple-silicon",
    "linux",
    "windows"
  ],
  "tools": [
    {
      "slug": "ollama",
      "name": "Ollama",
      "md": "https://insidethemachine.ai/setups/ollama.md"
    },
    {
      "slug": "open-webui",
      "name": "Open WebUI",
      "md": "https://insidethemachine.ai/setups/open-webui.md"
    }
  ],
  "placeholders": {
    "{MODEL}": "ollama tag from model_by_memory_gb for the machine's RAM",
    "{WHISPER}": null
  },
  "model_by_memory_gb": {
    "8": {
      "name": "Qwen3.5 4B",
      "tag": "qwen3.5:4b",
      "gb": 5.8,
      "aa": 13.1,
      "maker": "Alibaba Qwen"
    },
    "16": {
      "name": "Gemma 4 12B",
      "tag": "gemma4:12b",
      "gb": 11.2,
      "aa": 14.2,
      "maker": "Google"
    },
    "24": {
      "name": "Gemma 4 12B",
      "tag": "gemma4:12b",
      "gb": 11.2,
      "aa": 14.2,
      "maker": "Google"
    },
    "32": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "48": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "64": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "96": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "128": {
      "name": "Qwen3.8 27B",
      "tag": "qwen3.8:27b",
      "gb": 22.7,
      "aa": 33.7,
      "maker": "Alibaba Qwen"
    },
    "192": {
      "name": "Qwen3.8-Flash-Next (125B-A6B)",
      "tag": "qwen3.8-flash-next:125b-a6b",
      "gb": 140,
      "aa": 39.8,
      "maker": "Alibaba Qwen"
    },
    "256": {
      "name": "Qwen3.8-Flash-Next (125B-A6B)",
      "tag": "qwen3.8-flash-next:125b-a6b",
      "gb": 140,
      "aa": 39.8,
      "maker": "Alibaba Qwen"
    },
    "512": {
      "name": "Qwen3.8-Flash-Next (125B-A6B)",
      "tag": "qwen3.8-flash-next:125b-a6b",
      "gb": 140,
      "aa": 39.8,
      "maker": "Alibaba Qwen"
    }
  },
  "frontier": {
    "name": "Claude Opus 5.5",
    "aa": 57.6
  },
  "tested": "Run end to end on an Apple M4 Mac with 16 GB on 2026-10-15.",
  "recipe": {
    "id": "chat",
    "get": "A ChatGPT-style chat app that runs fully on your computer, even offline.",
    "model": "chat",
    "steps": [
      {
        "title": "Install Ollama",
        "body": "Ollama downloads AI models and runs them on your computer. Open the Terminal app and paste this. It may ask for your Mac password.",
        "cmds": [
          {
            "run": "curl -fsSL https://ollama.com/install.sh | sh",
            "note": "Or download the app from ollama.com/download"
          }
        ],
        "expect": "Run `ollama --version`. It prints a version number. If it also says “could not connect”, open Ollama from your Applications folder, wait a few seconds, then go on."
      },
      {
        "title": "Download your model",
        "body": "This is the AI itself. It is one big file, so it takes a few minutes.",
        "cmds": [
          {
            "run": "ollama pull {MODEL}"
          }
        ],
        "expect": "The download finishes with “success”."
      },
      {
        "title": "Say hi",
        "body": "Chat right in the Terminal to check it works.",
        "cmds": [
          {
            "run": "ollama run {MODEL}",
            "note": "Type a message. Type /bye to quit."
          }
        ],
        "expect": "The model answers you. That answer came from your own computer."
      },
      {
        "title": "Add a ChatGPT-style window",
        "body": "Open WebUI gives you a chat app in your browser. It needs Homebrew (brew.sh) for Python.",
        "cmds": [
          {
            "run": "brew install python@3.11"
          },
          {
            "run": "python3.11 -m venv ~/.venvs/openwebui && source ~/.venvs/openwebui/bin/activate"
          },
          {
            "run": "pip install open-webui"
          },
          {
            "run": "open-webui serve",
            "note": "Keep this window open while you use it"
          }
        ],
        "expect": "Open http://localhost:8080. Make a local account (it stays on your computer) and pick your model at the top."
      }
    ],
    "alt": {
      "slug": "lm-studio",
      "title": "Prefer no Terminal? Use LM Studio.",
      "body": "Download the app from lmstudio.ai, search for your model by name, click Download, then chat. Everything is point and click.",
      "href": "/setups/lm-studio"
    },
    "undo": [
      {
        "run": "ollama rm {MODEL}",
        "note": "Removes the model file"
      },
      {
        "run": "rm -rf ~/.venvs/openwebui",
        "note": "Removes Open WebUI"
      },
      {
        "run": "rm -rf ~/Library/Caches/pip",
        "note": "Removes about 1.5 GB of saved downloads"
      }
    ],
    "know": [
      "Check your free disk space first. You need room for the model (a bit less than the memory it needs) plus about 4 GB for Open WebUI.",
      "The first answer is slow while the model loads. On a 16 GB Mac it took about 1.5 minutes. After that it is quick.",
      "Open WebUI uses port 8080. Other local AI servers sometimes use it too."
    ],
    "fix": [
      {
        "q": "“could not connect to ollama app, is it running?”",
        "a": "Ollama is not running. Open Ollama from your Applications folder, or run `ollama serve` in a new Terminal window and leave it open."
      },
      {
        "q": "“command not found: ollama”",
        "a": "Close the Terminal window and open a new one. If it still fails, run the install command again."
      },
      {
        "q": "“model requires more system memory”",
        "a": "The model is too big for your memory. Pick a smaller memory size at the top of this page and use that model. Close other big apps too."
      },
      {
        "q": "“file does not exist” when you download",
        "a": "The model name is wrong, or Ollama is too old. Copy the command again from this page. Then update Ollama: run the install command again."
      },
      {
        "q": "It is very slow",
        "a": "Run `ollama ps`. PROCESSOR should say 100% GPU. If it shows CPU, the model does not fit in memory. Pick a smaller model."
      },
      {
        "q": "The computer freezes, or the fan is loud",
        "a": "The model uses all your memory. Stop it with `ollama stop {MODEL}`. Then use a smaller one."
      },
      {
        "q": "“address already in use” when Open WebUI starts",
        "a": "Another app uses port 8080. Run `open-webui serve --port 8081`, then open http://localhost:8081."
      },
      {
        "q": "No models in the list at the top of Open WebUI",
        "a": "Ollama is not running. Start it, then reload the page."
      }
    ],
    "after": [
      "Try it: paste a long email and ask “sum this up in 3 lines”. Ask it to rewrite a text so it sounds friendlier. Ask it to explain a hard idea step by step.",
      "See every model you have: `ollama list`.",
      "Try a different model: copy any `ollama run` name from the Models page.",
      "Update your model: run `ollama pull {MODEL}` again. It only downloads what changed.",
      "Free disk space: `ollama rm {MODEL}` deletes a model you no longer use."
    ],
    "win": {
      "body": "Install Ollama with this PowerShell command, or the installer from ollama.com/download. On Linux, the install command above works as it is. After that, every `ollama` command on this page is the same. For the chat window on Windows, LM Studio (lmstudio.ai) is the easiest. Open WebUI also runs on Windows; see its page.",
      "cmds": [
        {
          "run": "irm https://ollama.com/install.ps1 | iex",
          "note": "Windows: paste in PowerShell. Or get the installer from ollama.com/download"
        }
      ]
    },
    "tested": "Run end to end on an Apple M4 Mac with 16 GB on 2026-10-15."
  }
}