keepcalculator

06 Numbers and Powers

AMD EPYC vs Other Cloud CPUs for AI Agents

Card No. 06·12037 · Updated · Standard formula, shown below

Cost per million tokens 0.6944 USD
Tokens per dollar
1,440,000 tokens
Result
Total tokens per second
1000 tokens/s
You entered
Price per hour
2.5 USD
You entered
You enter
Total tokens per second, Price per hour
You get
Cost per million tokens, Tokens per dollar
Rounding
4 dp · 0 dp

AMD EPYC processors are a strong choice for AI agent workloads in the cloud, often delivering more cores and memory bandwidth per dollar than comparable Intel Xeon or Arm-based options, but the best pick depends on your specific mix of inference, training, and latency requirements. This article compares EPYC against Intel Xeon, AWS Graviton, and GPU-accelerated instances for AI agent tasks, covering performance, cost, and practical trade-offs.

Formula

The calculator works out the cost efficiency of running an AI agent workload on a cloud CPU instance. You enter the total throughput in tokens per second (as reported by your inference framework) and the hourly price of the instance. The first output, cost per million tokens, is calculated as:

Cost per million tokens = (Price per hour) / (Tokens per second × 3600) × 1,000,000

Where:

  • Price per hour (USD) – the on-demand or reserved cost of the cloud instance.
  • Tokens per second – the aggregate generation+prompt processing throughput your workload achieves on that instance.
  • 3600 – seconds in an hour.
  • 1,000,000 – converts to per-million-token cost.

The second output, tokens per dollar, is simply the total tokens you can process for $1: Tokens per dollar = (Tokens per second × 3600) / Price per hour.

Worked Example

Suppose your AI agent workload processes 1,000 tokens per second on a cloud instance that costs $2.50 per hour. Using the formula:

  1. Tokens per hour = 1,000 × 3600 = 3,600,000 tokens.
  2. Cost per million tokens = $2.50 / 3,600,000 × 1,000,000 = $0.6944.
  3. Tokens per dollar = 3,600,000 / $2.50 = 1,440,000 tokens.

The calculator shows 0.6944 for cost per million tokens and 1,440,000 for tokens per dollar. This matches the manual calculation.

Background: What Makes AI Agent Workloads Different

AI agents are not a single task. They typically chain together multiple inference calls, tool invocations, and retrieval steps. Unlike a simple chatbot that streams a response, an agent might:

  • Parse a user request and decide which tools to call.
  • Call a search API or a database query.
  • Run a small local model to summarize results.
  • Generate a final answer with a larger model.

This means the workload is often latency-sensitive (each step adds to the user-perceived delay) and bursty (idle while waiting for external calls). It also involves a mix of prompt processing (prefill) and token generation (decode). CPUs are particularly relevant for small to medium models (under ~13B parameters) where GPU instances are overkill, or for serving many concurrent lightweight agents where memory bandwidth and core count matter more than raw FLOPs.

How AMD EPYC Compares to Intel Xeon and Arm

AMD’s EPYC line, especially the Genoa and Bergamo generations, offers up to 128 cores per socket with high memory bandwidth (12 channels of DDR5). Intel Xeon Scalable (Sapphire Rapids and Emerald Rapids) typically provides fewer cores (up to 60) but includes built-in AMX (Advanced Matrix Extensions) that can accelerate certain AI operations. Arm-based options like AWS Graviton3/4 have lower power draw and good price-performance for scale-out workloads, but software compatibility can be a hurdle for some AI frameworks.

For AI agent workloads, the key differentiators are:

  • Memory bandwidth – EPYC’s 12-channel DDR5 gives it a edge in token generation, which is memory-bound. More bandwidth means higher tokens per second per core.
  • Core density – EPYC’s high core counts allow you to run many concurrent agent sessions on a single instance, reducing per-session overhead.
  • AVX-512 and AMX – Intel’s AMX can speed up matrix multiplication for prefill, but many inference frameworks don’t fully exploit it yet. EPYC’s AVX-512 is also capable, but its advantage is raw core count.
  • Software ecosystem – Most cloud AI frameworks (PyTorch, ONNX Runtime, vLLM) are optimized for both x86 and Arm, but some niche libraries are x86-only. EPYC and Xeon are safer bets for compatibility.

Real-World Performance and Cost Considerations

In practice, the choice often comes down to cost per token. Cloud providers price instances based on hardware and demand. EPYC-based instances (e.g., AWS M7a, Azure Dv5, Google N2D) are often 10-20% cheaper per core than comparable Xeon instances. However, Xeon instances may achieve higher throughput per core for certain models due to AMX. For example, a 32-core EPYC might serve 100 concurrent agent sessions with a 7B model at 500 tokens/sec, while a 32-core Xeon might do 550 tokens/sec but cost 15% more. The cost per million tokens could be similar.

Arm-based Graviton instances are often the cheapest per core, but you need to verify that your inference stack (e.g., llama.cpp, ONNX) supports ARM NEON optimizations. Many do, and Graviton3 can be surprisingly efficient for small models. However, for larger models or heavy prefill, EPYC’s higher memory bandwidth usually wins.

How to Choose the Right CPU for Your AI Agent

Follow these steps to decide:

  1. Profile your workload – Measure the average tokens per second your agents need, the number of concurrent sessions, and the model size you plan to run.
  2. Test on a representative instance – Run your actual agent code on a mid-sized EPYC, Xeon, and Graviton instance for a few hours. Use a load generator that simulates your agent’s call pattern.
  3. Compare cost per million tokens – Use the calculator above with the measured throughput and the instance’s hourly price.
  4. Check memory and storage – Agents often need to load large embeddings or tool outputs. Ensure the instance has enough RAM (EPYC instances often have more RAM per core).
  5. Consider scaling – If your workload is bursty, you might prefer a smaller instance that scales out quickly, rather than a large one that idles.

Common Problems and Misconceptions

A frequent misconception is that CPUs are always slower than GPUs for AI. While true for training large models, for serving small models with low batch sizes, CPUs can match or beat GPUs in cost per token because GPUs are underutilized. Another issue is that many developers assume all cloud CPUs are the same. In reality, the same EPYC model can perform differently across cloud providers due to clock speed variations, memory configuration, and network latency.

Another common problem is cold start latency – when an agent needs to load a model into memory. EPYC’s high memory bandwidth helps, but you should also consider using a smaller model or a pre-warmed container to reduce startup time. Finally, be aware that cloud providers may throttle CPU performance on burstable instances (like AWS T-series), which are unsuitable for consistent agent workloads.

Alternatives: When to Use GPUs or Specialized Hardware

If your agent workload involves large models (70B+), heavy fine-tuning, or real-time video/audio processing, GPUs (NVIDIA A10, L4, A100) are still the standard. GPU instances cost more per hour but can process tokens 10-100x faster, making them cost-effective for high-volume inference. For edge cases, you might also consider:

  • AWS Inferentia – custom ASICs for inference, but require model compilation and may not support all operations.
  • Google TPU – great for large-scale training, but less flexible for agent-style workloads that need dynamic control flow.
  • Hybrid approach – use CPUs for pre-processing and tool calls, and GPUs for the main model generation. This can reduce cost by using the GPU only when needed.

Frequently Asked Questions

Is AMD EPYC better than Intel Xeon for AI inference?

It depends on the model and framework. EPYC generally has more cores and memory bandwidth, which helps with high concurrency and long context windows. Xeon with AMX can be faster for prefill in some frameworks. Test your specific model on both to get a definitive answer.

Can I run AI agents on ARM cloud instances like Graviton?

Yes, if your inference framework supports ARM. llama.cpp and ONNX Runtime have ARM optimizations, and many Python libraries work fine. However, you may encounter compatibility issues with some pre-built wheels or CUDA-dependent code, so a small pilot test is recommended.

What is the best instance type for a small AI agent (e.g., 7B model)?

A general-purpose instance with 8-16 vCPUs and 32-64 GB RAM is a good starting point. For EPYC, try AWS M7a.medium or larger, or Google N2D. Monitor your latency and cost per token, then scale up or down.

How do I measure tokens per second for my agent?

Use the inference framework’s built-in metrics (e.g., vLLM prints tokens/s) or add timing around your model calls. Run a realistic workload with multiple concurrent sessions and divide total tokens generated by total time.

Does memory bandwidth really matter for AI agents?

Yes, especially for autoregressive generation. Each generated token requires reading the entire model weights from memory. Higher bandwidth directly increases tokens per second. EPYC’s 12-channel DDR5 gives it an advantage over many Xeon and Arm chips.

Related

Formula used
in t | Total tokens per second | tokens/s | 1000 | 1 | 100000
in p | Price per hour | USD | 2.5 | 0.01 | 100
out c | Cost per million tokens | USD | p / (t * 3600) * 1000000 | 4
out d | Tokens per dollar | tokens | t * 3600 / p | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →