Oc-e-Non-v1 LiteRT-LM

This repository is a conversion of p-e-w/Oc-e-Non-v1 to LiteRT-LM, made with litert-torch 0.10.0 and ai-edge-quantizer 0.10.1 for LiteRT-LM 0.19: on a Galaxy S26 GPU the Mixed INT4 file decodes 18.1 tokens/s and prefills 1,024 tokens at 222 tokens/s (LiteRT-LM v0.19.0, 2026-11-15).

pip install litert-lm
litert-lm run --from-huggingface-repo mlboydaisuke/Oc-e-Non-v1-LiteRT oc_e_non_v1_mixed_int4b32_fp16act_ekv4096.litertlm --backend gpu --prompt "What is the capital of Japan?"

Use LiteRT-LM 0.19.0 or newer: the files were checked on 0.19.0 (Android) and 0.19.2 (Mac), and earlier releases were not tried. They were not tried on phones with 8 GB of memory.

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 (tested on 0.19.2 and litert-lm-nightly 0.20.0.dev20261112; 0.14.0 to 0.19.1 have the same download code) can keep an incomplete download in ~/.litert-lm/cache/huggingface/mlboydaisuke/Oc-e-Non-v1-LiteRT/ and uses it again on later runs without checking its size. Delete that file and run the command again.

p-e-w/Oc-e-Non-v1 is Qwen/Qwen3-4B-Instruct-2507 made to answer in fewer words with Heretic; its card reports about half the mean response length. It has no thinking mode.

Files

File Weights GPU activations Size Use
oc_e_non_v1_mixed_int4b32_fp16act_ekv4096.litertlm int4 (blocks of 32) for the linear layers; int8 token table and output layer fp16 3.05 GB The faster file: on a Galaxy S26 GPU it decodes 1.4 times as fast as the int8 file
oc_e_non_v1_int8_ekv4096.litertlm int8 per channel for every linear layer and the token table fp32 4.06 GB Answers closer to the original model: the same verdict on 12 of 12 Mac questions, against 11 of 12

Both files hold 4,096 tokens of context: the prompt, the reply and earlier turns together.

Accuracy

Greedy decoding against the original model in Transformers (float32, Mac CPU), LiteRT-LM 0.19.2 on an Apple M4 Max:

File Backend 12 questions: same verdict 3-turn recall GSM8K, first 100
Original model (Transformers) β€” β€” pass 83
Mixed INT4 GPU 11 / 12 pass 75 and 83
Mixed INT4 CPU 11 / 12 pass β€”
int8 GPU 12 / 12 pass 84
int8 CPU 12 / 12 pass β€”

The Mixed INT4 file differs from the original model on question 10 on both backends: it writes a correct Python function and then gives fib(10) as 10, where the original model gives 55. Two processes of the Mixed INT4 file on the Mac GPU gave 75 and 83 on GSM8K, with the same text in 39 of the 100 replies: on LiteRT-LM's default Mac GPU path, where the GPU sampler writes the next decode step's input (sampler_handles_input), greedy replies to long prompts have also differed from run to run with other models. The other GSM8K numbers are one run each. On phones (litert_lm_advanced_main built from LiteRT-LM v0.19.0), the first 8 of the 12 questions: 8 / 8 for each file on a Pixel 11 Pro GPU and CPU, and 8 / 8 for the Mixed INT4 file on a Galaxy S26 GPU. The questions, prompts and every run: MEASUREMENTS.md.

Performance

Galaxy S26, 1,024 prefill tokens and 256 decode tokens:

File Backend Prefill (tok/s) Decode (tok/s) Time to first token Peak (VmHWM)
Mixed INT4 GPU 222.1 18.1 4.7 s 1.73 GB
int8 GPU 119.5 12.8 8.7 s 1.14 GB
Mixed INT4 CPU 36.1 9.1 28.5 s 6.23 GB
int8 CPU 79.5 7.4 13.1 s 7.16 GB

Samsung Galaxy S26 (SM-S942Q, Android 16), litert_lm_advanced_main built from LiteRT-LM v0.19.0 (771b06e1), --benchmark --benchmark_prefill_tokens=1024 --benchmark_decode_tokens=256 --num_iterations=3 --max_num_tokens=2048; each value is the mean of iterations 2 and 3, averaged over 2 runs (1 run for the Mixed INT4 file on the CPU), each a new process, 2026-11-15. The CPU runs used 4 threads. VmHWM does not count the memory the GPU driver holds. At --max_num_tokens=4096, the files' own context, two more runs of the Mixed INT4 file on the GPU decoded 17.91 and 18.26 tokens/s. Every run: MEASUREMENTS.md.

Conversion

  • From the bf16 checkpoint at revision dbf4e269 with litert-torch 0.10.0's export_hf and its GPU composites; int8 per-channel and int4 blockwise-32 weights from ai-edge-quantizer 0.10.1.
  • Metadata: LiteRT-LM 0.19.1's Qwen3 configuration with three changes: the checkpoint's sampler (top-k 20, top-p 0.8, temperature 0.7), <|endoftext|> as a second stop token, and no thought channel. Tokenizer: the checkpoint's tokenizer.json, byte for byte.
  • One command rebuilds both files from the checkpoint: the recipe.

License

Apache License 2.0, the license of p-e-w/Oc-e-Non-v1 and Qwen/Qwen3-4B-Instruct-2507.

Downloads last month
62
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for mlboydaisuke/Oc-e-Non-v1-LiteRT

Quantized
(6)
this model