Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 25 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ including converting, quantizing, compiling, running, benchmarking and
visualizing LiteRT (TFLite) models on various hardware (CPU / GPU / NPU) across
platforms (desktop, mobile, or cloud).

🚀 [Installation](#-installation)  |  ⚡ [Quick start](#-quick-start)  |  💡 [Common commands](#-common-commands)
<br>
📓 [Try Colab](#-try-colab) &nbsp;|&nbsp; 🌟 [Quick demos](#-quick-demos) &nbsp;|&nbsp; 🤖 [Use in coding agent](#-use-in-coding-agent)
🚀 [Installation](#-installation) | ⚡ [Quick start](#-quick-start) | 💡 [Common commands](#-common-commands) |
📓 [Try Colab](#-try-colab) | 🌟 [Quick demos](#-quick-demos) | 🤖 [Use in coding agent](#-use-in-coding-agent)

> [!NOTE] It's still an early preview under active development, thus has limited
LiteRT CLI is built on top of [Google AI Edge](https://ai.google.dev/edge) stacks, including
[LiteRT](https://github.com/google-ai-edge/LiteRT), [LiteRT-LM](https://github.com/google-ai-edge/LiteRT-LM),
[LiteRT Torch](https://github.com/google-ai-edge/LiteRT-Torch), [AI Edge Quantizer](https://github.com/google-ai-edge/ai-edge-quantizer),
[AI Edge Portal](https://ai.google.dev/edge/ai-edge-portal), and [Model Explorer](https://ai.google.dev/edge/model-explorer).

> [!NOTE]
> It's still an early preview under active development, thus has limited
> platform and feature support, plus possible bugs. We appreciate your patience
> and feedback to help us improve it. Welcome issues and PRs!

Expand Down Expand Up @@ -124,26 +129,25 @@ Add the LiteRT CLI skill
into your coding agent (like [Google Antigravity](https://antigravity.google/))
and try prompts such as:

* "Download LiteRT model `litert-community/efficientnet_b1` and run it on CPU"
* "Benchmark LiteRT model `litert-community/efficientnet_b1` on my Android
GPU"
* "Compile LiteRT model `litert-community/efficientnet_b1` for NPU target
`sm8750`"
* "Visualize LiteRT model `litert-community/efficientnet_b1`"
* "Download the FP32 EfficientNet model `litert-community/efficientnet_b1`
from HuggingFace. Quantize it to INT8 dynamic range (`--recipe
* *Download LiteRT model `litert-community/efficientnet_b1` and run it on CPU*
* *Benchmark LiteRT model `litert-community/efficientnet_b1` on my Android
GPU*
* *Compile LiteRT model `litert-community/efficientnet_b1` for NPU target
`sm8750`*
* *Visualize LiteRT model `litert-community/efficientnet_b1`*
* *Download the FP32 model `litert-community/efficientnet_b1`
, quantize it to INT8 dynamic range (`--recipe
dynamic_wi8_afp32`), then benchmark both the original FP32 model and the
newly quantized INT8 model on the GPU of my connected Android device.
Compare the average latency and report the throughput speedup."
* "Convert the model `Qwen/Qwen1.5-0.5B-Chat` from HuggingFace Hub to LiteRT
format, and run it locally using the prompt 'Explain edge machine learning
in one sentence'."
* "Download EfficientNet from huggingface repo
`litert-community/efficientnet_b1` . Offline compile (AOT) the model for the
Compare the average latency and report the throughput speedup.*
* *Convert the model `Qwen/Qwen1.5-0.5B-Chat` from HuggingFace, and run it
locally using the prompt 'Explain edge machine learning one sentence'*
* *Download EfficientNet from huggingface repo
`litert-community/efficientnet_b1`, offline compile (AOT) the model for the
`sm8750` target NPU, and output the compiled model into `./models/compiled`.
Then, run an on-device inference and benchmark using this newly compiled AOT
model on the connected Android device's NPU (`--npu`). Confirm that the
graph loads directly without dynamic JIT compilation warmup latency."
graph loads directly without dynamic JIT compilation warmup latency.*

The agent will automatically install the necessary tools, including Python
virtual environments, `litert-cli-nightly`, and all required dependencies.
Expand Down Expand Up @@ -263,7 +267,8 @@ litert quantize model.tflite \

### 4. AOT Compile a LiteRT model for NPU

> [!NOTE] Currently only support on Linux hosts and Qualcomm NPUs, and other NPU
> [!NOTE]
> Currently only support on Linux hosts and Qualcomm NPUs, and other NPU
> supports are coming soon!

```bash
Expand Down
Loading