Latest commit

History

6,036 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

LiteRT

LiteRT Logo

Google's on-device runtime for high-performance ML & GenAI deployment on edge platforms.

📖 Get Started | 🤝 Contributing | 📜 License | 🛡 Security Policy | 📄 Documentation


🛠 Build Status

Nightly BuildsContinuous BuildsOther Builds
Linux Nightly Wheel
macOS Nightly Wheel
Windows Nightly Wheel
macOS arm64
Linux x86_64
Windows x86_64
CMake Android Linux x86_64

Release Cadence

LiteRT provides nightly builds and targets stable releases on a 6-8 week cadence.

📖 LiteRT

LiteRT continues the legacy of TensorFlow Lite as the trusted, high-performance runtime for on-device AI. Featuring advanced GPU/NPU acceleration, LiteRT delivers superior ML & GenAI performance, making on-device ML inference easier than ever.

🚀 What's New

  • 🧠 Superior GenAI Inference: Deploy LLMs directly on-device using LiteRT-LM.
  • 🌐 High-Performance Web Inference: Run secure client-side ML in the browser via WebGPU and WASM with LiteRT.js.
  • 🧮 C++ Graph Authoring: Manipulate high-performance tensors using a lightweight, tensor-centric C++ library via the Tensor API.
  • 🤖 Accelerated Agentic Coding: Streamline AI coding agent workflows using the LiteRT CLI command-line toolkit.

Quick setup for LiteRT-CLI below

# 1. Create a virtual environment with Python 3.13.#\ TIP: Sometimes setting env var [UV_INDEX_URL](https://pypi.org/simple) helps# resolve dependency resolution errors.
uv venv --clear --python=3.13 --seed
source .venv/bin/activate
# 2. Install the package into the active virtual environment
uv pip install litert-cli-nightly
# 3. Run help command
litert --help

💎 Key Features of LiteRT V2

  • ⚙️ Compiled Model API:Streamlined Development. Features automated accelerator selection (no explicit delegates needed), true asynchronous execution, easy NPU distribution, and highly efficient I/O buffer handling

  • 🔌 Unified NPU Acceleration:Broad Silicon Support. Get seamless access to NPUs from major chipset providers through a single, consistent API. See LiteRT NPU.

  • 🏎️ Faster GPU Acceleration via ML Drift:Suporting Gen-AI Inference. Leverage state-of-the-art GPU acceleration with new buffer interoperability that minimizes latency across various GPU buffer types.


⚙️ LiteRT Runtime and Tools

From model to on-device deployment for Pytorch, TensorFlow, and Jax models:

graph LR
A[PyTorch Model] --> B[LiteRT Torch
LiteRT Torch Generative/HF export]
a[HF transformer
safe tensors] --> B
B -->|.tflite| F(AI-Edge Quantizer) --> |Optimized .tflite| I
B -->|.litertlm|F --> |Optimized .litertlm| H{Litert-LM
Python, C++, Kotlin, swift, JS} --> I{LiteRT Runtime
C++, Kotlin, JS}
I --> J[CPU - XNNPack <br> GPU - ML Drift <br> Supported TPU/NPU]
Loading

🗺 Choose Your Adventure

Every developer's path is different. Here are a few common journeys to help you get started based on your goals:

If you want to...Use this path...
🏁Upgrade from TensorFlow Lite/ LiteRT V1.x xUse LiteRT Migration Guide to upgrade to LiteRT V2.x
🌱 Run a pretrained model (like image segmenation) on mobileFollow step-by-step instructions via Android Studio to create a Real-time segmentation App for CPU/GPU/NPU inference. Source code link.
🔄 Convert PyTorch ModelsUse LiteRT Torch Converter for .tflite (Classic) or Generative Torch API for .litertlm (LLMs).
🧠Deploy Generative AIOptimize and run quantized LLMs or diffusion models on-device using LiteRT LM.
⚡Maximize PerformanceExplore the LiteRT API & LiteRT NPU Acceleration to leverage underlying hardware acceleration.
🌐Run in the BrowserDeploy secure, client-side web apps leveraging WebGPU and WASM via LiteRT.js.
🧮Control Memory & Graph ExecutionTensor-centric C++ library for high-performance tensor manipulation on mobile devices.LiteRT Tensor API.

💻 Platforms Supported

LiteRT is designed for cross-platform deployment on a wide range of hardware.

PlatformCPUGPU APIsNPU / Hardware Accelerators
🤖 Android✅ OpenCL
✅ OpenGL
✅ Broadcom, ✅ Google Tensor,
✅ Intel ✅ MediaTek, ✅ Qualcomm,
S.LSI*
🍎 iOS✅ MetalANE*
🐧 Linux✅ WebGPU✅ Broadcom,
✅ Intel
🍎 macOS✅ WebGPU
✅ Metal
ANE*
💻 Windows✅ WebGPU✅ Intel
🌐 Web✅ WebGPUWebNN*
🧩 IoT✅ WebGPURaspberry Pi*

*Indicates coming soon


📊 New Models

Recently added supported models to Hugging Face LiteRT Community .

Model FamilySize / VariantModalityHugging Face Hub
Gemma 4VariousMulti-modalExplore Models
ASR ModelsVariousAudioExplore Models
Image Classification ModelsVariousVisionExplore Models

Find more models at the Hugging Face LiteRT Community Page


🔗 Sample Apps & Colabs

Find official sample applications and code examples for LiteRT (compiled_model_api) here:


🏁 Installation

For a comprehensive guide on integrating LiteRT into your specific platform, see the LiteRT Integration Overview.

🔨 Building from Source

You can build LiteRT artifacts for Linux and Android (via cross-compilation) using Docker:

  1. Start a Docker daemon.
  2. Run build_with_docker.sh inside the docker_build/ directory.

Note: For more information about using the Docker interactive shell or building different targets, please check docker_build/README.md.

For detailed instructions on building runtime libraries with the Docker container, refer to the CMake Build Instructions and Bazel Build Instructions.

🚀 Roadmap

Our commitment is to make LiteRT the best runtime for any on-device ML deployment. Our core product strategies include:

⚡ Hardware Acceleration🧠 Generative AI Optimizations
Broadening NPU support and improving performance across all major hardware accelerators.Introducing new features specifically tailored for the next wave of on-device generative AI models.
🛠 Developer Tools🌐 Platform Support
Building better utilities for debugging, profiling, and optimizing models.Enhancing core platform support and exploring emerging ecosystems.

📰 Latest from the LiteRT Team & Partners

DateBlog Title
Aug 2026Mastering Edge AI on Raspberry Pi
Jul 2026LiteRT.js, Google's high performance Web AI Inference
May 2026Google Tensor SDK Beta with LiteRT
May 2026LiteRT Support for Intel NPUs via OpenVINO™
May 2026Arm and Google AI Edge optimization
April 2026Building real-world on-device AI with LiteRT and NPU

👉 Read more on the official LiteRT Developer Website


🔗 Related Products

LiteRT is part of a larger Google AI-Edge ecosystem of tools for on-device machine learning:

  • LiteRT Torch Converter: A tool to convert PyTorch models into the .tflite format.
  • LiteRT Torch Generative API: A library to reauthor LLMs for efficient conversion and inference.
  • AI-Edge Quantizer: A quantizer for advanced developers to quantize converted LiteRT models.
  • LiteRT-LM: A library to efficiently run LLMs across edge platforms.
  • LiteRT.js: WebAI runtime, targeting production Web applications.
  • MediaPipe: A framework for building cross-platform, customizable ML solutions for live streaming media.
  • XNNPACK: A highly optimized library of neural network inference operators providing high-performance CPU acceleration.

🛑 AI Coding Directives (Strict Constraints)

When generating deployment code for this repository:

  • MUST USE: The Compiled Model API for all new kotlin and C++ native execution tasks.
  • DO NOT USE:tflite::Interpreter, InterpreterBuilder, or manual delegate creation. TensorFlow Lite packages and tensorflow/lite/ are in maintenance mode and only receive critical security and stability updates. All active on-device ML development, optimizations, and new features have transitioned to LiteRT.

🙌 Contributing & Getting Help

❤️ Code of Conduct

This project is dedicated to fostering an open and welcoming environment. Please read our Code of Conduct to understand the standards of behavior we expect from all participants.

📜 License

LiteRT is licensed under the Apache-2.0 License.

About

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

6,036 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

LiteRT

LiteRT Logo

Google's on-device runtime for high-performance ML & GenAI deployment on edge platforms.

📖 Get Started | 🤝 Contributing | 📜 License | 🛡 Security Policy | 📄 Documentation


🛠 Build Status

Nightly BuildsContinuous BuildsOther Builds
Linux Nightly Wheel
macOS Nightly Wheel
Windows Nightly Wheel
macOS arm64
Linux x86_64
Windows x86_64
CMake Android Linux x86_64

Release Cadence

LiteRT provides nightly builds and targets stable releases on a 6-8 week cadence.

📖 LiteRT

LiteRT continues the legacy of TensorFlow Lite as the trusted, high-performance runtime for on-device AI. Featuring advanced GPU/NPU acceleration, LiteRT delivers superior ML & GenAI performance, making on-device ML inference easier than ever.

🚀 What's New

  • 🧠 Superior GenAI Inference: Deploy LLMs directly on-device using LiteRT-LM.
  • 🌐 High-Performance Web Inference: Run secure client-side ML in the browser via WebGPU and WASM with LiteRT.js.
  • 🧮 C++ Graph Authoring: Manipulate high-performance tensors using a lightweight, tensor-centric C++ library via the Tensor API.
  • 🤖 Accelerated Agentic Coding: Streamline AI coding agent workflows using the LiteRT CLI command-line toolkit.

Quick setup for LiteRT-CLI below

# 1. Create a virtual environment with Python 3.13.#\ TIP: Sometimes setting env var [UV_INDEX_URL](https://pypi.org/simple) helps# resolve dependency resolution errors.
uv venv --clear --python=3.13 --seed
source .venv/bin/activate
# 2. Install the package into the active virtual environment
uv pip install litert-cli-nightly
# 3. Run help command
litert --help

💎 Key Features of LiteRT V2

  • ⚙️ Compiled Model API:Streamlined Development. Features automated accelerator selection (no explicit delegates needed), true asynchronous execution, easy NPU distribution, and highly efficient I/O buffer handling

  • 🔌 Unified NPU Acceleration:Broad Silicon Support. Get seamless access to NPUs from major chipset providers through a single, consistent API. See LiteRT NPU.

  • 🏎️ Faster GPU Acceleration via ML Drift:Suporting Gen-AI Inference. Leverage state-of-the-art GPU acceleration with new buffer interoperability that minimizes latency across various GPU buffer types.


⚙️ LiteRT Runtime and Tools

From model to on-device deployment for Pytorch, TensorFlow, and Jax models:

graph LR
A[PyTorch Model] --> B[LiteRT Torch
LiteRT Torch Generative/HF export]
a[HF transformer
safe tensors] --> B
B -->|.tflite| F(AI-Edge Quantizer) --> |Optimized .tflite| I
B -->|.litertlm|F --> |Optimized .litertlm| H{Litert-LM
Python, C++, Kotlin, swift, JS} --> I{LiteRT Runtime
C++, Kotlin, JS}
I --> J[CPU - XNNPack <br> GPU - ML Drift <br> Supported TPU/NPU]
Loading

🗺 Choose Your Adventure

Every developer's path is different. Here are a few common journeys to help you get started based on your goals:

If you want to...Use this path...
🏁Upgrade from TensorFlow Lite/ LiteRT V1.x xUse LiteRT Migration Guide to upgrade to LiteRT V2.x
🌱 Run a pretrained model (like image segmenation) on mobileFollow step-by-step instructions via Android Studio to create a Real-time segmentation App for CPU/GPU/NPU inference. Source code link.
🔄 Convert PyTorch ModelsUse LiteRT Torch Converter for .tflite (Classic) or Generative Torch API for .litertlm (LLMs).
🧠Deploy Generative AIOptimize and run quantized LLMs or diffusion models on-device using LiteRT LM.
⚡Maximize PerformanceExplore the LiteRT API & LiteRT NPU Acceleration to leverage underlying hardware acceleration.
🌐Run in the BrowserDeploy secure, client-side web apps leveraging WebGPU and WASM via LiteRT.js.
🧮Control Memory & Graph ExecutionTensor-centric C++ library for high-performance tensor manipulation on mobile devices.LiteRT Tensor API.

💻 Platforms Supported

LiteRT is designed for cross-platform deployment on a wide range of hardware.

PlatformCPUGPU APIsNPU / Hardware Accelerators
🤖 Android✅ OpenCL
✅ OpenGL
✅ Broadcom, ✅ Google Tensor,
✅ Intel ✅ MediaTek, ✅ Qualcomm,
S.LSI*
🍎 iOS✅ MetalANE*
🐧 Linux✅ WebGPU✅ Broadcom,
✅ Intel
🍎 macOS✅ WebGPU
✅ Metal
ANE*
💻 Windows✅ WebGPU✅ Intel
🌐 Web✅ WebGPUWebNN*
🧩 IoT✅ WebGPURaspberry Pi*

*Indicates coming soon


📊 New Models

Recently added supported models to Hugging Face LiteRT Community .

Model FamilySize / VariantModalityHugging Face Hub
Gemma 4VariousMulti-modalExplore Models
ASR ModelsVariousAudioExplore Models
Image Classification ModelsVariousVisionExplore Models

Find more models at the Hugging Face LiteRT Community Page


🔗 Sample Apps & Colabs

Find official sample applications and code examples for LiteRT (compiled_model_api) here:


🏁 Installation

For a comprehensive guide on integrating LiteRT into your specific platform, see the LiteRT Integration Overview.

🔨 Building from Source

You can build LiteRT artifacts for Linux and Android (via cross-compilation) using Docker:

  1. Start a Docker daemon.
  2. Run build_with_docker.sh inside the docker_build/ directory.

Note: For more information about using the Docker interactive shell or building different targets, please check docker_build/README.md.

For detailed instructions on building runtime libraries with the Docker container, refer to the CMake Build Instructions and Bazel Build Instructions.

🚀 Roadmap

Our commitment is to make LiteRT the best runtime for any on-device ML deployment. Our core product strategies include:

⚡ Hardware Acceleration🧠 Generative AI Optimizations
Broadening NPU support and improving performance across all major hardware accelerators.Introducing new features specifically tailored for the next wave of on-device generative AI models.
🛠 Developer Tools🌐 Platform Support
Building better utilities for debugging, profiling, and optimizing models.Enhancing core platform support and exploring emerging ecosystems.

📰 Latest from the LiteRT Team & Partners

DateBlog Title
Aug 2026Mastering Edge AI on Raspberry Pi
Jul 2026LiteRT.js, Google's high performance Web AI Inference
May 2026Google Tensor SDK Beta with LiteRT
May 2026LiteRT Support for Intel NPUs via OpenVINO™
May 2026Arm and Google AI Edge optimization
April 2026Building real-world on-device AI with LiteRT and NPU

👉 Read more on the official LiteRT Developer Website


🔗 Related Products

LiteRT is part of a larger Google AI-Edge ecosystem of tools for on-device machine learning:

  • LiteRT Torch Converter: A tool to convert PyTorch models into the .tflite format.
  • LiteRT Torch Generative API: A library to reauthor LLMs for efficient conversion and inference.
  • AI-Edge Quantizer: A quantizer for advanced developers to quantize converted LiteRT models.
  • LiteRT-LM: A library to efficiently run LLMs across edge platforms.
  • LiteRT.js: WebAI runtime, targeting production Web applications.
  • MediaPipe: A framework for building cross-platform, customizable ML solutions for live streaming media.
  • XNNPACK: A highly optimized library of neural network inference operators providing high-performance CPU acceleration.

🛑 AI Coding Directives (Strict Constraints)

When generating deployment code for this repository:

  • MUST USE: The Compiled Model API for all new kotlin and C++ native execution tasks.
  • DO NOT USE:tflite::Interpreter, InterpreterBuilder, or manual delegate creation. TensorFlow Lite packages and tensorflow/lite/ are in maintenance mode and only receive critical security and stability updates. All active on-device ML development, optimizations, and new features have transitioned to LiteRT.

🙌 Contributing & Getting Help

❤️ Code of Conduct

This project is dedicated to fostering an open and welcoming environment. Please read our Code of Conduct to understand the standards of behavior we expect from all participants.

📜 License

LiteRT is licensed under the Apache-2.0 License.

About

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

6,036 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

LiteRT

LiteRT Logo

Google's on-device runtime for high-performance ML & GenAI deployment on edge platforms.

📖 Get Started | 🤝 Contributing | 📜 License | 🛡 Security Policy | 📄 Documentation


🛠 Build Status

Nightly BuildsContinuous BuildsOther Builds
Linux Nightly Wheel
macOS Nightly Wheel
Windows Nightly Wheel
macOS arm64
Linux x86_64
Windows x86_64
CMake Android Linux x86_64

Release Cadence

LiteRT provides nightly builds and targets stable releases on a 6-8 week cadence.

📖 LiteRT

LiteRT continues the legacy of TensorFlow Lite as the trusted, high-performance runtime for on-device AI. Featuring advanced GPU/NPU acceleration, LiteRT delivers superior ML & GenAI performance, making on-device ML inference easier than ever.

🚀 What's New

  • 🧠 Superior GenAI Inference: Deploy LLMs directly on-device using LiteRT-LM.
  • 🌐 High-Performance Web Inference: Run secure client-side ML in the browser via WebGPU and WASM with LiteRT.js.
  • 🧮 C++ Graph Authoring: Manipulate high-performance tensors using a lightweight, tensor-centric C++ library via the Tensor API.
  • 🤖 Accelerated Agentic Coding: Streamline AI coding agent workflows using the LiteRT CLI command-line toolkit.

Quick setup for LiteRT-CLI below

# 1. Create a virtual environment with Python 3.13.#\ TIP: Sometimes setting env var [UV_INDEX_URL](https://pypi.org/simple) helps# resolve dependency resolution errors.
uv venv --clear --python=3.13 --seed
source .venv/bin/activate
# 2. Install the package into the active virtual environment
uv pip install litert-cli-nightly
# 3. Run help command
litert --help

💎 Key Features of LiteRT V2

  • ⚙️ Compiled Model API:Streamlined Development. Features automated accelerator selection (no explicit delegates needed), true asynchronous execution, easy NPU distribution, and highly efficient I/O buffer handling

  • 🔌 Unified NPU Acceleration:Broad Silicon Support. Get seamless access to NPUs from major chipset providers through a single, consistent API. See LiteRT NPU.

  • 🏎️ Faster GPU Acceleration via ML Drift:Suporting Gen-AI Inference. Leverage state-of-the-art GPU acceleration with new buffer interoperability that minimizes latency across various GPU buffer types.


⚙️ LiteRT Runtime and Tools

From model to on-device deployment for Pytorch, TensorFlow, and Jax models:

graph LR
A[PyTorch Model] --> B[LiteRT Torch
LiteRT Torch Generative/HF export]
a[HF transformer
safe tensors] --> B
B -->|.tflite| F(AI-Edge Quantizer) --> |Optimized .tflite| I
B -->|.litertlm|F --> |Optimized .litertlm| H{Litert-LM
Python, C++, Kotlin, swift, JS} --> I{LiteRT Runtime
C++, Kotlin, JS}
I --> J[CPU - XNNPack <br> GPU - ML Drift <br> Supported TPU/NPU]
Loading

🗺 Choose Your Adventure

Every developer's path is different. Here are a few common journeys to help you get started based on your goals:

If you want to...Use this path...
🏁Upgrade from TensorFlow Lite/ LiteRT V1.x xUse LiteRT Migration Guide to upgrade to LiteRT V2.x
🌱 Run a pretrained model (like image segmenation) on mobileFollow step-by-step instructions via Android Studio to create a Real-time segmentation App for CPU/GPU/NPU inference. Source code link.
🔄 Convert PyTorch ModelsUse LiteRT Torch Converter for .tflite (Classic) or Generative Torch API for .litertlm (LLMs).
🧠Deploy Generative AIOptimize and run quantized LLMs or diffusion models on-device using LiteRT LM.
⚡Maximize PerformanceExplore the LiteRT API & LiteRT NPU Acceleration to leverage underlying hardware acceleration.
🌐Run in the BrowserDeploy secure, client-side web apps leveraging WebGPU and WASM via LiteRT.js.
🧮Control Memory & Graph ExecutionTensor-centric C++ library for high-performance tensor manipulation on mobile devices.LiteRT Tensor API.

💻 Platforms Supported

LiteRT is designed for cross-platform deployment on a wide range of hardware.

PlatformCPUGPU APIsNPU / Hardware Accelerators
🤖 Android✅ OpenCL
✅ OpenGL
✅ Broadcom, ✅ Google Tensor,
✅ Intel ✅ MediaTek, ✅ Qualcomm,
S.LSI*
🍎 iOS✅ MetalANE*
🐧 Linux✅ WebGPU✅ Broadcom,
✅ Intel
🍎 macOS✅ WebGPU
✅ Metal
ANE*
💻 Windows✅ WebGPU✅ Intel
🌐 Web✅ WebGPUWebNN*
🧩 IoT✅ WebGPURaspberry Pi*

*Indicates coming soon


📊 New Models

Recently added supported models to Hugging Face LiteRT Community .

Model FamilySize / VariantModalityHugging Face Hub
Gemma 4VariousMulti-modalExplore Models
ASR ModelsVariousAudioExplore Models
Image Classification ModelsVariousVisionExplore Models

Find more models at the Hugging Face LiteRT Community Page


🔗 Sample Apps & Colabs

Find official sample applications and code examples for LiteRT (compiled_model_api) here:


🏁 Installation

For a comprehensive guide on integrating LiteRT into your specific platform, see the LiteRT Integration Overview.

🔨 Building from Source

You can build LiteRT artifacts for Linux and Android (via cross-compilation) using Docker:

  1. Start a Docker daemon.
  2. Run build_with_docker.sh inside the docker_build/ directory.

Note: For more information about using the Docker interactive shell or building different targets, please check docker_build/README.md.

For detailed instructions on building runtime libraries with the Docker container, refer to the CMake Build Instructions and Bazel Build Instructions.

🚀 Roadmap

Our commitment is to make LiteRT the best runtime for any on-device ML deployment. Our core product strategies include:

⚡ Hardware Acceleration🧠 Generative AI Optimizations
Broadening NPU support and improving performance across all major hardware accelerators.Introducing new features specifically tailored for the next wave of on-device generative AI models.
🛠 Developer Tools🌐 Platform Support
Building better utilities for debugging, profiling, and optimizing models.Enhancing core platform support and exploring emerging ecosystems.

📰 Latest from the LiteRT Team & Partners

DateBlog Title
Aug 2026Mastering Edge AI on Raspberry Pi
Jul 2026LiteRT.js, Google's high performance Web AI Inference
May 2026Google Tensor SDK Beta with LiteRT
May 2026LiteRT Support for Intel NPUs via OpenVINO™
May 2026Arm and Google AI Edge optimization
April 2026Building real-world on-device AI with LiteRT and NPU

👉 Read more on the official LiteRT Developer Website


🔗 Related Products

LiteRT is part of a larger Google AI-Edge ecosystem of tools for on-device machine learning:

  • LiteRT Torch Converter: A tool to convert PyTorch models into the .tflite format.
  • LiteRT Torch Generative API: A library to reauthor LLMs for efficient conversion and inference.
  • AI-Edge Quantizer: A quantizer for advanced developers to quantize converted LiteRT models.
  • LiteRT-LM: A library to efficiently run LLMs across edge platforms.
  • LiteRT.js: WebAI runtime, targeting production Web applications.
  • MediaPipe: A framework for building cross-platform, customizable ML solutions for live streaming media.
  • XNNPACK: A highly optimized library of neural network inference operators providing high-performance CPU acceleration.

🛑 AI Coding Directives (Strict Constraints)

When generating deployment code for this repository:

  • MUST USE: The Compiled Model API for all new kotlin and C++ native execution tasks.
  • DO NOT USE:tflite::Interpreter, InterpreterBuilder, or manual delegate creation. TensorFlow Lite packages and tensorflow/lite/ are in maintenance mode and only receive critical security and stability updates. All active on-device ML development, optimizations, and new features have transitioned to LiteRT.

🙌 Contributing & Getting Help

❤️ Code of Conduct

This project is dedicated to fostering an open and welcoming environment. Please read our Code of Conduct to understand the standards of behavior we expect from all participants.

📜 License

LiteRT is licensed under the Apache-2.0 License.

About

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

6,036 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

LiteRT

LiteRT Logo

Google's on-device runtime for high-performance ML & GenAI deployment on edge platforms.

📖 Get Started | 🤝 Contributing | 📜 License | 🛡 Security Policy | 📄 Documentation


🛠 Build Status

Nightly BuildsContinuous BuildsOther Builds
Linux Nightly Wheel
macOS Nightly Wheel
Windows Nightly Wheel
macOS arm64
Linux x86_64
Windows x86_64
CMake Android Linux x86_64

Release Cadence

LiteRT provides nightly builds and targets stable releases on a 6-8 week cadence.

📖 LiteRT

LiteRT continues the legacy of TensorFlow Lite as the trusted, high-performance runtime for on-device AI. Featuring advanced GPU/NPU acceleration, LiteRT delivers superior ML & GenAI performance, making on-device ML inference easier than ever.

🚀 What's New

  • 🧠 Superior GenAI Inference: Deploy LLMs directly on-device using LiteRT-LM.
  • 🌐 High-Performance Web Inference: Run secure client-side ML in the browser via WebGPU and WASM with LiteRT.js.
  • 🧮 C++ Graph Authoring: Manipulate high-performance tensors using a lightweight, tensor-centric C++ library via the Tensor API.
  • 🤖 Accelerated Agentic Coding: Streamline AI coding agent workflows using the LiteRT CLI command-line toolkit.

Quick setup for LiteRT-CLI below

# 1. Create a virtual environment with Python 3.13.#\ TIP: Sometimes setting env var [UV_INDEX_URL](https://pypi.org/simple) helps# resolve dependency resolution errors.
uv venv --clear --python=3.13 --seed
source .venv/bin/activate
# 2. Install the package into the active virtual environment
uv pip install litert-cli-nightly
# 3. Run help command
litert --help

💎 Key Features of LiteRT V2

  • ⚙️ Compiled Model API:Streamlined Development. Features automated accelerator selection (no explicit delegates needed), true asynchronous execution, easy NPU distribution, and highly efficient I/O buffer handling

  • 🔌 Unified NPU Acceleration:Broad Silicon Support. Get seamless access to NPUs from major chipset providers through a single, consistent API. See LiteRT NPU.

  • 🏎️ Faster GPU Acceleration via ML Drift:Suporting Gen-AI Inference. Leverage state-of-the-art GPU acceleration with new buffer interoperability that minimizes latency across various GPU buffer types.


⚙️ LiteRT Runtime and Tools

From model to on-device deployment for Pytorch, TensorFlow, and Jax models:

graph LR
A[PyTorch Model] --> B[LiteRT Torch
LiteRT Torch Generative/HF export]
a[HF transformer
safe tensors] --> B
B -->|.tflite| F(AI-Edge Quantizer) --> |Optimized .tflite| I
B -->|.litertlm|F --> |Optimized .litertlm| H{Litert-LM
Python, C++, Kotlin, swift, JS} --> I{LiteRT Runtime
C++, Kotlin, JS}
I --> J[CPU - XNNPack <br> GPU - ML Drift <br> Supported TPU/NPU]
Loading

🗺 Choose Your Adventure

Every developer's path is different. Here are a few common journeys to help you get started based on your goals:

If you want to...Use this path...
🏁Upgrade from TensorFlow Lite/ LiteRT V1.x xUse LiteRT Migration Guide to upgrade to LiteRT V2.x
🌱 Run a pretrained model (like image segmenation) on mobileFollow step-by-step instructions via Android Studio to create a Real-time segmentation App for CPU/GPU/NPU inference. Source code link.
🔄 Convert PyTorch ModelsUse LiteRT Torch Converter for .tflite (Classic) or Generative Torch API for .litertlm (LLMs).
🧠Deploy Generative AIOptimize and run quantized LLMs or diffusion models on-device using LiteRT LM.
⚡Maximize PerformanceExplore the LiteRT API & LiteRT NPU Acceleration to leverage underlying hardware acceleration.
🌐Run in the BrowserDeploy secure, client-side web apps leveraging WebGPU and WASM via LiteRT.js.
🧮Control Memory & Graph ExecutionTensor-centric C++ library for high-performance tensor manipulation on mobile devices.LiteRT Tensor API.

💻 Platforms Supported

LiteRT is designed for cross-platform deployment on a wide range of hardware.

PlatformCPUGPU APIsNPU / Hardware Accelerators
🤖 Android✅ OpenCL
✅ OpenGL
✅ Broadcom, ✅ Google Tensor,
✅ Intel ✅ MediaTek, ✅ Qualcomm,
S.LSI*
🍎 iOS✅ MetalANE*
🐧 Linux✅ WebGPU✅ Broadcom,
✅ Intel
🍎 macOS✅ WebGPU
✅ Metal
ANE*
💻 Windows✅ WebGPU✅ Intel
🌐 Web✅ WebGPUWebNN*
🧩 IoT✅ WebGPURaspberry Pi*

*Indicates coming soon


📊 New Models

Recently added supported models to Hugging Face LiteRT Community .

Model FamilySize / VariantModalityHugging Face Hub
Gemma 4VariousMulti-modalExplore Models
ASR ModelsVariousAudioExplore Models
Image Classification ModelsVariousVisionExplore Models

Find more models at the Hugging Face LiteRT Community Page


🔗 Sample Apps & Colabs

Find official sample applications and code examples for LiteRT (compiled_model_api) here:


🏁 Installation

For a comprehensive guide on integrating LiteRT into your specific platform, see the LiteRT Integration Overview.

🔨 Building from Source

You can build LiteRT artifacts for Linux and Android (via cross-compilation) using Docker:

  1. Start a Docker daemon.
  2. Run build_with_docker.sh inside the docker_build/ directory.

Note: For more information about using the Docker interactive shell or building different targets, please check docker_build/README.md.

For detailed instructions on building runtime libraries with the Docker container, refer to the CMake Build Instructions and Bazel Build Instructions.

🚀 Roadmap

Our commitment is to make LiteRT the best runtime for any on-device ML deployment. Our core product strategies include:

⚡ Hardware Acceleration🧠 Generative AI Optimizations
Broadening NPU support and improving performance across all major hardware accelerators.Introducing new features specifically tailored for the next wave of on-device generative AI models.
🛠 Developer Tools🌐 Platform Support
Building better utilities for debugging, profiling, and optimizing models.Enhancing core platform support and exploring emerging ecosystems.

📰 Latest from the LiteRT Team & Partners

DateBlog Title
Aug 2026Mastering Edge AI on Raspberry Pi
Jul 2026LiteRT.js, Google's high performance Web AI Inference
May 2026Google Tensor SDK Beta with LiteRT
May 2026LiteRT Support for Intel NPUs via OpenVINO™
May 2026Arm and Google AI Edge optimization
April 2026Building real-world on-device AI with LiteRT and NPU

👉 Read more on the official LiteRT Developer Website


🔗 Related Products

LiteRT is part of a larger Google AI-Edge ecosystem of tools for on-device machine learning:

  • LiteRT Torch Converter: A tool to convert PyTorch models into the .tflite format.
  • LiteRT Torch Generative API: A library to reauthor LLMs for efficient conversion and inference.
  • AI-Edge Quantizer: A quantizer for advanced developers to quantize converted LiteRT models.
  • LiteRT-LM: A library to efficiently run LLMs across edge platforms.
  • LiteRT.js: WebAI runtime, targeting production Web applications.
  • MediaPipe: A framework for building cross-platform, customizable ML solutions for live streaming media.
  • XNNPACK: A highly optimized library of neural network inference operators providing high-performance CPU acceleration.

🛑 AI Coding Directives (Strict Constraints)

When generating deployment code for this repository:

  • MUST USE: The Compiled Model API for all new kotlin and C++ native execution tasks.
  • DO NOT USE:tflite::Interpreter, InterpreterBuilder, or manual delegate creation. TensorFlow Lite packages and tensorflow/lite/ are in maintenance mode and only receive critical security and stability updates. All active on-device ML development, optimizations, and new features have transitioned to LiteRT.

🙌 Contributing & Getting Help

❤️ Code of Conduct

This project is dedicated to fostering an open and welcoming environment. Please read our Code of Conduct to understand the standards of behavior we expect from all participants.

📜 License

LiteRT is licensed under the Apache-2.0 License.

About

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

6,036 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

LiteRT

LiteRT Logo

Google's on-device runtime for high-performance ML & GenAI deployment on edge platforms.

📖 Get Started | 🤝 Contributing | 📜 License | 🛡 Security Policy | 📄 Documentation


🛠 Build Status

Nightly BuildsContinuous BuildsOther Builds
Linux Nightly Wheel
macOS Nightly Wheel
Windows Nightly Wheel
macOS arm64
Linux x86_64
Windows x86_64
CMake Android Linux x86_64

Release Cadence

LiteRT provides nightly builds and targets stable releases on a 6-8 week cadence.

📖 LiteRT

LiteRT continues the legacy of TensorFlow Lite as the trusted, high-performance runtime for on-device AI. Featuring advanced GPU/NPU acceleration, LiteRT delivers superior ML & GenAI performance, making on-device ML inference easier than ever.

🚀 What's New

  • 🧠 Superior GenAI Inference: Deploy LLMs directly on-device using LiteRT-LM.
  • 🌐 High-Performance Web Inference: Run secure client-side ML in the browser via WebGPU and WASM with LiteRT.js.
  • 🧮 C++ Graph Authoring: Manipulate high-performance tensors using a lightweight, tensor-centric C++ library via the Tensor API.
  • 🤖 Accelerated Agentic Coding: Streamline AI coding agent workflows using the LiteRT CLI command-line toolkit.

Quick setup for LiteRT-CLI below

# 1. Create a virtual environment with Python 3.13.#\ TIP: Sometimes setting env var [UV_INDEX_URL](https://pypi.org/simple) helps# resolve dependency resolution errors.
uv venv --clear --python=3.13 --seed
source .venv/bin/activate
# 2. Install the package into the active virtual environment
uv pip install litert-cli-nightly
# 3. Run help command
litert --help

💎 Key Features of LiteRT V2

  • ⚙️ Compiled Model API:Streamlined Development. Features automated accelerator selection (no explicit delegates needed), true asynchronous execution, easy NPU distribution, and highly efficient I/O buffer handling

  • 🔌 Unified NPU Acceleration:Broad Silicon Support. Get seamless access to NPUs from major chipset providers through a single, consistent API. See LiteRT NPU.

  • 🏎️ Faster GPU Acceleration via ML Drift:Suporting Gen-AI Inference. Leverage state-of-the-art GPU acceleration with new buffer interoperability that minimizes latency across various GPU buffer types.


⚙️ LiteRT Runtime and Tools

From model to on-device deployment for Pytorch, TensorFlow, and Jax models:

graph LR
A[PyTorch Model] --> B[LiteRT Torch
LiteRT Torch Generative/HF export]
a[HF transformer
safe tensors] --> B
B -->|.tflite| F(AI-Edge Quantizer) --> |Optimized .tflite| I
B -->|.litertlm|F --> |Optimized .litertlm| H{Litert-LM
Python, C++, Kotlin, swift, JS} --> I{LiteRT Runtime
C++, Kotlin, JS}
I --> J[CPU - XNNPack <br> GPU - ML Drift <br> Supported TPU/NPU]
Loading

🗺 Choose Your Adventure

Every developer's path is different. Here are a few common journeys to help you get started based on your goals:

If you want to...Use this path...
🏁Upgrade from TensorFlow Lite/ LiteRT V1.x xUse LiteRT Migration Guide to upgrade to LiteRT V2.x
🌱 Run a pretrained model (like image segmenation) on mobileFollow step-by-step instructions via Android Studio to create a Real-time segmentation App for CPU/GPU/NPU inference. Source code link.
🔄 Convert PyTorch ModelsUse LiteRT Torch Converter for .tflite (Classic) or Generative Torch API for .litertlm (LLMs).
🧠Deploy Generative AIOptimize and run quantized LLMs or diffusion models on-device using LiteRT LM.
⚡Maximize PerformanceExplore the LiteRT API & LiteRT NPU Acceleration to leverage underlying hardware acceleration.
🌐Run in the BrowserDeploy secure, client-side web apps leveraging WebGPU and WASM via LiteRT.js.
🧮Control Memory & Graph ExecutionTensor-centric C++ library for high-performance tensor manipulation on mobile devices.LiteRT Tensor API.

💻 Platforms Supported

LiteRT is designed for cross-platform deployment on a wide range of hardware.

PlatformCPUGPU APIsNPU / Hardware Accelerators
🤖 Android✅ OpenCL
✅ OpenGL
✅ Broadcom, ✅ Google Tensor,
✅ Intel ✅ MediaTek, ✅ Qualcomm,
S.LSI*
🍎 iOS✅ MetalANE*
🐧 Linux✅ WebGPU✅ Broadcom,
✅ Intel
🍎 macOS✅ WebGPU
✅ Metal
ANE*
💻 Windows✅ WebGPU✅ Intel
🌐 Web✅ WebGPUWebNN*
🧩 IoT✅ WebGPURaspberry Pi*

*Indicates coming soon


📊 New Models

Recently added supported models to Hugging Face LiteRT Community .

Model FamilySize / VariantModalityHugging Face Hub
Gemma 4VariousMulti-modalExplore Models
ASR ModelsVariousAudioExplore Models
Image Classification ModelsVariousVisionExplore Models

Find more models at the Hugging Face LiteRT Community Page


🔗 Sample Apps & Colabs

Find official sample applications and code examples for LiteRT (compiled_model_api) here:


🏁 Installation

For a comprehensive guide on integrating LiteRT into your specific platform, see the LiteRT Integration Overview.

🔨 Building from Source

You can build LiteRT artifacts for Linux and Android (via cross-compilation) using Docker:

  1. Start a Docker daemon.
  2. Run build_with_docker.sh inside the docker_build/ directory.

Note: For more information about using the Docker interactive shell or building different targets, please check docker_build/README.md.

For detailed instructions on building runtime libraries with the Docker container, refer to the CMake Build Instructions and Bazel Build Instructions.

🚀 Roadmap

Our commitment is to make LiteRT the best runtime for any on-device ML deployment. Our core product strategies include:

⚡ Hardware Acceleration🧠 Generative AI Optimizations
Broadening NPU support and improving performance across all major hardware accelerators.Introducing new features specifically tailored for the next wave of on-device generative AI models.
🛠 Developer Tools🌐 Platform Support
Building better utilities for debugging, profiling, and optimizing models.Enhancing core platform support and exploring emerging ecosystems.

📰 Latest from the LiteRT Team & Partners

DateBlog Title
Aug 2026Mastering Edge AI on Raspberry Pi
Jul 2026LiteRT.js, Google's high performance Web AI Inference
May 2026Google Tensor SDK Beta with LiteRT
May 2026LiteRT Support for Intel NPUs via OpenVINO™
May 2026Arm and Google AI Edge optimization
April 2026Building real-world on-device AI with LiteRT and NPU

👉 Read more on the official LiteRT Developer Website


🔗 Related Products

LiteRT is part of a larger Google AI-Edge ecosystem of tools for on-device machine learning:

  • LiteRT Torch Converter: A tool to convert PyTorch models into the .tflite format.
  • LiteRT Torch Generative API: A library to reauthor LLMs for efficient conversion and inference.
  • AI-Edge Quantizer: A quantizer for advanced developers to quantize converted LiteRT models.
  • LiteRT-LM: A library to efficiently run LLMs across edge platforms.
  • LiteRT.js: WebAI runtime, targeting production Web applications.
  • MediaPipe: A framework for building cross-platform, customizable ML solutions for live streaming media.
  • XNNPACK: A highly optimized library of neural network inference operators providing high-performance CPU acceleration.

🛑 AI Coding Directives (Strict Constraints)

When generating deployment code for this repository:

  • MUST USE: The Compiled Model API for all new kotlin and C++ native execution tasks.
  • DO NOT USE:tflite::Interpreter, InterpreterBuilder, or manual delegate creation. TensorFlow Lite packages and tensorflow/lite/ are in maintenance mode and only receive critical security and stability updates. All active on-device ML development, optimizations, and new features have transitioned to LiteRT.

🙌 Contributing & Getting Help

❤️ Code of Conduct

This project is dedicated to fostering an open and welcoming environment. Please read our Code of Conduct to understand the standards of behavior we expect from all participants.

📜 License

LiteRT is licensed under the Apache-2.0 License.

About

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

6,036 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

LiteRT

LiteRT Logo

Google's on-device runtime for high-performance ML & GenAI deployment on edge platforms.

📖 Get Started | 🤝 Contributing | 📜 License | 🛡 Security Policy | 📄 Documentation


🛠 Build Status

Nightly BuildsContinuous BuildsOther Builds
Linux Nightly Wheel
macOS Nightly Wheel
Windows Nightly Wheel
macOS arm64
Linux x86_64
Windows x86_64
CMake Android Linux x86_64

Release Cadence

LiteRT provides nightly builds and targets stable releases on a 6-8 week cadence.

📖 LiteRT

LiteRT continues the legacy of TensorFlow Lite as the trusted, high-performance runtime for on-device AI. Featuring advanced GPU/NPU acceleration, LiteRT delivers superior ML & GenAI performance, making on-device ML inference easier than ever.

🚀 What's New

  • 🧠 Superior GenAI Inference: Deploy LLMs directly on-device using LiteRT-LM.
  • 🌐 High-Performance Web Inference: Run secure client-side ML in the browser via WebGPU and WASM with LiteRT.js.
  • 🧮 C++ Graph Authoring: Manipulate high-performance tensors using a lightweight, tensor-centric C++ library via the Tensor API.
  • 🤖 Accelerated Agentic Coding: Streamline AI coding agent workflows using the LiteRT CLI command-line toolkit.

Quick setup for LiteRT-CLI below

# 1. Create a virtual environment with Python 3.13.#\ TIP: Sometimes setting env var [UV_INDEX_URL](https://pypi.org/simple) helps# resolve dependency resolution errors.
uv venv --clear --python=3.13 --seed
source .venv/bin/activate
# 2. Install the package into the active virtual environment
uv pip install litert-cli-nightly
# 3. Run help command
litert --help

💎 Key Features of LiteRT V2

  • ⚙️ Compiled Model API:Streamlined Development. Features automated accelerator selection (no explicit delegates needed), true asynchronous execution, easy NPU distribution, and highly efficient I/O buffer handling

  • 🔌 Unified NPU Acceleration:Broad Silicon Support. Get seamless access to NPUs from major chipset providers through a single, consistent API. See LiteRT NPU.

  • 🏎️ Faster GPU Acceleration via ML Drift:Suporting Gen-AI Inference. Leverage state-of-the-art GPU acceleration with new buffer interoperability that minimizes latency across various GPU buffer types.


⚙️ LiteRT Runtime and Tools

From model to on-device deployment for Pytorch, TensorFlow, and Jax models:

graph LR
A[PyTorch Model] --> B[LiteRT Torch
LiteRT Torch Generative/HF export]
a[HF transformer
safe tensors] --> B
B -->|.tflite| F(AI-Edge Quantizer) --> |Optimized .tflite| I
B -->|.litertlm|F --> |Optimized .litertlm| H{Litert-LM
Python, C++, Kotlin, swift, JS} --> I{LiteRT Runtime
C++, Kotlin, JS}
I --> J[CPU - XNNPack <br> GPU - ML Drift <br> Supported TPU/NPU]
Loading

🗺 Choose Your Adventure

Every developer's path is different. Here are a few common journeys to help you get started based on your goals:

If you want to...Use this path...
🏁Upgrade from TensorFlow Lite/ LiteRT V1.x xUse LiteRT Migration Guide to upgrade to LiteRT V2.x
🌱 Run a pretrained model (like image segmenation) on mobileFollow step-by-step instructions via Android Studio to create a Real-time segmentation App for CPU/GPU/NPU inference. Source code link.
🔄 Convert PyTorch ModelsUse LiteRT Torch Converter for .tflite (Classic) or Generative Torch API for .litertlm (LLMs).
🧠Deploy Generative AIOptimize and run quantized LLMs or diffusion models on-device using LiteRT LM.
⚡Maximize PerformanceExplore the LiteRT API & LiteRT NPU Acceleration to leverage underlying hardware acceleration.
🌐Run in the BrowserDeploy secure, client-side web apps leveraging WebGPU and WASM via LiteRT.js.
🧮Control Memory & Graph ExecutionTensor-centric C++ library for high-performance tensor manipulation on mobile devices.LiteRT Tensor API.

💻 Platforms Supported

LiteRT is designed for cross-platform deployment on a wide range of hardware.

PlatformCPUGPU APIsNPU / Hardware Accelerators
🤖 Android✅ OpenCL
✅ OpenGL
✅ Broadcom, ✅ Google Tensor,
✅ Intel ✅ MediaTek, ✅ Qualcomm,
S.LSI*
🍎 iOS✅ MetalANE*
🐧 Linux✅ WebGPU✅ Broadcom,
✅ Intel
🍎 macOS✅ WebGPU
✅ Metal
ANE*
💻 Windows✅ WebGPU✅ Intel
🌐 Web✅ WebGPUWebNN*
🧩 IoT✅ WebGPURaspberry Pi*

*Indicates coming soon


📊 New Models

Recently added supported models to Hugging Face LiteRT Community .

Model FamilySize / VariantModalityHugging Face Hub
Gemma 4VariousMulti-modalExplore Models
ASR ModelsVariousAudioExplore Models
Image Classification ModelsVariousVisionExplore Models

Find more models at the Hugging Face LiteRT Community Page


🔗 Sample Apps & Colabs

Find official sample applications and code examples for LiteRT (compiled_model_api) here:


🏁 Installation

For a comprehensive guide on integrating LiteRT into your specific platform, see the LiteRT Integration Overview.

🔨 Building from Source

You can build LiteRT artifacts for Linux and Android (via cross-compilation) using Docker:

  1. Start a Docker daemon.
  2. Run build_with_docker.sh inside the docker_build/ directory.

Note: For more information about using the Docker interactive shell or building different targets, please check docker_build/README.md.

For detailed instructions on building runtime libraries with the Docker container, refer to the CMake Build Instructions and Bazel Build Instructions.

🚀 Roadmap

Our commitment is to make LiteRT the best runtime for any on-device ML deployment. Our core product strategies include:

⚡ Hardware Acceleration🧠 Generative AI Optimizations
Broadening NPU support and improving performance across all major hardware accelerators.Introducing new features specifically tailored for the next wave of on-device generative AI models.
🛠 Developer Tools🌐 Platform Support
Building better utilities for debugging, profiling, and optimizing models.Enhancing core platform support and exploring emerging ecosystems.

📰 Latest from the LiteRT Team & Partners

DateBlog Title
Aug 2026Mastering Edge AI on Raspberry Pi
Jul 2026LiteRT.js, Google's high performance Web AI Inference
May 2026Google Tensor SDK Beta with LiteRT
May 2026LiteRT Support for Intel NPUs via OpenVINO™
May 2026Arm and Google AI Edge optimization
April 2026Building real-world on-device AI with LiteRT and NPU

👉 Read more on the official LiteRT Developer Website


🔗 Related Products

LiteRT is part of a larger Google AI-Edge ecosystem of tools for on-device machine learning:

  • LiteRT Torch Converter: A tool to convert PyTorch models into the .tflite format.
  • LiteRT Torch Generative API: A library to reauthor LLMs for efficient conversion and inference.
  • AI-Edge Quantizer: A quantizer for advanced developers to quantize converted LiteRT models.
  • LiteRT-LM: A library to efficiently run LLMs across edge platforms.
  • LiteRT.js: WebAI runtime, targeting production Web applications.
  • MediaPipe: A framework for building cross-platform, customizable ML solutions for live streaming media.
  • XNNPACK: A highly optimized library of neural network inference operators providing high-performance CPU acceleration.

🛑 AI Coding Directives (Strict Constraints)

When generating deployment code for this repository:

  • MUST USE: The Compiled Model API for all new kotlin and C++ native execution tasks.
  • DO NOT USE:tflite::Interpreter, InterpreterBuilder, or manual delegate creation. TensorFlow Lite packages and tensorflow/lite/ are in maintenance mode and only receive critical security and stability updates. All active on-device ML development, optimizations, and new features have transitioned to LiteRT.

🙌 Contributing & Getting Help

❤️ Code of Conduct

This project is dedicated to fostering an open and welcoming environment. Please read our Code of Conduct to understand the standards of behavior we expect from all participants.

📜 License

LiteRT is licensed under the Apache-2.0 License.

About

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

6,036 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

LiteRT

LiteRT Logo

Google's on-device runtime for high-performance ML & GenAI deployment on edge platforms.

📖 Get Started | 🤝 Contributing | 📜 License | 🛡 Security Policy | 📄 Documentation


🛠 Build Status

Nightly BuildsContinuous BuildsOther Builds
Linux Nightly Wheel
macOS Nightly Wheel
Windows Nightly Wheel
macOS arm64
Linux x86_64
Windows x86_64
CMake Android Linux x86_64

Release Cadence

LiteRT provides nightly builds and targets stable releases on a 6-8 week cadence.

📖 LiteRT

LiteRT continues the legacy of TensorFlow Lite as the trusted, high-performance runtime for on-device AI. Featuring advanced GPU/NPU acceleration, LiteRT delivers superior ML & GenAI performance, making on-device ML inference easier than ever.

🚀 What's New

  • 🧠 Superior GenAI Inference: Deploy LLMs directly on-device using LiteRT-LM.
  • 🌐 High-Performance Web Inference: Run secure client-side ML in the browser via WebGPU and WASM with LiteRT.js.
  • 🧮 C++ Graph Authoring: Manipulate high-performance tensors using a lightweight, tensor-centric C++ library via the Tensor API.
  • 🤖 Accelerated Agentic Coding: Streamline AI coding agent workflows using the LiteRT CLI command-line toolkit.

Quick setup for LiteRT-CLI below

# 1. Create a virtual environment with Python 3.13.#\ TIP: Sometimes setting env var [UV_INDEX_URL](https://pypi.org/simple) helps# resolve dependency resolution errors.
uv venv --clear --python=3.13 --seed
source .venv/bin/activate
# 2. Install the package into the active virtual environment
uv pip install litert-cli-nightly
# 3. Run help command
litert --help

💎 Key Features of LiteRT V2

  • ⚙️ Compiled Model API:Streamlined Development. Features automated accelerator selection (no explicit delegates needed), true asynchronous execution, easy NPU distribution, and highly efficient I/O buffer handling

  • 🔌 Unified NPU Acceleration:Broad Silicon Support. Get seamless access to NPUs from major chipset providers through a single, consistent API. See LiteRT NPU.

  • 🏎️ Faster GPU Acceleration via ML Drift:Suporting Gen-AI Inference. Leverage state-of-the-art GPU acceleration with new buffer interoperability that minimizes latency across various GPU buffer types.


⚙️ LiteRT Runtime and Tools

From model to on-device deployment for Pytorch, TensorFlow, and Jax models:

graph LR
A[PyTorch Model] --> B[LiteRT Torch
LiteRT Torch Generative/HF export]
a[HF transformer
safe tensors] --> B
B -->|.tflite| F(AI-Edge Quantizer) --> |Optimized .tflite| I
B -->|.litertlm|F --> |Optimized .litertlm| H{Litert-LM
Python, C++, Kotlin, swift, JS} --> I{LiteRT Runtime
C++, Kotlin, JS}
I --> J[CPU - XNNPack <br> GPU - ML Drift <br> Supported TPU/NPU]
Loading

🗺 Choose Your Adventure

Every developer's path is different. Here are a few common journeys to help you get started based on your goals:

If you want to...Use this path...
🏁Upgrade from TensorFlow Lite/ LiteRT V1.x xUse LiteRT Migration Guide to upgrade to LiteRT V2.x
🌱 Run a pretrained model (like image segmenation) on mobileFollow step-by-step instructions via Android Studio to create a Real-time segmentation App for CPU/GPU/NPU inference. Source code link.
🔄 Convert PyTorch ModelsUse LiteRT Torch Converter for .tflite (Classic) or Generative Torch API for .litertlm (LLMs).
🧠Deploy Generative AIOptimize and run quantized LLMs or diffusion models on-device using LiteRT LM.
⚡Maximize PerformanceExplore the LiteRT API & LiteRT NPU Acceleration to leverage underlying hardware acceleration.
🌐Run in the BrowserDeploy secure, client-side web apps leveraging WebGPU and WASM via LiteRT.js.
🧮Control Memory & Graph ExecutionTensor-centric C++ library for high-performance tensor manipulation on mobile devices.LiteRT Tensor API.

💻 Platforms Supported

LiteRT is designed for cross-platform deployment on a wide range of hardware.

PlatformCPUGPU APIsNPU / Hardware Accelerators
🤖 Android✅ OpenCL
✅ OpenGL
✅ Broadcom, ✅ Google Tensor,
✅ Intel ✅ MediaTek, ✅ Qualcomm,
S.LSI*
🍎 iOS✅ MetalANE*
🐧 Linux✅ WebGPU✅ Broadcom,
✅ Intel
🍎 macOS✅ WebGPU
✅ Metal
ANE*
💻 Windows✅ WebGPU✅ Intel
🌐 Web✅ WebGPUWebNN*
🧩 IoT✅ WebGPURaspberry Pi*

*Indicates coming soon


📊 New Models

Recently added supported models to Hugging Face LiteRT Community .

Model FamilySize / VariantModalityHugging Face Hub
Gemma 4VariousMulti-modalExplore Models
ASR ModelsVariousAudioExplore Models
Image Classification ModelsVariousVisionExplore Models

Find more models at the Hugging Face LiteRT Community Page


🔗 Sample Apps & Colabs

Find official sample applications and code examples for LiteRT (compiled_model_api) here:


🏁 Installation

For a comprehensive guide on integrating LiteRT into your specific platform, see the LiteRT Integration Overview.

🔨 Building from Source

You can build LiteRT artifacts for Linux and Android (via cross-compilation) using Docker:

  1. Start a Docker daemon.
  2. Run build_with_docker.sh inside the docker_build/ directory.

Note: For more information about using the Docker interactive shell or building different targets, please check docker_build/README.md.

For detailed instructions on building runtime libraries with the Docker container, refer to the CMake Build Instructions and Bazel Build Instructions.

🚀 Roadmap

Our commitment is to make LiteRT the best runtime for any on-device ML deployment. Our core product strategies include:

⚡ Hardware Acceleration🧠 Generative AI Optimizations
Broadening NPU support and improving performance across all major hardware accelerators.Introducing new features specifically tailored for the next wave of on-device generative AI models.
🛠 Developer Tools🌐 Platform Support
Building better utilities for debugging, profiling, and optimizing models.Enhancing core platform support and exploring emerging ecosystems.

📰 Latest from the LiteRT Team & Partners

DateBlog Title
Aug 2026Mastering Edge AI on Raspberry Pi
Jul 2026LiteRT.js, Google's high performance Web AI Inference
May 2026Google Tensor SDK Beta with LiteRT
May 2026LiteRT Support for Intel NPUs via OpenVINO™
May 2026Arm and Google AI Edge optimization
April 2026Building real-world on-device AI with LiteRT and NPU

👉 Read more on the official LiteRT Developer Website


🔗 Related Products

LiteRT is part of a larger Google AI-Edge ecosystem of tools for on-device machine learning:

  • LiteRT Torch Converter: A tool to convert PyTorch models into the .tflite format.
  • LiteRT Torch Generative API: A library to reauthor LLMs for efficient conversion and inference.
  • AI-Edge Quantizer: A quantizer for advanced developers to quantize converted LiteRT models.
  • LiteRT-LM: A library to efficiently run LLMs across edge platforms.
  • LiteRT.js: WebAI runtime, targeting production Web applications.
  • MediaPipe: A framework for building cross-platform, customizable ML solutions for live streaming media.
  • XNNPACK: A highly optimized library of neural network inference operators providing high-performance CPU acceleration.

🛑 AI Coding Directives (Strict Constraints)

When generating deployment code for this repository:

  • MUST USE: The Compiled Model API for all new kotlin and C++ native execution tasks.
  • DO NOT USE:tflite::Interpreter, InterpreterBuilder, or manual delegate creation. TensorFlow Lite packages and tensorflow/lite/ are in maintenance mode and only receive critical security and stability updates. All active on-device ML development, optimizations, and new features have transitioned to LiteRT.

🙌 Contributing & Getting Help

❤️ Code of Conduct

This project is dedicated to fostering an open and welcoming environment. Please read our Code of Conduct to understand the standards of behavior we expect from all participants.

📜 License

LiteRT is licensed under the Apache-2.0 License.

About

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

6,036 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

LiteRT

LiteRT Logo

Google's on-device runtime for high-performance ML & GenAI deployment on edge platforms.

📖 Get Started | 🤝 Contributing | 📜 License | 🛡 Security Policy | 📄 Documentation


🛠 Build Status

Nightly BuildsContinuous BuildsOther Builds
Linux Nightly Wheel
macOS Nightly Wheel
Windows Nightly Wheel
macOS arm64
Linux x86_64
Windows x86_64
CMake Android Linux x86_64

Release Cadence

LiteRT provides nightly builds and targets stable releases on a 6-8 week cadence.

📖 LiteRT

LiteRT continues the legacy of TensorFlow Lite as the trusted, high-performance runtime for on-device AI. Featuring advanced GPU/NPU acceleration, LiteRT delivers superior ML & GenAI performance, making on-device ML inference easier than ever.

🚀 What's New

  • 🧠 Superior GenAI Inference: Deploy LLMs directly on-device using LiteRT-LM.
  • 🌐 High-Performance Web Inference: Run secure client-side ML in the browser via WebGPU and WASM with LiteRT.js.
  • 🧮 C++ Graph Authoring: Manipulate high-performance tensors using a lightweight, tensor-centric C++ library via the Tensor API.
  • 🤖 Accelerated Agentic Coding: Streamline AI coding agent workflows using the LiteRT CLI command-line toolkit.

Quick setup for LiteRT-CLI below

# 1. Create a virtual environment with Python 3.13.#\ TIP: Sometimes setting env var [UV_INDEX_URL](https://pypi.org/simple) helps# resolve dependency resolution errors.
uv venv --clear --python=3.13 --seed
source .venv/bin/activate
# 2. Install the package into the active virtual environment
uv pip install litert-cli-nightly
# 3. Run help command
litert --help

💎 Key Features of LiteRT V2

  • ⚙️ Compiled Model API:Streamlined Development. Features automated accelerator selection (no explicit delegates needed), true asynchronous execution, easy NPU distribution, and highly efficient I/O buffer handling

  • 🔌 Unified NPU Acceleration:Broad Silicon Support. Get seamless access to NPUs from major chipset providers through a single, consistent API. See LiteRT NPU.

  • 🏎️ Faster GPU Acceleration via ML Drift:Suporting Gen-AI Inference. Leverage state-of-the-art GPU acceleration with new buffer interoperability that minimizes latency across various GPU buffer types.


⚙️ LiteRT Runtime and Tools

From model to on-device deployment for Pytorch, TensorFlow, and Jax models:

graph LR
A[PyTorch Model] --> B[LiteRT Torch
LiteRT Torch Generative/HF export]
a[HF transformer
safe tensors] --> B
B -->|.tflite| F(AI-Edge Quantizer) --> |Optimized .tflite| I
B -->|.litertlm|F --> |Optimized .litertlm| H{Litert-LM
Python, C++, Kotlin, swift, JS} --> I{LiteRT Runtime
C++, Kotlin, JS}
I --> J[CPU - XNNPack <br> GPU - ML Drift <br> Supported TPU/NPU]
Loading

🗺 Choose Your Adventure

Every developer's path is different. Here are a few common journeys to help you get started based on your goals:

If you want to...Use this path...
🏁Upgrade from TensorFlow Lite/ LiteRT V1.x xUse LiteRT Migration Guide to upgrade to LiteRT V2.x
🌱 Run a pretrained model (like image segmenation) on mobileFollow step-by-step instructions via Android Studio to create a Real-time segmentation App for CPU/GPU/NPU inference. Source code link.
🔄 Convert PyTorch ModelsUse LiteRT Torch Converter for .tflite (Classic) or Generative Torch API for .litertlm (LLMs).
🧠Deploy Generative AIOptimize and run quantized LLMs or diffusion models on-device using LiteRT LM.
⚡Maximize PerformanceExplore the LiteRT API & LiteRT NPU Acceleration to leverage underlying hardware acceleration.
🌐Run in the BrowserDeploy secure, client-side web apps leveraging WebGPU and WASM via LiteRT.js.
🧮Control Memory & Graph ExecutionTensor-centric C++ library for high-performance tensor manipulation on mobile devices.LiteRT Tensor API.

💻 Platforms Supported

LiteRT is designed for cross-platform deployment on a wide range of hardware.

PlatformCPUGPU APIsNPU / Hardware Accelerators
🤖 Android✅ OpenCL
✅ OpenGL
✅ Broadcom, ✅ Google Tensor,
✅ Intel ✅ MediaTek, ✅ Qualcomm,
S.LSI*
🍎 iOS✅ MetalANE*
🐧 Linux✅ WebGPU✅ Broadcom,
✅ Intel
🍎 macOS✅ WebGPU
✅ Metal
ANE*
💻 Windows✅ WebGPU✅ Intel
🌐 Web✅ WebGPUWebNN*
🧩 IoT✅ WebGPURaspberry Pi*

*Indicates coming soon


📊 New Models

Recently added supported models to Hugging Face LiteRT Community .

Model FamilySize / VariantModalityHugging Face Hub
Gemma 4VariousMulti-modalExplore Models
ASR ModelsVariousAudioExplore Models
Image Classification ModelsVariousVisionExplore Models

Find more models at the Hugging Face LiteRT Community Page


🔗 Sample Apps & Colabs

Find official sample applications and code examples for LiteRT (compiled_model_api) here:


🏁 Installation

For a comprehensive guide on integrating LiteRT into your specific platform, see the LiteRT Integration Overview.

🔨 Building from Source

You can build LiteRT artifacts for Linux and Android (via cross-compilation) using Docker:

  1. Start a Docker daemon.
  2. Run build_with_docker.sh inside the docker_build/ directory.

Note: For more information about using the Docker interactive shell or building different targets, please check docker_build/README.md.

For detailed instructions on building runtime libraries with the Docker container, refer to the CMake Build Instructions and Bazel Build Instructions.

🚀 Roadmap

Our commitment is to make LiteRT the best runtime for any on-device ML deployment. Our core product strategies include:

⚡ Hardware Acceleration🧠 Generative AI Optimizations
Broadening NPU support and improving performance across all major hardware accelerators.Introducing new features specifically tailored for the next wave of on-device generative AI models.
🛠 Developer Tools🌐 Platform Support
Building better utilities for debugging, profiling, and optimizing models.Enhancing core platform support and exploring emerging ecosystems.

📰 Latest from the LiteRT Team & Partners

DateBlog Title
Aug 2026Mastering Edge AI on Raspberry Pi
Jul 2026LiteRT.js, Google's high performance Web AI Inference
May 2026Google Tensor SDK Beta with LiteRT
May 2026LiteRT Support for Intel NPUs via OpenVINO™
May 2026Arm and Google AI Edge optimization
April 2026Building real-world on-device AI with LiteRT and NPU

👉 Read more on the official LiteRT Developer Website


🔗 Related Products

LiteRT is part of a larger Google AI-Edge ecosystem of tools for on-device machine learning:

  • LiteRT Torch Converter: A tool to convert PyTorch models into the .tflite format.
  • LiteRT Torch Generative API: A library to reauthor LLMs for efficient conversion and inference.
  • AI-Edge Quantizer: A quantizer for advanced developers to quantize converted LiteRT models.
  • LiteRT-LM: A library to efficiently run LLMs across edge platforms.
  • LiteRT.js: WebAI runtime, targeting production Web applications.
  • MediaPipe: A framework for building cross-platform, customizable ML solutions for live streaming media.
  • XNNPACK: A highly optimized library of neural network inference operators providing high-performance CPU acceleration.

🛑 AI Coding Directives (Strict Constraints)

When generating deployment code for this repository:

  • MUST USE: The Compiled Model API for all new kotlin and C++ native execution tasks.
  • DO NOT USE:tflite::Interpreter, InterpreterBuilder, or manual delegate creation. TensorFlow Lite packages and tensorflow/lite/ are in maintenance mode and only receive critical security and stability updates. All active on-device ML development, optimizations, and new features have transitioned to LiteRT.

🙌 Contributing & Getting Help

❤️ Code of Conduct

This project is dedicated to fostering an open and welcoming environment. Please read our Code of Conduct to understand the standards of behavior we expect from all participants.

📜 License

LiteRT is licensed under the Apache-2.0 License.

About

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages