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 README.md from mlboydaisuke/Oc-e-Non-v1-LiteRT: direct link, hf CLI and curl.
- Browser
- Download file 5.85 kB
-
https://huggingface.co/mlboydaisuke/Oc-e-Non-v1-LiteRT/resolve/main/README.md
- Command line
-
hf download hf://mlboydaisuke/Oc-e-Non-v1-LiteRT/README.md
-
curl -L -o README.md https://huggingface.co/mlboydaisuke/Oc-e-Non-v1-LiteRT/resolve/main/README.md
5.85 kB
| language: | |
| - en | |
| license: apache-2.0 | |
| license_link: https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507/blob/main/LICENSE | |
| pipeline_tag: text-generation | |
| base_model: p-e-w/Oc-e-Non-v1 | |
| base_model_relation: quantized | |
| library_name: litert-lm | |
| tags: | |
| - litert-lm | |
| - litertlm | |
| - qwen3 | |
| - terse | |
| # Oc-e-Non-v1 LiteRT-LM | |
| This repository is a conversion of [p-e-w/Oc-e-Non-v1](https://huggingface.co/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). | |
| ```bash | |
| 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](https://huggingface.co/p-e-w/Oc-e-Non-v1) is [Qwen/Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507) made to answer in fewer words with [Heretic](https://heretic-project.org); 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](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](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](https://github.com/john-rocky/hf-to-litertlm/blob/main/REPRODUCE.md#oc-e-non-v1--a-qwen3-4b-instruct-2507-derivative-as-int8-and-mixed-int4-files-from-one-export-with-the-released-litert-torch-0100-gpu-composites-for-litert-lm-019-2026-11-15). | |
| ## License | |
| Apache License 2.0, the license of [p-e-w/Oc-e-Non-v1](https://huggingface.co/p-e-w/Oc-e-Non-v1) and [Qwen/Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507/blob/main/LICENSE). | |