Instructions to use litert-community/OLMo-2-1B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use litert-community/OLMo-2-1B-Instruct 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/OLMo-2-1B-Instruct \ --prompt="Write me a poem"
- LiteRT
How to use litert-community/OLMo-2-1B-Instruct 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
Download MEASUREMENTS.md from litert-community/OLMo-2-1B-Instruct: direct link, hf CLI and curl.
- Browser
- Download file 11.2 kB
-
https://huggingface.co/litert-community/OLMo-2-1B-Instruct/resolve/main/MEASUREMENTS.md
- Command line
-
hf download hf://litert-community/OLMo-2-1B-Instruct/MEASUREMENTS.md
-
curl -L -o MEASUREMENTS.md https://huggingface.co/litert-community/OLMo-2-1B-Instruct/resolve/main/MEASUREMENTS.md
OLMo-2-1B-Instruct β measurements
The model card (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 OLMo-2-1B-Instruct_q4_block32_ekv4096.litertlm as published on 2026-11-15; "the previous file" is the one it replaced.
Galaxy S26 and Pixel 11 Pro, LiteRT-LM v0.19.0 (this file, 2026-11-14 and 2026-11-15)
- This file:
OLMo-2-1B-Instruct_q4_block32_ekv4096.litertlm, sha256aa3a27afd2ed3fe7d3870bf53dc6fa04a191f98d5d10028979524de9fb64b117, 933,543,936 B. Previous file: the same name at Hub commitd2b975b34fe1dc87cac39f769ce62b2c707c7bf6, sha256bfd8c35ef39adc0e11c3988d06ae6b14f614fecb6d776708c120a9a237cf01be, 931,250,176 B. - This file has prefill signatures of 128 and 1,024 tokens; the previous file has the 128-token one only.
- Phones: Samsung Galaxy S26 (SM-S942Q, SM8850, Adreno 840 GPU, Android 16); Google Pixel 11 Pro (PowerVR GPU, Android 17).
- Program:
litert_lm_advanced_mainbuilt for Android arm64 from LiteRT-LM v0.19.0 source (commit771b06e1; the v0.19.0 tag is on the next commit, which changes onlyPackage.swiftandREADME.md), sha2562e0b50979206be39f00d676ec1363546fdfe6ae95eec5d4dff074617448b7937. - 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. - 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, no CPU clock cap and GPU thermal level 0; the CPU runs are described in their section.
- Questions: each is a new process with
--max_num_tokens=1024 --max_output_tokens=256 --benchmark_prefill_tokens=0 --benchmark_decode_tokens=0and the question as the prompt file. A run starts without waiting for the phone to cool. It keeps the runtime's cache files that an earlier run of the same file wrote. - When they ran: on the Pixel 11 Pro, after the timing runs, at thermal status 1; 13 of the 16 runs had a CPU limit (policy6 at 3.90β4.01 of its 4.11 GHz, or the phone's thermal utilization clamps). On the Galaxy S26, after the timing runs, at thermal status 2; the first two had a CPU clock cap.
- 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, not rounded); 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.
Galaxy S26 GPU
All nodes of the prefill and decode graphs run on LiteRT GPU (LITERT_CL: 719 nodes in each of prefill_1024 and prefill_128, 686 in decode). The previous file's 2 graphs are delegated whole too (705 nodes in prefill_128, 670 in decode).
Runs in the order previous, new, new, previous (prefill / decode tok/s, time to first token), each started at thermal status 0 after 161β236 s of rest.
| Run | File | Iteration 1 | Iteration 2 | Iteration 3 |
|---|---|---|---|---|
| 1 | previous | 443.30 / 22.40, 2.35 s | 324.11 / 23.16, 3.20 s | 423.19 / 23.06, 2.46 s |
| 2 | new | 764.46 / 46.47, 1.36 s | 727.67 / 48.96, 1.43 s | 699.32 / 48.60, 1.48 s |
| 3 | new | 750.82 / 46.94, 1.39 s | 681.20 / 48.90, 1.52 s | 681.67 / 48.54, 1.52 s |
| 4 | previous | 439.78 / 22.83, 2.37 s | 443.28 / 23.18, 2.35 s | 420.88 / 23.03, 2.48 s |
Median of iterations 2β3: previous 422.035 / 23.11, new 690.495 / 48.75 tok/s (prefill Γ1.636, decode Γ2.109). Iteration 1 alone (median over the two runs): previous 441.54 / 22.615, new 757.64 / 46.705 (prefill Γ1.716, decode Γ2.065). In every run iteration 3 prefilled more slowly than iteration 1. Time to first token (median of iterations 2β3) 2.47 β 1.50 s. Engine init (median) 4.58 β 4.55 s. Peak VmHWM 934,428 β 966,240 kB (0.96 β 0.99 GB). In run 3 the process had up to 38,144 kB in swap (VmSwap); in the other runs it had none. VmHWM does not count memory the GPU driver holds: the phone's GPU allocation counter (kgsl_page_alloc) rose by 2.47 GB during each of the previous file's runs and by 3.27 and 3.29 GB during this file's.
8 short questions (such as "What is 17 + 25? Answer briefly.") on the GPU, this file only: 7 of 8. It answered "0.11 is larger than 0.9." to "Which is larger: 0.9 or 0.11? Answer briefly."
Galaxy S26 CPU (XNNPACK)
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). In runs 1, 3 and 4 the cap of policy6 is already lower at the second reading, 2 s in, and in run 2 at the third, 5 s in; that of policy0 is lower 4β5 s in. Both reach 1.56 / 1.50 GHz 22β26 s in and stay there until the last seconds of the run, when they come down to 1.32 / 1.38 and then 1.23 / 1.27 GHz (93β100 s in; the runs took 102β104 s). 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 152β154 s of rest. Before run 1, one warm-up run of this file was not counted (prefill / decode 254.41 / 10.61, 179.14 / 9.91 and 109.88 / 9.45 tok/s in its three iterations). Its caps came down by another path: 2.23 / 2.23 GHz at 27 s, 1.79 / 1.63 GHz at 60 s and 1.23 / 1.27 GHz at 64 s, never 1.56 / 1.50 GHz (the run took 98 s). The lowest cap seen in each counted run is beside it.
| Run | File | Iteration 1 | Iteration 2 | Iteration 3 | Lowest cap (policy0 / policy6) |
|---|---|---|---|---|---|
| 1 | previous | 233.32 / 9.76, 4.49 s | 115.03 / 9.66, 9.01 s | 114.59 / 9.58, 9.04 s | 1.23 / 1.27 GHz |
| 2 | new | 253.90 / 9.79, 4.14 s | 126.11 / 9.64, 8.22 s | 125.47 / 9.51, 8.27 s | 1.23 / 1.27 GHz |
| 3 | new | 255.73 / 9.79, 4.11 s | 125.98 / 9.65, 8.23 s | 126.12 / 9.54, 8.22 s | 1.23 / 1.27 GHz |
| 4 | previous | 237.15 / 9.75, 4.42 s | 114.98 / 9.63, 9.01 s | 114.99 / 9.54, 9.01 s | 1.23 / 1.27 GHz |
Median of each iteration, previous β new: iteration 1 235.235 / 9.755 β 254.815 / 9.79 tok/s, iteration 2 115.005 / 9.645 β 126.045 / 9.645, iteration 3 114.79 / 9.56 β 125.795 / 9.525 (time to first token 4.455 β 4.125, 9.01 β 8.225 and 9.025 β 8.245 s). This file's prefill medians are 8.3β9.6 % above the previous file's, its decode medians between 0.4 % below and 0.4 % above. Two counted runs of the same file differ by up to 1.6 % (iteration 1 prefill of the previous file: 233.32 and 237.15). The warm-up run prefilled faster in iteration 2 (179.14 tok/s) than this file's two counted runs (126.11 and 125.98). Engine init 1.08 and 1.89 s (previous), 2.08 and 1.92 s (new). Peak VmHWM: previous 2,289,376 and 2,202,992 kB (2.34 and 2.26 GB), new 2,748,300 and 2,752,200 kB (2.81 and 2.82 GB) in runs 2β3 and 2,773,692 kB (2.84 GB) in the warm-up run.
Pixel 11 Pro GPU
Same program and command, runs in the order previous, new, new, previous, every run at thermal status 0 after 154β224 s of rest. All nodes of the prefill and decode graphs run on LiteRT GPU (the same node counts as on the Galaxy S26).
| Run | File | Iteration 1 | Iteration 2 | Iteration 3 |
|---|---|---|---|---|
| 1 | previous | 371.10 / 13.06, 2.84 s | 374.69 / 13.22, 2.81 s | 370.08 / 13.41, 2.84 s |
| 2 | new | 634.75 / 24.83, 1.65 s | 693.19 / 25.81, 1.52 s | 691.68 / 25.82, 1.52 s |
| 3 | new | 682.91 / 25.10, 1.54 s | 687.04 / 25.62, 1.53 s | 684.06 / 25.52, 1.54 s |
| 4 | previous | 376.01 / 13.60, 2.80 s | 381.82 / 13.68, 2.75 s | 377.74 / 13.67, 2.78 s |
Median of iterations 2β3: previous 376.215 / 13.54, new 689.36 / 25.715 tok/s (prefill Γ1.832, decode Γ1.899). Peak VmHWM 956,952 β 971,996 kB.
8 short questions: 7 of 8 with both files. Both answered "0.11 is larger than 0.9." to "Which is larger: 0.9 or 0.11? Answer briefly."
Mac
- 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. One of the prompts is 1,435 tokens long with the chat template (counted with the bundle's own tokenizer and prompt template), longer than the 1,024-token prefill.
- One prompt ("Write a Python function that returns the n-th Fibonacci number, with a short docstring.") on litert-lm 0.19.0, 0.19.1 and 0.19.2 (PyPI): on the CPU the same reply as the previous file, byte for byte. On the GPU both files write the function; their replies are the same for the first 27 lines and then part (1,356 and 1,287 bytes), the same two replies on all three versions.
- 8 short questions (litert-lm 0.19.2): 8 of 8 with both files on the GPU, with the same answers character for character; 7 of 8 with both files on the CPU, where both answer "0.11 is larger than 0.9." to "Which is larger: 0.9 or 0.11? Answer briefly."
Galaxy S26, LiteRT-LM 0.16.0 (an earlier file)
This section was on the model card until 2026-11-15. It is repeated here as it was, except its heading (on the card: "Galaxy S26 β GPU backend"), its last line (the GPU guide link), which stays on the card, and one word, reworded. It describes an earlier file of this repo on LiteRT-LM 0.16.0 (checked 2026-08-24). Its last paragraph, written before any Galaxy S26 CPU row of this model existed, says the GPU backend does not win decode on this phone; the CPU section above gives this file's CPU row. The check of 2026-08-24 also ran a GPU benchmark on LiteRT-LM 0.16.0 (a 931,241,056-byte file, a 210-token prompt), which decoded 23.08 and 22.97 tok/s in its two runs. A CPU benchmark of 2026-09-05, with the same phone, the same LiteRT-LM 0.16.0 program and the same prompt file, decoded 12.1 and 11.52 tok/s in its two runs (a 205-token prompt). It ran on a later file of the same size: the file of 2026-08-30, in which only the tokenizer section was replaced (see the 2026-08-30 entry on the model card). With this file on LiteRT-LM v0.19.0, the GPU decodes 5.0β5.1Γ as fast as the CPU on this phone (the runs are in the sections above).
The published bundle runs on the Android GPU backend: LiteRT takes the whole graph and the model generates.
| file | GPU backend | delegation | peak |
|---|---|---|---|
OLMo-2-1B-Instruct_q4_block32_ekv4096.litertlm |
runs | 1375 / 1375 ops across 2 subgraphs on LiteRT GPU |
931 MB |
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. Checked 2026-08-24.
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.