More Gemini Features Coming to Google TV
Google TV integrates Gemini AI for image/video generation, enhances Google Photos, and adds a dedicated YouTube Shorts feed to the homepage.
Read moreWith the rapid advancement of Large Language Models (LLMs), the significance of structured generation has become increasingly prominent. These sophisticated models are not only capable of producing human-like text but are also tasked with generating outputs in strict formats, such as JSON, SQL, and other domain-specific languages. Applications like code generation, robotic control, and structured querying heavily rely on the structured output capabilities of LLMs. However, achieving structured outputs without compromising speed or efficiency remains a critical challenge that needs to be addressed.
Despite the notable advancements in LLM technology, generating structured outputs still grapples with inefficiency issues. A primary challenge lies in effectively managing grammatical constraints during the output generation process. Traditional approaches, such as Context-Free Grammar (CFG) interpretation, require handling each potential token from the model's extensive vocabulary, which can exceed 128,000 entries. Moreover, maintaining stack states to track recursive grammatical rules further adds to runtime latency. Consequently, existing systems frequently encounter high delays and increased resource consumption, making them unsuitable for real-time or large-scale applications.
To tackle these challenges, current structured generation tools utilize constrained decoding techniques to ensure that outputs adhere to predefined rules. These methods filter out invalid tokens during the decoding phase, which, while effective, still require further efficiency improvements. Constrained decoding necessitates evaluating each token against the entire stack state, and the recursive nature of CFGs exacerbates the complexity of runtime processing. These limitations significantly hinder the scalability and practicality of existing systems, particularly when dealing with complex structures or large vocabularies.
To overcome these limitations, researchers from Carnegie Mellon University, NVIDIA, Shanghai Jiao Tong University, and the University of California, Berkeley collaboratively developed XGrammar, an innovative structured generation engine. XGrammar introduces a novel token classification approach that significantly reduces the computational load during the output generation process. It categorizes tokens into two types: context-free tokens that can be pre-validated and context-dependent tokens that require runtime evaluation. This classification enables the system to handle tokens more efficiently, thereby minimizing unnecessary computations.
XGrammar's technical implementation encompasses several key innovations. It utilizes byte-level pushdown automata to efficiently handle CFGs, effectively managing irregular token boundaries and nested structures. Additionally, the adaptive token mask caching technique precomputes and stores the validity of context-free tokens, covering over 99% of tokens in most cases. For the remaining context-dependent tokens, the system processes them through a persistent execution stack, allowing for rapid branching and rollback operations. These innovations enable XGrammar to overlap with the LLM's initial prompt processing during the preprocessing phase, achieving near-zero latency in structured generation.
Performance evaluations demonstrate that XGrammar offers significant advantages in the field of structured generation. In JSON grammar tasks, the system achieves token mask generation times of under 40 microseconds, resulting in speed improvements of up to 100 times compared to traditional methods. When integrated with the Llama 3.1 model, XGrammar delivers an 80-fold performance enhancement in end-to-end structured output generation on NVIDIA H100 GPUs. Furthermore, memory optimization techniques reduce storage requirements from the original 160 MB to a mere 0.46 MB, accounting for only 0.2% of the original size. These impressive results clearly showcase XGrammar's unprecedented efficiency in handling large-scale tasks.
Researchers focused on the following key areas during the development of XGrammar:
· Token Classification: By precomputing context-free tokens and reducing runtime checks for context-dependent tokens, XGrammar significantly lowers computational overhead.
· Memory Efficiency: The adaptive token mask caching technique reduces memory usage to 0.2% of the original requirement, demonstrating exceptional scalability.
· Performance Enhancement: Achieving a 100-fold speed increase in CFG processing and an 80-fold performance boost in structured output generation, XGrammar sets new benchmarks for efficiency.
· Cross-Platform Deployment: XGrammar supports a wide range of platforms, including client-side browsers, enabling easy use on portable devices like smartphones.
· Integration with LLM Frameworks: The system seamlessly integrates with popular LLM models, such as Llama 3.1, ensuring compatibility and reducing adoption barriers.
In summary, XGrammar represents a groundbreaking advancement in the field of structured generation. It successfully addresses the inefficiencies associated with traditional CFG processing and constrained decoding, offering scalable and high-performance solutions for generating structured outputs. Its innovative technologies, such as token classification, memory optimization, and platform compatibility, make it a vital tool for advancing AI applications. With speed enhancements of up to 100 times and minimal latency, XGrammar sets a new standard for structured generation, effectively meeting the demands of modern AI systems.
Google TV integrates Gemini AI for image/video generation, enhances Google Photos, and adds a dedicated YouTube Shorts feed to the homepage.
Read moreAlphabet Q1 paid subscribers reached 350M, fueled by YouTube & Google One. YouTube ad revenue slightly missed at $9.88B amid Premium growth. Total Q1 revenue hit $109.9B, beating forecasts.
Read moreAnthropic releases Claude connectors for Adobe, Blender, and Ableton, enabling AI workflow automation and app control. It also sponsors the Blender Development Foundation.
Read moreApple introduces an App Store model splitting 12-month plans into monthly installments. On iOS 26.4+, it lowers upfront costs without reducing total price, adding billing tracking.
Read moreGoogle launches Aadhaar digital IDs in Wallet for India, enabling secure QR/NFC verification. A phased partner rollout targets key sectors, while passport-based credentials expand globally.
Read moreYouTube tests "Ask YouTube," an AI tool blending text and video for complex queries. Initially for US Premium users, it supports interactive follow-ups, expanding Google's AI search.
Read moreGoogle grants US DoD classified AI access, joining OpenAI and xAI in defense deals amid Anthropic's dispute. Contractual safeguards against surveillance and lethal weapons remain unenforceable.
Read moreMistral AI launches Workflows, a Temporal-powered orchestration platform for secure, Python-driven enterprise AI automation featuring human-in-the-loop approvals.
Read moreCustom subliminal audio maker

AI Social Media Manager

AI Search Visibility

Workout and Calorie Tracker
Stock research platform

AI interview assistant

Scientific figure generator

AI courses with real code