---
title: "Efficient and Scalable Agentic AI with Heterogeneous Systems"
description: "How a compiler and scheduler match AI agent tasks to different chips, and what a voice-agent simulation finds about serving costs."
canonical: "https://research.elamur.ai/free/en/papers/asgar-2025-efficient-scalable-agentic-ai-heterogeneous/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/asgar-2025-efficient-scalable-agentic-ai-heterogeneous/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2025](https://md.research.elamur.ai/free/en/papers/2025/) / Efficient and Scalable Agentic AI with Heterogeneous Systems

# Efficient and Scalable Agentic AI with Heterogeneous Systems

Paper · 2025 · Zain Asgar, Michelle Nguyen and Sachin Katti

**Authors:** Zain Asgar, [Michelle Nguyen](https://md.research.elamur.ai/free/en/authors/michelle-nguyen/) and Sachin Katti · **Year:** 2025 · **Venue:** arXiv:2507.19635 · **Licence:** [CC BY 4.0 (arXiv)](http://creativecommons.org/licenses/by/4.0/)

Cited by **6** papers in our library of more than 163,000 papers whose bibliographies we read · [licence](http://creativecommons.org/licenses/by/4.0/)

- [PDF](https://arxiv.org/pdf/2507.19635)
- [arXiv 2507.19635](https://arxiv.org/abs/2507.19635)

## Summary

A voice assistant can spend part of a request transcribing speech, part waiting for a search service, and part generating a reply. These steps place different demands on the machines that run them. Generating a reply can require an accelerator that moves data quickly through memory, while handling a search response may mostly require ordinary processing and a network connection. The paper asks whether a serving system can exploit these differences to reduce the cost of running an agent while keeping the application responsive. Its proposed system can assign work to CPUs and accelerators of different generations, performance tiers, and manufacturers.

The authors represent an agent as a graph of operations and dependencies. A voice agent, for instance, can take a branch to search the web and then return to generation with new information. The graph can also expose stages inside a single operation. For a [large language model](https://md.research.elamur.ai/free/en/concepts/large-language-models/), prefill processes the input and prepares reusable attention state. Decode uses that state to generate output tokens in sequence. Separating the stages lets the planner choose hardware for each and account for the cost of moving state between them. The authors use Multi-Level Intermediate Representation, or MLIR, to describe operations at these different levels, and propose a scheduler that uses resource estimates, prices, and service targets to decide where the operations should run.

The preliminary evaluation uses a conversational voice agent and concentrates on its most computationally demanding component, LLaMA 3. A continuous-load simulation combines available hardware measurements with analytical performance estimates. The interactive scenario imposes limits of 250 ms to the first token and 20 ms between tokens. The offline scenario emphasizes tokens generated per second per dollar. Across the evaluated configurations, B200 prefill paired with Gaudi 3 decode gives the strongest overall ownership-cost result, particularly at FP8 precision. H100 prefill with Gaudi 3 decode is frequently comparable to or slightly better than using B200 for both stages under the study’s assumptions.

The scope of that result is the accelerator comparison within the simulated voice workload. The study places the other voice-agent components on CPUs and leaves comprehensive system validation for further work. The economics also depend on prompt and response length, the price and operating cost of the devices, and the network’s ability to carry attention state within the token latency budget. The paper shows how those considerations can inform the same placement decision and why a newer fleet of identical devices is only one of the configurations worth evaluating.

## Deep dive: Efficient and Scalable Agentic AI with Heterogeneous Systems

How a compiler and scheduler match AI agent tasks to different chips, and what a voice-agent simulation finds about serving costs. · about 34 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A request can change shape while it runs

The paper begins from a distinction between serving an inference call and serving the application that makes the call. An agent can take input, use it to choose a course of action, and carry out operations that produce new input for another decision. A simple rule can map a condition directly to an action. A more involved agent can read stored context, issue a query, and use the result to decide whether it needs another query. In the second case, a description of the application has to accommodate paths whose selection depends on what happens after execution begins.

The authors separate several sources of variation. Autonomy concerns how much decision-making the agent performs. Interactivity concerns whether it responds to feedback or new input while working, possibly preserving state between user turns. Functional capabilities concern what it can actually do, such as using a database, calling an external service, or running local processing. A single-pass document workflow can involve several operations even though it has little interactivity. A conversational system may repeatedly revisit the same operations because its next move depends on new information.

Variation also appears in how agents are composed. The paper describes a controller that calls tools directly, peers that work concurrently and exchange information, and hierarchies in which a supervisor delegates to specialized components. It also allows one agent to invoke another as a tool. These structures matter to a serving system because each exposes a different set of dependencies. A supervisor may have to wait for a particular result before making its next decision. Independent peers may be able to proceed together. A nested graph can contain parts worth placing separately even if the developer treats the whole subagent as one operation.

The conversational example makes the consequences concrete. Audio is first transcribed. The resulting text goes to a component that can either produce a response or request information from the web. A search might supply enough context to answer, or it might lead to another search. Once the response text is ready, speech synthesis converts it into the audio returned to the user. The possible operations can be known in advance while the route and the amount of work remain dependent on the request. Improving a step that some requests skip, or that spends much of its time waiting on an external service, may have a limited effect on the time a user experiences.

#### Different operations consume different resources

The paper distinguishes several hardware properties that can matter independently. Specialized compute supplies the arithmetic throughput for large numerical operations. Memory bandwidth measures how quickly data can move through memory, while memory capacity determines how much can be held there. Network bandwidth governs transfers between devices, machines, and services. Persistent storage capacity matters when data must be retained or moved out of faster memory. General-purpose processing supports work such as parsing, control logic, and input or output preparation. An operation can put pressure on more than one of these resources, and changing how it is distributed can change which pressure dominates.

A language generation call illustrates the difference between phases. Prefill processes the input sequence together and establishes the attention state needed later. It can make substantial use of arithmetic throughput. During decode, the next token depends on what has already been generated. The execution repeatedly accesses stored state and other data, making memory traffic and the amount of state that fits on a device important. A placement that keeps both phases local avoids a handoff between machines. A placement that separates them gains a new hardware choice and introduces a transfer whose duration matters to the application.

Other stages have different profiles. A remote tool call can spend much of its elapsed time on communication and work performed by another service. Its local component still prepares the request and handles the result. A data-processing stage can run general-purpose instructions and need substantial memory if it assembles large documents. Storing attention state requires little arithmetic in its own right, yet pressure on device memory can move that state to more distant storage and make access slower. The authors also discuss diffusion workloads, where repeated passes through a network can keep both arithmetic units and memory busy. These descriptions motivate treating resource demand as a property of an operation and its execution plan.

The authors contrast this variety with the purchasing and deployment pattern of building racks from the same high-end GPU configuration. Such racks provide fast interconnects and substantial capacity across several resources at once. Their price reflects that bundle. An application may spend some of its time in operations that need only a subset of what the rack provides. The authors’ proposed alternative is to evaluate the resource bought by each dollar and place a task where the resources it needs are economical. That comparison still has to include the cost of combining the devices, since an inexpensive execution stage can become a poor choice if every request pays for a slow handoff.

#### What earlier systems already addressed

The authors describe earlier agent research as concentrating on topics such as the quality of an agent’s decisions, the integration of tools, and coordination among agents. ReAct, AutoGPT, and CAMEL are examples of that line of work. The foundations of the paper’s deployment question also include work on how to evaluate agents. The authors point to the argument that accuracy alone can favor unnecessarily expensive ways of carrying out a task. In a serving study, the relevant question includes the resources consumed in reaching the result. [ReAct](https://md.research.elamur.ai/free/en/papers/yao-2022-react-synergizing-reasoning-acting-language/) · [Auto-GPT for Online Decision Making](https://md.research.elamur.ai/free/en/papers/yang-2023-auto-gpt-online-decision-making/) · [CAMEL](https://md.research.elamur.ai/free/en/papers/li-2023-camel-communicative-agents-mind/) · [AI Agents That Matter](https://md.research.elamur.ai/free/en/papers/kapoor-2024-ai-agents-that-matter/)

At the application level, the paper discusses LangGraph’s representation of stateful transitions and the collaborative abstractions of CrewAI and AutoGen. Such systems give developers a way to describe how responsibilities are divided, when tools are called, and how results move between parts of a workflow. The paper’s concern begins with the relationship between that description and physical execution. A developer can specify that a tool result feeds a generation step without specifying how the result should reach the device that is available to run it. The authors want to preserve the meaning of the workflow while leaving room to choose the device and location.

Earlier inference-serving work supplies optimizations within that larger graph. The paper describes Flash Attention as improving attention execution and memory efficiency, and discusses sparsity, quantization, and batching as additional ways to manage compute and memory. In particular, vLLM’s paged attention organizes the reusable key-value state used during generation and helps support continuous batching. SGLang combines structured prompt programming with a runtime and scheduling that account for memory. TensorRT-LLM uses such techniques as optimized CUDA kernels and operator fusion on NVIDIA hardware. These examples give the authors mechanisms a broader deployment system can draw on, while defining a narrower scope than the graph of an entire agent. [Efficient Memory Management for Large Language Model Serving with PagedAttention](https://md.research.elamur.ai/free/en/papers/kwon-2023-efficient-memory-management-large-language/)

The closest antecedents separate prefill and decode across devices. Splitwise demonstrates the use of distinct NVIDIA accelerators for those phases, selected for different performance and cost properties. The paper also discusses the planner, router, and state-transfer components in NVIDIA Dynamo, and describes how llm-d bases placement decisions on cache state, service targets, and system load. It cites Mitra and colleagues for an empirical examination of disaggregation, including the need to match rates and scale resources as load changes. The proposed planner takes phase splitting as an available execution strategy. It also needs to represent the option of keeping phases together and to decide placements for operations outside the language generation call. [Splitwise](https://md.research.elamur.ai/free/en/papers/patel-2023-splitwise-efficient-generative-llm-inference/)

The compiler proposal has a similar relationship to earlier work. The paper cites IREE and MHLO as examples of using MLIR to support portable execution or standardized tensor operations. It describes Triton as a complementary tool for writing efficient GPU kernels. Those efforts bear on the execution of numerical operations once a target or backend is in view. In this paper, the compiler representation must also preserve information about calls to tools, memory, and other agents so that placement decisions can be made across a workflow. The systems problem is to connect that broader view to the details used by an execution backend.

### The method, step by step

#### Draw the application as a graph of work

The starting point is the agent as a developer understands it. In the voice example, a speech recognizer passes text to a generation component, web search provides information when requested, and a speech synthesizer takes the final text. The authors express these operations as nodes and use arrows to record what must pass between them. A node can carry out an ordinary computation, read memory, invoke a tool, perform inference, or choose which operation runs next. An arrow can carry a result, such as text or a retrieved document, or it can express a control dependency that determines whether another operation may proceed.

This description can preserve hierarchy. An outer graph can treat a subsidiary agent as a single component with a defined input and output. The system can look inside that component when it needs to see where costs arise or which operations might run together. The graph can represent repeated paths as well. When generation requests another search, new search results return to a component that has already executed. The authors frame such cycles as compatible with the representation provided runtime planning can handle them through measures such as bounded unrolling or checkpointing. Unrolling makes repeated instances of a body explicit up to a limit, and checkpointing preserves progress or state at selected points.

The graph exposes opportunities for parallelism. In pipeline parallelism, stages can serve different requests at the same time. While a decode stage is working through an earlier response, another request can enter prefill. Dependencies are still respected within each request. In task parallelism, separate tasks within the available work may execute concurrently if their inputs are ready. The paper illustrates this with specialized experts that operate on their assigned portions of the workload. Distinguishing the two patterns helps explain why the cost formulation gives a stage-to-stage transfer and synchronization among parallel workers different terms.

From an agent workflow to distributed execution The steps in order.

#### Expose the right amount of detail to the planner

MLIR is the compiler representation the authors use to connect the application graph to hardware. A dialect is a vocabulary of operations with meanings that the compiler can reason about. An agent-oriented dialect can express, for instance, that a step reads stored context, passes a token sequence to inference, or invokes an external tool. Retaining these meanings lets later passes analyze what a node consumes and produces. The representation can also preserve a composite operation until its internals become relevant to planning.

The paper illustrates the transition with a LangChain-style workflow that has memory and access to search and a calculator. In its high-level form, the workflow is convenient for expressing the agent’s behavior. In its corresponding MLIR form, memory accesses, inference, and tool calls are visible as operations with typed inputs and outputs. Types describe what kind of value can pass from one operation to another. Explicit edges then show where a consumer needs data from an earlier stage. Together, the types and edges give the compiler a basis for checking and transforming the graph.

The authors illustrate several kinds of decomposition. A generation call can be opened up into prefill and decode. Tool invocation can be separated into a lookup stage and a computation stage. Another view exposes the internal parallelism of inference with experts. A gate selects a subset of experts for the incoming tokens, and the work for each selected expert can be distributed through tensor parallelism. Tensor parallelism places pieces of the same numerical operation on different devices. Expert parallelism distributes distinct expert computations. In the illustration the compiler can represent both choices inside the same inference subgraph, including tensor-parallel work during prefill and decode.

Decomposition and fusion serve complementary purposes. Decomposition exposes choices that were hidden when a larger operation was treated as atomic. Fusion keeps operations together when their dependency would otherwise require unnecessary movement or coordination. For instance, exposing the handoff between prefill and decode gives the optimizer a freedom it can use if the hardware savings justify moving the cache. Where the transfer is expensive, a local plan can retain the dependency inside a device or a more tightly connected group. The ability to represent both shapes allows the compiler to leave that choice to deployment analysis.

MLIR passes also contribute information to the planner. Shape inference estimates the dimensions of intermediate values. Bufferization makes storage for those values explicit. Dependency analysis tracks the order imposed by their use, and cost analysis estimates resources for the operations that produce or consume them. Operations can carry annotations from profiling or placement hints. The design combines these annotations with knowledge of the hardware and with feedback from execution. Once fragments and targets are selected, the compiler can lower operations towards backends such as LLVM IR, TensorRT, or XLA HLO. Here, lowering means translating a higher-level operation into a form closer to the instructions or kernels used by the chosen target.

#### Build execution estimates

The method concerns serving. Its data procedure is to collect or estimate the quantities that describe execution on candidate devices. The authors mention hardware specifications, benchmarks, system traces, and earlier runs as sources. The preliminary study estimates the demands of inference from the size of the network, its architecture, and the lengths of the input and generated sequences. It combines measurements where available with a roofline performance estimate. Roofline analysis describes how arithmetic throughput and the rate of data movement can constrain attainable performance. The study assumes dense arithmetic for its reported operation counts. [Roofline](https://md.research.elamur.ai/free/en/papers/williams-2009-roofline-insightful-visual-performance-model/)

Formally, the paper describes the dependency structure as a directed graph.

```
G = (V, E)
```

Here, `G` is the workload graph, `V` is its set of tasks, and `E` is its set of directed dependencies. A task is indexed by `i`. When `k` indexes a second task, an edge written `(i, k)` indicates a dependency directed from `i` to `k`. The same graph can carry a branch whose choice depends on a runtime result.

The candidate device classes form a set denoted `H`, with `j` indexing a class. A class can represent a CPU, a tier of GPU, or another accelerator. For each task and candidate class, the paper expresses execution time as a dominant resource term plus additional latencies.

```
tᵢⱼ = maxᵣ(θᵢⱼ⁽ʳ⁾ / perfⱼ⁽ʳ⁾) + lᵢ + dᵢⱼ + δᵢⱼ
```

The quantity `tᵢⱼ` is the estimated time to execute task `i` on hardware class `j`. The superscript `r` identifies a resource, such as computation, memory, or bandwidth. The demand associated with that resource is `θᵢⱼ⁽ʳ⁾`, and `perfⱼ⁽ʳ⁾` is the performance available for it on class `j`. Dividing demand by the corresponding performance gives a time estimate for that resource. The operator `maxᵣ` takes the largest of those estimates for the task and class under consideration. The term `lᵢ` is static task latency, `dᵢⱼ` is the communication cost in time, and `δᵢⱼ` is synchronization overhead among parallel tasks.

The maximum expresses a bottleneck assumption. If the time implied by memory traffic exceeds the time implied by arithmetic, the memory term determines the resource portion of the estimate. A faster arithmetic unit may have little effect on that portion. The other terms preserve effects that a resource rating would miss, including fixed startup work, a cross-device transfer, or a synchronization operation. The authors allow the terms to be drawn from profiling. This is important where a nominal device specification provides only an upper bound on the rate an application can obtain.

The monetary or weighted execution cost uses a different calculation.

```
Costᵢⱼ = ∑ᵣ θᵢⱼ⁽ʳ⁾ · cⱼ⁽ʳ⁾ + γ · dᵢⱼ
```

`Costᵢⱼ` denotes the cost attributed to running task `i` on class `j`. The sum `∑ᵣ` runs over resource categories. For each resource `r`, demand `θᵢⱼ⁽ʳ⁾` is multiplied by `cⱼ⁽ʳ⁾`, the unit price for that resource on class `j`. The term `dᵢⱼ` represents communication, and the weight `γ` sets the size of its contribution to the cost objective. The dot denotes multiplication.

The two expressions answer different questions about the same placement. The time estimate asks how long the execution takes given a bottleneck and overheads. The cost expression adds the charges associated with consuming resources and moving data. An accelerator can have a higher purchase or operating cost while offering a low cost per unit of the resource a task needs. Conversely, an otherwise attractive device class can lose its advantage once a particular split requires communication at the rate necessary to preserve responsiveness.

#### Choose an allocation under constraints

The decision variable `xᵢⱼ` is the fraction of task `i` assigned to class `j`. A fractional assignment can stand for divisible work or a soft allocation. When a task is indivisible, the paper describes the usual choice as a binary assignment. The objective includes the estimated execution cost of the proposed allocation and a penalty for exceeding service targets.

```
min ∑ᵢ∈ⱽ ∑ⱼ∈ᴴ xᵢⱼ · Costᵢⱼ + λ · ∑ᵢ∈ⱽ sᵢ
```

The minimization is over the allocations and permitted slack. The first pair of sums runs over tasks `i` belonging to `V` and device classes `j` belonging to `H`. The cost of a task and class pairing, `Costᵢⱼ`, is weighted by the assigned fraction `xᵢⱼ`. The symbol `sᵢ` denotes task `i`’s slack, the amount of excess latency the solution is allowed to absorb. The penalty weight `λ` determines how strongly total slack is discouraged. The authors describe taking `λ` towards infinity as the hard-constraint limit.

The assignment constraint makes the planner account for all of each task.

```
∑ⱼ∈ᴴ xᵢⱼ = 1  for every i ∈ V
```

The sum runs over the classes `j` in `H`. Its terms are the assigned fractions `xᵢⱼ`, and the equality applies to every task `i` in `V`. The value `1` stands for the whole task. In the fractional version, several terms can contribute to that total.

For latency, the paper defines a weighted time for each task.

```
tᵢ = ∑ⱼ∈ᴴ xᵢⱼ · tᵢⱼ
```

Here, `tᵢ` is the latency attributed to task `i`, `j` ranges over classes in `H`, `xᵢⱼ` is the assigned fraction, and `tᵢⱼ` is the corresponding execution-time estimate. For an indivisible placement, the weighted expression picks out the time of the selected class. For a fractional placement it is the weighted latency used by this formulation.

The service-level agreement, abbreviated SLA, is a target the system is meant to meet. The displayed constraint expresses it with slack.

```
tᵢ − sᵢ ≤ Tₛₗₐ
```

The quantity `tᵢ` is task `i`’s estimated latency, `sᵢ` is the slack allowed for that task, and `Tₛₗₐ` is the target time. The inequality makes the constraint feasible when the excess can be covered by slack. Whether such a solution is attractive depends on the penalty in the objective.

```
sᵢ ≥ 0
```

This bound restricts the slack `sᵢ` for task `i` to a non-negative value. A task that meets its target can use the value `0`.

An optional throughput constraint expresses a rate target as a sum of inverse task times.

```
∑ᵢ∈ⱽ 1 / tᵢ ≥ R
```

The sum ranges over tasks `i` in `V`. The reciprocal of `tᵢ`, using `1` as the numerator, expresses a rate from task `i`’s estimated time. The threshold `R` is the required rate in this version of the constraint. The expression is the paper’s generic throughput constraint. The experimental study evaluates generation throughput through a more specific scenario involving batch sizes, token lengths, and parallelism.

Hardware capacity limits how much assigned resource demand a device class can accommodate.

```
∑ᵢ∈ⱽ xᵢⱼ · θᵢⱼ⁽ʳ⁾ ≤ capⱼ⁽ʳ⁾  for every j and r
```

The sum collects tasks `i` in `V` that use class `j`. Each contribution is the resource demand `θᵢⱼ⁽ʳ⁾` for resource `r`, weighted by the fraction `xᵢⱼ` placed there. The right-hand side, `capⱼ⁽ʳ⁾`, is the capacity of class `j` for that resource. The inequality is repeated for each class and each resource category.

Finally, the fractional formulation bounds the assignments.

```
xᵢⱼ ∈ [0, 1]  for every i and j
```

The variable `xᵢⱼ` may range from `0` to `1` inclusive for every task `i` and class `j`. These endpoints are the only choices when the task is treated as indivisible. With fixed estimates and without the optional inverse-time constraint, the displayed fractional objective and bounds are linear. The integral placements used in the worked example require a discrete decision, a distinction that matters when interpreting the paper’s description of convex optimization.

#### Follow a request through the worked placement example

The paper illustrates the scheduling decision with a hypothetical request containing 1000 input tokens and 500 output tokens. Prefill must finish and make its state available before decode can use it. The example assumes favorable batching and utilization for the profiled rates and gives each phase a single placement. It calls the high-performance device HP and the cost-optimized device CO. These names describe the roles of the devices in the example. The figures are hypothetical and are separate from the estimates for named accelerators in the voice-agent study.

For prefill, HP takes 80 ms and charges $0.00008 per input token, while CO takes 130 ms and charges $0.00005 per input token. For decode, HP takes 25 ms and charges $0.00006 per output token, while CO takes 30 ms and charges $0.00002 per output token. If HP runs prefill and CO runs decode, the handoff adds 10 ms and costs $0.000005 per prefill token. These inputs separate the penalty for moving state from the price of executing either phase. They also show why the placement of the second phase can be more flexible than that of the first in this example.

The worked request has an elapsed-time deadline of 120 ms. The choice of HP for prefill gives the planner enough room to use CO for decode and pay for the transfer. The paper compares that choice with keeping both stages on HP, which is faster and has a higher reported cost. Keeping both on CO misses the deadline. The end-to-end addition in this particular example gives a concrete interpretation of the service constraint for serial stages. A graph with branches, overlaps, or repeated tool calls requires the planner to determine which operations contribute to elapsed time on the path it is budgeting.

#### Turn a placement into a running service

The proposed cluster architecture divides responsibility between planning and request execution. The planner and scheduler run on the slower path. They use information about capacity, workload demand, and utilization to allocate resources and can revise allocations or migrate work. On the fast path, a router receives and directs requests using signals such as the location of reusable state and the availability of the selected execution component. This division matters when requests need prompt handling and the resource plan is expensive enough to maintain on a different timescale.

The runtime on an accelerator node executes inference or a compiled subgraph and manages local state. It also supplies metrics that can inform later decisions. The cache manager has a broader view of state across the cluster. The paper proposes coordinating attention caches, graph databases, and agent memory, and moving infrequently used data to slower tiers where appropriate. A placement decision and a cache decision can affect each other. For example, a routing choice that keeps a request near its existing state can spare the system a transfer, while a plan that moves a stage can make the old location less useful.

The network design distinguishes links within a tightly connected system from the fabric that joins separate machines. The authors assume that the scale-up fabric is limited to a chassis, typically with up to 8 accelerators. They propose high-speed RDMA over Converged Ethernet, or RoCE, for communication outside it. RDMA stands for remote direct memory access. In the design it supplies a transport for moving such data as caches across the network. The serving layer accounts for link throughput, latency, and potential contention when considering how the fragments should communicate.

There are two recurring reasons for communication. Parallel execution can require multiple devices to exchange results while they work on the same computation. A pipeline can require the output state of one stage to reach the next. The authors distinguish these uses because they constrain different parts of execution. Frequent coordination can limit the gains from adding devices to a stage. Moving the prefill cache has a more direct effect on when decode can continue the response. Overlapping communication and computation can hide some of the elapsed transfer time when the pipeline and available work permit it.

#### Estimate how much bandwidth the state transfer needs

The state in the prefill-to-decode handoff is the key-value cache, also called the KV cache. In a [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/), it holds attention information from tokens already processed so that the next decode step can reuse that information. In the paper’s transfer analysis, the receiving stage needs the populated cache in time for the continuation of generation. The authors connect the handoff to the second token, making the token-to-token budget important even if prefill itself completes within the time-to-first-token target.

For the sending side, the paper divides the cache size by the first-token interval and the number of participating prefill accelerators.

```
BWₚₑₐₖ,ₑgᵣₑₛₛ = KVCacheSize / (TTFT · NₚᵣₑբᵢₗₗGPU)
```

`BWₚₑₐₖ,ₑgᵣₑₛₛ` is the estimated peak outgoing bandwidth per participating prefill GPU. `KVCacheSize` is the amount of state to move, `TTFT` is time to first token, and `NₚᵣₑբᵢₗₗGPU` counts the GPUs assigned to prefill. The denominator uses the available interval and distributes the transfer across the participating GPUs as in the paper’s estimate.

The receiving side uses the decode GPU count and the token-to-token interval.

```
BWₚₑₐₖ,ᵢₙgᵣₑₛₛ = KVCacheSize / (TBT · NdecodeGPU)
```

`BWₚₑₐₖ,ᵢₙgᵣₑₛₛ` is the estimated peak incoming bandwidth per participating decode GPU. The transferred amount `KVCacheSize` is the same cache size, `TBT` is the token-to-token time, and `NdecodeGPU` is the number of GPUs assigned to decode. Under this expression, a greater number of receiving GPUs reduces the estimated demand per receiving GPU for the same state and interval. It leaves the need to move the state across the fabric.

The amount of state depends on the architecture of the inference component and on the request or batch.

```
KVCacheSizeₚₑₐₖ = 2 · Nlayers · dₘₒdₑₗ · (Nkv / Nheads) · ISL · BS · BPE
```

`KVCacheSizeₚₑₐₖ` is the estimated peak key-value cache size. The factor `2` accounts for both keys and values. `Nlayers` counts transformer layers, and `dₘₒdₑₗ` is the hidden dimension. `Nkv` counts key-value heads and `Nheads` counts all attention heads, so their ratio scales the amount stored. `ISL` is the input sequence length in tokens. `BS` is the batch size, and `BPE` is bytes per stored element. The paper gives `2` bytes per element for FP16 as an example.

The bandwidth expressions characterize a cache transfer against short timing windows. The size expression also shows how a batch changes the amount of state to be moved. Holding the other quantities fixed, the size grows with the number of inputs in the batch and their sequence length. For offline work, the paper suggests reasoning about bandwidth over a longer interval when total completion time matters more than the delay immediately following the first token. This can change which link a planner regards as sufficient for a given split.

### Experiments and results

#### What the evaluation runs

The evaluation uses the conversational workflow already described, with speech recognition, web search, and speech synthesis around the generation component. The optimizer assigns the comparatively light surrounding work to CPUs. The authors then concentrate the evaluation on the accelerator choice for generation, which they identify as the main influence on the agent’s total cost of ownership in this setup. The workload specification uses fixed prompt and generation lengths. The paper reports these as serving scenarios and gives no named voice corpus or benchmark split for them.

The generation configurations use LLaMA 3 with 8B or 70B parameters. Each size is evaluated in FP16 and FP8, two numerical precision settings. The optimizer receives estimates of the compute and memory needed for each configuration. Latency and throughput estimates draw on hardware measurements when the authors have them and on the analytical performance bounds described earlier. The authors simulate a continuous supply of requests with unconstrained hardware availability. Their planning procedure explores batching and forms of parallelism to reach the best result under the selected service objective. [LLaMA 3](https://md.research.elamur.ai/free/en/papers/grattafiori-2024-llama-3-herd-models/)

The sequence lengths test opposite balances of input processing and generation. The reasoning-like scenario uses an input of 512 tokens and an output of 4096 tokens. Decode consequently accounts for a long portion of the generation workload. The summarization-like scenario uses an input of 4096 tokens and an output of 512 tokens, putting more emphasis on processing the prompt. These are descriptions of the sequence shapes. The paper evaluates their serving economics and performance, with no answer-quality or summary-quality score.

#### Service targets and the cost comparison

The interactive scenario uses a time-to-first-token target of 250 ms and a token-to-token target of 20 ms. The first metric concerns how soon generation becomes visible. The second concerns the pace after it has begun. In a disaggregated execution, satisfying the first target still leaves work to do on the second, since the cache prepared during prefill has to be accessible to decode. The offline scenario maximizes tokens/s/$, giving the optimizer a way to weigh generation throughput against expenditure.

The placement notation in the paper puts the prefill hardware to the left of `::` and the decode hardware to the right. H100::H100 is the homogeneous reference in the ownership-cost figures, whose reference line is marked at 1.0. B200::B200 is the newer uniform alternative used in the authors’ interpretation. The authors focus on 6 hardware pairings to illustrate the cost and performance tradeoffs. Within a pairing, the search can change tensor and pipeline parallelism as well as batch size. A pairing therefore describes the device classes used for the phases, and its selected configuration reflects the choices available within those classes.

The optimizer uses purchase-price and operating-cost estimates alongside capacity, memory bandwidth, and arithmetic throughput. For the NVIDIA A40 and A100, the purchase prices are $3,000 and $8,000, respectively, and the corresponding operating costs are $0.15 and $0.25 per hour. The A40 is listed at 48 GB of memory and 696 GB/s of memory bandwidth. The A100 is listed at 80 GB and 2039 GB/s. These devices help represent hardware tiers with different prices and resource profiles.

The Intel Gaudi3 is listed at $12,500 and $0.49 per hour, with 128 GB of memory and 3700 GB/s of bandwidth. The AMD MI300x is listed at $20,000 and $0.52 per hour, with 192 GB and 5300 GB/s. For the NVIDIA H100, the corresponding values are $25,000 and $0.60 per hour, with 80 GB and 3350 GB/s. For the B200, they are $40,000 and $0.83 per hour, with 192 GB and 8000 GB/s. These are inputs to the optimization, so the ownership-cost findings depend on how much capacity and how many devices a successful placement requires.

The prices come from representative reseller listings as of June 2025. In the cost calculation, the hardware is financed over 4 years at 8% interest. The electricity assumption is $0.40/kWh with nodes operating at their maximum rated thermal design power. The calculation also incorporates the effects of the network used for parallel execution and transferring state. Datacenter or colocation fees and nonrecurring engineering expenses are outside the accounting. The comparison therefore concerns a defined set of expenses under a specified usage assumption.

#### Which pairings come out ahead

The authors report that B200::Gaudi 3 yields the best overall ownership-cost benefit in the study, with an especially strong showing for FP8. The improvement appears for interactive and offline service. The paper says the pairing also offers a benefit against B200::B200, although smaller than against the older homogeneous reference. The result reflects the combination of a fast prefill placement and a decode placement the analysis finds economical when the token pacing requirement allows it.

H100::Gaudi 3 is frequently comparable to, or slightly better than, B200::B200 in the authors’ comparison. That finding concerns H100 as the device class for prefill and Gaudi 3 for decode. It gives a conditional economic case for retaining already deployed accelerators, since a whole fleet need not be replaced to obtain the simulated service characteristics. The study applies its general cost assumptions to the devices. The authors separately speculate that partial amortization of hardware already owned could improve the case, and leave that possibility outside the calculation.

The prose describing the ownership-cost figures gives the baseline value and the ordering of the notable pairings. It leaves the exact bar heights for particular size, precision, and service settings to the figures. The quantitative placement comparison below uses the paper’s separately specified worked example, where the elapsed time for every listed alternative is given. It shows the feasibility decision that precedes a cost ranking under a hard deadline.

Request latency by placement in the hypothetical prefill and decode example The mixed placement meets the deadline, while using the cost-optimized device for both phases misses it.

**The numbers**

| System or setting | ms |
| --- | --- |
| High-performance prefill and decode | 105 |
| High-performance prefill and cost-optimized decode (this paper) | 120 |
| Cost-optimized prefill and decode | 160 |

In the worked example, the paper reports $0.11 for the all-HP placement and $0.095 for the selected mixed placement, including the cache transfer. Both satisfy the example’s 120 ms SLA, so the objective favors the mixed option at its lower cost. The paper lists $0.07 for the all-CO request, a total inconsistent with that option’s stated token counts and rates. Its infeasibility follows independently from the reported latency. These figures concern the hypothetical request, whose device rates and elapsed-time target are distinct from the simulated interactive voice workload.

#### What the network estimates add

Under the assumptions used for the cache calculation, the authors estimate that a 200–400 Gbps link can support the transfer SLA for inputs up to 32K tokens, depending on the LLaMA variant. This is a provisioning estimate for the handoff. The available time for the transfer, the amount of state, and how it is distributed all matter to its interpretation. The authors explain that batching raises peak transfer requirements because the batch carries more cache state. A deployment sharing its links with other computation would also have to account for the contention considered in the system design.

The paper also observes that a longer input can change both sides of the bandwidth estimate. The amount of cache grows linearly with sequence length in the given formula. Time to first token can grow faster than linearly, giving the transfer a larger time window in the estimate for outgoing bandwidth. More receiving GPUs can likewise lower the peak ingress demand attributed to each GPU. An architecture that stores less attention state reduces the transfer for another reason. The paper cites DeepSeek-V2 in discussing that possibility. [DeepSeek-V2](https://md.research.elamur.ai/free/en/papers/deepseek-2024-ai-deepseek-v2-strong-economical-efficient/)

### What the ablations show

The paper reports no formal component-removal ablation and instead analyzes changes in sequence length, precision, device placement, parallelism, and cache-transfer requirements. These comparisons vary the conditions under which a plan is chosen. They help explain why a measured or estimated device advantage can be important in one configuration and less important in another. The reported outcomes reflect plans selected jointly over several choices, so the paper leaves the separate contribution of each system component undetermined.

#### Prompt length changes the placement decision

The sequence comparisons give prefill and decode different shares of the computational work. For the longer-prompt scenario, the paper’s analysis identifies Gaudi 3 as an economical prefill choice because of its cost-performance balance for prompt processing. The same discussion identifies conditions in which B200’s compute performance justifies its price, especially when latency or FP8 performance is decisive. These statements apply to different regions of the evaluation. The most economical device for prefill over a particular set of long-input cases and the device used by the strongest overall pairing answer different questions.

With the longer output, the analysis emphasizes the advantages of Gaudi 3 for decode when the application can tolerate the pacing associated with that placement. This is where comparatively low marginal cost for memory-related resources can affect the result for much of a request. The paper describes B200 as offering the best raw performance while costing more, and still looking relatively efficient against H100. The optimizer therefore has to distinguish a preference for serving more tokens quickly from a preference for obtaining more token throughput per dollar, with each scenario imposing its own performance conditions.

The hardware resource analysis supplies context for these choices. The paper compares accelerator prices with different resource specifications and finds favorable memory-bandwidth economics for Gaudi3 and MI300x. B200 has a leading cost-efficiency position in the FP8 compute comparison. Capacity-based rankings differ again, with MI300x and A40 among the most economical devices in that dimension. These comparisons use specifications and prices. They explain why a device might enter a promising configuration, while latency, communication, and feasibility still have to be evaluated for the complete placement.

#### Parallelism has a communication cost

The authors report that initial increases in tensor parallelism substantially reduce latency. Distributing an operation can shorten the computation each accelerator has to carry out. With further increases, device-to-device communication grows enough to erase the gains. This is a controlled change in the amount of parallel work available to the serving configuration, but the paper gives the overall trend in prose, without a separate numeric breakdown for each degree of parallelism or each link topology.

That result complements the mixed-device comparison. Tensor parallelism trades local arithmetic against repeated exchanges within a distributed computation. Disaggregating prefill and decode trades the benefits of separate placements against a handoff between phases. Both use the network, with distinct timings and communication patterns. A device pairing can appear attractive on its own specifications and become unattractive if the parallel implementation would often cross a limited link. The planner’s choice of parallelism thus depends on where the devices are located as well as what the devices can do.

The paper includes paged attention among the optimizations available to the configurations it evaluates. Efficient management of the cache can improve the way inference uses memory and supports batching. The evaluation reports results with that optimization incorporated and does not show a paired experiment with it disabled. The same applies to graph transformations, routing, and cache management. Their roles are described in the architecture, while the placement comparison reflects the configurations as evaluated.

#### The worked comparison isolates a narrower mechanism

The hypothetical example holds the request and its assigned device rates fixed. It adds a stated transfer penalty when the phases run on different devices. That makes the logic of the decision inspectable. A lower price for decode is valuable only after the time left by prefill is enough to cover both the decode stage and the handoff. The all-HP option illustrates what the extra latency margin costs under the example’s rates. The mixed option spends the available latency margin to bring the reported cost down.

The effect of the deadline can be read directly from the structure of the comparison. A placement that already fails during its prefill stage remains uncompetitive under the hard target even if decode is cheap. A placement with a rapid first stage has more options for the second. The case explains how heterogeneity can help with a specific sequence of serial operations. In the voice workload, the optimizer extends that reasoning to device availability, batches, network limits, and parallel execution, so the hypothetical device rates do not quantify the benefit of any real pairing.

### Limitations

#### Limits the authors state

The authors characterize the results as preliminary and say that comprehensive validation is underway. The evaluation simulates a continuous workload with unconstrained availability of devices. Some estimates use empirical measurements, supplemented by analytical performance modeling. This setup supports comparison of choices under the modeled conditions. The cost and latency of supplying the same service on a finite cluster under changing load remain open.

The authors also distinguish their resource-demand illustrations from measurements. The profiles of operations such as inference, tool calls, cache storage, and general-purpose processing use qualitative estimates. Those profiles motivate the placement framework by describing likely bottlenecks. The evaluation of the LLaMA 3 configurations uses a separate procedure drawing on architecture, sequence length, measurements where available, and dense-compute estimates. The paper does not make the qualitative profiles a substitute for profiling the operations of another deployment.

The stated cost assumptions restrict the financial interpretation. The accounting excludes datacenter or colocation fees and nonrecurring engineering. It uses maximum rated power for utilities and a fixed financing assumption for hardware. It also leaves out partial amortization of devices already in use, even though the authors identify that as a factor that could change the appeal of the H100 pairing. Readers can interpret the comparison within the stated costing method. A budget based on existing inventory, different electricity tariffs, or additional integration expenses would require those inputs to be reflected separately.

The authors treat scheduling across geographically distributed datacenters and between edge devices and the cloud as future work. In both settings, locality and changing link conditions would affect the relative merits of placement. They also describe a potential marketplace in which providers could offer spare capacity or modules on varied hardware. That discussion describes an application of the architecture the authors envision. It gives no additional evidence about the simulated pairings or their costs.

#### Limits apparent from the setup

The example agent stands for a broader class of workflows, but the accelerator comparison focuses on one demanding generation component. The CPU placement of the speech and tool stages makes that focus understandable. It also means the results tell relatively little about graphs whose cost is spread over several inference components, or whose critical path is dominated by remote calls and their variability. Placement across a complicated agent graph is the architectural ambition. The reported economic results are concentrated on a split inside one operation in that graph.

The voice workflow specifies a possible search loop, while the simulation works with given token lengths and a continuous workload. The paper leaves unreported the distribution of search latencies, the number of times requests take a search branch, and the end-to-end response times of a deployed population of users. The interactive constraints cover the pace of generation. A user’s wait in the full workflow would also include speech processing, tool dependencies, and other work on the realized path. Meeting the token targets is therefore evidence about a defined part of responsiveness in the simulated setup.

The fixed token lengths permit a clear contrast between long inputs and long outputs. They leave the stability of the rankings under a mixture of lengths and request arrival patterns untested. A continuous workload can help keep batches full under the simulation assumptions. A real interactive workload may require the scheduler to make decisions before such a batch forms, and a finite fleet can make some of the cheapest feasible simulated configurations unavailable. The fast-path router and slow-path planner are designed to respond to resource conditions, yet the results do not quantify their behavior through these changes.

The formal presentation also leaves a gap between the basic constraints and the deployment problem. The per-task latency bound does not by itself express the elapsed time of an entire branching or cyclic graph. The serial worked example explicitly adds the stage durations and the transfer. For a general graph, the relevant execution path and the overlap among its operations have to enter the calculation. Likewise, the transfer term indexed by task and hardware class can stand for a profiled plan, while the displayed equations do not explicitly choose both endpoints of each dependency and derive the cost from their joint placement. The network discussion supplies the ingredients for such estimates. The paper leaves details of that integration open.

The claim of convex planning has a scope that depends on the choice of variables and constraints. With fixed cost and latency coefficients, the fractional assignment objective, the capacity bounds, and the soft latency bounds have a linear form. The usual binary placement described by the authors introduces a discrete choice. The optional throughput inequality puts a lower bound on a sum of reciprocals of positive task latencies, a form that does not in general preserve convexity of the feasible set. Accordingly, the displayed formulation supports a convex reading for a narrower set of choices than the complete list of options might suggest. The paper gives no general optimality guarantee for coupled discrete assignments across a full dynamic graph.

The bandwidth finding inherits assumptions about how state is partitioned and about the share of the network that can be used during a transfer. The estimated peak requirement grows with the cache carried for a batch. Transfers for different requests or parallel computations can draw on the same fabric. The distinction between scale-up and scale-out also affects how much communication is exposed to the application. The paper estimates when links can be sufficient and describes how a planner could account for contention. It leaves sustained multi-workload measurements and latency under contention for broader validation.

Finally, the study treats size and precision as serving configurations. The FP8 results establish a cost pattern under the analysis, with no accompanying comparison of answer quality, speech quality, or task success. A choice among precision settings for an application would depend on those properties where they matter. The system description identifies places to observe performance and revise placement, but the preliminary results provide no separate estimates for the overhead of replanning, compiling fragments, moving workloads, or restoring state. Those costs would matter when estimating how frequently a deployment could profitably change its plan.

### What came after

No later citing work is documented that establishes how another system adopted, tested, or extended the proposed compiler and scheduler.

## Cite

Cite as Zain Asgar, Michelle Nguyen and Sachin Katti. 2025. Efficient and Scalable Agentic AI with Heterogeneous Systems. arXiv:2507.19635.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2507.19635](https://doi.org/10.48550/arxiv.2507.19635) · [arXiv 2507.19635](https://arxiv.org/abs/2507.19635)

```bibtex
@misc{asgar2025efficient,
  title = {{Efficient and Scalable Agentic AI with Heterogeneous Systems}},
  author = {Zain Asgar, Michelle Nguyen and Sachin Katti},
  year = {2025},
  doi = {10.48550/arxiv.2507.19635},
  eprint = {2507.19635},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2507.19635}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
