MLC | Achieving Efficient, Flexible, and Portable Structured Generation with XGrammar
We are witnessing an exciting era for large language models (LLMs). As LLM applications evolve, we are increasingly moving toward LLM agents that not only respond in raw text but can also generate code, call environment functions, and even control robots. To enable these richer LLM agent applications, LLM engines need to produce structured outputs that can be consumed by downstream agent systems. Examples of these structures include JSON, SQL, Python, and more. This paradigm is known as the structured generation in LLM inference. Fundamentally, an ideal LLM structured generation system should satisfy the following requirements: It is challenging to address all these goals simultaneously. Some libraries introduce efficiency optimizations but at the cost of restricting to a small set of structures (e.g., those representable by finite-state machines). Conversely, supporting more general structures through expressive representations like context-free grammar (CFG) introduces challenges in
MLC | Achieving Efficient, Flexible, and Portable Structured Generation with XGrammar --> Home Achieving Efficient, Flexible, and Portable Structured Generation with XGrammar Nov 22, 2024 • MLC Community We are witnessing an exciting era for large language models (LLMs). As LLM applications evolve, we are increasingly moving toward LLM agents that not only respond in raw text but can also generate code, call environment functions, and even control robots. To enable these richer LLM agent applications, LLM engines need to produce structured outputs that can be consumed by downstream agent syste
related reading
- LLM Powered Autonomous Agents | Lil'Loglilianweng.github.io
- Recursive Language Models | Alex L. Zhangalexzhang13.github.io
- Structured Decoding in vLLM: A Gentle Introductionbentoml.com
- Efficient Guided Generation for Large Language Modelsarxiv.org
- Patterns for Building LLM-based Systems & Productseugeneyan.com
- What We’ve Learned From A Year of Building with LLMs – Applied LLMsapplied-llms.org
- structured decoding, a guide for the impatientaarnphm.xyz
- LLM Inference Performance Engineering: Best Practices | Databricks Blogdatabricks.com
- ⭐️ Fast LLM Inference From Scratchandrewkchan.dev
- Productizing Large Language Modelsblog.replit.com
- LLM Evaluation doesn't need to be complicatedphilschmid.de
- Recursive Language Models ("RLMs")whynowtech.substack.com