ai china

Parrot lets an LLM service see the application graph, not just the next request

6 sources 1 primary source August 28, 2026

Text
An evening view from Microsoft Research Asia's Shanghai lab across the Huangpu River toward the city's skyline.

The view from Microsoft Research Asia's Shanghai lab, the institutional setting for the Microsoft researchers who collaborated with Shanghai Jiao Tong University on Parrot. The photograph supplies place context; it does not show the Parrot experiment. Microsoft Research.[6]

Video mode

This article includes 1 embedded video.

  1. 1 Chaofan Lin presenting Parrot's application-aware LLM serving design at OSDI 2024 YouTube embed

An application asks one model to split a report into sections, several parallel calls to summarize those sections, and a final call to combine the summaries. To an ordinary completion service, that program can look like a queue of unrelated prompts. The service sees rendered text arriving one request at a time; it may not see which output feeds which input, which calls can run together, or which final answer the user is actually waiting for.

Parrot begins from the cost of that lost information. Created by researchers at Shanghai Jiao Tong University and Microsoft Research, the system extends the programming and serving interface with Semantic Variables: named prompt fields that retain producer-consumer relationships as an application crosses the model-serving boundary. The service can then optimize a connected application instead of treating each call as an island.[2][4]

This 13-minute OSDI 2024 presentation is worth watching for the bargain it makes visible. Parrot offers the serving layer enough structure to schedule dependent calls, propagate a final-output objective and find repeated prompt prefixes. In return, the application must describe its templates and dependencies through Parrot's interface. The timestamps below are viewing landmarks rather than a transcript.[1][3]

0:32–2:54 — the provider sees traffic where the developer sees a program

The opening moves quickly through several LLM application shapes: a chain of summaries, a map-reduce pattern, chat and search, and a multi-role coding workflow. The important feature is not “agents.” It is that one user-visible result can require multiple model calls with different relationships. Some calls are serial, some parallel, and some reuse a long common prompt.[1][3]

At 2:25 the viewpoint flips. The developer's workflow collapses at the provider boundary into an OpenAI-style stream of individual requests. Names have been replaced by text. A placeholder that once meant “the output of step A becomes the input of step B” is now only a string inside B's prompt. The completion API still carries enough information to generate the next answer, but it has discarded information that could help deliver the application's final answer sooner.

This is different from a load balancer merely lacking a good estimate of one request's size. Parrot's claim is that the service is missing relationships between requests. A client may wait for an intermediate response, receive it over the network, construct the next prompt, and enter the queue again. Meanwhile, the server cannot tell that several map calls are siblings or that a reduce call is the latency-critical sink. The paper calls this a mismatch between request-centric serving and application-level performance.[2]

2:55–5:50 — three optimizations are blocked by one information loss

The middle of the problem statement connects that blindness to three costs. First, bouncing intermediate values through a remote client adds network and queueing time to a dependency chain. Second, optimizing every call for the same local metric can work against the final result. A group of parallel map calls may benefit from throughput-oriented batching, while the reduce call that produces the answer may deserve latency priority. Third, fully rendered prompts hide template boundaries that would make common-prefix reuse easier to detect.[1][3]

Notice the restraint in the argument around 5:20. Sticky routing, dependency-aware scheduling and shared-prefix caching are not presented as inventions that no one had imagined. The point is that a multi-tenant service cannot safely choose where to apply them when the interface conceals application identity, dependency and prompt structure. Parrot is therefore less a new bag of isolated optimizations than an attempt to supply their missing input.

That distinction matters when evaluating the project. A clever scheduler cannot reconstruct every application's intent from opaque prompt text without guesswork. Parrot instead changes the contract: expose selected semantics explicitly, then let the service act on them. Better optimization comes with integration work and a wider trust boundary.

5:51–8:10 — a placeholder becomes a Semantic Variable

The key observation arrives at 6:19. Prompt-building code already uses placeholders: a task description goes into one field; generated code fills another; test output may feed a repair prompt. Parrot promotes those fields into Semantic Variables. A semantic function declares which variables it consumes and produces, so the relationship survives after the template is submitted.[1][3][4]

Suppose code is the output variable of a generation function and an input variable to a review function. The application no longer has to flatten that link into an ordinary string before the service can know about it. Parrot can build the dependency structure just in time, submit ready work asynchronously and return a requested output when the program actually needs it. Native application logic can remain on the client; the model-call relationships are what cross the interface.[2]

“Semantic” can sound grander than the mechanism. These variables do not make the model understand the truth of a field or prove that a workflow is correct. They preserve operational facts: a prompt segment's boundary, where its value comes from, where it will be consumed, and which requested output closes the path. That is just enough structure to expose parallelism and repeated context without asking the serving system to reverse-engineer arbitrary source code.

The resulting service view at 7:54 is the talk's decisive image. What was a pile of prompts becomes a dependency graph with prompt structure attached. Parrot has not designed the application graph; the developer already did that. It has kept the graph legible after the calls reach infrastructure.

8:11–10:47 — schedule backward from the answer that matters

Once a client asks for a final Semantic Variable, it can attach an end-to-end performance criterion. Parrot propagates that objective backward through the variable dependencies and groups work according to its role. In a map-reduce summary, independent map calls can be batched for throughput, while the downstream reduce call can be scheduled for low latency. The system is optimizing time to the requested output, not trying to minimize every intermediate call in isolation.[2][4]

The mixed-application example from 9:07 sharpens the idea. An interactive chatbot and an analytics job can share the same model fleet but value different behavior. Parrot derives request-level priorities from their application-level goals rather than forcing both through one undifferentiated rule. This is not a promise of an optimal global schedule: it is a way for the scheduler to receive the dependency and objective information that a useful policy needs.

At 10:48, prompt structure enables a second class of work. Semantic boundaries let Parrot identify shared prefixes without comparing every prompt token by token. Affinity scheduling can bring requests with reusable context together, and a custom attention path combines ideas associated with FlashAttention and PagedAttention to use the shared prefix efficiently.[2][3] The optimization is automatic after the application adopts the structured template. It is not transparent to an unchanged completion client.

These two mechanisms belong together. The graph says when work is ready and which output controls the user's wait. The template says which input regions may be common across calls. Parrot's contribution is to retain both kinds of structure in the same serving abstraction.

8:38–11:48 — read the speedups inside their testbed

The evaluation slides overlap those mechanism sections, so a second pass should pause here. The paper's single-GPU experiments used one NVIDIA A100 with 80 GB of memory; the multi-GPU experiments used four NVIDIA A6000 GPUs with 48 GB each. Engines served LLaMA-7B or LLaMA-13B models. Workloads represented chain and map-reduce arXiv summarization, search-shaped requests, GPT-style applications and a MetaGPT-style coding workflow.[2]

The largest number needs its full denominator. In the multi-agent workflow, Parrot reports up to 11.7× lower completion latency than a latency-oriented vLLM baseline and up to 2.45× against a deliberately throughput-oriented baseline. Those are maxima from that workflow and setup, not a general multiplier for agent software. Likewise, a four-GPU shared-prompt experiment reports as much as a 12× request-rate advantage over a baseline unable to reuse those prefixes; disabling Parrot's affinity scheduling reduces the advantage reported for that comparison.[2]

Other boundaries are equally instructive. Chain-summary gains shrink as generated outputs grow because token generation comes to dominate the avoided coordination delay. The search-shaped evaluation is synthetic: the authors modeled request characteristics because they did not possess a production search application's private intermediate workflow. And the hardware, models, traffic patterns and injected network conditions describe a research testbed, not today's frontier-model fleet.[2]

The honest conclusion is still meaningful. Within those controlled workloads, preserving application information gave the system optimization opportunities that request-blind baselines could not use. The paper demonstrates the value of the information contract; a deployment still has to measure whether its own graph shapes, prefix repetition and client latency make that contract worthwhile.

What survives beyond the prototype

Parrot's repository is explicit that the released code is a research prototype and is not actively maintained.[5] It also reflects a non-trivial adoption surface: a Python frontend, a serving runtime and custom kernels rather than a drop-in flag for an existing opaque API. Dynamic branches and ordinary client-side functions further complicate any clean server view; the paper leaves broader issues such as fairness, failures and heterogeneous clusters for future work.[2][5]

That limits what should be copied, but not what should be learned. A team evaluating the idea should first trace one application from input to final output: identify model-call dependencies, locate repeated prefixes, mark the outputs a user waits for, and measure client round trips and queue re-entry. Only then is it possible to ask whether exposing structure would create enough batching, scheduling or cache-reuse value to justify a new interface.

The durable lesson is an interface lesson. Completion APIs made model access wonderfully simple by reducing an invocation to prompt in, text out. For compound applications, that simplicity can erase the very context an inference service needs to optimize the whole. Parrot restores a narrow slice of that context. Its Semantic Variable is valuable not because the name is intelligent, but because it lets infrastructure recognize that the next request belongs to a larger computation.

Sources

  1. USENIX, “OSDI '24 — Parrot: Efficient Serving of LLM-based Applications with Semantic Variable,” presentation by Chaofan Lin, 2024.
  2. Chaofan Lin et al., “Parrot: Efficient Serving of LLM-based Applications with Semantic Variable,” 18th USENIX Symposium on Operating Systems Design and Implementation, 2024.
  3. Chaofan Lin et al., official OSDI '24 presentation slides, 2024.
  4. Microsoft Research Asia, “How Can Large Language Model Applications Achieve End-to-End Optimization?”, first-hand technical explanation of Parrot, July 25, 2024.
  5. Microsoft, ParrotServe research-prototype repository and implementation documentation.
  6. Microsoft Research Asia, Shanghai Systems and Engineering Group profile and official lab photograph.
Previous Chang'e-6's 4.5-kilogram photographer had one job—and enough AI to do it

Recommended In ai china

Matched by subject and format