惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Simon Willison's Weblog
Simon Willison's Weblog
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
Last Week in AI
Last Week in AI
月光博客
月光博客
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
Martin Fowler
Martin Fowler
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
U
Unit 42
The Register - Security
The Register - Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
D
DataBreaches.Net
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
H
Hacker News: Front Page
Recent Announcements
Recent Announcements
C
CXSECURITY Database RSS Feed - CXSecurity.com
Latest news
Latest news
小众软件
小众软件
P
Palo Alto Networks Blog
PCI Perspectives
PCI Perspectives
Security Latest
Security Latest
S
Secure Thoughts
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
Recorded Future
Recorded Future
O
OpenAI News
S
Securelist
云风的 BLOG
云风的 BLOG
H
Help Net Security
T
Troy Hunt's Blog

Google Developers Blog

Expanding Choice in Gemini Enterprise Agent Platform: Introducing Grounding with Parallel Web Search- Google Developers Blog Systems Engineering Playbook: Optimizing Qwen 3.5-397B MoE on Ironwood (TPU7x)- Google Developers Blog Unlocking the Next Era of On-Device AI with Google Tensor and Pixel- Google Developers Blog LiteRT.js, Google's high performance Web AI Inference- Google Developers Blog Bridging the Domain Gap: AI Race Coach built with Antigravity and Gemini- Google Developers Blog We terminated a TPU mid-training and it recovered in seconds: Introduction to elastic training with MaxText- Google Developers Blog ML Development in VS Code with Google Cloud Power: Workbench Extension Now Available- Google Developers Blog Why we built ADK 2.0- Google Developers Blog Build agentic full-stack apps with Genkit- Google Developers Blog Driving the Agent Quality Flywheel from Your Coding Agent- Google Developers Blog Build reliable multi-agent applications with ADK Go 2.0. Discover our new graph-based workflow engine, built-in human-in-the-loop, and dynamic orchestration- Google Developers Blog Measuring What Matters with Jules- Google Developers Blog Build Cross-Language Multi-Agent Team with Google’s Agent Development Kit and A2A- Google Developers Blog How A2A is Building a World of Collaborative Agents- Google Developers Blog A2UI + MCP Apps: Combining the best of declarative and custom agentic UIs- Google Developers Blog Announcing the Agentic Resource Discovery specification- Google Developers Blog Enhance Security and Trust: New Session Metadata in Sign in with Google- Google Developers Blog Unlocking the Power of the TPU Stack: Introducing our new Developer Hub- Google Developers Blog DiffusionGemma: The Developer Guide Introducing the Google Colab CLI Gemma 4 12B: The Developer Guide Bringing Gemma 4 12B to your Laptop: Unlocking Local, Agentic Workflows with Google AI Edge Supercharge your integration workflow with the Google Pay & Wallet Developer MCP server How the community trained Gemma to "Think" with Tunix and TPUs The latest updates to Google Pay Enhancing Android Checkout with Dynamic Callbacks in Google Pay Empowering Service Providers and Hardware Partners with Gemini for Home Announcing ADK for Kotlin and ADK for Android 0.1.0: Building AI Agents on Android and Beyond One Year of Innovation: Celebrating 100k Members in the Google Cloud x NVIDIA Developer Community All the news from the Google I/O 2026 Developer keynote A Smarter Google AI Edge Gallery: MCP integration, notifications, and session continuity Google Tensor SDK Beta with LiteRT An important update: Transitioning Gemini CLI to Antigravity CLI Accelerating on-device AI: A look at Arm and Google AI Edge optimization Announcing Genkit Middleware: Intercept, extend, and harden your agentic apps Build Long-running AI agents that pause, resume, and never lose context with ADK Supercharging LLM inference on Google TPUs: Achieving 3X speedups with diffusion-style speculative decoding Building with Gemini Embedding 2: Agentic multimodal RAG and beyond Speeding Up AI: Bringing Google Colossus to PyTorch via GCSFS and Rapid Bucket Building real-world on-device AI with LiteRT and NPU Agents CLI in Agent Platform: create to production in one CLI
Blazing fast on-device GenAI with LiteRT-LM
Tenghui Zhu, Yu-hui Chen, Ram Iyengar · 2026-05-19 · via Google Developers Blog

When it comes to bringing advanced AI to the edge, Google AI Edge’s LiteRT-LM delivers one of the most powerful and optimized experiences for deploying Gemma 4 across platforms. Leveraging LiteRT (formerly TensorFlow Lite) for inference, LiteRT-LM empowers local AI across a multitude of Google products—including Chrome, ChromeOS, the Pixel Watch, and the recent viral Google AI Edge Gallery app (Android / iOS). From unlocking state-of-the-art agentic capabilities with Gemma 4 to scaling our demanding production use cases, this proven engine is now ready to power your own applications. Read on for a deep dive into the underlying stack and how you can use LiteRT-LM for your own edge LLM deployments.

State-of-the-art performance

To fully unlock Gemma 4 on-device, we leverage the Google AI Edge stack, the most performant way to run Gemma 4 across platforms (for even greater performance, Gemma 4 can be run as system-service via Android AICore). To navigate the competing demands of restricted memory, limited compute, and fragmented hardware, this stack supports advanced quantization schemes alongside a foundation of accelerated XNNPACK and MLDrift kernels. By coupling this efficient footprint with the LiteRT runtime, the stack unlocks seamless model execution and broad portability across CPU, GPU, and NPU backends. Finally, at the orchestration layer, LiteRT-LM utilizes optimized pipelines to avoid costly CPU/GPU data transfers, alongside Multi-Token Prediction (MTP) and advanced session management. Together, this complete integration provides the highest-performing runtime environment for Gemma models.

litert_lm_perf_comp_v2

LiteRT-LM prefill and decode performance running Gemma 4 E2B (Android: Samsung S26 Ultra, iOS: iPhone 17 Pro, Web: Chrome on a MacBook Pro 2024 with Apple M4 Max).

Built for speed across hardware backends and platforms

LiteRT-LM is engineered to deliver exceptional performance across the entire edge ecosystem, ensuring low-latency inference on Android, iOS, and the open web. To achieve this, the runtime provides the most optimal hardware backend optimizations through LiteRT, seamlessly accelerating workloads via CPU, GPU, and NPU (currently on Android). This approach allows developers to build once and achieve peak performance everywhere:

  • When running Gemma 4 E2B without MTP enabled, LiteRT-LM achieves an impressive 52 tokens/sec decode speed via the GPU backend on Android (OpenCL), and 56 tokens/sec on iOS (Metal).
  • On the web, using WebGPU, developers can expect decode speeds of up to 76 tokens/sec decode on a Macbook Pro, proving that state-of-the-art on-device AI is now a reality regardless of the user's platform or hardware.

Multi-Token Prediction (MTP) for peak throughput

One of the most significant performance milestones in the LiteRT-LM pipeline is our native support for the Multi-Token Prediction (MTP) drafters recently launched with the Gemma 4 model family. By integrating this specialized speculative decoding architecture, LiteRT-LM bypasses traditional latency bottlenecks to deliver up to a 2.2x speedup.

Standard LLM inference is fundamentally memory-bandwidth bound; processors spend the majority of their time moving billions of parameters from VRAM to compute units just to generate a single token. While speculative decoding mitigates this, naive implementations can introduce new bottlenecks. LiteRT-LM prevents this by optimizing the data interplay between the primary Gemma 4 model and the MTP drafter.

To achieve this, LiteRT-LM enforces memory locality by executing both the lightweight MTP drafter and the primary model on the same hardware IP (e.g., the GPU). Managing the shared KV cache and activations within local memory entirely eliminates the latency penalties of cross-IP synchronization and data transfers. Once the drafter predicts future tokens, the primary model evaluates them using optimized kernels that maximize parallelization during verification. This streamlined architecture accelerates multi-token throughput without losing reasoning quality.

new_MTP_speedup

Enabling MTP in the LiteRT-LM pipeline requires only two lines of configuration, instantly unlocking up to 2.2x decoding speedup for low-latency applications. Numbers reported are collected on Samsung S26 Ultra using the GPU backend.

Session management for speed and continuity

Advanced session management in LiteRT-LM fundamentally transforms how mobile applications handle long-context interactions. By supporting native session save and restore capabilities, the engine allows large KV cache states—representing longer context histories—to be serialized and safely preserved across sessions. This architecture guarantees seamless user continuity, allowing conversations or workflows to be resumed seamlessly. Beyond user-experience benefits, this mechanism provides better backend efficiency: preserving context states reduces the need for redundant computations and bypasses heavy prefill phases on returning sessions. This efficiency powers dynamic features like the extended Agent Skills in the Google AI Edge Gallery app, driving down overall compute costs while delivering an incredibly fast, end-to-end on-device experience.

Efficient memory utilization

To ensure seamless on-device deployment of Gemma 4's native vision and audio capabilities, LiteRT-LM employs advanced memory footprint optimizations that maximize efficiency within strict hardware constraints. The runtime strategically reduces overhead by keeping per-layer embeddings (PLEs) out of memory and by dynamically loading image and audio encoders only when a specific task requires them, ensuring that text-only workloads remain exceptionally lightweight. LiteRT-LM also highly optimizes overall memory consumption for CPU execution, allowing developers to achieve robust performance while maintaining a minimal device footprint—be sure to check out the official model cards (E2B, E4B) for specific memory benchmarks.

The result of these combined techniques is a lean runtime footprint — for instance, LiteRT-LM successfully runs the ~2.58GB Gemma 4 E2B model with a physical memory footprint of just 607MB on Apple mobile CPUs utilizing XNNPACK’s weight caching mechanism. This reduction in active memory overhead ensures robust, enterprise-grade AI performance without compromising your app's overall stability.

Orchestrating agentic workflows: thinking, formatting, and acting

To ensure the model executes highly complex, multi-step tasks before triggering any external actions, LiteRT-LM natively supports Thinking Mode (available in the Gemma 4 model family). By dedicating a scratchpad for step-by-step reasoning before the model commits to an action, LiteRT-LM can significantly improve the output quality. Developers can choose to stream this raw reasoning process directly to the UI or strip it to save critical KV cache space in multi-turn mobile sessions.

Once the model has finished its internal reasoning, keeping its output structured is critical. Coupled with robust constrained decoding (CD), developers can enforce strict JSON schemas or specific output grammar on the final generated tool payload, completely eliminating parser breaking.

quality

Quality improvement from thinking + constrained decoding support, on Samsung S25 Ultra CPU.

With deep thinking and strict boundaries established, the model is ready to act. Moving beyond raw generation, LiteRT-LM supports the native function-calling capabilities introduced in FunctionGemma and perfected in Gemma 4. The runtime seamlessly pauses execution, returns structured tool-call requests to your application layer, and resumes upon receiving the tool's output.

Expanding the integration surface

LiteRT-LM was built from the ground up to be cross-platform, and we are now expanding beyond Android support (Kotlin/C++) with new interfaces for Apple ecosystems (Swift API) and the open web (JavaScript API) .

Native Development with Swift

Expanding its state-of-the-art performance for Gemma models, LiteRT-LM now unlocks native Apple development with a fully open-source iOS Swift API.

new_ios_2

Performance comparison of LiteRT-LM for iOS Swift Vs. MLX, tested on iPhone 17 Pro.

High-Performance browser inference with WebGPU

We’re also bringing the power of LiteRT-LM to the browser. These production-proven inference pipelines are now fully accessible on the web (WASM) through our JavaScript API. Powered by WebGPU, LiteRT-LM delivers lightning-fast LLM routing and execution client-side, unlocking web applications that are serverless, secure, and completely privacy-preserving. Building upon the foundational success of the MediaPipe LLM Inference engine’s web solution, this native web support in LiteRT-LM represents the next evolution in our on-device AI stack.

LiteRT-LM web demo running on an Apple MacBook Pro M3 36GB with 18 GPU cores.

Our web solution offers significant performance gains over other web-based LLM frameworks.

new_web_2

Performance comparison of LiteRT-LM.js Vs. ONNX Runtime Web, tested in Chrome on an MacBook Pro 2024 (Apple M4 Max) 48GB with 40 GPU cores.

Looking ahead

We are just scratching the surface of what is possible when you bring powerful LLM inference and true agentic skills to edge devices. LiteRT-LM eliminates the friction of managing memory, hardware acceleration, and cross-platform idiosyncrasies, letting you build the next generation of privacy-first, zero-latency applications.

We want you to try it. Download the LiteRT-LM CLI for desktop or AI Edge Gallery for mobile, or check out the code and APIs today, and we’re excited to see what you build.

Acknowledgements

We'd like to extend a special thanks to our key contributors for their foundational work on this project: Advait Jain, Alice Zheng, Cormac Brick, Byungchul Kim, Fengwu Yao, Jae Yoo, Jenn Lee, Lu Wang, Marissa Ikonomidis, Matthew Chan, Matthew Soulanille, Matthias Grundmann, Mohammadreza Heydary, Ram Iyengar, Sachin Kotwani, Salil Tambe, Suleman Shahid, Tenghui Zhu, Tyler Mullen, Vinod Mamillapalli, Wai Hon Law, Weiyi Wang, Yi-Chun Kuo, Yu-hui Chen.

Explore this announcement and all Google I/O 2026 updates on io.google.