ChatPaper.aiChatPaper

Papagei: Effiziente Bereitstellung von Anwendungen auf Basis von LLM mit semantischer Variable

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

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

Zusammenfassung

Der Aufstieg großer Sprachmodelle (LLMs) hat LLM-basierte Anwendungen ermöglicht (auch bekannt als KI-Agenten oder Co-Piloten), ein neues Software-Paradigma, das die Stärke von LLM und konventioneller Software kombiniert. Unterschiedliche LLM-Anwendungen von verschiedenen Nutzern könnten komplexe Workflows entwerfen, indem sie mehrere LLM-Anfragen verwenden, um eine Aufgabe zu erledigen. Allerdings müssen sie die übervereinfachte Anfrageebene-API nutzen, die von den öffentlichen LLM-Diensten von heute bereitgestellt wird, wodurch wesentliche anwendungsspezifische Informationen verloren gehen. Öffentliche LLM-Dienste müssen einzelne LLM-Anfragen blind optimieren, was zu einer suboptimalen End-to-End-Leistung von LLM-Anwendungen führt. Dieser Artikel stellt Parrot vor, ein LLM-Service-System, das sich auf das End-to-End-Erlebnis von LLM-basierten Anwendungen konzentriert. Parrot schlägt eine semantische Variable vor, eine vereinheitlichte Abstraktion, um anwendungsspezifisches Wissen öffentlichen LLM-Diensten zugänglich zu machen. Eine semantische Variable annotiert eine Ein-/Ausgabevariable im Prompt einer Anfrage und erstellt die Datenpipeline beim Verbinden mehrerer LLM-Anfragen, was eine natürliche Möglichkeit bietet, LLM-Anwendungen zu programmieren. Die Offenlegung semantischer Variablen für den öffentlichen LLM-Dienst ermöglicht es, konventionelle Datenflussanalyse durchzuführen, um die Korrelationen über mehrere LLM-Anfragen hinweg aufzudecken. Diese Korrelation eröffnet einen völlig neuen Optimierungsbereich für die End-to-End-Leistung von LLM-basierten Anwendungen. Umfangreiche Evaluierungen zeigen, dass Parrot für beliebte und praktische Anwendungsfälle von LLM-Anwendungen eine Verbesserung um bis zu eine Größenordnung erreichen kann.
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.

Summary

AI-Generated Summary

PDF70December 12, 2024