GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
ICML 2024

An LLM Compiler for Parallel Function Calling

Plan tool calls as a dependency graph, then run every call whose inputs are ready at the same time. Against ReAct this cut latency up to 3.7× and cost up to 6.7×, with similar accuracy.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2023
AUTHORS
Kim, Moon, Tabrizi, Lee, Mahoney, Keutzer, Gholami
FROM
UC Berkeley, ICSI, LBNL
PUBLISHED
Dec 2023 · ICML 2024
CITED BY
249Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 20% of this breakdown.

01

The paper in one minute

Ask an agent "would Stanford and UCLA together have more Nobel laureates than Berkeley?" and a ReAct agent will search for Stanford, wait, think, search for UCLA, wait, think, search for Berkeley, then do the arithmetic. The three searches do not depend on each other, but each one waits for the last, and each wait includes a full model call over a growing history. Sehoon Kim, Amir Gholami and colleagues at UC Berkeley noticed that this is the problem compilers solved long ago: find the dependencies, then schedule independent work in parallel.

LLMCompiler has three parts. A function-calling planner reads the request and writes a list of tasks, each a tool call whose arguments may reference earlier tasks' outputs as $1, $2 and so on. That list is a directed acyclic graph. A task fetching unit watches the graph, replaces references with actual values as they arrive, and dispatches every task whose dependencies are done. An executor runs dispatched tasks in parallel. For problems where the right steps depend on intermediate results, a joiner can either answer or ask the planner to replan with what is known so far.

On HotpotQA, a movie-recommendation task and the authors' own ParallelQA set, LLMCompiler with GPT models was 1.8× to 3.7× faster and 3.4× to 6.7× cheaper than ReAct, with accuracy within a few points, and beat OpenAI's parallel function calling, released at the same time, on latency and cost. It also ran the Game of 24 faster than Tree of Thoughts and, with replanning, beat ReAct and other agents on WebShop success rate.

THE IDEA, VISUALLY
PLAN A GRAPH, RUN WHAT IS READY Planner Task fetching unit Executor “If two schools merged, would they have more Nobel laureates than a third?” $1 search A $2 search B $3 search C $4 = $1 + $2 $5 = $4 > $3 The three searches run at once; the sum waits for two of them, the comparison for the sum and the third. ReAct would make five model calls in sequence; here the model plans once. Planner can stream tasks; replanning handles loops like WebShop. FASTER AND CHEAPER THAN REACT GPT models, Tables 1 and 2 HotpotQA accuracy 62.5 → 62.0 1.80× faster 3.37× cheaper Movie Recommendation accuracy 72.5 → 77.1 3.74× faster 6.73× cheaper ParallelQA accuracy 89.1 → 89.4 2.15× faster 4.65× cheaper Accuracy changed little with GPT; the gains are latency and cost. One LLaMA-2 row in Table 1 has a speedup its own latencies do not support.
LLMCompiler borrows a compiler's idea: write the dependency graph once, then execute independent work in parallel. The gains were mainly latency and cost; accuracy moved little with GPT models.
Research notes: the problem, approach and results
3.74×

lower latency than ReAct on Movie Recommendation with GPT, at 77.1% vs 72.5% accuracy

6.73×

lower cost than ReAct on the same benchmark, from fewer and shorter model calls

0.59×

speedup implied by Table 1's own latencies for one LLaMA-2 row reported as 2.27×

THE PROBLEM

Agents in the ReAct style call one tool, wait, reason, and call the next, even when several calls do not depend on each other. Latency and cost add up, and models sometimes loop or stop early.

THE IDEA

A planner writes the whole task as a graph of function calls with $-references to earlier results. A task fetching unit dispatches any task whose dependencies are resolved, an executor runs them in parallel, and a replanning loop handles cases the first plan cannot.

THE RESULT

With GPT models, speedups of 1.8× to 3.7× and cost reductions of 3.4× to 6.7× over ReAct on question-answering benchmarks, at similar accuracy, and faster than OpenAI's own parallel function calling. Accuracy gains were larger with LLaMA-2 70B.

02

Why it matters to an FDE

Latency is often the complaint that kills an agent rollout: users will not wait 20 seconds for an answer a person could look up in ten. Much of that time is the agent waiting on tool calls one at a time. This paper shows how much of it is avoidable.

Look for independent calls. Fetching the same data for several entities, querying several systems for one customer, checking several policies: these fan out naturally. Running them in parallel can cut response time by more than half.

Plan once, not per step. A single planning call that writes the whole graph is cheaper than a model call between every tool call, which is where the 3× to 7× cost savings came from.

Keep a replanning path. Some workflows cannot be planned in full up front, such as shopping through search results. A planner that can revise its graph after seeing results handles these without falling back to one step at a time.

Parallel calls change load. Fanning out ten calls at once hits downstream systems harder than ten calls over ten seconds. Agree rate limits and timeouts with the system owners, and set deadlines so one slow call does not hold the whole answer.

Accuracy is not the selling point. With GPT models, accuracy stayed about the same. Sell this as speed and cost, measured on the customer's own requests.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 99 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The three components, streaming and replanning, each benchmark, and the misreadings to avoid

    Free account
  2. 04How it works

    The plan format, dispatch logic, streaming, the joiner and replanning, and the evaluation setup

    Premium
  3. 05The numbers that matter

    Latency, cost, token counts, WebShop and Game of 24, and one inconsistent row

    Premium
  4. 06Try it yourself

    Check the paper's speedups against its latencies, then run a working dependency-graph executor

    Premium
  5. 07Where it breaks

    The limits of planned parallel calling and of this evaluation

    Premium
  6. 08Using it on a deployment

    Adding planned, parallel tool execution to a customer agent safely

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →