Install Ollama on Mac
Install the official Mac app, open it, then start Terminal.
Official Ollama downloadRun a bounded local function through Qwen3 8B and inspect the tool call, tool result, and final answer.
Estimated memory starting points for the 5.2 GB Qwen3 8B Ollama package with one tool and 4K context. Runtime and KV cache need extra memory beyond the download.
| Machine | Qwen3 · 8B |
|---|---|
| NVIDIA GPU · 8 GB | Possible with CPU offload and 16 GB-plus system RAM; check ollama ps. |
| NVIDIA GPU · 12 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| NVIDIA GPU · 16 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| NVIDIA GPU · 24 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| NVIDIA GPU · 32 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| AMD Radeon · 8 GB | Possible with CPU offload and 16 GB-plus system RAM; check ollama ps. |
| AMD Radeon · 16 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| AMD Radeon · 24 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| AMD Radeon · 32 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| Intel Arc · 8 GB | Possible with CPU offload and 16 GB-plus system RAM; check ollama ps. |
| Intel Arc · 16 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| Intel Arc · 24 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| Intel Arc · 32 GB | Runs at 4K if Ollama loads the package on this GPU; check ollama ps. |
| Apple Silicon · 16 GB unified | Runs at 4K with room for one tool; longer history uses more memory. |
| Apple Silicon · 24 GB unified | Runs at 4K with room for one tool; longer history uses more memory. |
| Apple Silicon · 32 GB unified | Runs at 4K with room for one tool; longer history uses more memory. |
| Apple Silicon · 64 GB unified | Runs at 4K with room for one tool; longer history uses more memory. |
| CPU-only · 16 GB RAM | Can run from system RAM at 4K; expect slower tool turns than GPU. |
| CPU-only · 32 GB RAM | Can run from system RAM at 4K; expect slower tool turns than GPU. |
| CPU-only · 64 GB RAM | Can run from system RAM at 4K; expect slower tool turns 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 the Qwen3 8B Ollama package, run a small Python tool loop, and check the returned value against the local lookup. Use the Windows, Mac, or Linux route for the same task.
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 Qwen3 8B package downloads 5.2 GB. Start with 4K context. An 8 GB GPU may need CPU offload; 12 GB GPU or 16 GB Apple Silicon unified memory is an estimated smoother starting point. Check ollama ps rather than assuming speed from weight size.
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 qwen3:8bThe official Ollama Python client connects to the service on your own machine.
python3 -m pip install --upgrade ollamaIn Terminal, paste this block. It writes the complete small example as tool_agent.py in your current folder. Read the code before running it.
cat > tool_agent.py <<'PY'
from ollama import chat
def get_temperature(city: str) -> str:
"""Return the temperature from this local example lookup, not live weather."""
return {"New York": "22°C", "London": "15°C"}.get(city, "No sample value")
messages = [{"role": "user", "content": "Using your tool, what is the sample temperature in New York?"}]
response = chat(model="qwen3:8b", messages=messages, tools=[get_temperature], think=True)
messages.append(response.message)
if not response.message.tool_calls:
raise RuntimeError("No tool call: check that qwen3:8b loaded and retry the exact question")
call = response.message.tool_calls[0]
if call.function.name != "get_temperature" or call.function.arguments.get("city") != "New York":
raise ValueError("Unapproved tool name or city; no function was executed")
result = get_temperature(**call.function.arguments)
print("Local tool result:", result)
messages.append({"role": "tool", "tool_name": "get_temperature", "content": result})
final = chat(model="qwen3:8b", messages=messages, tools=[get_temperature], think=True)
print("Final answer:", final.message.content)
PYRun the Python script. It checks that the requested function is exactly get_temperature and the city is New York, executes the local lookup, returns a tool message, then asks Qwen3 for its final answer.
python3 tool_agent.pyLook for Local tool result: 22°C and a final answer that uses 22°C. If the model does not request the tool, the script raises an error rather than pretending it succeeded. Use ollama ps to see CPU/GPU placement.
ollama psThe Python output prints Local tool result: 22°C, then Qwen3 uses that tool result in its final answer. The function is only called after its name and arguments pass the allowlist. No shell or network tool is available.
The lookup is a deliberately static sample, not live weather. Never allow an AI-requested tool name or argument to execute before checking it. Start with 4K context; larger tool histories increase memory use.
Confirm qwen3:8b is installed, then rerun the exact sample question with tools=[get_temperature]. The script stops instead of inventing a tool result.
Keep the allowlist check. Do not execute unexpected tools; inspect the call and retry with a narrower prompt.
Confirm the assistant tool-call message and role="tool" result are both appended before the second chat request; compare the printed local value with the final answer.
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.