Run distributed inference with llama.cpp on Arm-based AWS Graviton4 instances

Who is this for?

This introductory topic is for developers with some experience using llama.cpp who want to learn how to run distributed inference on Arm-based servers.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Set up a main host and worker nodes with llama.cpp
  • Run a large quantized model (for example, Llama 3.1 405B) with distributed CPU inference on Arm machines

Prerequisites

Before starting, you will need the following:

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 run distributed CPU inference with llama.cpp on AWS Graviton4 instances. You’ll convert Meta’s Llama 3.1 70B safetensors shards to one GGUF file, quantize the weights to 4-bit, configure worker RPC backends and a master through a comma-separated worker_ips list, and verify connectivity with telnet. You’ll then launch distributed inference across the Arm servers.

Frequently asked questions

AI-assisted

These FAQs were 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
?
How do I pass the worker node addresses to the master?
Export the worker_ips environment variable with a comma-separated list of host:port entries, for example, 172.31.110.11:50052,172.31.110.12:50052. Run this on the master node before starting inference.
How do I verify the master can reach a worker before running a distributed job?
From the master, run telnet <worker_ip> 50052. A successful connection confirms that the backend server on the worker is reachable.
Which model format should I use with llama.cpp in this path?
Convert Meta’s safetensors files for Llama 3.1 70B to a single GGUF file, then quantize to 4-bit GGUF. Use the quantized GGUF for inference.
How do I confirm the quantization step worked?
The process should create a new 4-bit GGUF weights file that is smaller than the 16-bit GGUF. Use this 4-bit file for the distributed run.
How many nodes are used in the example and what roles do they serve?
The example uses three AWS Graviton4 instances: one master node and two worker nodes. The master coordinates inference while the workers run the RPC backend.
Next