Install Ollama on Mac
Install the official Mac app, open it, then start Terminal.
Official Ollama downloadExtract and validate a sample receipt with gpt-oss 20B through local Ollama and Python.
Estimates for the 14.0 GB Ollama package at 4K text context. A full GPU load needs room beyond the weight download for runtime and KV cache; CPU offload can run on smaller GPUs with enough system RAM, but responds more slowly.
| Machine | gpt-oss · 20B |
|---|---|
| NVIDIA GPU · 8 GB | Use CPU offload with 32 GB RAM; slow. |
| NVIDIA GPU · 12 GB | Use CPU offload with 32 GB RAM; slow. |
| NVIDIA GPU · 16 GB | Runs at 4K text context; limited headroom. |
| NVIDIA GPU · 24 GB | Runs at 4K with headroom; speed not tested. |
| NVIDIA GPU · 32 GB | Runs at 4K with headroom; speed not tested. |
| AMD Radeon · 8 GB | Use CPU offload with 32 GB RAM; slow. Confirm the Ollama GPU backend with ollama ps. |
| AMD Radeon · 16 GB | Runs at 4K text context; limited headroom. Confirm the Ollama GPU backend with ollama ps. |
| AMD Radeon · 24 GB | Runs at 4K with headroom; speed not tested. Confirm the Ollama GPU backend with ollama ps. |
| AMD Radeon · 32 GB | Runs at 4K with headroom; speed not tested. Confirm the Ollama GPU backend with ollama ps. |
| Intel Arc · 8 GB | Use CPU offload with 32 GB RAM; slow. Confirm the Ollama GPU backend with ollama ps. |
| Intel Arc · 16 GB | Runs at 4K text context; limited headroom. Confirm the Ollama GPU backend with ollama ps. |
| Intel Arc · 24 GB | Runs at 4K with headroom; speed not tested. Confirm the Ollama GPU backend with ollama ps. |
| Intel Arc · 32 GB | Runs at 4K with headroom; speed not tested. Confirm the Ollama GPU backend with ollama ps. |
| Apple Silicon · 16 GB unified | Needs more unified memory at 4K; use a 24 GB Mac or lower-memory model. |
| Apple Silicon · 24 GB unified | Runs at 4K text context; limited memory headroom. |
| Apple Silicon · 32 GB unified | Runs at 4K text context with room to raise context; speed not tested. |
| Apple Silicon · 64 GB unified | Runs at 4K text context with room to raise context; speed not tested. |
| CPU-only · 16 GB RAM | Below the 32 GB system-RAM starting point; choose a smaller model. |
| CPU-only · 32 GB RAM | Can run in system RAM at 4K; expect slower replies than GPU. |
| CPU-only · 64 GB RAM | Can run in system RAM at 4K; expect slower replies than GPU. |
These are memory-fit starting points, not performance tests. Check the exact AMD or Intel Ollama backend and use ollama ps to see the GPU/CPU split; longer context or image input needs more memory.
Install gpt-oss 20B through Ollama, run a small Python extractor, and compare every returned field to the original receipt. Choose the Windows, Mac, or Linux route.
This setup uses the package documented for this task. Review its source and supported platforms before starting.
Save your machine in My Hardware to get an automatic starting choice. You can always choose any package yourself.
The 14 GB Ollama package needs additional memory for runtime and 4K context; start with 16 GB GPU or 24 GB Apple Silicon unified memory. The Python validator is small but not a substitute for model memory.
Choose where you want to run it. The instructions below update to match your selection.
Use Terminal on Apple Silicon. Ollama for macOS is available from the official download page.
Install the official Mac app, open it, then start Terminal.
Official Ollama downloadIn Terminal, confirm Ollama and Python 3 are available. Install Python 3 first if python3 is not found.
Install Python 3ollama --version
python3 --versionPull the exact package before running the example, so model download failures are separate from Python errors.
ollama pull gpt-oss:20bThe official Ollama Python client connects to the service on your own machine. Pydantic checks the output schema.
python3 -m pip install --upgrade ollama pydanticIn Terminal, paste this block. It writes the complete small example as extract.py in your current folder. Read the code before running it.
cat > extract.py <<'PY'
from ollama import chat
from pydantic import BaseModel
class Item(BaseModel):
name: str
price: float
class Receipt(BaseModel):
store: str
items: list[Item]
source = "Corner Cafe receipt: Coffee $3.00, Tea $2.00."
response = chat(
model="gpt-oss:20b",
messages=[{"role": "user", "content": "Extract only the store and items from this receipt: " + source}],
format=Receipt.model_json_schema(),
options={"temperature": 0},
)
receipt = Receipt.model_validate_json(response.message.content)
print(receipt.model_dump_json(indent=2))
assert receipt.store == "Corner Cafe", "Store differs from source; inspect manually"
assert {(item.name, item.price) for item in receipt.items} == {("Coffee", 3.0), ("Tea", 2.0)}, "Items differ from source; inspect manually"
print("Checked against the sample receipt")
PYRun the script. Pydantic validates the shape and the two assertions check every sample value against the receipt text.
python3 extract.pyLook for Corner Cafe, Coffee 3.0 and Tea 2.0 plus the checked message. If an assertion fails, inspect the JSON against the source; do not silently accept wrong fields. Use ollama ps to see CPU/GPU placement.
ollama psThe script prints Corner Cafe, Coffee 3.0, Tea 2.0 and “Checked against the sample receipt.” Its assertions compare each field with the sample text; valid JSON alone is not enough.
This is a local text example, not a test of document scanning or factual accuracy on unknown receipts. Review ambiguous fields manually and do not send private receipts to a hosted endpoint.
Check the Ollama package is gpt-oss:20b, the format argument uses Receipt.model_json_schema(), and Pydantic is installed. Inspect the raw model response before changing the schema.
Compare each returned value with the original sample. Lower context or simplify the prompt, then manually correct ambiguous data; a valid schema does not prove correctness.
Run ollama ps to inspect placement, close other GPU apps, then use a 24 GB GPU or 32 GB Mac for more headroom.
Original instructions, model files, and compatibility notes behind this setup.
Source-backed package and platform-route plan for private local chat with Qwen3.5 · 9B. Preserves the official Ollama 9B package, a smaller 4B family fallback, and a clearly labeled community uncensored GGUF option.
Run Qwen3.8 27B with Ollama, connect it to Cline in VS Code, and make one reviewable code change in a tiny local project.
Generate images from text prompts in ComfyUI with the fast distilled or more adjustable base 4B model. Save your results and reuse the visual workflow.