SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.04511 · ICML · 2024

An LLM Compiler for Parallel Function Calling

Kurt Keutzer, Michael Mahoney, Sehoon Kim, Amir Gholami, Nicholas Lee, Suhong Moon, Ryan Tabrizi, Scott Derrickson

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2312.04511.json · badge: /api/ran/2312.04511.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
squeezeailab/llmcompiler canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
SqueezeAILab/LLMCompiler canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
clean_str Ran
ran; our contract draft was wrong, not the code
squeezeailab/llmcompiler/src/docstore/wikipedia.py
code served (permissive licence) · get_code("396014a6a917554c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

def clean_str(p):
    try:
        return p.encode().decode('unicode-escape').encode('latin1').decode('utf-8')
    except Exception as e:
        print(e)
        return p

# The function takes a single parameter 'p' which should be a string
# It attempts to encode/decode it through unicode-escape, latin1, and utf-8
# We need to provide a string value

ARGS = {
    'p': 'hello world'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_function Ran
ran; our contract draft was wrong, not the code
squeezeailab/llmcompiler/src/chains/llm_math_chain.py
code served (permissive licence) · get_code("fd0028411f3750d5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def compute_function(match):
    func, values = match.groups()
    numbers = [float(re.sub('(?<=\\d),(?=\\d)', '', v)) for v in values.split(',')]
    result = min(numbers) if func == 'min' else max(numbers)
    return str(result)

# Create a valid match object for the function
import re as re_module

# The function expects a match object with two groups: (func, values)
# We need to create a mock match object or use an actual regex match

# Create a regex pattern that would match function calls like "min(1,000, 2,500)" or "max(10, 20)"
pattern = r'(min|max)\((.*?)\)'

# Create a valid match object by matching against a string
test_string = 'min(1,000, 2,500)'
match = re_module.search(pattern, test_string)

ARGS = {
    'match': match
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_dataset Ran
ran; our contract draft was wrong, not the code
SqueezeAILab/LLMCompiler/run_llm_compiler.py
code served (permissive licence) · get_code("043822c772e52ed3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse
import json
from unittest.mock import patch, mock_open

# Create a mock args object
class MockArgs:
    def __init__(self, benchmark_name):
        self.benchmark_name = benchmark_name

# Create mock dataset content
mock_movie_data = [
    {"id": 1, "title": "Movie 1", "rating": 8.5},
    {"id": 2, "title": "Movie 2", "rating": 7.2}
]

mock_hotpotqa_data = [
    {"question": "What is X?", "answer": "Y"},
    {"question": "What is A?", "answer": "B"}
]

mock_parallelqa_data = [
    {"question": "Q1", "answer": "A1"},
    {"question": "Q2", "answer": "A2"}
]

# Patch json.load to return appropriate mock data based on filename
original_open = open
def mock_file_open(filename, mode='r'):
    if 'movie_recommendations_formatted.json' in filename:
        return mock_open(read_data=json.dumps(mock_movie_data))()
    elif 'hotpotqa_comparison.json' in filename:
        return mock_open(read_data=json.dumps(mock_hotpotqa_data))()
    elif 'parallelqa_dataset.json' in filename:
        return mock_open(read_data=json.dumps(mock_parallelqa_data))()
    else:
        return mock_open(read_data=json.dumps([]))()

# Create args for each benchmark
ARGS = {
    'args': MockArgs(benchmark_name='movie')
}

# Patch open globally for the function to work
import builtins
builtins.open = mock_file_open
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
replace_min_max_functions Ran
ran; our contract draft was wrong, not the code
squeezeailab/llmcompiler/src/chains/llm_math_chain.py
code served (permissive licence) · get_code("86aa4addcae95d79")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import ast

class MaxTransformer(ast.NodeTransformer):

    def visit_Call(self, node):
        self.generic_visit(node)
        if isinstance(node.func, ast.Name) and node.func.id in ('max', 'min'):
            if all((isinstance(arg, (ast.Num, ast.Constant)) for arg in node.args)):
                args_as_strings = (ast.unparse(arg) for arg in node.args)
                args_str = ', '.join(args_as_strings)
                print(args_str)
                if node.func.id == 'min':
                    value = min((arg.n if isinstance(arg, ast.Num) else arg.value for arg in node.args))
                else:
                    value = max((arg.n if isinstance(arg, ast.Num) else arg.value for arg in node.args))
                return ast.copy_location(ast.Constant(value=value), node)
        return node

def replace_min_max_functions(expression):
    parsed_expression = ast.parse(expression, mode='eval')
    transformer = MaxTransformer()
    transformed_ast = transformer.visit(parsed_expression)
    transformed_ast = ast.fix_missing_locations(transformed_ast)
    compiled_code = compile(transformed_ast, '<string>', 'eval')
    result = eval(compiled_code)
    return str(result)


ARGS = {
    'expression': 'max(5, 10, 3)'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The reasoning capabilities of the recent LLMs enable them to execute external function calls to overcome their inherent limitations, such as knowledge cutoffs, poor arithmetic skills, or lack of access to private data. This development has allowed LLMs to select and coordinate multiple functions based on the context to tackle more complex problems. However, current methods for function calling often require sequential reasoning and acting for each function which can result in high latency, cost, and sometimes inaccurate behavior. To address this, we introduce LLMCompiler, which executes functions in parallel to efficiently orchestrate multiple function calls. Drawing inspiration from the principles of classical compilers, LLMCompiler enables parallel function calling with three components: (i) a Function Calling Planner, formulating execution plans for function calling; (ii) a Task Fetching Unit, dispatching function calling tasks; and (iii) an Executor, executing these tasks in parallel. LLMCompiler automatically generates an optimized orchestration for the function calls and can be used with both open-source and closed-source models. We have benchmarked LLMCompiler on a range of tasks with different patterns of function calling. We observe consistent latency speedup of up to 3.7×, cost savings of up to 6.7×, and accuracy improvement of up to ∼9% compared to ReAct. Our code is available at https://github.com/SqueezeAILab/LLMCompiler.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2312.04511")
get_code_for_paper("2312.04511")
have("2312.04511")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2312.04511.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2312.04511.svg)](https://syntology.ai/paper/2312.04511)

Connect an agent — have() is free.