Chat with your files
A private chat that answers questions about your own PDFs, notes and documents.
New to local AI? Read Start here first. It takes 5 minutes.
Your computer's memory
PC with a graphics card? Pick the card's memory (VRAM). Why?
It runs, but 32 GB or more is smoother.
- 1
Install Ollama
Ollama downloads AI models and runs them on your computer. Open the Terminal app and paste this. It may ask for your Mac password.
Or download the app from ollama.com/downloadcurl -fsSL https://ollama.com/install.sh | shYou should see: 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. - 2
Download your model
This is the AI itself. It is one big file, so it takes a few minutes.
ollama pull gemma4:12bYou should see: The download finishes with “success”.
- 3
Add a ChatGPT-style window
Open WebUI gives you a chat app in your browser. It needs Homebrew (brew.sh) for Python.
brew install python@3.11python3.11 -m venv ~/.venvs/openwebui && source ~/.venvs/openwebui/bin/activatepip install open-webui
Keep this window open while you use itopen-webui serveYou should see: Open http://localhost:8080. Make a local account (it stays on your computer) and pick your model at the top.
- 4
Add your files
In a chat, click + and attach a file, then ask about it. For a whole folder, go to Workspace → Knowledge, make a collection and upload your files. Then type # in a chat to use it.
You should see: The answer quotes your document.
- 5
Messy PDF? Clean it first
Scanned or complex PDFs give bad answers. Docling turns them into clean text you can upload instead.
python3 -m venv ~/.venvs/docling && source ~/.venvs/docling/bin/activatepip install docling
Writes yourfile.md next to itdocling yourfile.pdfYou should see: A Markdown file appears. Upload that one.
It works. What now?
- Try it: upload a manual and ask “how do I reset it?”. Upload notes and ask “what did we decide?”.
- Make a Knowledge collection per topic, so answers only use the right files.
- See every model you have:
ollama list. - Try a different model: copy any
ollama runname from the Models page. - Update your model: run
ollama pull gemma4:12bagain. It only downloads what changed. - Free disk space:
ollama rm gemma4:12bdeletes a model you no longer use.
Something went wrong?
“could not connect to ollama app, is it running?”
Ollama is not running. Open Ollama from your Applications folder, or run ollama serve in a new Terminal window and leave it open.
“command not found: ollama”
Close the Terminal window and open a new one. If it still fails, run the install command again.
“model requires more system memory”
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.
“file does not exist” when you download
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.
It is very slow
Run ollama ps. PROCESSOR should say 100% GPU. If it shows CPU, the model does not fit in memory. Pick a smaller model.
The computer freezes, or the fan is loud
The model uses all your memory. Stop it with ollama stop gemma4:12b. Then use a smaller one.
“address already in use” when Open WebUI starts
Another app uses port 8080. Run open-webui serve --port 8081, then open http://localhost:8081.
No models in the list at the top of Open WebUI
Ollama is not running. Start it, then reload the page.
The answer ignores your file
Check that the file shows in the chat. Scanned PDFs have no real text; clean them with Docling (step 5) and upload the .md file.
Good to know
- Check your free disk space first. You need room for the model plus about 4 GB for Open WebUI and 2 GB for Docling.
- The first Docling run downloads its own small models.
- Answers are only as good as the text it can read. Clean files give better answers.
How to remove it
ollama rm gemma4:12bRemoves the model filerm -rf ~/.venvs/openwebui ~/.venvs/doclingRemoves Open WebUI and Doclingrm -rf ~/Library/Caches/pipRemoves saved downloadscurl -fsSL https://insidethemachine.ai/install/docs.sh | bashirm https://insidethemachine.ai/install/docs.ps1 | iexWindows PowerShell (not run by us)Plan, check, undo
Add -s -- plan to print every step and run nothing, verify to only check, rollback --yes to undo. Partly checked: some paths were run, the rest only checked against docs. Install steps run on an Apple M4 Mac with 16 GB on 2026-10-15. File upload and the first Docling run are checked against the docs only.
Install steps run on an Apple M4 Mac with 16 GB on 2026-10-15. File upload and the first Docling run are checked against the docs only. For Windows and Linux, see the box above.