Instructions to use litert-community/InternVL3-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use litert-community/InternVL3-2B 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=litert-community/InternVL3-2B \ --prompt="Write me a poem"
- LiteRT
How to use litert-community/InternVL3-2B 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
Prefill/decode graph in the GPU composite form, plus a 1,024-token prefill (weights unchanged); card, MEASUREMENTS.md and manifest updated
Browse files- InternVL3-2B.litertlm +2 -2
- MEASUREMENTS.md +83 -0
- README.md +34 -15
- litertlm_manifest.json +69 -13
InternVL3-2B.litertlm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5302075056b91b0d6e1c43faff9006dea658a3458ab763ae7fa25d5b2dc59523
|
| 3 |
+
size 1431420928
|
MEASUREMENTS.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# InternVL3-2B — measurements
|
| 2 |
+
|
| 3 |
+
The model card ([README.md](README.md)) quotes the results. This page has how they were taken, the runs behind each number, and the rows of an earlier file. "This file" is `InternVL3-2B.litertlm` as published on 2026-11-15; "the previous file" is the one it replaced.
|
| 4 |
+
|
| 5 |
+
## Galaxy S26 and Pixel 11 Pro, LiteRT-LM v0.19.0 (this file, 2026-11-14 and 2026-11-15)
|
| 6 |
+
|
| 7 |
+
- **This file:** `InternVL3-2B.litertlm`, sha256 `5302075056b91b0d6e1c43faff9006dea658a3458ab763ae7fa25d5b2dc59523`, 1,431,420,928 B. **Previous file:** the same name at Hub commit `7232b4de71c69db1a0caabd8b4b4ca2dba431ee8`, sha256 `44c652d4aae876a1e06086fbb5e7fcc385005b5aa928b160238337478c5ffd3f`, 1,429,700,608 B.
|
| 8 |
+
- The previous file has prefill signatures of 128 and 512 tokens only; this file also has `prefill_1024`.
|
| 9 |
+
- **Phones:** Samsung Galaxy S26 (SM-S942Q, SM8850, Adreno 840 GPU, Android 16); Google Pixel 11 Pro (PowerVR GPU, Android 17).
|
| 10 |
+
- **Program:** `litert_lm_advanced_main` built for Android arm64 from LiteRT-LM v0.19.0 source (commit `771b06e1`), sha256 `2e0b50979206be39f00d676ec1363546fdfe6ae95eec5d4dff074617448b7937`.
|
| 11 |
+
- **Command:** `litert_lm_advanced_main --backend=<gpu|cpu> --model_path=<file> --max_num_tokens=2048 --max_output_tokens=2048 --async=false --benchmark --benchmark_prefill_tokens=1024 --benchmark_decode_tokens=256 --num_iterations=3 --use_session=false --input_prompt_file=<text file>`. No `--sampler_backend`; the CPU uses the runtime's default thread count. The benchmark prompt is text; the vision encoder does not run.
|
| 12 |
+
- **Timing runs:** each is a new process. Before it, the runtime's cache files next to the model are deleted. A GPU timing run starts when the phone reports thermal status 0 (Android's thermal status: 0 = none, 1 = light, 2 = moderate), no CPU clock cap and GPU thermal level 0; the CPU runs are described in their section.
|
| 13 |
+
- **Questions and photo:** each is a new process with `--max_output_tokens=256 --benchmark_prefill_tokens=0 --benchmark_decode_tokens=0`, `--max_num_tokens=1024` for a question and `2048` for the photo, and the question as the prompt file; the photo question's prompt file names the photo (`[image:<path>] Describe this picture in one sentence.`). A run starts without waiting for the phone to cool and keeps the runtime's cache files that an earlier run of the same file wrote.
|
| 14 |
+
- **When they ran:** the questions and the photo ran after the timing runs. On the Galaxy S26 the 9 runs (8 questions and the photo, this file only) started at thermal status 1, one of them with a CPU clock cap (the CPU clock domain policy6, `/sys/devices/system/cpu/cpufreq/policy6`, at 4.34 of its 4.74 GHz); the photo run with the vision encoder on the CPU ran later, on its own, at thermal status 0. On the Pixel 11 Pro every run started at thermal status 1 except the previous file's first question (thermal status 0); 15 of the 18 runs had a CPU limit (its policy6 at 3.57–4.01 of its 4.11 GHz, in four of them also the phone's thermal utilization clamps).
|
| 15 |
+
- **Value:** on the GPU, the median of iterations 2–3 over a file's runs (four values for two runs: the mean of the middle two, printed in full); on the CPU, the median of each iteration over a file's runs (see the CPU section). Prefill is 1,024 tokens; decode is 256 tokens.
|
| 16 |
+
|
| 17 |
+
### Galaxy S26 GPU
|
| 18 |
+
|
| 19 |
+
All nodes of the 4 prefill and decode graphs run on `LiteRT GPU` (`LITERT_CL`: 1,268 nodes in each of `prefill_1024`, `prefill_512` and `prefill_128`, 1,159 in `decode`). The previous file's 3 graphs are delegated whole too (1,243 nodes in each prefill graph, 1,132 in `decode`).
|
| 20 |
+
|
| 21 |
+
Runs in the order previous, new, new, previous (prefill / decode tok/s, time to first token), each started at thermal status 0 after 134–162 s of rest (2026-11-15).
|
| 22 |
+
|
| 23 |
+
| Run | File | Iteration 1 | Iteration 2 | Iteration 3 |
|
| 24 |
+
|---|---|---|---|---|
|
| 25 |
+
| 1 | previous | 688.86 / 41.64, 1.51 s | 673.22 / 43.58, 1.54 s | 640.07 / 42.86, 1.62 s |
|
| 26 |
+
| 2 | new | 751.95 / 45.94, 1.38 s | 731.97 / 46.96, 1.42 s | 699.52 / 46.46, 1.49 s |
|
| 27 |
+
| 3 | new | 754.63 / 45.50, 1.38 s | 504.32 / 46.83, 2.05 s | 722.39 / 47.57, 1.44 s |
|
| 28 |
+
| 4 | previous | 691.87 / 41.48, 1.50 s | 677.85 / 42.52, 1.53 s | 663.51 / 42.56, 1.57 s |
|
| 29 |
+
|
| 30 |
+
Per-run means of iterations 2–3: 656.645 / 43.22, 715.745 / 46.71, 613.355 / 47.2, 670.68 / 42.54 = previous → new prefill ×1.090 and decode ×1.081 in the first pair, ×0.915 and ×1.110 in the second; iteration 2 of run 3 prefilled 504.32 tok/s (time to first token 2.05 s). Median of iterations 2–3: previous 668.365 / 42.71, new 710.955 / 46.895 tok/s (prefill ×1.064, decode ×1.098). Time to first token (median of iterations 2–3) 1.555 → 1.465 s. Engine init (median) 4.59 → 4.63 s. Peak `VmHWM` 721,144 → 739,368 kB (0.74 → 0.76 GB). `VmHWM` does not count memory the GPU driver holds: the phone's GPU allocation counter (`kgsl_page_alloc`) rose by 1.33 and 1.34 GB during the previous file's runs and by 1.56 GB during each of this file's.
|
| 31 |
+
|
| 32 |
+
With this file and the vision encoder on the GPU (`--vision_backend=gpu`), the photo question stopped with exit status 13: the GPU delegate does not take the vision encoder's BROADCAST_TO and GATHER_ND ops (1,307 of its 1,320 nodes go to the GPU), and the runtime, told to delegate the whole graph, refuses the split (`Hint fully delegated to single delegate is set, but the graph is not fully delegated.` → `Failed to modify graph with delegate`). With the vision encoder on the CPU (`--vision_backend=cpu`), in a later run of its own: "Two cats are sleeping on a pink blanket, with a remote control nearby." 8 short questions (such as "What is 17 + 25? Answer briefly.") on the GPU, this file only (the previous file was not asked on this phone): 8 of 8.
|
| 33 |
+
|
| 34 |
+
### Galaxy S26 CPU (XNNPACK)
|
| 35 |
+
|
| 36 |
+
The phone has two CPU clock domains, policy0 and policy6 (`/sys/devices/system/cpu/cpufreq/`), whose highest clocks are 3.63 and 4.74 GHz. Early in a CPU run the phone lowers the clock cap of both (`scaling_max_freq`, read every 2–3 s during the run). The cap of policy6 is lower 2–3 s in (runs 1, 2 and 4) or 5 s in (run 3), that of policy0 5–6 s in. Both reach 1.56 / 1.50 GHz 17–27 s in and stay there to the end of the run (the runs took 46–48 s); in run 4 the reading at 20 s showed 1.67 / 1.63 GHz again and the one at 24 s 1.56 / 1.50 GHz. So iterations 2 and 3 run at a lower clock than iteration 1. All four runs started at thermal status 1 with no CPU clock cap, after 153–154 s of rest (2026-11-15). Before run 1, one warm-up run of this file was not counted (prefill / decode 241.04 / 36.23, 125.86 / 30.64 and 115.58 / 30.36 tok/s in its three iterations); its caps came down the same way (1.56 / 1.50 GHz at 20 s). The lowest cap seen in each counted run is beside it.
|
| 37 |
+
|
| 38 |
+
| Run | File | Iteration 1 | Iteration 2 | Iteration 3 | Lowest cap (policy0 / policy6) |
|
| 39 |
+
|---|---|---|---|---|---|
|
| 40 |
+
| 1 | previous | 239.40 / 36.04, 4.31 s | 129.07 / 31.76, 7.97 s | 115.52 / 31.15, 8.90 s | 1.56 / 1.50 GHz |
|
| 41 |
+
| 2 | new | 238.46 / 36.24, 4.32 s | 129.08 / 31.04, 7.97 s | 115.58 / 31.26, 8.89 s | 1.56 / 1.50 GHz |
|
| 42 |
+
| 3 | new | 239.04 / 36.81, 4.31 s | 129.84 / 32.38, 7.92 s | 116.18 / 31.27, 8.85 s | 1.56 / 1.50 GHz |
|
| 43 |
+
| 4 | previous | 241.27 / 37.03, 4.27 s | 130.13 / 31.43, 7.90 s | 115.73 / 31.21, 8.88 s | 1.56 / 1.50 GHz |
|
| 44 |
+
|
| 45 |
+
Median of each iteration, previous → new: iteration 1 240.335 / 36.535 → 238.75 / 36.525 tok/s, iteration 2 129.6 / 31.595 → 129.46 / 31.71, iteration 3 115.625 / 31.18 → 115.88 / 31.265 (time to first token 4.29 → 4.315, 7.935 → 7.945 and 8.89 → 8.87 s). This file's prefill and decode medians are between 0.7 % below and 0.4 % above the previous file's. Two counted runs of the same file differ by up to 4.3 % (iteration 2 decode of this file: 31.04 and 32.38). Engine init 1.37 and 2.21 s (previous), 2.33 and 2.34 s (new). Peak `VmHWM`: previous 1,507,060 and 1,482,940 kB (1.54 and 1.52 GB), new 1,615,816 and 1,616,556 kB (1.65 and 1.66 GB) in runs 2–3 and 1,646,296 kB (1.69 GB) in the warm-up run.
|
| 46 |
+
|
| 47 |
+
### Pixel 11 Pro GPU
|
| 48 |
+
|
| 49 |
+
Same program and command, runs in the order previous, new, new, previous, each started at thermal status 0 after 152–209 s of rest (2026-11-14).
|
| 50 |
+
|
| 51 |
+
| Run | File | Iteration 1 | Iteration 2 | Iteration 3 |
|
| 52 |
+
|---|---|---|---|---|
|
| 53 |
+
| 1 | previous | 588.41 / 16.79, 1.80 s | 582.42 / 16.73, 1.82 s | 588.35 / 16.99, 1.80 s |
|
| 54 |
+
| 2 | new | 633.25 / 19.33, 1.67 s | 622.09 / 19.57, 1.70 s | 625.86 / 19.51, 1.69 s |
|
| 55 |
+
| 3 | new | 639.62 / 19.33, 1.65 s | 631.23 / 19.58, 1.67 s | 633.32 / 19.77, 1.67 s |
|
| 56 |
+
| 4 | previous | 594.63 / 16.99, 1.78 s | 589.01 / 17.08, 1.80 s | 586.11 / 16.72, 1.81 s |
|
| 57 |
+
|
| 58 |
+
Median of iterations 2–3: previous 587.23 / 16.86, new 628.545 / 19.575 tok/s (prefill ×1.070, decode ×1.161). Time to first token (median of iterations 2–3) 1.805 → 1.68 s. Engine init (median) 7.99 → 8.05 s. Peak `VmHWM` 713,980 → 726,664 kB. All nodes of the prefill and decode graphs run on `LiteRT GPU` (the same node counts as on the Galaxy S26). 8 short questions: 8 of 8 with both files. The photo question with the vision encoder on the GPU stopped with exit status 13 with both files, the same way as on the Galaxy S26.
|
| 59 |
+
|
| 60 |
+
### Mac
|
| 61 |
+
|
| 62 |
+
- CPU (XNNPACK, 1 thread, top-k 1 = greedy decoding, litert-lm 0.19.2 from PyPI): the same replies as the previous file, byte for byte, on 4 prompts and on the photo question ("Two cats are sleeping on a pink blanket."). One of the prompts is 1,425 tokens long before the chat template is added (counted with the bundle's own tokenizer), longer than the 1,024-token prefill.
|
| 63 |
+
- One text question on litert-lm 0.19.0, 0.19.1 and 0.19.2 (PyPI), CPU and GPU, and the photo question on the CPU: the same replies as the previous file, byte for byte. With the vision encoder on the GPU (`--vision-backend gpu`), neither file answers the photo on any of these versions (the reply is `An error occurred`); with 0.19.2 the error log names two op types of the vision encoder that the GPU delegate does not take, BROADCAST_TO and GATHER_ND.
|
| 64 |
+
- With litert-lm 0.19.2, the decoder on the GPU and the vision encoder on the CPU: "Two cats are sleeping on a pink blanket." from both files, and from the previous file again in a second run, byte for byte.
|
| 65 |
+
- 8 short questions (litert-lm 0.19.2), CPU and GPU: 8 of 8 with both files.
|
| 66 |
+
|
| 67 |
+
## Galaxy S26, LiteRT-LM 0.16.0 (an earlier file)
|
| 68 |
+
|
| 69 |
+
This section was on the model card until 2026-11-15, word for word, except its heading (on the card: "Galaxy S26 — GPU backend") and its last line (the GPU guide link), which stays on the card. It describes an earlier file of this repo on LiteRT-LM 0.16.0 (checked 2026-08-25). Its last paragraph says no Galaxy S26 CPU row existed. One had been measured on 2026-09-05 on an earlier file with LiteRT-LM 0.16.0 and is the edge-compat line at the top of the card; the CPU section above gives this file's.
|
| 70 |
+
|
| 71 |
+
The published bundle runs on the Android GPU backend and generates.
|
| 72 |
+
|
| 73 |
+
| file | GPU backend | delegation | peak |
|
| 74 |
+
|---|---|---|---:|
|
| 75 |
+
| `InternVL3-2B.litertlm` | runs | 3618 / 3618 ops across 3 subgraphs on `LiteRT GPU` | 736 MB |
|
| 76 |
+
|
| 77 |
+
Measured on a **Samsung Galaxy S26** (SM-S942Q / SM8850, Android 16) with `litert_lm_advanced_main` from litert-lm 0.16.0, `--backend=gpu --sampler_backend=cpu`, prompt `What is the capital of France?`. Peak is the process high-water mark (`VmHWM`) sampled during that same run. Gated 2026-08-25.
|
| 78 |
+
|
| 79 |
+
The op counts above are the `LiteRT GPU` partitions. XNNPACK additionally takes 1 of the 4 nodes in `main`; the runtime accepts that split.
|
| 80 |
+
|
| 81 |
+
The gate prompt carries no image, so this covers engine creation and the text path. The vision path on the GPU is not measured here.
|
| 82 |
+
|
| 83 |
+
**No speed rows, on purpose.** On this handset the GPU backend wins prefill and does not win decode, so a GPU throughput figure only means something beside a CPU row from the same handset, and no S26 CPU row exists for this model yet.
|
README.md
CHANGED
|
@@ -16,14 +16,14 @@ library_name: litert-lm
|
|
| 16 |
base_model_relation: quantized
|
| 17 |
---
|
| 18 |
|
| 19 |
-
Measured on device (edge-compat): Galaxy S26 · LiteRT-LM 0.16.0 · GPU · decode 34.4 tok/s · prefill 573 tok/s · TTFT 380 ms · all 1243 ops delegated (2026-08-24); Galaxy S26 · LiteRT-LM 0.16.0 · CPU · decode 43.7 tok/s · prefill 208 tok/s · TTFT 1.17 s (2026-09-05). Record: https://github.com/john-rocky/edge-compat/blob/main/cards/internvl3-2b/CARD.md
|
| 20 |
|
| 21 |
# InternVL3-2B — LiteRT-LM (on-device Vision-Language Model)
|
| 22 |
|
| 23 |
[OpenGVLab/InternVL3-2B](https://huggingface.co/OpenGVLab/InternVL3-2B) converted to the
|
| 24 |
**LiteRT-LM** (`.litertlm`) format for **on-device image+text** inference with Google's
|
| 25 |
[LiteRT-LM](https://github.com/google-ai-edge/litert-lm) runtime (the engine behind the official
|
| 26 |
-
`litert-community/*` models, and the same runtime that runs `litert-community/FastVLM-0.5B`).
|
| 27 |
|
| 28 |
InternVL3-2B is a compact **vision-language model**: an **InternViT** vision encoder + pixel-shuffle +
|
| 29 |
MLP projector feeding a **Qwen2.5-1.5B** language decoder. This bundle runs it through LiteRT-LM's
|
|
@@ -52,22 +52,26 @@ pip install litert-lm
|
|
| 52 |
```bash
|
| 53 |
litert-lm run --from-huggingface-repo litert-community/InternVL3-2B InternVL3-2B.litertlm \
|
| 54 |
--attachment photo.jpg \
|
| 55 |
-
--prompt "Describe this
|
| 56 |
```
|
| 57 |
|
| 58 |
-
On the COCO
|
| 59 |
|
| 60 |
```
|
| 61 |
Two cats are sleeping on a pink blanket.
|
| 62 |
```
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
If `run` stops right after the download with no error message from the CLI (a bus error; exit status 138 on a Mac) or with an error log that contains `too large for file size`, the downloaded file may be incomplete. The litert-lm CLI (0.14.0 to 0.19.2, and litert-lm-nightly 0.20.0.dev20261112) can keep an incomplete download in `~/.litert-lm/cache/huggingface/litert-community/InternVL3-2B/` and uses it again on later runs without checking its size. Delete that file and run the command again.
|
| 65 |
|
| 66 |
Drop `--prompt` for an interactive chat, and pass `--attachment` more than once for several images. `litert-lm serve` exposes the same bundle as a local OpenAI-compatible API. The same file runs on macOS, Linux and Windows.
|
| 67 |
|
| 68 |
## Performance
|
| 69 |
|
| 70 |
-
`litert-lm benchmark` (litert-lm 0.15.0) on an Apple M4 Max, `-p 256 -d 256 --runs 3` (the tool averages three iterations), max-num-tokens 4096, warm-up run discarded, otherwise idle machine. These figures cover the text path; the vision encoder runs once per image and is not included.
|
| 71 |
|
| 72 |
| Device | Backend | Prefill (256) | Decode | TTFT |
|
| 73 |
|---|---|---|---|---|
|
|
@@ -79,28 +83,35 @@ Every desktop backend listed above was checked by actually generating a caption
|
|
| 79 |
|
| 80 |
The iPhone rows are carried over from this repository's own earlier on-device note, where the model loads in about 3–4 s; the run logs are not retained here, so the run count and prompt are not known. Single-image VQA is what the GPU row covers — see the multi-image limitation below.
|
| 81 |
|
| 82 |
-
**The macOS GPU backend is not usable for this bundle on litert-lm 0.15.0.** Asked to describe an image with `--backend gpu`, it returns a run of `!` characters instead of a caption. `litert-lm benchmark` still reports GPU numbers for it — 2,031 tok/s prefill and 183 tok/s decode — but they measure a path that produces no usable text, so no GPU row is quoted here.
|
| 83 |
|
| 84 |
Multi-turn text works: you can ask follow-up questions about the same image.
|
| 85 |
|
| 86 |
The image is described accurately and in detail. The vision tower converts bit-faithfully to the
|
| 87 |
reference (float CPU-parity corr ≈ 1.0); int8 vision weights keep grounding quality.
|
| 88 |
|
| 89 |
-
## Galaxy S26 — GPU
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
-
|
| 92 |
|
| 93 |
-
|
| 94 |
-
|---|---|---|---:|
|
| 95 |
-
| `InternVL3-2B.litertlm` | runs | 3618 / 3618 ops across 3 subgraphs on `LiteRT GPU` | 736 MB |
|
| 96 |
|
| 97 |
-
|
| 98 |
|
| 99 |
-
|
| 100 |
|
| 101 |
-
|
| 102 |
|
| 103 |
-
|
| 104 |
|
| 105 |
GPU wiring, including the Gallery import toggle: [GPU guide](https://github.com/john-rocky/hf-to-litertlm/blob/main/docs/android-gpu.md).
|
| 106 |
|
|
@@ -142,6 +153,8 @@ Run this model **with image input** in the official
|
|
| 142 |
|
| 143 |
> **Tip:** on the **GPU** backend use one image per conversation (a known GPU-delegate trait of `fast_vlm` models); pick **CPU** if you want multiple images in one chat.
|
| 144 |
|
|
|
|
|
|
|
| 145 |
## Run on desktop (LiteRT-LM CLI)
|
| 146 |
|
| 147 |
The same `.litertlm` bundle runs on macOS / Linux / Windows with the official
|
|
@@ -193,6 +206,10 @@ The chat template in `InternVL3-2B.litertlm` matched history turns only on role
|
|
| 193 |
|
| 194 |
**Template-only change**: every section of the bundle except the metadata is byte-identical to the previous file (verified by per-section sha256), and single-turn renders, token ids, prefill counts and greedy answers are unchanged (verified on the LiteRT-LM runtime), so the numbers on this card still describe this file — only the file's own sha256 differs. Re-download only matters if you inject conversation history with role `'assistant'`. Details: google-ai-edge/LiteRT-LM#3417 (https://github.com/google-ai-edge/LiteRT-LM/issues/3417).
|
| 195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
|
| 197 |
## Known runtime issues
|
| 198 |
|
|
@@ -201,3 +218,5 @@ The chat template in `InternVL3-2B.litertlm` matched history turns only on role
|
|
| 201 |
From the second turn of a conversation on, LiteRT-LM puts the previous answer's stop token into the KV cache with a zero embedding, because this file holds the embedding table in its own section and the decoder takes embeddings, so later answers in a conversation can differ from the answer the model gives to the same messages in one prompt (read in the source of LiteRT-LM 0.16.0 to 0.18.1; measured with 0.18.1 on WeVisOne-VL-2B and Qwen2.5-Coder-1.5B-Instruct, not on this file). One question per conversation avoids it, as does a new conversation that starts with the earlier messages and the new question.
|
| 202 |
|
| 203 |
From a conversation preface (the system message, initial messages, tools and extra context a conversation is created with) that has tools and no messages, LiteRT-LM renders this file's chat template with an empty message list, and the template reads `messages[0]` without checking that the list is non-empty, so the render fails with `Failed to apply template: undefined value`. This happens in two places: when the preface is prefilled at creation (`prefillPrefaceOnInit = true` in Kotlin, `prefillPrefaceOnInit: true` on the web, `SetPrefillPrefaceOnInit(true)` in C++; the default is false), where creating the conversation fails with that error, and in the preface render (`renderPrefaceIntoString()` in Kotlin and Swift, `RenderPrefaceIntoString()` in C++, `litert_lm_conversation_render_preface_to_string` in the C API). The same happens with extra context (such as `enable_thinking`) and no messages, and in the preface render with an empty preface (run in the runtime on one Qwen3 template; the other templates rendered with minijinja 2.14 and jinja2). Read in the source of LiteRT-LM 0.17.0, 0.18.1 and main; measured with LiteRT-LM 0.18.1 (the litert-lm package from PyPI) through its C API on this file's template text. The default path, where the first message is rendered together with the preface, is not affected: the Python API and the CLI of 0.18.1 expose neither the flag nor the preface render, and Google AI Edge Gallery sets neither (its source as read on 2026-10-25). A system message or any initial message in the conversation config avoids it.
|
|
|
|
|
|
|
|
|
| 16 |
base_model_relation: quantized
|
| 17 |
---
|
| 18 |
|
| 19 |
+
Measured on device on an earlier file (edge-compat): Galaxy S26 · LiteRT-LM 0.16.0 · GPU · decode 34.4 tok/s · prefill 573 tok/s · TTFT 380 ms · all 1243 ops delegated (2026-08-24); Galaxy S26 · LiteRT-LM 0.16.0 · CPU · decode 43.7 tok/s · prefill 208 tok/s · TTFT 1.17 s (2026-09-05). Record: https://github.com/john-rocky/edge-compat/blob/main/cards/internvl3-2b/CARD.md
|
| 20 |
|
| 21 |
# InternVL3-2B — LiteRT-LM (on-device Vision-Language Model)
|
| 22 |
|
| 23 |
[OpenGVLab/InternVL3-2B](https://huggingface.co/OpenGVLab/InternVL3-2B) converted to the
|
| 24 |
**LiteRT-LM** (`.litertlm`) format for **on-device image+text** inference with Google's
|
| 25 |
[LiteRT-LM](https://github.com/google-ai-edge/litert-lm) runtime (the engine behind the official
|
| 26 |
+
`litert-community/*` models, and the same runtime that runs `litert-community/FastVLM-0.5B`). On 2026-11-15 `InternVL3-2B.litertlm` was replaced with a file whose prefill/decode graph is rewritten for the GPU, with every weight unchanged; below, "the previous file" is the file it replaced (see Conversion notes). On a Galaxy S26 GPU this file decodes 46.9 tokens/s and reads a 1,024-token prompt at 711 tokens/s (LiteRT-LM v0.19.0).
|
| 27 |
|
| 28 |
InternVL3-2B is a compact **vision-language model**: an **InternViT** vision encoder + pixel-shuffle +
|
| 29 |
MLP projector feeding a **Qwen2.5-1.5B** language decoder. This bundle runs it through LiteRT-LM's
|
|
|
|
| 52 |
```bash
|
| 53 |
litert-lm run --from-huggingface-repo litert-community/InternVL3-2B InternVL3-2B.litertlm \
|
| 54 |
--attachment photo.jpg \
|
| 55 |
+
--prompt "Describe this picture in one sentence." --top-k 1
|
| 56 |
```
|
| 57 |
|
| 58 |
+
On the COCO photo [`000000039769.jpg`](http://images.cocodataset.org/val2017/000000039769.jpg) (640 × 480, two tabby cats on a pink blanket), this file answers:
|
| 59 |
|
| 60 |
```
|
| 61 |
Two cats are sleeping on a pink blanket.
|
| 62 |
```
|
| 63 |
|
| 64 |
+
(Two runs with the flags above on litert-lm 0.19.2 on a Mac, with the file downloaded beforehand and given by its path, 2026-11-15. litert-lm 0.19.0 to 0.19.2 give the same sentence on a Mac CPU with `--cpu-thread-count 1` added, 2026-11-14.)
|
| 65 |
+
|
| 66 |
+
Leave `--vision-backend` unset, as above; with `--backend gpu` and no `--vision-backend`, this file answers the picture (on a Mac with litert-lm 0.19.2, the same sentence; the run also prints one error line, `TopK requires src tensor C dimension to be divisible by 4.`). With `--vision-backend gpu`, neither this file nor the previous file answers a picture on a Mac (litert-lm 0.19.0 to 0.19.2; the reply is `An error occurred`); with litert-lm 0.19.2 the error log names two op types of the vision encoder that the GPU delegate does not take, BROADCAST_TO and GATHER_ND. On Android, `litert_lm_advanced_main` with the vision encoder on the GPU stops too (see the Galaxy S26 section).
|
| 67 |
+
|
| 68 |
If `run` stops right after the download with no error message from the CLI (a bus error; exit status 138 on a Mac) or with an error log that contains `too large for file size`, the downloaded file may be incomplete. The litert-lm CLI (0.14.0 to 0.19.2, and litert-lm-nightly 0.20.0.dev20261112) can keep an incomplete download in `~/.litert-lm/cache/huggingface/litert-community/InternVL3-2B/` and uses it again on later runs without checking its size. Delete that file and run the command again.
|
| 69 |
|
| 70 |
Drop `--prompt` for an interactive chat, and pass `--attachment` more than once for several images. `litert-lm serve` exposes the same bundle as a local OpenAI-compatible API. The same file runs on macOS, Linux and Windows.
|
| 71 |
|
| 72 |
## Performance
|
| 73 |
|
| 74 |
+
Measured on an earlier file: `litert-lm benchmark` (litert-lm 0.15.0) on an Apple M4 Max, `-p 256 -d 256 --runs 3` (the tool averages three iterations), max-num-tokens 4096, warm-up run discarded, otherwise idle machine. These figures cover the text path; the vision encoder runs once per image and is not included.
|
| 75 |
|
| 76 |
| Device | Backend | Prefill (256) | Decode | TTFT |
|
| 77 |
|---|---|---|---|---|
|
|
|
|
| 83 |
|
| 84 |
The iPhone rows are carried over from this repository's own earlier on-device note, where the model loads in about 3–4 s; the run logs are not retained here, so the run count and prompt are not known. Single-image VQA is what the GPU row covers — see the multi-image limitation below.
|
| 85 |
|
| 86 |
+
**The macOS GPU backend is not usable for this bundle on litert-lm 0.15.0.** Asked to describe an image with `--backend gpu`, it returns a run of `!` characters instead of a caption. `litert-lm benchmark` still reports GPU numbers for it — 2,031 tok/s prefill and 183 tok/s decode — but they measure a path that produces no usable text, so no GPU row is quoted here. With that version, use the CPU backend on the desktop. This is a desktop-runtime observation and says nothing about the iPhone or Android GPU paths described elsewhere on this card. With litert-lm 0.19.0 to 0.19.2, this file and the previous one answer a text question on the Mac GPU with the same reply, byte for byte; with litert-lm 0.19.2 and the vision encoder on the CPU, both answer the picture under How to use on the Mac GPU with "Two cats are sleeping on a pink blanket."
|
| 87 |
|
| 88 |
Multi-turn text works: you can ask follow-up questions about the same image.
|
| 89 |
|
| 90 |
The image is described accurately and in detail. The vision tower converts bit-faithfully to the
|
| 91 |
reference (float CPU-parity corr ≈ 1.0); int8 vision weights keep grounding quality.
|
| 92 |
|
| 93 |
+
## Galaxy S26 — GPU and CPU
|
| 94 |
+
|
| 95 |
+
Each run reads a 1,024-token text prompt and generates 256 tokens, three times (three iterations). The GPU row is the median of iterations 2–3 over two runs. On the CPU the median prefill and decode speeds drop from one iteration to the next, so each iteration has its own row: the median of that iteration over two runs.
|
| 96 |
+
|
| 97 |
+
| Backend | Prefill, 1,024 tokens | Decode | Time to first token | Peak (`VmHWM`) |
|
| 98 |
+
|---|---:|---:|---:|---:|
|
| 99 |
+
| GPU (`LiteRT GPU`, every node of the prefill and decode graphs), iterations 2–3 | 711 tok/s | **46.9 tok/s** | 1.47 s | 0.76 GB |
|
| 100 |
+
| CPU (XNNPACK), iteration 1 | 239 tok/s | 36.5 tok/s | 4.32 s | 1.66 GB |
|
| 101 |
+
| CPU (XNNPACK), iteration 2 | 129 tok/s | 31.7 tok/s | 7.95 s | 1.66 GB |
|
| 102 |
+
| CPU (XNNPACK), iteration 3 | 116 tok/s | 31.3 tok/s | 8.87 s | 1.66 GB |
|
| 103 |
|
| 104 |
+
Samsung Galaxy S26 (SM-S942Q / SM8850, Android 16), `litert_lm_advanced_main` built from LiteRT-LM v0.19.0 (commit `771b06e1`), `--benchmark` with a 1,024-token text prefill and 256 decode tokens, context 2,048, 2026-11-15. Each run is a new process. The GPU runs started at Android's thermal status 0 (none) and the CPU runs at thermal status 1 (light). The rows cover the text path.
|
| 105 |
|
| 106 |
+
In each of the four counted CPU runs, the phone lowers the clock caps of its two CPU clusters from 2–5 s in, to 1.56 / 1.50 GHz by 17–27 s in, so iterations 2 and 3 run at a lower clock than iteration 1. On the CPU, this file's prefill and decode medians in each iteration were between 0.7 % below and 0.4 % above those of the previous file (replaced on 2026-11-15, see Conversion notes). Two counted runs of the same file differed by up to 4.3 %.
|
|
|
|
|
|
|
| 107 |
|
| 108 |
+
Peak is the process's `VmHWM`. On the CPU it was 1.65–1.66 GB in this file's two counted runs (1.69 GB in a warm-up run before them) and 1.52–1.54 GB in the previous file's two. `VmHWM` does not count memory the GPU driver holds: the phone's GPU allocation counter (`kgsl_page_alloc`) rose by 1.56 GB during each of this file's GPU runs and by 1.33 and 1.34 GB during those of the previous file.
|
| 109 |
|
| 110 |
+
With the vision encoder on the GPU (`--vision_backend=gpu`), `litert_lm_advanced_main` stops with exit status 13 before it reads the picture: with this file on this phone, and with this file and the previous one on a Pixel 11 Pro. Its log names two op types of the encoder that the GPU delegate does not take, BROADCAST_TO and GATHER_ND (on this phone, 13 of the encoder's 1,320 nodes). With the vision encoder on the CPU (`--vision_backend=cpu`) and the decoder on the GPU, this phone answered "Describe this picture in one sentence." about the photo under How to use with "Two cats are sleeping on a pink blanket, with a remote control nearby." (one run).
|
| 111 |
|
| 112 |
+
On a Pixel 11 Pro GPU this file decodes 19.6 tok/s, 16 % faster than the previous file, and prefills 629 tok/s, 7 % faster. The runs behind each number, the Pixel 11 Pro runs, and the S26 section this card carried for an earlier file: [MEASUREMENTS.md](MEASUREMENTS.md).
|
| 113 |
|
| 114 |
+
On the Galaxy S26 the GPU decodes 1.3–1.5× as fast as the CPU and reads the prompt 3.0–6.1× as fast, so this repo's `litertlm_manifest.json` recommends `gpu` for flagship-class Android. That recommendation rests on the Galaxy S26 alone: the Pixel 11 Pro CPU was not measured.
|
| 115 |
|
| 116 |
GPU wiring, including the Gallery import toggle: [GPU guide](https://github.com/john-rocky/hf-to-litertlm/blob/main/docs/android-gpu.md).
|
| 117 |
|
|
|
|
| 153 |
|
| 154 |
> **Tip:** on the **GPU** backend use one image per conversation (a known GPU-delegate trait of `fast_vlm` models); pick **CPU** if you want multiple images in one chat.
|
| 155 |
|
| 156 |
+
These steps were written for an earlier file and were not repeated with this one. With `litert_lm_advanced_main` on Android, a picture needs the vision encoder on the CPU (see the Galaxy S26 section).
|
| 157 |
+
|
| 158 |
## Run on desktop (LiteRT-LM CLI)
|
| 159 |
|
| 160 |
The same `.litertlm` bundle runs on macOS / Linux / Windows with the official
|
|
|
|
| 206 |
|
| 207 |
**Template-only change**: every section of the bundle except the metadata is byte-identical to the previous file (verified by per-section sha256), and single-turn renders, token ids, prefill counts and greedy answers are unchanged (verified on the LiteRT-LM runtime), so the numbers on this card still describe this file — only the file's own sha256 differs. Re-download only matters if you inject conversation history with role `'assistant'`. Details: google-ai-edge/LiteRT-LM#3417 (https://github.com/google-ai-edge/LiteRT-LM/issues/3417).
|
| 208 |
|
| 209 |
+
### 2026-11-15 — GPU graph and a 1,024-token prefill (weights unchanged)
|
| 210 |
+
|
| 211 |
+
The prefill/decode graph now has the GPU form litert-torch writes with `--apply_gpu_composites`, plus a 1,024-token prefill (`prefill_1024`, copied from `prefill_512`). Every weight, and every section outside that graph, is byte-identical: sha256 `44c652d4…` (1,429,700,608 B) → `53020750…` (1,431,420,928 B). On a Mac the two files give the same replies byte for byte: 4 prompts and a picture on the CPU (litert-lm 0.19.2, 1 thread, greedy decoding with top-k 1), and one prompt and the picture on the CPU and the prompt on the GPU with litert-lm 0.19.0 to 0.19.2. 8 short questions: 8 of 8 with both files on the Mac CPU and GPU and on a Pixel 11 Pro GPU; 8 of 8 with this file on a Galaxy S26 GPU (the previous file was not asked there). Galaxy S26 GPU (LiteRT-LM v0.19.0, four runs in the order previous, new, new, previous; each run's mean of iterations 2–3): prefill 657, 716, 613 and 671 tokens/s, decode 43.2, 46.7, 47.2 and 42.5 tokens/s, so from the previous file to this one prefill ×1.090 and decode ×1.081 in the first pair, prefill ×0.915 and decode ×1.110 in the second. In the second run of this file, iteration 2 prefilled at 504.32 tokens/s (time to first token 2.05 s). Procedure: [REPRODUCE.md](https://github.com/john-rocky/hf-to-litertlm/blob/main/REPRODUCE.md#2026-11-15--gpu-graph-re-ship-internvl3-2b-weights-unchanged). Measured on this file: the last two sentences of the paragraph under the title, the example answer under How to use and the two paragraphs after it, the last sentence of the macOS GPU paragraph, the Galaxy S26 section, the last paragraph of the Gallery section and this entry; the rest of this card describes earlier files.
|
| 212 |
+
|
| 213 |
|
| 214 |
## Known runtime issues
|
| 215 |
|
|
|
|
| 218 |
From the second turn of a conversation on, LiteRT-LM puts the previous answer's stop token into the KV cache with a zero embedding, because this file holds the embedding table in its own section and the decoder takes embeddings, so later answers in a conversation can differ from the answer the model gives to the same messages in one prompt (read in the source of LiteRT-LM 0.16.0 to 0.18.1; measured with 0.18.1 on WeVisOne-VL-2B and Qwen2.5-Coder-1.5B-Instruct, not on this file). One question per conversation avoids it, as does a new conversation that starts with the earlier messages and the new question.
|
| 219 |
|
| 220 |
From a conversation preface (the system message, initial messages, tools and extra context a conversation is created with) that has tools and no messages, LiteRT-LM renders this file's chat template with an empty message list, and the template reads `messages[0]` without checking that the list is non-empty, so the render fails with `Failed to apply template: undefined value`. This happens in two places: when the preface is prefilled at creation (`prefillPrefaceOnInit = true` in Kotlin, `prefillPrefaceOnInit: true` on the web, `SetPrefillPrefaceOnInit(true)` in C++; the default is false), where creating the conversation fails with that error, and in the preface render (`renderPrefaceIntoString()` in Kotlin and Swift, `RenderPrefaceIntoString()` in C++, `litert_lm_conversation_render_preface_to_string` in the C API). The same happens with extra context (such as `enable_thinking`) and no messages, and in the preface render with an empty preface (run in the runtime on one Qwen3 template; the other templates rendered with minijinja 2.14 and jinja2). Read in the source of LiteRT-LM 0.17.0, 0.18.1 and main; measured with LiteRT-LM 0.18.1 (the litert-lm package from PyPI) through its C API on this file's template text. The default path, where the first message is rendered together with the preface, is not affected: the Python API and the CLI of 0.18.1 expose neither the flag nor the preface render, and Google AI Edge Gallery sets neither (its source as read on 2026-10-25). A system message or any initial message in the conversation config avoids it.
|
| 221 |
+
|
| 222 |
+
On LiteRT-LM 0.18.1 and 0.19.1, once a message fails because it does not fit in the context window, every later message in that conversation fails as well (the next one with `Task failed with state: 7`). Start a new conversation after such an error.
|
litertlm_manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"manifest_schema": "0.1.3",
|
| 3 |
"repo": "litert-community/InternVL3-2B",
|
| 4 |
-
"generated": "2026-11-
|
| 5 |
"generator": "make_manifest.py",
|
| 6 |
"model": {
|
| 7 |
"display_name": "InternVL3-2B",
|
|
@@ -22,8 +22,8 @@
|
|
| 22 |
"variants": [
|
| 23 |
{
|
| 24 |
"file": "InternVL3-2B.litertlm",
|
| 25 |
-
"sha256": "
|
| 26 |
-
"size_bytes":
|
| 27 |
"sections": [
|
| 28 |
{
|
| 29 |
"type": "LlmMetadataProto",
|
|
@@ -40,7 +40,7 @@
|
|
| 40 |
},
|
| 41 |
{
|
| 42 |
"type": "TFLiteModel",
|
| 43 |
-
"size_bytes":
|
| 44 |
"model_type": "tf_lite_prefill_decode"
|
| 45 |
},
|
| 46 |
{
|
|
@@ -85,12 +85,12 @@
|
|
| 85 |
"platform": "android",
|
| 86 |
"device_class": "flagship",
|
| 87 |
"backend": "gpu",
|
| 88 |
-
"reason": "measured on one Galaxy S26 with one binary: GPU
|
| 89 |
},
|
| 90 |
{
|
| 91 |
"platform": "macos",
|
| 92 |
"backend": "cpu",
|
| 93 |
-
"reason": "
|
| 94 |
}
|
| 95 |
],
|
| 96 |
"requirements": {
|
|
@@ -98,14 +98,15 @@
|
|
| 98 |
"iPhone 17 Pro rows are carried over from the repository's earlier on-device note (model loads in about 3–4 s); run logs are not retained, so run count and prompt are unknown. The GPU row covers single-image VQA.",
|
| 99 |
"Multi-turn text works: follow-up questions about the same image are supported.",
|
| 100 |
"Vision-only bundle (no audio tower): bring up the engine with the vision modality only (Modality.textImage / [.vision]); requesting the audio tower (.all) fails at session creation.",
|
| 101 |
-
"Galaxy S26 GPU
|
| 102 |
-
"Galaxy S26 GPU
|
| 103 |
"2026-08-28 start_token fix (metadata-only, weights unchanged): the literal start token \"None\" was removed. Accuracy figures on the card were measured on the previous file and not re-measured.",
|
| 104 |
"2026-08-29 default system prompt restored (metadata-only, weights unchanged): with no system message the prompt now adds 37 prefill tokens, so time-to-first-token grows by that much; per-token speed is unchanged. Accuracy figures not re-measured.",
|
| 105 |
"2026-08-30 tokenizer section replaced with the upstream tokenizer.json (weights unchanged): answers to prompts with accented letters/symbols/emoji can change; accuracy figures and any on-device rows were measured on the previous file; the on-device gate has not been re-run.",
|
| 106 |
"2026-08-31 chat template fix (metadata-only, weights unchanged): history turns with role 'assistant' are now accepted; single-turn renders, token ids, prefill counts and greedy answers are unchanged, so the card's numbers still describe this file.",
|
| 107 |
"Not a measured row: card reports iPhone 17 Pro cpu decode_tps 20 (Performance table (iPhone rows carried over from the repository's earlier on-device note; run logs not retained); runtime/run count not stated)",
|
| 108 |
-
"Not a measured row: card reports iPhone 17 Pro gpu decode_tps 45 (Performance table (iPhone rows carried over from the repository's earlier on-device note; run logs not retained); runtime/run count not stated)"
|
|
|
|
| 109 |
]
|
| 110 |
},
|
| 111 |
"measured": [
|
|
@@ -120,7 +121,7 @@
|
|
| 120 |
"ttft_s": 1.79,
|
| 121 |
"max_num_tokens": 4096,
|
| 122 |
"runs": 3,
|
| 123 |
-
"source": "model card: Performance table (litert-lm benchmark, Apple M4 Max) (card retrieved 2026-09-05)",
|
| 124 |
"date": "2026-09-05"
|
| 125 |
},
|
| 126 |
{
|
|
@@ -136,7 +137,7 @@
|
|
| 136 |
"peak_memory_mb": 736,
|
| 137 |
"runs": 1,
|
| 138 |
"date": "2026-08-25",
|
| 139 |
-
"source": "205-token benchmark, single run; full delegation (3618 ops across 3 subgraphs); generation gate answered the probe correctly. The Galaxy S26 cpu row of 2026-09-05 is its same-device control
|
| 140 |
},
|
| 141 |
{
|
| 142 |
"device": "Galaxy S26 (SM-S942Q, Qualcomm SM8850, Adreno)",
|
|
@@ -152,13 +153,68 @@
|
|
| 152 |
"cache": "no",
|
| 153 |
"runs": 2,
|
| 154 |
"date": "2026-09-05",
|
| 155 |
-
"source": "same-device CPU control - identical binary, prompt file and flags, only --backend differs; 205-token prompt with --benchmark, 2 cold runs (compile/weight caches deleted between runs, device cooled below 42 C before each run)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
}
|
| 157 |
],
|
| 158 |
"known_issues": [
|
| 159 |
"Android GPU needs LiteRT-LM 0.19.0 or later: since 2026-11-09 this file's weights sit in TFLiteWeights sections at the end of the file (LiteRT's external weights), and the GPU engine of the v0.18.0 and v0.18.1 Android builds crashes (SIGSEGV) on such a file (https://github.com/google-ai-edge/LiteRT-LM/issues/3986); the earlier file with the weights inside the graph stays at revision 4f65e5a4ae4bd19ed369296703ab99ca3a41bd7d (https://huggingface.co/litert-community/InternVL3-2B/tree/4f65e5a4ae4bd19ed369296703ab99ca3a41bd7d)",
|
| 160 |
"macOS GPU backend is not usable on litert-lm 0.15.0: with --backend gpu it returns a run of '!' characters instead of a caption; the benchmark still reports 2,031 tok/s prefill / 183 tok/s decode on that unusable path, so no GPU row is quoted. Desktop-runtime observation only.",
|
| 161 |
-
"GPU (Metal) backend: a second image in the same conversation truncates the answer; ask about one image per chat. GPU-delegate-specific, not a model/bundle issue — on the CPU backend multi-image works perfectly (verified); reproduces with FastVLM-0.5B, general to the runtime's GPU fast_vlm path."
|
|
|
|
| 162 |
],
|
| 163 |
"min_runtime_version": "0.19.0",
|
| 164 |
"context_length": 2048
|
|
|
|
| 1 |
{
|
| 2 |
"manifest_schema": "0.1.3",
|
| 3 |
"repo": "litert-community/InternVL3-2B",
|
| 4 |
+
"generated": "2026-11-15",
|
| 5 |
"generator": "make_manifest.py",
|
| 6 |
"model": {
|
| 7 |
"display_name": "InternVL3-2B",
|
|
|
|
| 22 |
"variants": [
|
| 23 |
{
|
| 24 |
"file": "InternVL3-2B.litertlm",
|
| 25 |
+
"sha256": "5302075056b91b0d6e1c43faff9006dea658a3458ab763ae7fa25d5b2dc59523",
|
| 26 |
+
"size_bytes": 1431420928,
|
| 27 |
"sections": [
|
| 28 |
{
|
| 29 |
"type": "LlmMetadataProto",
|
|
|
|
| 40 |
},
|
| 41 |
{
|
| 42 |
"type": "TFLiteModel",
|
| 43 |
+
"size_bytes": 102822576,
|
| 44 |
"model_type": "tf_lite_prefill_decode"
|
| 45 |
},
|
| 46 |
{
|
|
|
|
| 85 |
"platform": "android",
|
| 86 |
"device_class": "flagship",
|
| 87 |
"backend": "gpu",
|
| 88 |
+
"reason": "measured on one Galaxy S26 with one binary (litert_lm_advanced_main, LiteRT-LM v0.19.0 source build 771b06e1; 1,024-token prefill, 256 decode tokens; 2026-11-15): GPU 46.895 tok/s decode / 710.955 prefill, the median of iterations 2-3 over 2 runs, peak 739,368 kB, against CPU 36.525 decode / 238.75 prefill in iteration 1 and 31.265 / 115.88 in iteration 3 (the median of each over 2 runs; in each counted run the phone lowers the clock caps of its two CPU clusters from 2-5 s in to 1.56 / 1.50 GHz by 17-27 s in), peak 1,616,556 kB in the 2 counted runs. The GPU decodes 1.3-1.5x as fast as the CPU and prefills 3.0-6.1x as fast. The Pixel 11 Pro CPU was not measured"
|
| 89 |
},
|
| 90 |
{
|
| 91 |
"platform": "macos",
|
| 92 |
"backend": "cpu",
|
| 93 |
+
"reason": "on litert-lm 0.15.0 the macOS GPU backend answered an image question with a run of `!`; with that version, use the CPU backend on the desktop. With litert-lm 0.19.0-0.19.2 the Mac GPU answered a text question (the same reply from this file and the previous one, 2026-11-14), and with litert-lm 0.19.2 and the vision encoder on the CPU it answered the picture with the sentence the Mac CPU gives (2026-11-15); no Mac speed was measured with these versions"
|
| 94 |
}
|
| 95 |
],
|
| 96 |
"requirements": {
|
|
|
|
| 98 |
"iPhone 17 Pro rows are carried over from the repository's earlier on-device note (model loads in about 3–4 s); run logs are not retained, so run count and prompt are unknown. The GPU row covers single-image VQA.",
|
| 99 |
"Multi-turn text works: follow-up questions about the same image are supported.",
|
| 100 |
"Vision-only bundle (no audio tower): bring up the engine with the vision modality only (Modality.textImage / [.vision]); requesting the audio tower (.all) fails at session creation.",
|
| 101 |
+
"Earlier file (Galaxy S26 GPU check, 2026-08-25): its prompt carried no image, so it covered engine creation and the text path only.",
|
| 102 |
+
"Galaxy S26 GPU: XNNPACK additionally takes 1 of the 4 nodes in `main` (the earlier file's 2026-08-25 check and this file's 2026-11-15 runs); the runtime accepts that split.",
|
| 103 |
"2026-08-28 start_token fix (metadata-only, weights unchanged): the literal start token \"None\" was removed. Accuracy figures on the card were measured on the previous file and not re-measured.",
|
| 104 |
"2026-08-29 default system prompt restored (metadata-only, weights unchanged): with no system message the prompt now adds 37 prefill tokens, so time-to-first-token grows by that much; per-token speed is unchanged. Accuracy figures not re-measured.",
|
| 105 |
"2026-08-30 tokenizer section replaced with the upstream tokenizer.json (weights unchanged): answers to prompts with accented letters/symbols/emoji can change; accuracy figures and any on-device rows were measured on the previous file; the on-device gate has not been re-run.",
|
| 106 |
"2026-08-31 chat template fix (metadata-only, weights unchanged): history turns with role 'assistant' are now accepted; single-turn renders, token ids, prefill counts and greedy answers are unchanged, so the card's numbers still describe this file.",
|
| 107 |
"Not a measured row: card reports iPhone 17 Pro cpu decode_tps 20 (Performance table (iPhone rows carried over from the repository's earlier on-device note; run logs not retained); runtime/run count not stated)",
|
| 108 |
+
"Not a measured row: card reports iPhone 17 Pro gpu decode_tps 45 (Performance table (iPhone rows carried over from the repository's earlier on-device note; run logs not retained); runtime/run count not stated)",
|
| 109 |
+
"2026-11-15 GPU graph (weights unchanged): the prefill/decode graph has the GPU composite form (odml.cache_update writes the KV cache, odml.runtime_bmm runs the attention products) and a 1,024-token prefill signature copied from prefill_512; every weight and every section outside that graph is byte-identical to the previous file (Hub 7232b4de). This file was tested on litert-lm 0.19.0-0.19.2 (macOS) and litert_lm_advanced_main v0.19.0 (Galaxy S26, Pixel 11 Pro)."
|
| 110 |
]
|
| 111 |
},
|
| 112 |
"measured": [
|
|
|
|
| 121 |
"ttft_s": 1.79,
|
| 122 |
"max_num_tokens": 4096,
|
| 123 |
"runs": 3,
|
| 124 |
+
"source": "model card: Performance table (litert-lm benchmark, Apple M4 Max) (card retrieved 2026-09-05); measured on an earlier file (before 2026-11-15)",
|
| 125 |
"date": "2026-09-05"
|
| 126 |
},
|
| 127 |
{
|
|
|
|
| 137 |
"peak_memory_mb": 736,
|
| 138 |
"runs": 1,
|
| 139 |
"date": "2026-08-25",
|
| 140 |
+
"source": "205-token benchmark, single run; full delegation (3618 ops across 3 subgraphs); generation gate answered the probe correctly. The Galaxy S26 cpu row of 2026-09-05 is its same-device control; measured on an earlier file (before 2026-11-15)"
|
| 141 |
},
|
| 142 |
{
|
| 143 |
"device": "Galaxy S26 (SM-S942Q, Qualcomm SM8850, Adreno)",
|
|
|
|
| 153 |
"cache": "no",
|
| 154 |
"runs": 2,
|
| 155 |
"date": "2026-09-05",
|
| 156 |
+
"source": "same-device CPU control - identical binary, prompt file and flags, only --backend differs; 205-token prompt with --benchmark, 2 cold runs (compile/weight caches deleted between runs, device cooled below 42 C before each run); measured on an earlier file (before 2026-11-15)"
|
| 157 |
+
},
|
| 158 |
+
{
|
| 159 |
+
"device": "Galaxy S26 (SM-S942Q, Qualcomm SM8850, Adreno)",
|
| 160 |
+
"os": "Android",
|
| 161 |
+
"backend": "gpu",
|
| 162 |
+
"runtime": "litert_lm_advanced_main v0.19.0 (source build 771b06e1), LiteRT GPU (LITERT_CL)",
|
| 163 |
+
"prompt_tokens": 1024,
|
| 164 |
+
"decode_tokens": 256,
|
| 165 |
+
"prefill_tps": 710.955,
|
| 166 |
+
"decode_tps": 46.895,
|
| 167 |
+
"ttft_s": 1.465,
|
| 168 |
+
"load_s": 4.63,
|
| 169 |
+
"peak_memory_mb": 757,
|
| 170 |
+
"max_num_tokens": 2048,
|
| 171 |
+
"cache": "no",
|
| 172 |
+
"runs": 2,
|
| 173 |
+
"date": "2026-11-15",
|
| 174 |
+
"source": "--benchmark, text prompt, 3 iterations per run, the median of iterations 2-3 over 2 runs; every run started at thermal status 0 after 134-162 s of rest; every node of the prefill and decode graphs delegated; the previous file measured back to back (previous, new, new, previous): 668.365 prefill / 42.71 decode; in the second run of this file iteration 2 prefilled at 504.32 tok/s (time to first token 2.05 s); peak_memory_mb is the process's VmHWM and leaves out GPU driver memory (the phone's kgsl_page_alloc counter rose by 1.56 GB during this file's GPU runs and 1.33-1.34 GB during the previous file's)"
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"device": "Galaxy S26 (SM-S942Q, Qualcomm SM8850, Adreno)",
|
| 178 |
+
"os": "Android",
|
| 179 |
+
"backend": "cpu",
|
| 180 |
+
"runtime": "litert_lm_advanced_main v0.19.0 (source build 771b06e1), XNNPACK, default thread count",
|
| 181 |
+
"prompt_tokens": 1024,
|
| 182 |
+
"decode_tokens": 256,
|
| 183 |
+
"prefill_tps": "115.88-238.75",
|
| 184 |
+
"decode_tps": "31.265-36.525",
|
| 185 |
+
"ttft_s": "4.315-8.87",
|
| 186 |
+
"load_s": 2.33,
|
| 187 |
+
"peak_memory_mb": 1655,
|
| 188 |
+
"max_num_tokens": 2048,
|
| 189 |
+
"cache": "no",
|
| 190 |
+
"runs": 2,
|
| 191 |
+
"date": "2026-11-15",
|
| 192 |
+
"source": "--benchmark, text prompt, 3 iterations per run; the high end is iteration 1 and the low end iteration 3, the median of each over 2 runs (iteration 2: 129.46 / 31.71); one warm-up run of this file before the 2 counted runs, not counted; every run started at thermal status 1 (Android's light level) with no CPU clock cap, the counted runs after 153-154 s of rest and the warm-up run after 143 s; in each of the 4 counted runs (2 per file) the phone lowers the clock caps of both CPU clusters from 2-5 s into the run to 1.56 / 1.50 GHz by 17-27 s in (the runs took 46-48 s), so iterations 2 and 3 run at a lower clock than iteration 1; peak_memory_mb is the highest VmHWM of the 2 counted runs (1,616,556 kB; 1,646,296 kB in the warm-up run); the previous file measured back to back: 240.335 / 36.535 (iteration 1), 129.6 / 31.595 (iteration 2) and 115.625 / 31.18 (iteration 3), peak 1,507,060 kB; this file's prefill and decode medians are 0.7 % below to 0.4 % above the previous file's, and two counted runs of the same file differ by up to 4.3 %"
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"device": "Pixel 11 Pro",
|
| 196 |
+
"os": "Android",
|
| 197 |
+
"backend": "gpu",
|
| 198 |
+
"runtime": "litert_lm_advanced_main v0.19.0 (source build 771b06e1), LiteRT GPU",
|
| 199 |
+
"prompt_tokens": 1024,
|
| 200 |
+
"decode_tokens": 256,
|
| 201 |
+
"prefill_tps": 628.545,
|
| 202 |
+
"decode_tps": 19.575,
|
| 203 |
+
"ttft_s": 1.68,
|
| 204 |
+
"load_s": 8.05,
|
| 205 |
+
"peak_memory_mb": 744,
|
| 206 |
+
"max_num_tokens": 2048,
|
| 207 |
+
"cache": "no",
|
| 208 |
+
"runs": 2,
|
| 209 |
+
"date": "2026-11-14",
|
| 210 |
+
"source": "--benchmark, text prompt, 3 iterations per run, the median of iterations 2-3 over 2 runs; every run started at thermal status 0 after 152-209 s of rest; the previous file measured back to back (previous, new, new, previous): 587.23 prefill / 16.86 decode"
|
| 211 |
}
|
| 212 |
],
|
| 213 |
"known_issues": [
|
| 214 |
"Android GPU needs LiteRT-LM 0.19.0 or later: since 2026-11-09 this file's weights sit in TFLiteWeights sections at the end of the file (LiteRT's external weights), and the GPU engine of the v0.18.0 and v0.18.1 Android builds crashes (SIGSEGV) on such a file (https://github.com/google-ai-edge/LiteRT-LM/issues/3986); the earlier file with the weights inside the graph stays at revision 4f65e5a4ae4bd19ed369296703ab99ca3a41bd7d (https://huggingface.co/litert-community/InternVL3-2B/tree/4f65e5a4ae4bd19ed369296703ab99ca3a41bd7d)",
|
| 215 |
"macOS GPU backend is not usable on litert-lm 0.15.0: with --backend gpu it returns a run of '!' characters instead of a caption; the benchmark still reports 2,031 tok/s prefill / 183 tok/s decode on that unusable path, so no GPU row is quoted. Desktop-runtime observation only.",
|
| 216 |
+
"GPU (Metal) backend: a second image in the same conversation truncates the answer; ask about one image per chat. GPU-delegate-specific, not a model/bundle issue — on the CPU backend multi-image works perfectly (verified); reproduces with FastVLM-0.5B, general to the runtime's GPU fast_vlm path.",
|
| 217 |
+
"Android, litert_lm_advanced_main v0.19.0: with the vision encoder on the GPU (--vision_backend=gpu) it stops with exit status 13 before it reads the picture: the GPU delegate does not take two op types of the encoder, BROADCAST_TO and GATHER_ND, and the runtime, told to delegate the whole graph, refuses the split. Seen with this file on a Galaxy S26 and with this file and the previous one on a Pixel 11 Pro. With the vision encoder on the CPU (--vision_backend=cpu) and the decoder on the GPU, the Galaxy S26 answered the photo question (one run); the Pixel 11 Pro and the Gallery app were not tried that way."
|
| 218 |
],
|
| 219 |
"min_runtime_version": "0.19.0",
|
| 220 |
"context_length": 2048
|