Instructions to use litert-community/Phi-4-mini-reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use litert-community/Phi-4-mini-reasoning with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli litert-lm run \ --from-huggingface-repo=litert-community/Phi-4-mini-reasoning \ --prompt="Write me a poem"
- LiteRT
How to use litert-community/Phi-4-mini-reasoning with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Document Gallery 1.0.16 direct Hugging Face import + desktop LiteRT-LM CLI (serve/run)
Browse files
README.md
CHANGED
|
@@ -69,6 +69,8 @@ so no separate tokenizer files are needed.
|
|
| 69 |
|
| 70 |
## Run on Android
|
| 71 |
|
|
|
|
|
|
|
| 72 |
The official **[Google AI Edge Gallery](https://github.com/google-ai-edge/gallery)** app runs
|
| 73 |
`.litertlm` models on-device:
|
| 74 |
|
|
@@ -76,6 +78,19 @@ The official **[Google AI Edge Gallery](https://github.com/google-ai-edge/galler
|
|
| 76 |
2. Download `model.litertlm` and push it: `adb push model.litertlm /sdcard/Download/`
|
| 77 |
3. In the app tap **+**, pick the file, choose the **GPU** backend, and raise the max-tokens setting (≥2048).
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
## Run on iPhone
|
| 80 |
|
| 81 |
Verified on **iPhone 17 Pro** (LiteRT-LM Swift runtime): loads and generates correct answers. This is a
|
|
|
|
| 69 |
|
| 70 |
## Run on Android
|
| 71 |
|
| 72 |
+
> **Update (July 2026):** [Google AI Edge Gallery](https://github.com/google-ai-edge/gallery) **v1.0.16+** can import litert-lm models **directly from Hugging Face** inside the app (tap **+**) — no computer or `adb` needed. The manual steps below are only required on older builds or for sideloading a local file.
|
| 73 |
+
|
| 74 |
The official **[Google AI Edge Gallery](https://github.com/google-ai-edge/gallery)** app runs
|
| 75 |
`.litertlm` models on-device:
|
| 76 |
|
|
|
|
| 78 |
2. Download `model.litertlm` and push it: `adb push model.litertlm /sdcard/Download/`
|
| 79 |
3. In the app tap **+**, pick the file, choose the **GPU** backend, and raise the max-tokens setting (≥2048).
|
| 80 |
|
| 81 |
+
## Run on desktop (LiteRT-LM CLI)
|
| 82 |
+
|
| 83 |
+
The same `.litertlm` bundle runs on macOS / Linux / Windows with the official
|
| 84 |
+
[LiteRT-LM CLI](https://github.com/google-ai-edge/LiteRT-LM) — including as a
|
| 85 |
+
local **OpenAI-compatible API server**:
|
| 86 |
+
|
| 87 |
+
```bash
|
| 88 |
+
pip install litert-lm
|
| 89 |
+
litert-lm import --from-huggingface-repo litert-community/Phi-4-mini-reasoning model.litertlm phi-4-mini-reasoning
|
| 90 |
+
litert-lm run phi-4-mini-reasoning # interactive chat in the terminal
|
| 91 |
+
litert-lm serve # local OpenAI-compatible API server
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
## Run on iPhone
|
| 95 |
|
| 96 |
Verified on **iPhone 17 Pro** (LiteRT-LM Swift runtime): loads and generates correct answers. This is a
|