Instructions to use mlboydaisuke/Oc-e-Non-v1-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use mlboydaisuke/Oc-e-Non-v1-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/Oc-e-Non-v1-LiteRT \ --prompt="Write me a poem"
- Notebooks
- Google Colab
- Kaggle
Download MEASUREMENTS.md from mlboydaisuke/Oc-e-Non-v1-LiteRT: direct link, hf CLI and curl.
- Browser
- Download file 8.89 kB
-
https://huggingface.co/mlboydaisuke/Oc-e-Non-v1-LiteRT/resolve/main/MEASUREMENTS.md
- Command line
-
hf download hf://mlboydaisuke/Oc-e-Non-v1-LiteRT/MEASUREMENTS.md
-
curl -L -o MEASUREMENTS.md https://huggingface.co/mlboydaisuke/Oc-e-Non-v1-LiteRT/resolve/main/MEASUREMENTS.md
Oc-e-Non-v1 LiteRT-LM: measurements
The runs behind the numbers on the model card, 2026-11-14 and 2026-11-15.
Files
| File | Bytes | sha256 |
|---|---|---|
oc_e_non_v1_mixed_int4b32_fp16act_ekv4096.litertlm |
3,051,929,936 | 0dac09e4d6d298216444caf4a0ad0b9a29e71d31953d9568cd0e58de01d7a854 |
oc_e_non_v1_int8_ekv4096.litertlm |
4,060,193,936 | 9cba203de52dc34d772660c95b7629536c44916604d84fa45dee43e1cf514b4a |
The conversion first wrote the Mixed INT4 file with fp32 GPU activations declared (sha256 1a403a97e57f816cae457b5744cd01d9048c97bb39552617eb19fe8fa6928b84, the same size). The file in this repository is that file with the declaration changed to fp16 in the file header: every section (weights, metadata, tokenizer) is byte-identical. Rows marked "fp32-declared copy" ran that first file.
Mac checks
Apple M4 Max (128 GB, macOS 27.0), litert-lm 0.19.2 from PyPI through its Python API: an engine with max_num_tokens=4096 and no cache directory, a new conversation per question, greedy decoding (top-k 1). A run that stopped partway went on in a new process from its first unanswered question. CPU = XNNPACK, GPU = WebGPU.
The reference is the original model in Transformers 5.22.1 (the bf16 weights computed in float32 on the Mac CPU), with the checkpoint's chat template, greedy decoding, stopping at token 151645 or 151643.
| File | Backend | 12 questions: same verdict as the reference | 3-turn recall | GSM8K, first 100 (b / c) |
|---|---|---|---|---|
| Original model | Transformers | (12 / 12 right) | pass | 83 |
| Mixed INT4 | GPU | 11 / 12 | pass | 75 (14 / 6) and 83 (8 / 8) |
| Mixed INT4 | CPU | 11 / 12 | pass | — |
| Mixed INT4, fp32-declared copy | GPU | 11 / 12 | pass | 83 (6 / 6) |
| Mixed INT4, fp32-declared copy | GPU, fp16 activations set in the engine | 11 / 12 | pass | 83 (8 / 8) |
| Mixed INT4, fp32-declared copy | CPU | 11 / 12 | pass | — |
| int8 | GPU | 12 / 12 | pass | 84 (4 / 5) |
| int8 | CPU | 12 / 12 | pass | — |
- 12 questions. Each is sent as the question followed by " Answer briefly." in one user turn, with up to 1,024 new tokens, and judged by a regular expression: 1 What is 17 + 25? (42) · 2 What is the capital of Japan? (Tokyo) · 3 What is the opposite of "hot"? (cold) · 4 How many days are in a week? (7) · 5 How do you say "thank you" in French? (merci) · 6 What is 8 times 7? (56) · 7 Which is larger: 0.9 or 0.11? (0.9) · 8 Complete the rhyme: "Roses are red, violets are ___" (blue) · 9 a farmer's three fields of potatoes sold at 2 dollars per kg (1100) · 10 Write a Python function fib(n) that returns the n-th Fibonacci number, with fib(0) = 0 and fib(1) = 1. Show the function, then give the value of fib(10). (a
def fib(nline and 55) · 11 the eight planets in order from the Sun · 12 Translate this Japanese sentence into English: 私は毎朝コーヒーを飲みます。 (coffee, morning). - The Mixed INT4 miss is question 10 on both backends: the file writes a correct function and then gives the value of fib(10) as 10. The reference and the int8 file write the function and then 55.
- 3-turn recall. Turn 1: "My name is Kaito and my lucky number is 37. Please greet me using my name and my lucky number." Turn 2: "What is the capital of Australia? Answer briefly." Turn 3: "What is my lucky number? Answer briefly." Pass = turn 3 says 37 and no turn reaches the token cap. In every row turn 2 answered "Canberra" and turn 3 "37"; turn 1 answered "Kaito, 37", except the int8 file on the CPU ("Hello, Kaito. 37.").
- GSM8K. The first 100 questions of the test split with a chain-of-thought prompt, up to 512 new tokens, on the GPU only. b = right in the reference and wrong in the file, c = the reverse; a file passes when b − c ≤ 2√(b + c).
- Two GSM8K runs of the Mixed INT4 file. Two new processes of the same file, 1.5 hours apart, gave 75 (b 14 / c 6) and 83 (b 8 / c 8), and 39 of the 100 replies were the same text; both pass. The second run and the run with fp16 activations set in the engine on the fp32-declared copy gave the same text in 94 of the 100 replies. Both processes printed
Sampler will handle decode input tensors.: the GPU sampler writes the next decode step's input (sampler_handles_input), the default path on which LiteRT-LM's Mac GPU replies to long prompts have differed from run to run with other models as well. Each other GSM8K number in the table is one run.
Phones
litert_lm_advanced_main built for Android from LiteRT-LM v0.19.0 (commit 771b06e1, 2026-10-28). Every run is a new process.
The 8 questions
The first 8 of the 12 questions above, each in its own process: --max_num_tokens=1024 --max_output_tokens=256, no sampler flags.
| Phone | File | Backend | Right |
|---|---|---|---|
| Pixel 11 Pro (Android 17) | Mixed INT4 | GPU | 8 / 8 |
| Pixel 11 Pro | Mixed INT4 | CPU | 8 / 8 |
| Pixel 11 Pro | int8 | GPU | 8 / 8 |
| Pixel 11 Pro | int8 | CPU | 8 / 8 |
| Pixel 11 Pro | Mixed INT4, fp32-declared copy | GPU | 8 / 8 |
| Pixel 11 Pro | Mixed INT4, fp32-declared copy | CPU | 8 / 8 |
| Galaxy S26 (Android 16) | Mixed INT4 | GPU | 8 / 8 |
The Galaxy S26's answers, in order: 42 · Tokyo · cold · 7 days · "Merci" · 56 · 0.9 · Violets are blue.
Galaxy S26 timing
Samsung Galaxy S26 (SM-S942Q), --benchmark --benchmark_prefill_tokens=1024 --benchmark_decode_tokens=256 --num_iterations=3 --max_num_tokens=2048. A run's value is the mean of its iterations 2 and 3, and the card shows the mean of the runs of each file and backend. Each run started after the phone had rested 244–307 s since the previous process; its Android thermal status at the start is given. Peak = the process's VmHWM. GPU memory = how far the phone's GPU allocation counter (kgsl_page_alloc) rose during the run, memory that VmHWM does not count.
| File | Backend | Run | Thermal status at start | Prefill, iterations 1 / 2 / 3 (tok/s) | Decode, iterations 1 / 2 / 3 (tok/s) | Value: prefill / decode | Time to first token | Peak | GPU memory |
|---|---|---|---|---|---|---|---|---|---|
| Mixed INT4 | GPU | 1 | 1 | 273.41 / 250.23 / 197.15 | 18.32 / 18.13 / 17.80 | 223.69 / 17.96 | 4.70 s | 1.73 GB | 4.86 GB |
| Mixed INT4 | GPU | 2 | 1 | 261.68 / 234.38 / 206.69 | 18.38 / 18.33 / 18.16 | 220.53 / 18.24 | 4.715 s | 1.73 GB | 4.86 GB |
| int8 | GPU | 1 | 1 | 163.06 / 127.65 / 113.27 | 12.80 / 12.82 / 12.63 | 120.46 / 12.73 | 8.61 s | 1.14 GB | 5.91 GB |
| int8 | GPU | 2 | 1 | 162.56 / 130.87 / 106.22 | 13.00 / 12.93 / 12.70 | 118.55 / 12.81 | 8.81 s | 1.13 GB | 5.97 GB |
| Mixed INT4, fp32-declared copy | GPU | 1 | 0 | 52.16 / 47.61 / 41.59 | 14.48 / 14.57 / 14.41 | 44.60 / 14.49 | 23.135 s | 2.23 GB | 6.12 GB |
| Mixed INT4, fp32-declared copy | GPU | 2 | 0 | 81.98 / 74.29 / 65.06 | 14.92 / 14.97 / 14.77 | 69.68 / 14.87 | 14.83 s | 2.23 GB | 6.12 GB |
| Mixed INT4, fp32-declared copy | CPU | 1 | 1 | 38.10 / 30.21 / 36.09 | 9.60 / 9.43 / 9.46 | 33.15 / 9.45 | 31.24 s | 5.23 GB | — |
| int8 | CPU | 1 | 1 | 112.07 / 75.98 / 86.78 | 8.10 / 7.64 / 7.30 | 81.38 / 7.47 | 12.775 s | 6.82 GB | — |
| int8 | CPU | 2 | 1 | 117.84 / 68.62 / 86.56 | 8.10 / 7.60 / 7.25 | 77.59 / 7.42 | 13.515 s | 7.16 GB | — |
| Mixed INT4 | CPU | 1 | 1 | 39.88 / 36.04 / 36.09 | 9.68 / 9.35 / 8.90 | 36.06 / 9.12 | 28.505 s | 6.23 GB | — |
Within each GPU process, prefill drops from iteration 1 to iteration 3, while decode moves by 1–3 %. Within the CPU processes of the two files in this repository, decode drops 8–11 % from iteration 1 to iteration 3. The runtime printed number_of_threads: 4 for every CPU run.
Context length
The files hold 4,096 tokens of context; the runtime sizes the KV cache from --max_num_tokens (its log: magic number 4099 to target number 2048 or 4096). Four more runs of the Mixed INT4 file on the Galaxy S26 GPU, with the command above and only --max_num_tokens changed, in the order 2048, 4096, 4096, 2048, each after the phone had rested 274–306 s, 2026-11-15:
--max_num_tokens |
Run | Thermal status at start | Prefill, iterations 1 / 2 / 3 (tok/s) | Decode, iterations 1 / 2 / 3 (tok/s) | Value: prefill / decode | Time to first token | Peak | GPU memory |
|---|---|---|---|---|---|---|---|---|
| 2048 | 1 | 1 | 272.94 / 239.45 / 210.20 | 18.67 / 18.69 / 18.30 | 224.82 / 18.50 | 4.63 s | 1.75 GB | 4.94 GB |
| 4096 | 1 | 0 | 271.52 / 240.57 / 204.84 | 18.20 / 17.99 / 17.82 | 222.70 / 17.91 | 4.685 s | 1.72 GB | 5.60 GB |
| 4096 | 2 | 0 | 266.73 / 232.86 / 201.22 | 18.44 / 18.37 / 18.14 | 217.04 / 18.26 | 4.795 s | 1.73 GB | 5.60 GB |
| 2048 | 2 | 1 | 273.11 / 240.19 / 201.44 | 18.81 / 18.81 / 18.40 | 220.81 / 18.60 | 4.73 s | 1.72 GB | 4.94 GB |
At 4096 the file decoded 2.5 % slower than at 2048 in these runs (mean 18.09 against 18.55 tokens/s) and its GPU memory rose 0.67 GB more.