Instructions to use litert-community/LFM2.5-1.2B-JP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use litert-community/LFM2.5-1.2B-JP 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/LFM2.5-1.2B-JP \ --prompt="Write me a poem"
- LiteRT
How to use litert-community/LFM2.5-1.2B-JP 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: state the actual GPU-delegation blocker (INT64 ShortConv ops, 536/579 delegated)
Browse files
README.md
CHANGED
|
@@ -68,7 +68,7 @@ Install a recent [Google AI Edge Gallery](https://github.com/google-ai-edge/gall
|
|
| 68 |
|
| 69 |
Set `--max-num-tokens` to the smallest value your use case needs — 1024 is a good chat default, and the file allows up to 4096. At 1024 the int4 file decodes fastest; at 4096 the two variants converge.
|
| 70 |
|
| 71 |
-
**Use the CPU backend.**
|
| 72 |
|
| 73 |
On a Pixel 8a (Tensor G3, CPU backend, measured in AI Edge Gallery) int8 decodes at ~19 tok/s and int4 at ~31 tok/s — on phone-class memory bandwidth the int4 file is about 1.7× faster as well as 41% smaller, so prefer int4 on mid-range devices. Those Android figures are single ship-gate runs, not medians. First device load compiles the graph and can take about a minute; later loads are instant.
|
| 74 |
|
|
|
|
| 68 |
|
| 69 |
Set `--max-num-tokens` to the smallest value your use case needs — 1024 is a good chat default, and the file allows up to 4096. At 1024 the int4 file decodes fastest; at 4096 the two variants converge.
|
| 70 |
|
| 71 |
+
**Use the CPU backend — this bundle cannot create a GPU engine.** It comes from the pre-0.9.2 ShortConv export generation, whose prefill graph still carries INT64 `ADD`/`CAST` inside `Lfm2ShortConv`, plus `GATHER_ND` and a `GREATER_EQUAL` with const inputs. The GPU delegate takes 536 of the 579 operations and leaves 43 on the CPU, and the runtime then refuses the partial split: `Hint fully delegated to single delegate is set, but the graph is not fully delegated`. Re-exporting from the post-0.9.2 lineage removes those INT64 ops and does run fully delegated on the macOS GPU; the remaining iOS Metal failure is tracked upstream in [LiteRT-LM#3129](https://github.com/google-ai-edge/LiteRT-LM/issues/3129).
|
| 72 |
|
| 73 |
On a Pixel 8a (Tensor G3, CPU backend, measured in AI Edge Gallery) int8 decodes at ~19 tok/s and int4 at ~31 tok/s — on phone-class memory bandwidth the int4 file is about 1.7× faster as well as 41% smaller, so prefer int4 on mid-range devices. Those Android figures are single ship-gate runs, not medians. First device load compiles the graph and can take about a minute; later loads are instant.
|
| 74 |
|