LFM2-700M — LiteRT-LM

Try it in your browser: the LiteRT-LM Web chat demo loads LFM2-700M_int4.litertlm (481 MB download) and runs it with WebGPU.

This repository is a conversion of LiquidAI/LFM2-700M to the LiteRT-LM (.litertlm) format for Google's LiteRT-LM runtime, made with litert-torch. For the GPU on LiteRT-LM 0.20.0, use LFM2-700M_int4_v0200.litertlm: on a Mac M4 Max with litert-lm 0.20.0 from PyPI, this command, run from an empty directory, printed The dates from the given text are May 3 and May 17.

uvx --from litert-lm==0.20.0 litert-lm run --from-huggingface-repo=litert-community/LFM2-700M LFM2-700M_int4_v0200.litertlm --backend gpu --cache no --prompt "Extract the dates from: The meeting moved from May 3 to May 17."

litert-lm 0.20.0 from PyPI needs Python 3.10 or newer. On a Snapdragon Galaxy S26 GPU on 2026-11-12, this file answered 7 of the 8 check questions (Correctness) with a LiteRT-LM main build (LiteRT-LM 1d378fca with LiteRT bf49eb62, 2026-11-07) that has LiteRT #11565, which makes channels-last the only layout of the GPU short_conv_step. LFM2-700M_int4_v0200.litertlm was not run on iOS, or on a phone with LiteRT-LM 0.20.0. Asked one question on the GPU of litert-lm 0.19.2 (PyPI, Mac M4 Max), the two _v0200 files printed garbled text that is not an answer, with no error and exit status 0; for the GPU, use them on LiteRT-LM 0.20.0. On LiteRT-LM 0.19.0 to 0.19.2 use LFM2-700M_int4_gpu_composite_v0190.litertlm on the GPU instead; 0.20.0 refuses that file on the GPU (Known runtime issues).

The int8 and int4 files were tested on litert-lm 0.18.0 on a Mac; their phone rows ran the prebuilt Android binary named below. On litert-lm 0.17.1 the plain run of the int8 file answered as if no question had been asked (the int4 file was not tried on 0.17.1).

Liquid AI suggests LFM2 for agentic tasks, data extraction, RAG, creative writing and multi-turn conversations, not for knowledge-intensive tasks or programming, and recommends fine-tuning it on narrow use cases. LFM2-700M has 742,489,344 parameters in 16 layers (10 convolution + 6 attention); Liquid AI lists English, Arabic, Chinese, French, German, Japanese, Korean and Spanish and states a 32,768-token context (4096 in these files).

Which file to use, by runtime and backend (⭐ = recommended). Both ⭐ GPU files are the int4 recipe on exports with GPU composites; on the Galaxy S26 GPU with LiteRT-LM 0.19.1 on 2026-11-14, the _v0190 one decoded at 86.2 tok/s against 70.1 for LFM2-700M_int4.litertlm (Performance). The _v0190 file ran on a Mac M4 Max GPU with litert-lm 0.19.0, 0.19.1 and 0.19.2 from PyPI (0.19.2 is on PyPI only; on 2026-11-14 the newest GitHub release was v0.19.1) and on a Galaxy S26 GPU with LiteRT-LM 0.19.1; it was not run on iOS or on other phones. Speeds on LiteRT-LM 0.20.0 are still being measured and will be added here.

Runtime Backend File
LiteRT-LM 0.20.0 GPU ⭐ LFM2-700M_int4_v0200.litertlm; LFM2-700M_int8_v0200.litertlm, LFM2-700M_int4.litertlm and LFM2-700M_int8.litertlm also run
LiteRT-LM 0.20.0 CPU any .litertlm file of this repository
LiteRT-LM 0.19.0 to 0.19.2 GPU ⭐ LFM2-700M_int4_gpu_composite_v0190.litertlm
LiteRT-LM 0.19.0 to 0.19.2 CPU LFM2-700M_int4.litertlm or LFM2-700M_int8.litertlm
File Recipe Size sha256
⭐ LFM2-700M_int4_v0200.litertlm For LiteRT-LM 0.20.0 (2026-11-24 entry below): the int4 recipe on an export with GPU composites, ShortConv state channels-last 482.0 MB 3b40427a970bfebbed6f87e795d60bc717485a53671d6597ee3ea0fc231d15cf
LFM2-700M_int8_v0200.litertlm For LiteRT-LM 0.20.0: int8 weights on linears and the embedding (dynamic_wi8_afp32), ShortConv filters float, on the same export 810.1 MB 0223231e1033d41f574b92faf39e34a3e07f09d697759cf9a1c10ed7f458df83
⭐ LFM2-700M_int4_gpu_composite_v0190.litertlm For the GPU on LiteRT-LM 0.19.0 to 0.19.2 (2026-11-14 entry below): the int4 recipe on an export with GPU composites 482.2 MB af873216eca7b7ccabebf7d8ba072ef1e321f4e343afe460527bdafe7ba42b2d
LFM2-700M_int8.litertlm int8 weights on linears, the 10 convolutions and the embedding (litert-torch's default export recipe dynamic_wi8_afp32), float activations 808.3 MB 57e418871e08fc6b2e1408ab56c54a2a18247b03889c99f1af04a6f397d3dfcf
LFM2-700M_int4.litertlm int4 blockwise-32 + OCTAV on linears, int8 lm_head + embedding, convs float 480.9 MB 2366c6c032eafdf6aee60102f2b842a45c082ff61ef4176bcc921d5a48332fa9

The int8 and int4 results in the time table below, in Accuracy, in the first paragraph of Correctness and in the first three tables of Performance (Mac M4 Max, Galaxy S26, Pixel 8a) were measured on earlier versions of the two files. The card's other int8 and int4 tests with litert-lm 0.17.1 or 0.18.0 or the prebuilt Android binary also ran on those earlier files. The current files have the same weights, chat template and tokenizer.

On IFEval-lite (n=120) bf16 passed 77 prompts, the int8 file 75 and 74 (two runs) and the int4 file 67 (table in Accuracy); the int4 file is 40.5 % smaller. Time for a 1024-token prefill plus 256 decoded tokens at context 2048 with LFM2-700M_int8.litertlm (int8) and LFM2-700M_int4.litertlm (int4), from the rates in Performance (the _v0190 file's Galaxy S26 rows are in their own table there):

Seconds Mac M4 Max Galaxy S26 Pixel 8a
int8 GPU 0.97 4.64 8.07
int4 GPU 0.87 3.92 8.07
int8 CPU 3.72 6.76 16.21
int4 CPU 4.18 7.43 ² 15.13

int4 is faster on the Mac and Galaxy S26 GPUs and equal on the Pixel 8a GPU; on the CPUs int8 is faster on the Mac and the Galaxy S26 (the int4 row there is from a run that started on a hot phone, noted below) and int4 on the Pixel 8a. Not measured on iOS.

2026-11-14: added LFM2-700M_int4_gpu_composite_v0190.litertlm (sha256 af873216…, 482,230,272 B) for the GPU on LiteRT-LM 0.19.0 to 0.19.2: on a Galaxy S26 GPU with LiteRT-LM 0.19.1 it decodes at 86.2 tok/s against 70.1 for LFM2-700M_int4.litertlm (Performance). It is the int4 recipe on an export with litert-torch's GPU composites; its LLM metadata (chat template included) and tokenizer sections are byte-identical to those of LFM2-700M_int4.litertlm. Check: the 8 questions (Correctness), one process per question, give 7/8 on the GPU and the CPU of a Mac M4 Max (litert-lm 0.19.1 from PyPI) and on the Galaxy S26 GPU (LiteRT-LM 0.19.1 built from its tag), with the same eight replies as LFM2-700M_int4.litertlm in the same runs. A build with LiteRT #11565 refuses it on the GPU (Known runtime issues). LFM2-700M_int8.litertlm and LFM2-700M_int4.litertlm are unchanged. How it was made: Conversion notes.

2026-11-24: added LFM2-700M_int4_v0200.litertlm and LFM2-700M_int8_v0200.litertlm for LiteRT-LM 0.20.0 (file table and Correctness; how they were made: Conversion notes). The other three files are unchanged.

Correctness

8-question check on the Mac M4 Max (the questions with "Answer briefly." appended, --temperature 0, one litert-lm run process each): int8 7/8 on CPU and GPU, int4 7/8 on CPU and GPU, bf16 (transformers) 7/8; the miss was the rhyme question in every case.

LFM2-700M_int4_gpu_composite_v0190.litertlm (2026-11-14), the same questions, one fresh process each: 7/8 on the Mac GPU and on the Mac CPU (litert-lm 0.19.1 from PyPI, --temperature 0 --seed 0) and on the Galaxy S26 GPU (LiteRT-LM v0.19.1 built from its tag, top-k 1). All three missed the rhyme question (Complete the rhyme: "Roses are red, violets are ___" → "Purple"). LFM2-700M_int4.litertlm gave the same eight replies in the same runs.

The same questions with litert-lm 0.20.0 from PyPI on the same Mac (2026-11-24), greedy, one fresh process each, one run: 7/8 on the GPU and on the CPU for LFM2-700M_int4_v0200.litertlm, LFM2-700M_int8_v0200.litertlm, LFM2-700M_int4.litertlm and LFM2-700M_int8.litertlm, and 7/8 on the CPU for LFM2-700M_int4_gpu_composite_v0190.litertlm (0.20.0 refuses it on the GPU; on the GPU of litert-lm 0.19.2 it gave 7/8 the same day); every run missed only the rhyme question ("Purple" from the int4 files, "Purple." from the int8 files). LFM2-700M_int8_v0200.litertlm was not run on a phone.

All 12 signatures of the int8 and int4 files were fully delegated on the three GPUs measured, and so were the 12 of the 2026-11-14 file on the Galaxy S26 GPU. On both phones, the int8 and int4 files answered "What is the capital of France? Answer in one sentence." on GPU and CPU: "The capital of France is Paris."

Accuracy

IFEval-lite: the first 120 google/IFEval rows with mechanically checkable instructions, prompt-level strict, with a 1400-token budget per prompt (bf16: at most 1400 new tokens). GSM8K: test questions 0–99, prompted for step-by-step reasoning and a final #### <number> line, in two wordings of that prompt, at most 1024 output tokens. Greedy; litert-lm on the Mac CPU, a fresh process per item. Scores are comparable only within this table, not with published IFEval scores or Liquid AI's IFEval 72.23 (a different setup).

Configuration IFEval-lite (n=120) GSM8K, prompt 1 (n=100) GSM8K, prompt 2 (n=100)
bf16 reference (transformers, MPS) 77 59 59
int8, litert-lm 75 and 74 (two runs) 58 62
int4, litert-lm 67 52 57

Prompt 1 ends Solve this step by step. After your reasoning, write the final answer on its own line in the exact form: followed by #### <number> on the next line; prompt 2 ends Think step by step, then write the final answer on its own line as '#### <number>'. The same int8 file run twice on IFEval-lite flipped 5 prompts (3 passed only in the first run, 2 only in the second): greedy replies of this file differed between processes on the CPU path (24 prompts re-run gave byte-identical replies for 4).

Usage

uvx --from litert-lm==0.20.0 litert-lm run --from-huggingface-repo=litert-community/LFM2-700M LFM2-700M_int4_v0200.litertlm --cache no --prompt "Extract the dates from: The meeting moved from May 3 to May 17."
uvx --from litert-lm==0.20.0 litert-lm benchmark --from-huggingface-repo=litert-community/LFM2-700M LFM2-700M_int4_v0200.litertlm -p 1024 -d 256 --max-num-tokens 2048 --runs 3 --cache no --backend cpu

Without --backend, run uses the file's default backend, which for this file is the CPU; on a Mac, --backend gpu of litert-lm 0.20.0 from PyPI runs on WebGPU. On the Mac with litert-lm 0.20.0 (2026-11-24), from an empty directory, the run command used the copy of the file that an earlier run had downloaded and printed The dates from the given text are May 3 and May 17., as on the GPU; LFM2-700M_int8_v0200.litertlm on the GPU and the CPU and LFM2-700M_int8.litertlm on the GPU listed the two dates, and no reply contained a chat marker such as <|im_end|>. For Android, see android-gpu.md.

The GPU file for LiteRT-LM 0.19.0 to 0.19.2 (2026-11-14), from an empty directory:

uvx --from litert-lm==0.19.2 litert-lm run --from-huggingface-repo=litert-community/LFM2-700M LFM2-700M_int4_gpu_composite_v0190.litertlm --backend gpu --cache no --prompt "Extract the dates from: The meeting moved from May 3 to May 17."

On a Mac M4 Max, from an empty directory with an empty home directory (the first run, 0.19.2 on the GPU, downloaded the file from this repo and the later runs used that copy; litert-lm==0.19.0 or litert-lm==0.19.1 in place of litert-lm==0.19.2 for those two versions), this command printed The dates from the given text are: May 3 and May 17. on litert-lm 0.19.0, 0.19.1 and 0.19.2, and the same dates on 0.19.2 without --backend gpu (CPU); on litert-lm-nightly 0.20.0.dev20261112 it printed An error occurred and exited with status 0 (Known runtime issues). A separate run of this command with litert-lm==0.20.0, from an empty directory, downloaded the file itself, then printed An error occurred and exited with status 0.

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 and 0.20.0 have the same download code) can keep an incomplete download in ~/.litert-lm/cache/huggingface/litert-community/LFM2-700M/ and uses it again on later runs without checking its size. Delete that file and run the command again.

The .litertlm file's default sampler is temperature 0.1, top-k 50, top-p 1.0; Liquid AI recommends temperature 0.3, min_p 0.15 and repetition_penalty 1.05, and the .litertlm file has no min_p or repetition penalty. run uses that sampler unless you pass --top-k, --top-p, --temperature or --seed; --top-k 1 gives greedy output.

The chat template is byte-identical to LiteRT-LM's models/lfm2/chat_template.jinja at commit 86a7e6d0, with its stops <|im_end|> and <|endoftext|> and start token <|startoftext|>. The metadata marks the model non-thinking (supports_thinking false). These files declare a thought channel (<think> / </think>); no reply in our checks carried a thought, so the checks say nothing about LiteRT-LM's KV refill after a reply with a thought.

Tool calling is declared (model type lfm2): the earlier versions of the int8 and int4 files returned a parsed get_weather call (litert-lm 0.18.0 Python API, CPU, greedy; not run on the 2026-11-14 and 2026-11-24 files) and, with automatic tool calling, used its result. Without tools the template renders the same text as Liquid AI's (four conversations checked); with tools it omits Liquid AI's <|tool_list_start|> / <|tool_list_end|> and <|tool_response_start|> / <|tool_response_end|> markers, wraps the tool result in [ … ], and quotes call arguments with double quotes instead of single quotes.

Engine reuse (the earlier version of LFM2-700M_int8.litertlm, litert-lm 0.18.0 Python API, CPU, greedy; 3 processes with a shared Engine and 3 with fresh Engines; the two conversations had different system prompts): after an Engine served one conversation, the next conversation's three answers ("Paris", "Blue", "Eight") and its token count were the same as on a fresh Engine in 3 of 3 processes. The open issue LiteRT-LM #3165 reports the runtime reusing the recurrent state across conversations that share prompt tokens; the test's two conversations started with different system prompts. Open a new Engine for each conversation. A fix landed on LiteRT-LM main on 2026-11-03 (e1f86b05), and LiteRT-LM v0.20.0 on GitHub contains it; this test was not run on 0.20.0.

Performance

Mac M4 Max, litert-lm 0.18.0: litert-lm benchmark with the flags of the benchmark command above and --backend cpu or gpu (1024-token prefill, 256-token decode, context 2048), one warmup, then the mean of 3 iterations; GPU is WebGPU on Metal. The int8 GPU row is the one of three benchmark processes with the median time for the workload (0.959, 0.969 and 0.966 s); the int4 GPU row is one benchmark process; each CPU row is the mean of two benchmark processes. Init is the first iteration's Init time as the CLI prints it; that value includes both Init Total and the phases inside it, so it counts engine creation twice (LiteRT-LM #4057).

Mac M4 Max Prefill 1024 (tok/s) Decode 256 (tok/s) TTFT (s) Init (s)
int8 GPU 7870.47 306.34 0.1334 1.2774
int4 GPU 7839.15 348.26 0.1335 1.4619
int8 CPU 1134.25 90.87 0.9139 9.5982
int4 CPU 580.71 105.97 1.7826 2.3391

Phones, Android 16: Galaxy S26 (SM-S942Q, Qualcomm SM8850, Adreno, MemTotal 10.9 GiB) and Pixel 8a (Tensor G3, Mali, MemTotal 7.4 GiB), the same workload through the prebuilt litert_lm_advanced_main (sha256 adac974b…, 40,382,152 bytes) published 2026-09-18 in LiteRT-LM's public binary bucket (binaries/latest/android_arm64/litert_lm/), with --benchmark=true --benchmark_prefill_tokens=1024 --benchmark_decode_tokens=256 --max_num_tokens=2048 --num_iterations=3 --report_peak_memory_footprint=true. Rates are the mean of iterations 2 and 3 (GPU: LITERT_CL). Init cold = the first process after the compiled-program caches were removed, warm = the benchmark process; peak = the largest of the benchmark process's three Peak system ram usage lines.

Galaxy S26 Prefill 1024 (tok/s) Decode 256 (tok/s) TTFT (s) Init cold / warm (s) Peak (MB)
int8 GPU 3396.4 58.97 0.32 4.30 / 1.28 517.2
int4 GPU ¹ 2427.3 73.25 0.435 4.97 / 1.82 534.4
int8 CPU 890.1 45.65 1.20 0.93 / 0.13 1948.0
int4 CPU ² 346.8 57.12 3.06 1.59 / 1.22 1652.5

Before each process of the first three rows the measurement script waited for Android thermal status 0 and uncapped clocks; in the int8 CPU run the CPU clock was lowered in 9 of 10 samples, taken 2–3 s apart. ¹ The GPU clock limit fell from 1300 to 1100 MHz in the last 2 of 7 samples; the first iteration read 2494.6 / 69.22 tok/s. ² An earlier run that started on a hot phone (thermal status 3); the CPU clock was lowered in 10 of 11 samples.

Pixel 8a Prefill 1024 (tok/s) Decode 256 (tok/s) TTFT (s) Init cold / warm (s) Peak (MB)
int8 GPU 1451.1 34.75 0.735 19.42 / 1.88 1107.6
int4 GPU 619.7 39.91 1.675 8.95 / 3.12 1026.0
int8 CPU 207.0 22.73 4.99 2.03 / 0.46 1534.8
int4 CPU 153.0 30.33 6.78 3.05 / 2.62 1250.7

Every run started at thermal status 1; in the CPU runs the CPU clock was lowered in 13 of 17 samples in each file's run, taken 2–4 s apart (int8) and 2–3 s apart (int4), and in the GPU runs in 3 of 11 (int8) and 5 of 11 (int4); the measurement script could not read the Mali GPU clock. Not run on the NPU.

LFM2-700M_int4_gpu_composite_v0190.litertlm against LFM2-700M_int4.litertlm on the same Galaxy S26 GPU, 2026-11-14: litert_lm_advanced_main built from LiteRT-LM's v0.19.1 tag (commit 7a03724c), the same benchmark flags, four benchmark processes of the two files one after another, in the order of the Run column. The default build of that tag links a GPU accelerator compiled from source (its log says Statically linked GPU accelerator registered.); the prebuilt binary of the two phone tables above loads Google's prebuilt one (Dynamically loaded GPU accelerator(libLiteRtOpenClAccelerator.so) registered.). Each benchmark process started 122 to 418 s after the cold-start process of the same file ended, with every CPU and GPU clock ceiling at its top. While the four processes ran (read every 2 s), the phone lowered the GPU clock ceiling in 2 of 7 samples in run 1 (to 826 MHz) and 1 of 6 in run 2 (to 1000 MHz), not in runs 3 and 4, and the CPU clock ceiling in 7 of 7, 5 of 6, 5 of 6 and 7 of 7 samples (at the lowest to 69 % and 51 % of the two CPU clusters' maxima in the int4 file's runs, 80 % and 61 % in the _v0190 file's). Rates are the mean of iterations 2 and 3; init cold / warm and peak are read as for the phone tables above. This table and the Galaxy S26 table above ran different binaries, so compare rows within a table.

Run Galaxy S26 GPU, LiteRT-LM 0.19.1 Prefill 1024 (tok/s) Decode 256 (tok/s) TTFT (s) Init cold / warm (s) Peak (MB)
1 int4 1298.2 68.9 0.805 4.45 / 1.83 509.6
2 _gpu_composite_v0190 1738.9 85.9 0.600 3.78 / 1.84 537.5
3 _gpu_composite_v0190 1729.2 86.5 0.605 3.75 / 1.73 536.3
4 int4 1423.3 71.4 0.730 4.37 / 1.85 487.2

Mean of the two runs of each file: decode 86.2 against 70.1 tok/s (1.23 times), prefill 1734.1 against 1360.7 tok/s (1.27 times). The int4 file's runs had their CPU clock ceilings lowered more often and further, so these ratios may favour the _v0190 file; run 2, the _v0190 file's slower one, against run 4, the int4 file's faster one, gives 85.9 against 71.4 tok/s decode (1.20 times). In a separate process that ran one prompt after each of the four benchmark processes, both files answered "What is the capital of France? Answer in one sentence." with "The capital of France is Paris."

Conversion notes

  • Source and tools: LiquidAI/LFM2-700M at revision 86f49fc9; litert-torch 0.9.4, litert-converter 0.4.0, ai-edge-quantizer 0.9.0, transformers 5.14.1, torch 2.13.0; packed by the litert-lm 0.18.0 CLI. lfm_work/convert_lfm2_700m.sh in hf-to-litertlm runs the steps listed under Order.
  • Order: two exports (11 prefill signatures, 1024 down to 1, plus decode, over a 4096-position KV cache): the int8 file is the export with the default int8 recipe; the int4 file is post-hoc int4 quantization of an unquantized export (no zero or subnormal block scale in its 92 blockwise tensors) → metadata repack of each file with LiteRT-LM's lfm2 configuration.
  • Template: Liquid AI's chat template fails at render on litert-lm 0.18.0 (message.get("content")), so the .litertlm file carries LiteRT-LM's lfm2 template, which reads message content as a list of parts.
  • The 2026-11-14 file (LFM2-700M_int4_gpu_composite_v0190.litertlm): the same checkpoint exported with litert-torch at commit 65aafa4 (export_hf --apply_gpu_composites=True --use_short_conv_composite=True; litert-converter 0.6.0.dev20261103, transformers 5.22.1, torch 2.14.0; one local change in the packaging step, the model-type enum names passed to the .litertlm file builder, leaves the export untouched), which writes the ShortConv state channels-first; the int4 recipe of LFM2-700M_int4.litertlm (file table) with ai-edge-quantizer 0.9.0, the lm_head int8 in all 12 signatures; no zero or subnormal block scale; the LLM metadata and tokenizer sections of LFM2-700M_int4.litertlm put back byte for byte; packed with litert-lm 0.19.1. Composites over the 12 signatures: KV cache write 72, attention 72, ShortConv step 120, q/k norm with RoPE 72, RMSNorm 396, SwiGLU 192.
  • The 2026-11-24 files (LFM2-700M_int4_v0200.litertlm, LFM2-700M_int8_v0200.litertlm): exported with litert-torch main at commit 5d18d996e, whose default GPU composites keep the ShortConv state channels-last (the same 11 prefill signatures, decode and 4096-position KV cache); int8 = the exporter's dynamic_wi8_afp32 with the ShortConv filters left float (they are operands of the ShortConv composite), unlike LFM2-700M_int8.litertlm; int4 = the int4 recipe of LFM2-700M_int4.litertlm with the block scales floored at 2^-14; their LLM metadata (chat template included) and tokenizer sections are byte-identical to those of LFM2-700M_int4.litertlm and LFM2-700M_int8.litertlm.

Known runtime issues

LFM2-700M_int4_gpu_composite_v0190.litertlm, LiteRT #11565 and LiteRT-LM 0.20.0. This file keeps the ShortConv state channels-first. LiteRT #11565 makes channels-last the only layout the GPU short_conv_step accepts, so a build that carries it refuses the file at engine creation with ShortConvStep supports only a channels-last conv_state [1, 2, H], but got [1, 1536, 2]. LiteRT-LM main has carried it since commit b1dcfbd0 (2026-11-07). LiteRT-LM 0.20.0 refuses the file this way on a Mac GPU (litert-lm 0.20.0 from PyPI, 2026-11-24), as litert-lm-nightly 0.20.0.dev20261112 did, and the CLI of both prints An error occurred and exits with status 0 (the nightlies 0.20.0.dev20261106 to 0.20.0.dev20261111 were not tried); on 0.20.0 use LFM2-700M_int4_v0200.litertlm, which keeps the state channels-last, or run LFM2-700M_int4_gpu_composite_v0190.litertlm on the CPU. LiteRT-LM main at commit 1d378fca (two commits before b1dcfbd0), built with its LiteRT dependency moved to commit bf49eb62 (the LiteRT commit that b1dcfbd0 adopted), refuses it with the same message on a Mac and on the Galaxy S26 (litert_lm_advanced_main exits with status 2 on the Galaxy S26 and aborts on the Mac). On such a build use LFM2-700M_int4_v0200.litertlm, which answered 7 of the 8 check questions on the Galaxy S26 GPU with that build, or LFM2-700M_int4.litertlm or LFM2-700M_int8.litertlm, which have no ShortConv composite and run with or without #11565. This file stays here for the GPU on LiteRT-LM 0.19.0 to 0.19.2.

Android GPU with LiteRT-LM v0.18.0 and v0.18.1. LFM2-700M_int4.litertlm, LFM2-700M_int8.litertlm and LFM2-700M_int4_gpu_composite_v0190.litertlm keep some of their weights outside the model graph (LiteRT's external weights), and on a Pixel 8a the GPU backend of the v0.18.0 and v0.18.1 Android builds crashes (SIGSEGV) on a Qwen3-0.6B file with external weights (LiteRT-LM#3986). On Android, LFM2-700M_int4.litertlm and LFM2-700M_int4_gpu_composite_v0190.litertlm ran on the GPU of a Galaxy S26 with LiteRT-LM 0.19.1 (2026-11-14, Performance), and LFM2-700M_int8.litertlm with the litert-lm-api 0.19.0 wheel from PyPI (2026-10-30).

Long greedy replies on the GPU may vary between runs. On the GPU's default path, where the sampler writes the inputs of the next decode step, a long greedy reply of LFM2.5-2.6B differed from one process to the next on a Mac (WebGPU, LiteRT-LM 0.19.1 from PyPI and built from source) and on a Pixel 11 Pro GPU (PyPI litert-lm-api 0.19.0); with --sampler_handles_input=false (litert_lm_advanced_main built from source; the Python, Kotlin and Swift APIs of 0.19.1 have no such setting) it gave one reply. The files here run the same GPU path; this was not measured on them.

From a conversation preface (the system message, initial messages, tools and extra context a conversation is created with) that has tools and no messages, LiteRT-LM renders these files' chat template with an empty message list, and the template reads messages[0] without checking that the list is non-empty, so the render fails with Failed to apply template: undefined value. This happens in two places: when the preface is prefilled at creation (prefillPrefaceOnInit = true in Kotlin, prefillPrefaceOnInit: true on the web, SetPrefillPrefaceOnInit(true) in C++; the default is false), where creating the conversation fails with that error, and in the preface render (renderPrefaceIntoString() in Kotlin and Swift, RenderPrefaceIntoString() in C++, litert_lm_conversation_render_preface_to_string in the C API). The same happens with extra context (such as enable_thinking) and no messages, and in the preface render with an empty preface (run in the runtime on one Qwen3 template; the other templates rendered with minijinja 2.14 and jinja2). Read in the source of LiteRT-LM 0.17.0, 0.18.1 and main; measured with LiteRT-LM 0.18.1 (the litert-lm package from PyPI) through its C API on these files' template text. The default path, where the first message is rendered together with the preface, is not affected: the Python API and the CLI of 0.18.1 expose neither the flag nor the preface render, and Google AI Edge Gallery sets neither (its source as read on 2026-10-25). A system message or any initial message in the conversation config avoids it.

On LiteRT-LM 0.18.1 and 0.19.1, once a message fails because it does not fit in the context window, every later message in that conversation fails as well (the next one with Task failed with state: 7). Start a new conversation after such an error.

License and changes

Distributed under the LFM Open License v1.0 inherited from the base model (LICENSE); its section 5 conditions commercial use on an annual revenue below 10 million US dollars. Changes from the original work: exported to the LiteRT-LM format and quantized to int8 and int4 as described above; chat template and stop tokens taken from LiteRT-LM's models/lfm2 configuration, with max_num_tokens changed from 32768 to 4096 and supports_thinking from true to false; LFM2-700M_int4_gpu_composite_v0190.litertlm (2026-11-14) and the two _v0200 files (2026-11-24) exported with litert-torch's GPU composites. This conversion was made and is published independently of Liquid AI.

Downloads last month
1,002
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for litert-community/LFM2-700M

Quantized
(28)
this model