Image-Text-to-Text
LiteRT-LM
LiteRT
English
decision-model
vision
structured-output
hybrid
gated-deltanet
Instructions to use litert-community/decider-2b-vision-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use litert-community/decider-2b-vision-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=litert-community/decider-2b-vision-LiteRT \ --prompt="Write me a poem"
- LiteRT
How to use litert-community/decider-2b-vision-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
Card: remove the link to a sample app
Browse files
README.md
CHANGED
|
@@ -84,7 +84,7 @@ python -B reference/runtime_example.py --bundle decider-2b-vision_fp16-int8vocab
|
|
| 84 |
|
| 85 |
[runtime_example.py](reference/runtime_example.py) builds the prompt with the upstream prompt code, resizes the image to 256×256 with PIL, sends `[image, text]` as one user message and reads the first generated token with greedy decoding. This path covers one image first, one question per request, and the argmax only. The runtime returns text, not option probabilities, and its greedy token is the most likely token over the whole vocabulary, not only over the option letters. The two agree on every single-question published row. In one two-question row, the most likely token for a two-option question is "C".
|
| 86 |
|
| 87 |
-
Several questions about one image go into one conversation: the image with the first question, then each further question as a text-only message that starts with `)` (it closes the previous letter) and carries the next `Question: … Options: … Answer: (` block. Do not open a new conversation per request on the same engine: LiteRT-LM keeps this model's linear-attention state across conversations ([LiteRT-LM #3165](https://github.com/google-ai-edge/LiteRT-LM/issues/3165)), and the answers drift. Measured on a Galaxy S26 through the Android library (litertlm-android 0.16.1, the int8 file, 2026-09-29): one conversation with five questions per bar chart gave the answer of a fresh engine on 18 of 20 questions on the GPU and 5 of 5 on the CPU; a new conversation per request gave it on 33 of 60 (GPU) and 34 of 60 (CPU) with pixel-identical inputs.
|
| 88 |
|
| 89 |
## Examples
|
| 90 |
|
|
|
|
| 84 |
|
| 85 |
[runtime_example.py](reference/runtime_example.py) builds the prompt with the upstream prompt code, resizes the image to 256×256 with PIL, sends `[image, text]` as one user message and reads the first generated token with greedy decoding. This path covers one image first, one question per request, and the argmax only. The runtime returns text, not option probabilities, and its greedy token is the most likely token over the whole vocabulary, not only over the option letters. The two agree on every single-question published row. In one two-question row, the most likely token for a two-option question is "C".
|
| 86 |
|
| 87 |
+
Several questions about one image go into one conversation: the image with the first question, then each further question as a text-only message that starts with `)` (it closes the previous letter) and carries the next `Question: … Options: … Answer: (` block. Do not open a new conversation per request on the same engine: LiteRT-LM keeps this model's linear-attention state across conversations ([LiteRT-LM #3165](https://github.com/google-ai-edge/LiteRT-LM/issues/3165)), and the answers drift. Measured on a Galaxy S26 through the Android library (litertlm-android 0.16.1, the int8 file, 2026-09-29): one conversation with five questions per bar chart gave the answer of a fresh engine on 18 of 20 questions on the GPU and 5 of 5 on the CPU; a new conversation per request gave it on 33 of 60 (GPU) and 34 of 60 (CPU) with pixel-identical inputs.
|
| 88 |
|
| 89 |
## Examples
|
| 90 |
|