Loading page

Who is this for?

Developers familiar with macOS, CMake, and LLM inference who want to run a local AI agent on Apple silicon.

What will you learn?

After completing this Learning Path, you'll be able to perform the following tasks:

  • Compile llama.cpp from source on macOS with Metal GPU and Arm KleidiAI optimizations.
  • Download Gemma 4 E4B from Hugging Face and benchmark Metal GPU versus CPU performance on Apple silicon.
  • Serve Gemma 4 E4B with a 64K context window and quantized key-value (KV) cache using llama-server.
  • Configure Nous Research Hermes Agent to use a local OpenAI-compatible endpoint and validate autonomous code-fixing workflows.

Prerequisites

Before starting, you'll need the following prerequisites:

  • An Apple silicon Mac running macOS with at least 16 GB of unified memory
  • At least 15 GB of free disk space for building llama.cpp and storing Gemma 4 E4B
  • Xcode Command Line Tools, Git, and CMake installed
  • Familiarity with the macOS Terminal, CMake builds, and basic large language model (LLM) inference concepts

Summary

AI-assisted

This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
You’ll build llama.cpp with Metal and Arm KleidiAI on your Apple silicon Mac, then run Hermes Agent against a local Gemma 4 E4B server. First, you’ll download the quantized model and compare GPU and CPU benchmarks. Next, you’ll serve it with a 64K context window, quantized KV cache, and structured tool calling. Finally, you’ll connect Hermes Agent to the local API and verify that it diagnoses and fixes two bugs in a Python script.