ChatPaper.aiChatPaper

Parrot: Efficiënte Bediening van LLM-gebaseerde Toepassingen met Semantische Variabelen

Parrot: Efficient Serving of LLM-based Applications with Semantic Variable

May 30, 2024
Auteurs: Chaofan Lin, Zhenhua Han, Chengruidong Zhang, Yuqing Yang, Fan Yang, Chen Chen, Lili Qiu
cs.AI

Samenvatting

De opkomst van grote taalmodellen (LLM's) heeft de weg vrijgemaakt voor LLM-gebaseerde applicaties (ook wel AI-agents of co-pilots genoemd), een nieuw softwareparadigma dat de kracht van LLM's combineert met conventionele software. Diverse LLM-applicaties van verschillende partijen kunnen complexe workflows ontwerpen met behulp van meerdere LLM-verzoeken om één taak te voltooien. Echter, moeten zij gebruikmaken van de overgesimplificeerde API op verzoekniveau die door de huidige openbare LLM-diensten wordt aangeboden, waardoor essentiële informatie op applicatieniveau verloren gaat. Openbare LLM-diensten zijn gedwongen om individuele LLM-verzoeken blindelings te optimaliseren, wat leidt tot suboptimale end-to-end prestaties van LLM-applicaties. Dit artikel introduceert Parrot, een LLM-dienstsysteem dat zich richt op de end-to-end ervaring van LLM-gebaseerde applicaties. Parrot stelt Semantic Variable voor, een uniforme abstractie om kennis op applicatieniveau bloot te leggen aan openbare LLM-diensten. Een Semantic Variable annoteert een invoer/uitvoer-variabele in de prompt van een verzoek en creëert de datapijplijn bij het verbinden van meerdere LLM-verzoeken, wat een natuurlijke manier biedt om LLM-applicaties te programmeren. Het blootleggen van Semantic Variables aan de openbare LLM-dienst stelt deze in staat om conventionele dataflow-analyse uit te voeren om de correlatie tussen meerdere LLM-verzoeken te ontdekken. Deze correlatie opent een geheel nieuwe optimalisatieruimte voor de end-to-end prestaties van LLM-gebaseerde applicaties. Uitgebreide evaluaties tonen aan dat Parrot een verbetering tot een orde van grootte kan bereiken voor populaire en praktische use cases van LLM-applicaties.
English
The rise of large language models (LLMs) has enabled LLM-based applications (a.k.a. AI agents or co-pilots), a new software paradigm that combines the strength of LLM and conventional software. Diverse LLM applications from different tenants could design complex workflows using multiple LLM requests to accomplish one task. However, they have to use the over-simplified request-level API provided by today's public LLM services, losing essential application-level information. Public LLM services have to blindly optimize individual LLM requests, leading to sub-optimal end-to-end performance of LLM applications. This paper introduces Parrot, an LLM service system that focuses on the end-to-end experience of LLM-based applications. Parrot proposes Semantic Variable, a unified abstraction to expose application-level knowledge to public LLM services. A Semantic Variable annotates an input/output variable in the prompt of a request, and creates the data pipeline when connecting multiple LLM requests, providing a natural way to program LLM applications. Exposing Semantic Variables to the public LLM service allows it to perform conventional data flow analysis to uncover the correlation across multiple LLM requests. This correlation opens a brand-new optimization space for the end-to-end performance of LLM-based applications. Extensive evaluations demonstrate that Parrot can achieve up to an order-of-magnitude improvement for popular and practical use cases of LLM applications.
PDF70December 12, 2024