Skip to content
プロジェクト

概要

Custom converter: open-weight Hugging Face LLMs/VLMs -> on-device LiteRT-LM (.litertlm), with one-command reproduction

AI・機械学習

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
+2

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

hf-to-litertlm

Convert open-weight Hugging Face LLMs and VLMs into .litertlm files for Google's LiteRT-LM runtime (Android, iOS, macOS, Windows, Linux). There are 118 published conversions below, most with speeds measured on a phone and a Mac.

Scatter plot of decode speed against model size for the published conversions measured on a phone, colored by CPU, GPU or NPU. Speed falls as models get larger.

If you want an open model in an Android or iPhone app, look for it in the list of converted models first. If it isn't there, ask for it with the model's Hugging Face link. I reply on the issue with the converted file, the recipe and the measured numbers, or the reason it couldn't be converted. Two SDKs already load these files by repo name: react-native-litert-lm and flutter_edge_ai.

Try a published model

On a Mac, before it goes on a phone (needs uv):

uvx [email protected] run \
  --from-huggingface-repo=litert-community/LFM2.5-1.2B-Instruct \
  LFM2.5-1.2B-Instruct_int4_gpu.litertlm \
  --prompt="What is 17 + 25? Answer briefly."

To use a published conversion in an Android app, add hfmodels-android with one Gradle dependency and a few lines of Kotlin (code). In an iPhone app, it loads through swift-litert-lm (code).

Convert a finetune

uvx hf-to-litertlm <org>/<model>

That runs convert.py from PyPI and writes the .litertlm file under ./out. The hybrid families (granite-4.0-h, Falcon-H1, Zamba2 and Nemotron-H) need a clone, and the package tells you when:

git clone https://github.com/john-rocky/hf-to-litertlm
cd hf-to-litertlm
uv sync
uv run python scripts/convert.py <org>/<model>
uv run python scripts/verify_lock.py out/<model>/<model>.lock.json
uv run litert-lm run out/<model>/*.litertlm --prompt "Hello"

verify_lock.py rebuilds the .litertlm file from its lock file and prints MATCH when the bytes are the same.

convert.py handles finetunes of Qwen3.5, LFM2.5, MiniCPM5, granite-4.0-h, Falcon-H1 and Nemotron-H, and every dense architecture the stock exporter handles. LoRA and PEFT repos merge automatically. It refuses gated, remote-code and pre-quantized repos and says why. It then asks the converted model 8 test questions and reports a failure if fewer than 6 are right. All the flags and steps are in the docs.

A Gemma 4 E2B finetune saved in a local folder (merged weights or a LoRA adapter) converts on Linux x86-64: uvx hf-to-litertlm <folder> (details). It needs at least 22 GiB of available memory, and a container with a 24 GiB limit worked.

LiteRT CLI also takes a repo id: after pip install -U litert-cli-nightly, litert lm run <org>/<model> converts the checkpoint once with the stock exporter, caches the .litertlm file and runs it.

Converted models

The list runs from LFM2.5-230M to Qwen3.5-122B-A10B: chat, reasoning, vision, OCR, speech to text and translation. Each speed is tokens per second on the fastest backend verified on that class of device, taken from the repo's litertlm_manifest.json. A range is the spread across runs, and a dash means not measured yet.

Show all the conversions
Model Params Task Phone: decode tok/s Mac: decode tok/s Recipe
LFM2.5-230M 0.23B chat iPhone 17 Pro GPU 161.7 M4 Max GPU 561.2 recipe
gemma-3-270m-it-NPU 0.268B chat, Qualcomm NPU only (compiled on the device) Galaxy S26 NPU 190.8–192.9 — recipe
MNN-Pocket-0.3B 0.303B chat (en, zh), tool calls as JSON text Galaxy S26 NPU 157.4–158.0 M4 Max GPU 490.9 recipe
granite-4.0-h-350m 0.35B chat Galaxy S26 CPU 97.6 — recipe
LFM2.5-350M 0.35B chat Galaxy S26 GPU 106.9 M4 Max GPU 425.9 recipe
Falcon-H1-0.5B-Instruct 0.5B chat Galaxy S26 CPU 32.1–40.5 M4 Max GPU 127.5 recipe
sarashina2.2-0.5b-instruct-v0.1 0.5B chat, Japanese Galaxy S26 GPU 36.2–36.5 M4 Max GPU 197.8 recipe
LFM2-700M 0.74B chat Galaxy S26 GPU 73.3 M4 Max GPU 348.3 recipe
granite-4.0-h-1b 1B chat Galaxy S26 GPU 25.0 M4 Max GPU 134.7 recipe
OLMo-2-1B-Instruct 1B chat Galaxy S26 GPU 48.8 M4 Max GPU 150.1 card
sarashina2.2-1b-instruct-v0.1 1B chat, Japanese Galaxy S26 GPU 50.5 M4 Max GPU 159.4 recipe
LFM2.5-1.2B-Instruct 1.2B chat Galaxy S26 GPU 54.5 M4 Max GPU 318.3 recipe
LFM2.5-1.2B-JP 1.2B chat, Japanese iPhone 17 Pro GPU 70.0 M4 Max GPU 316.0 recipe
Zamba2-1.2B-instruct 1.2B chat Galaxy S26 GPU 11.6 M4 Max GPU 74.0 recipe
granite-3.0-1b-a400m-instruct 1.33B chat, tool calling Galaxy S26 GPU 27.1–27.4 M4 Max GPU 146.2–146.5 recipe
Falcon-H1-1.5B-Deep-Instruct 1.5B chat Galaxy S26 CPU 11.3–12.0 M4 Max GPU 51.7 recipe
Falcon-H1-1.5B-Instruct 1.5B chat Galaxy S26 GPU 20.8 M4 Max GPU 102.9 recipe
Qwen2.5-Coder-1.5B-Instruct 1.54B code Galaxy S26 GPU 44.3 M4 Max GPU 137.8 recipe
LFM3-1.7B 1.73B local agents, tool calls (XML), optional thinking Galaxy S26 CPU 35.5 — recipe
LFM3-1.7B-Base 1.73B text continuation and few-shot prompts (the pre-trained base of LFM3-1.7B) Galaxy S26 CPU 35.1 — recipe
LFM2-2.6B 2.57B chat Galaxy S26 GPU 27.8 M4 Max GPU 163.8 recipe
LFM2-2.6B-Exp 2.57B chat Galaxy S26 GPU 27.6 M4 Max GPU 161.8 recipe
G9v3-3B 2.99B chat Galaxy S26 GPU 18.5 M4 Max GPU 84.2 recipe
Falcon-H1-3B-Instruct 3B chat Galaxy S26 GPU 11.6 M4 Max GPU 65.3 recipe
Ministral-3-3B-Instruct-2512 3B chat iPhone 18 Pro GPU 44.0 M4 Max GPU 129.5 card
granite-4.0-micro 3.4B chat Galaxy S26 GPU 20.8 M4 Max GPU 111.3 recipe
granite-4.1-3b 3.4B chat, tool calling Galaxy S26 GPU 16.1 M4 Max GPU 86.3 recipe
Agents-A1-4B 4B agentic research, tool calls Galaxy S26 CPU 11.9 M4 Max GPU 67.2 recipe
FastContext-1.0-4B-SFT 4B chat Galaxy S26 GPU 20.5 M4 Max GPU 73.8 card
Oc-e-Non-v1 4B chat, short answers Galaxy S26 GPU 18.0–18.2 — recipe
Qwen3.5-4B 4B chat iPhone 17 Pro GPU 11.4 M4 Max GPU 68.5 recipe
Qwen3.5-4B-3D-Coder 4B coding, Three.js 3D scenes iPhone 18 Pro GPU 10.5 M4 Max GPU 48.6 recipe
granite-4.1-8b 8.38B chat Galaxy S26 GPU 5.4 M4 Max GPU 58.3 recipe
Ministral-3-8B-Instruct-2512 8.49B chat Galaxy S26 GPU 5.7 M4 Max GPU 61.7 recipe
Ornith-1.0-9B 8.95B agentic coding — M4 Max GPU 44.9 recipe
Ornith-1.5-9B 8.95B agentic coding — M4 Max GPU 45.6 recipe
Qwen3.5-9B 8.95B chat — M4 Max GPU 46.1 recipe
Qwen3.8-27B 26.9B chat — M4 Max GPU 18.2 recipe
Qwen3-30B-A3B 30.5B chat, thinking (LiteRT-LM built from source) — M4 Max GPU 101.5 recipe
Qwen3-Coder-30B-A3B-Instruct 30.5B code, tool calls (LiteRT-LM built from source) — M4 Max GPU 101.6 recipe
Nemotron-3-Nano-30B-A3B 31.6B chat, thinking — M4 Max GPU 75.2 recipe
Qwen3-32B 32.8B chat, thinking — M4 Max GPU 13.2 recipe
Qwen3.5-35B-A3B 35B chat, thinking (LiteRT-LM built from source) — M4 Max GPU 69.3 recipe
Qwen3.6-35B-A3B 35B chat, thinking (LiteRT-LM built from source) — M4 Max GPU 77.0 recipe
Kimi-Linear-48B-A3B-Instruct 49.1B chat (LiteRT-LM built from source) — M4 Max GPU 61.0 recipe
gpt-oss-120b 117B chat, reasoning — M4 Max GPU 66.7 recipe
Qwen3.5-122B-A10B 122B chat, thinking (LiteRT-LM built from source) — M4 Max GPU 26.8 recipe
Falcon-H1-Tiny-R-0.6B 0.62B reasoning iPhone 17 Pro CPU 29.4 M4 Max GPU 97.8 recipe
LFM2.5-1.2B-Thinking 1.2B reasoning iPhone 17 Pro GPU 69.7 M4 Max GPU 317.9 recipe
Spark-X2.5-1.7B 1.71B reasoning Galaxy S26 GPU 38.2 M4 Max GPU 103.6 recipe
Spark-X2.6-1.7B 1.71B reasoning iPhone 18 Pro GPU 51.5 M4 Max GPU 151.5 recipe
MiniCPM5-2B 2.52B chat, hybrid thinking Galaxy S26 GPU 16.1–18.6 M4 Max GPU 92.8 card
LFM2.5-2.6B 2.6B reasoning Galaxy S26 GPU 20.9 M4 Max GPU 161.6 recipe
Ministral-3-3B-Reasoning-2512 3B reasoning Galaxy S26 GPU 22.3 M4 Max GPU 95.8 card
Nanbeige4.1-3B 3B reasoning Galaxy S26 GPU 21.9 M4 Max GPU 90.1 card
Nanbeige4.2-3B 3B reasoning Galaxy S26 CPU 4.1 M4 Max GPU 39.7 card
SmolLM3-3B 3B chat, optional thinking iPhone 18 Pro GPU 43.9 M4 Max GPU 131.8 card
VibeThinker-3B 3B math reasoning Galaxy S26 GPU 24.2–25.3 M4 Max GPU 125.6 card
Mordant-3B-Think 3.4B image-prompt writing, thinking Galaxy S26 GPU 9.6–10.1 M4 Max GPU 71.9 recipe
granite-4.2-3b 3.66B reasoning Galaxy S26 GPU 12.3–15.6 M4 Max GPU 85.5 card
Phi-4-mini-reasoning 3.8B math reasoning Galaxy S26 GPU 12.8–19.1 M4 Max GPU 114.9 card
Nemotron-3-Nano-4B 3.97B reasoning Galaxy S26 CPU 11.9–12.9 M4 Max GPU 83.3 recipe
NVIDIA-Nemotron-Labs-Dory1.0-4B 3.98B reasoning Galaxy S26 GPU 17.3 M4 Max GPU 88.2 recipe
Jan-nano 4B tool-use agent (MCP) Galaxy S26 GPU 20.4 M4 Max GPU 69.0 card
Polaris-4B-Preview 4B reasoning Galaxy S26 GPU 20.3 M4 Max GPU 69.1 card
Qwen3-4B-Thinking-2507 4B reasoning Galaxy S26 GPU 15.3 M4 Max GPU 92.1 card
Spark-X2.5-4B 4.11B reasoning Galaxy S26 CPU 5.5–5.6 M4 Max GPU 53.6 recipe
Spark-X2.6-4B 4.11B reasoning Galaxy S26 CPU 5.3 M4 Max GPU 91.2 recipe
DeepSeek-R1-Distill-Qwen-7B 7B reasoning Galaxy S26 GPU 8.5–10.3 M4 Max GPU 79.1 card
Olmo-3-7B-Think 7.3B reasoning Galaxy S26 GPU 7.0 M4 Max GPU 46.6 recipe
Falcon-H1R-7B 7.59B reasoning — M4 Max GPU 39.7 recipe
NVIDIA-Nemotron-3.5-Bolt-E4B 8B chat, optional thinking Galaxy S26 GPU 15.2 M4 Max GPU 89.2 recipe
NVIDIA-Nemotron-Nano-9B-v2 8.89B reasoning — M4 Max GPU 45.5 recipe
granite-docling-258M 0.26B document to DocTags Galaxy S26 CPU 28.6–33.5 M4 Max CPU 64.0 card
LFM2.5-VL-450M 0.45B chat + image Galaxy S26 GPU 103.1 M4 Max GPU 360.0 recipe
LLaVA-OneVision-0.5B 0.5B chat + image Galaxy S26 GPU 83.9 M4 Max GPU 239.3 card
SmolVLM2-500M 0.5B chat + image Galaxy S26 GPU 79.8 M4 Max CPU 63.9 card
Qwen3.5-0.8B 0.8B chat; separate image file iPhone 17 Pro GPU 65.8 M4 Max GPU 161.8 recipe
OvisOCR2 0.85B document OCR iPhone 17 Pro GPU 48.5 M4 Max GPU 140.9 recipe
Xiaomi-OCR-0 0.873B OCR: pages, text, tables, formulas, fields iPhone 18 Pro GPU 71.8 M4 Max CPU 41.2 recipe
PaddleOCR-VL-1.6 0.9B OCR, 109 languages Galaxy S26 GPU 65.8 M4 Max GPU 208.3 card
InternVL3-1B 1B chat + image Galaxy S26 GPU 111.9 M4 Max CPU 94.0 card
InternVL3_5-1B 1B chat + image Galaxy S26 GPU 77.0 M4 Max GPU 176.2 card
MiniCPM-OCR-1.0 1.3B OCR: text, tables, formulas, fields Galaxy S26 CPU 43.5–45.1 M4 Max GPU 139.3 recipe
MiniCPM-V-4.7-1B 1.55B chat + image iPhone 18 Pro GPU 73.7 M4 Max GPU 158.4 recipe
LFM2.5-VL-1.6B 1.6B chat + image Galaxy S26 GPU 54.2 M4 Max GPU 275.3 recipe
LFM3-VL-2B 1.92B questions about an image (en), optional thinking Galaxy S26 GPU 37.9 M4 Max GPU 179.0 recipe
InternVL3-2B 2B chat + image Galaxy S26 GPU 46.9 M4 Max CPU 50.0 card
InternVL3_5-2B 2B chat + image Galaxy S26 GPU 40.2 M4 Max GPU 137.2 card
Ovis2.5-2B 2B chat + image Galaxy S26 GPU 39.8 M4 Max GPU 142.6 card
Qwen2-VL-2B 2B chat + image Galaxy S26 GPU 46.3 M4 Max GPU 139.1 card
SmolVLM2-2.2B 2.2B chat + image Galaxy S26 GPU 36.1 M4 Max GPU 134.7 card
Qwen3.5-2B 2.27B chat; separate image file iPhone 17 Pro GPU 33.9 M4 Max GPU 114.3 recipe
WeVisOne-VL-2B 2.44B boxes, points, counts and OCR on an image Galaxy S26 GPU 22.5 M4 Max GPU 117.0 recipe
North-Micro-Vision-Instruct 2.48B chat + image, 11 languages Galaxy S26 GPU 23.3 M4 Max GPU 80.6 card
LFM2.5-VL-3B 3B chat + image Galaxy S26 GPU 27.0 M4 Max GPU 143.2 recipe
Unlimited-OCR 3.34B OCR: pages, text, tables, formulas Galaxy S26 CPU 20.2–20.5 Mac GPU 107.4–109.1 recipe
Unlimited-OCR-2 3.34B OCR: pages, text, tables, formulas iPhone 18 Pro CPU 30.5–31.7 M4 Max GPU 97.7–99.0 recipe
InternVL3_5-4B 4B chat + image Galaxy S26 GPU 18.7 M4 Max GPU 86.5 card
Mage-VL 4.7B chat + image Galaxy S26 GPU 17.1 M4 Max GPU 80.0 card
Mage-VL-Cowork 4.74B GUI agent step: screenshot + instruction -> next action iPhone 18 Pro GPU 35.2–35.3 M4 Max GPU 94.3–94.8 recipe
WeVisOne-VL-4B 4.83B boxes, points, counts and OCR on an image Galaxy S26 GPU 15.1–15.3 M4 Max GPU 89.0–89.2 recipe
Muse-Glimmer-30B 29.8B chat + image (one picture at 448 × 448) — M4 Max GPU 18.3 recipe
Qwen2.5-VL-72B-Instruct 73.4B chat + image (one picture at 448 × 448) — M4 Max GPU 8.6 recipe
Tashkeel-350M-v2 0.34B Arabic diacritization Galaxy S26 CPU 67.2–69.0 M4 Max CPU 97.2 recipe
S1-mini 0.6B ASR transcript normalization iPhone 17 Pro GPU 32.0 M4 Max GPU 144.6 card
decider-0.8b 0.752B typed decisions with calibrated probabilities (System One) Galaxy S26 CPU 36.9 M4 Max CPU 42.5 recipe
Fun-ASR-Nano-2512 0.83B speech to text (zh / en / ja) Galaxy S26 CPU 31.6 M4 Max GPU 143.0 card
LFM3-Audio-2B 2B speech to text, questions about audio (en); speech output through LiteRT graphs Galaxy S26 GPU 40.6 M4 Max GPU 167.9 recipe
Confucius4-R2T2 2.04B streaming speech to text (zh / en / ja) — — card
Hy-MT2-1.8B 2.04B translation, 33 languages Galaxy S26 GPU 26.3–27.5 M4 Max GPU 150.7 recipe
Qwen3-ASR-1.7B 2.04B speech to text (scored on zh / en / ja) Galaxy S26 CPU 25.3 — card
LFM3-Omni-2B 2.17B questions about a picture or a recording (en); speech output through LiteRT graphs Galaxy S26 GPU 27.0 M4 Max GPU 84.3–139.0 recipe
VibeVoice-ASR-BitNet 2.2B speech to text Galaxy S26 GPU 36.1 M4 Max GPU 138.6 card
decider-2b-vision 2.21B decisions from an image with calibrated option probabilities (System One) Galaxy S26 GPU 8.6 — recipe
granite-speech-5.0-2b 2.31B speech to text and speech translation (en, fr, de, es, pt, ja) Galaxy S26 CPU 15.3 M4 Max GPU 109.9 recipe
VibeVoice-ASR-Streaming-1.5B 2.8B streaming speech to text Galaxy S26 CPU 46.5 M4 Max GPU 139.6 card
Shieldstral-1.0-3B 3B safety classifier, text + image Galaxy S26 GPU 10.8 — recipe

Conversions without a manifest and the non-chat ones (encoders, embeddings, text to speech, image generation) are in REPRODUCE.md.

Speech recognition models

The same command converts transformers' ParakeetForTDT checkpoints: nvidia/parakeet-tdt-0.6b-v3 and finetunes saved with transformers. MediaPipe's AudioTranscriber runs the file (example).

Reproduce a published model

bash scripts/reproduce_llm.sh --list
bash scripts/reproduce_llm.sh olmo2-1b        # -> out/olmo2-1b/model.litertlm

Each model's recipe and device measurements are in REPRODUCE.md.

Convert a new architecture

A dense LLM starts from scripts/export_simple_template.py, a single-image VLM from the closest scripts/ship_*.sh, and a hybrid SSM and attention family from the recipes in granite_work/, falcon_h1_work/, zamba2_work/ and nemotron_h_work/. The details are in the docs.

Setup

uv sync installs the exact package versions in uv.lock. A pip install works too, and some families need another toolchain.

Deployment manifests

Every repo in the list ships a litertlm_manifest.json, so an app can read which file fits a device, with its backend, RAM budget and measured speed. The format is in manifest/SCHEMA.md, and readers/ has TypeScript and Dart code that reads it. The same file can build a Google Play on-device AI pack.

Used in other projects

I wrote the two manifest resolvers and sent them as pull requests (#25, #469), and both projects ship them now.

License

Code: Apache-2.0. Converted model files inherit their base model's license.

This is an independent open-source project, not affiliated with or endorsed by Google. LiteRT and LiteRT-LM are Google projects, and .litertlm is their runtime's model file format.

関連プロジェクトを探す

読み込み中…