Instructions to use mlboydaisuke/MiniCPM5-2B-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use mlboydaisuke/MiniCPM5-2B-LiteRT 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 # A single .litertlm file in the repo is picked automatically; otherwise the CLI asks which one to run # (or pass its name right after the repo id). litert-lm run \ --from-huggingface-repo=mlboydaisuke/MiniCPM5-2B-LiteRT \ --prompt="Write me a poem"
- LiteRT
How to use mlboydaisuke/MiniCPM5-2B-LiteRT 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
README: plain wording in the Galaxy S26 benchmark conditions (litert_lm_advanced_main of litert-lm v0.16.0) and the iPhone 17 Pro result (a prompt-format effect); an unexplained check label dropped from the 2026-10-13 note (a check on the Mac GPU passed on 0.18.0)
Browse files
README.md
CHANGED
|
@@ -28,7 +28,7 @@ MiniCPM5-2B is OpenBMB's 2.5B-parameter dense **hybrid-reasoning** model (42 lay
|
|
| 28 |
|
| 29 |
2026-09-21: chat template updated to accept the 0.18 content-parts form (string form unchanged); weights, tokenizer and executor metadata byte-identical.
|
| 30 |
|
| 31 |
-
2026-10-13: re-packed with LiteRT-LM's official `models/minicpm5` metadata and chat template (metadata only; weights, tokenizer and graph byte-identical): passing `tools` works, the tool call is parsed on litert-lm 0.18.0, and the model answers directly unless `enable_thinking` is true. The 2026-10-13 re-pack changes the model type, and with it the runtime's GPU executor defaults (every non-generic LiteRT-LM model type shares them: allow_src_quantized_fc_conv_ops on, OpenCL hint_waiting_for_completion off, kernel batch size unset); the phone GPU rows on this card were measured with the previous files and have not been re-run β the Mac GPU
|
| 32 |
|
| 33 |
The **int4 file is the phone file** (smaller, fastest GPU decode on every platform measured) β best used for direct answers or short reasoning; see the thinking-mode note below. **int8 is the file for reasoning that has to complete**: its thinking chains are ~3β4Γ shorter than int4's on the same questions and terminate where int4 runs into the token budget. int8's main weight section is 2.33 GB, above the single-section mmap ceiling of default-entitlement iOS apps, so it is a desktop / Android build.
|
| 34 |
|
|
@@ -51,7 +51,7 @@ int8 is at parity (7 of its 9 misses are the bf16 model's own). int4 costs about
|
|
| 51 |
|
| 52 |
On a **Galaxy S26 (SM-S942Q, Snapdragon SM8850, Adreno)** both files generate correctly on GPU and CPU with **full OpenCL delegation β 1873/1873 nodes on every prefill signature and decode, zero rejected ops** β and the runtime separates the reasoning on-device (`[thought] β¦ [/thought]`, then the answer).
|
| 53 |
|
| 54 |
-
On an **iPhone 17 Pro** the int4 file passes the same 8-question check on both backends (on-device byte count verified against the source file): **Metal GPU 7/8** (init 5.7 s) and **CPU 7/8** (init 2.2 s); the one miss in each run is the rhyme line inside the 8-question composite prompt, answered "green" β the same answer the bf16 model gives with thinking off, so a prompt-format
|
| 55 |
|
| 56 |
Multi-turn: three-turn conversations (introduce a name and a city, an arithmetic question, then "which city do I live in?") hold on both files under all three thinking modes with the name and city recalled β the template's history rendering stays consistent with what the runtime already streamed.
|
| 57 |
|
|
@@ -92,7 +92,7 @@ Since the 2026-10-13 re-pack the default is a **direct answer**: the bundled tem
|
|
| 92 |
|
| 93 |
Init is the `Init time` the CLI prints; that value includes both `Init Total` and the phases inside it, so it counts engine creation twice ([LiteRT-LM #4057](https://github.com/google-ai-edge/LiteRT-LM/issues/4057)).
|
| 94 |
|
| 95 |
-
Galaxy S26 (SM-S942Q, Snapdragon SM8850, Adreno; `litert_lm_advanced_main`
|
| 96 |
|
| 97 |
| File | Backend | Prefill (205) | Decode | TTFT | Init | Peak RSS |
|
| 98 |
|---|---|---|---|---|---|---|
|
|
|
|
| 28 |
|
| 29 |
2026-09-21: chat template updated to accept the 0.18 content-parts form (string form unchanged); weights, tokenizer and executor metadata byte-identical.
|
| 30 |
|
| 31 |
+
2026-10-13: re-packed with LiteRT-LM's official `models/minicpm5` metadata and chat template (metadata only; weights, tokenizer and graph byte-identical): passing `tools` works, the tool call is parsed on litert-lm 0.18.0, and the model answers directly unless `enable_thinking` is true. The 2026-10-13 re-pack changes the model type, and with it the runtime's GPU executor defaults (every non-generic LiteRT-LM model type shares them: allow_src_quantized_fc_conv_ops on, OpenCL hint_waiting_for_completion off, kernel batch size unset); the phone GPU rows on this card were measured with the previous files and have not been re-run β a check on the Mac GPU passed on 0.18.0.
|
| 32 |
|
| 33 |
The **int4 file is the phone file** (smaller, fastest GPU decode on every platform measured) β best used for direct answers or short reasoning; see the thinking-mode note below. **int8 is the file for reasoning that has to complete**: its thinking chains are ~3β4Γ shorter than int4's on the same questions and terminate where int4 runs into the token budget. int8's main weight section is 2.33 GB, above the single-section mmap ceiling of default-entitlement iOS apps, so it is a desktop / Android build.
|
| 34 |
|
|
|
|
| 51 |
|
| 52 |
On a **Galaxy S26 (SM-S942Q, Snapdragon SM8850, Adreno)** both files generate correctly on GPU and CPU with **full OpenCL delegation β 1873/1873 nodes on every prefill signature and decode, zero rejected ops** β and the runtime separates the reasoning on-device (`[thought] β¦ [/thought]`, then the answer).
|
| 53 |
|
| 54 |
+
On an **iPhone 17 Pro** the int4 file passes the same 8-question check on both backends (on-device byte count verified against the source file): **Metal GPU 7/8** (init 5.7 s) and **CPU 7/8** (init 2.2 s); the one miss in each run is the rhyme line inside the 8-question composite prompt, answered "green" β the same answer the bf16 model gives with thinking off, so a prompt-format effect rather than conversion damage.
|
| 55 |
|
| 56 |
Multi-turn: three-turn conversations (introduce a name and a city, an arithmetic question, then "which city do I live in?") hold on both files under all three thinking modes with the name and city recalled β the template's history rendering stays consistent with what the runtime already streamed.
|
| 57 |
|
|
|
|
| 92 |
|
| 93 |
Init is the `Init time` the CLI prints; that value includes both `Init Total` and the phases inside it, so it counts engine creation twice ([LiteRT-LM #4057](https://github.com/google-ai-edge/LiteRT-LM/issues/4057)).
|
| 94 |
|
| 95 |
+
Galaxy S26 (SM-S942Q, Snapdragon SM8850, Adreno; `litert_lm_advanced_main` of litert-lm v0.16.0, 205-token prompt with `--benchmark`, 2 runs per configuration, ranges shown; a reasoning model decodes its own full response, so decode-turn lengths vary):
|
| 96 |
|
| 97 |
| File | Backend | Prefill (205) | Decode | TTFT | Init | Peak RSS |
|
| 98 |
|---|---|---|---|---|---|---|
|