Ollama and Hermes: Gemma 4 local model setup

Learn to install Ollama on Mac, run Gemma 4 E4B, and connect Hermes through a custom endpoint with a 64,000-token context configuration.

Player not loading? Watch on YouTube

This tutorial explains how to run models locally with Ollama, then connect Gemma 4 E4B to Hermes Agent. The presenter installs Ollama on a Mac, downloads the model, checks the installed model list and starts a terminal chat. He also shows the desktop app, where conversations with a downloaded model stay on the computer in his demonstrated setup.

Hardware guides the model choice. The presenter recommends E4B for computers with 8 GB of RAM and says he can run a 12-billion-parameter model on his 32 GB machine. These are his recommendations and reported experience, rather than performance guarantees for every computer.

The Hermes setup focuses on context length. The running E4B model initially shows 32,768 tokens; the presenter says Hermes requires 64,000 for agent tools. He creates a variant that reuses the model's existing layers with a larger context setting. Ollama's app settings provide another route, though that setting applies to every model it launches. He then connects Hermes through a custom endpoint using Ollama's OpenAI-compatible interface.

The closing examples discuss using an AI agent with an Obsidian vault and keeping a model loaded to avoid startup delays. The presenter also explains offline use after download and describes privacy as a reason for choosing this workflow. The Obsidian discussion outlines possible uses rather than a complete vault integration tutorial.