LFM3-Omni-2B on Samsung Galaxy S26+ (OpenCL)

Ported, optimized and verified on a real Samsung Galaxy S26+ by nnopt.dev β€” AI agents that port and optimize models for the hardware you ship.

The model is LiquidAI/LFM3-Omni-2B by Liquid AI, and it is theirs. The OpenCL port in this repository is nnopt's work: nnopt job NN-B774C1.

Device Samsung Galaxy S26+, Android 16
Chip Snapdragon 8 Elite Gen 5 (SM8850)
Processor GPU (Adreno 840)
Runtime custom C++ runtime with OpenCL kernels (no other engine)
Precision int8 weights (AWQ, per-64 fp16 scales) for backbone, depth trunk and embeddings, fp16 elsewhere; fp32 activations, accumulation, KV cache, norms and softmax
Modality speech + text in, text + speech out (voice chat, ASR, TTS, chat modes)
Weights included: build/weights.bin (int8 AWQ, made by nnopt from the original BF16 weights) and its index
nnopt job NN-B774C1 (optimize)
Folder sm8850-gpu-int8/

Verified results

nnopt built the folder from a clean copy, deployed it to the device and checked it against the model's reference code on hidden inputs. The full report is report.html in the folder.

  • Passed. Matches the reference 10 of 10 cases
  • Next-token agreement 96.6% (bar top-1 >= 93%, worst cosine >= 0.97, mean KL <= 0.05, int8 logits)
  • Speed target met
  • voice real-time factor +20.9% vs starting version, timed in turns on this device (0.748 -> 0.619) (bar at least +20%)
  • Time per request 374 ms (was 443 ms, 1.2x faster)
  • Load time 606 ms (was 2.03 s, 3.4x faster)
  • Peak memory 1,796 MB (was 3,390 MB, 47% less)
  • Speech to text (ASR) latency 756 ms (was 827 ms, 1.1x faster)

Use it

mkdir LFM3-Omni-2B-OpenCL && cd LFM3-Omni-2B-OpenCL
curl -fsSL https://huggingface.co/nnopt-dev/LFM3-Omni-2B-OpenCL/resolve/main/config.json -o config.json
hf download nnopt-dev/LFM3-Omni-2B-OpenCL --include "sm8850-gpu-int8/*" --local-dir .
cd sm8850-gpu-int8
bash fetch.sh
bash deploy.sh /data/local/tmp/lfm3omni      # adb: pushes the runner, kernels and weights, compiles the kernels once
adb push demo/voice_in.wav /data/local/tmp/lfm3omni/q.wav
adb shell 'cd /data/local/tmp/lfm3omni && sh ./run.sh --audio q.wav --task voice --seed 1234 --max-new-tokens 320 \
    --wav-out reply.wav --out reply.json --metrics m.json'

Needs: An Adreno phone with OpenCL 3.0 (tested: Galaxy S26+), adb, about 4.1 GB free on the phone. Rebuilding (INPUTS_DIR=... bash build.sh) needs the original weights from LiquidAI/LFM3-Omni-2B; build.sh fetches its own NDK r27d, OpenCL headers and numpy.

README.md in the folder has every flag, the requirements and the known limits; REPRO.md (where present) reproduces the measurements.

License

The model and everything derived from it here are under the LFM Open License v1.0 (Liquid AI): see LICENSE and NOTICE. Commercial use is licensed only to organizations under $10M annual revenue (LFM Open License v1.0, section 5).

Made with nnopt

nnopt is a platform where AI agents port, optimize and benchmark a model for a specific device. They write the runtime code on the real device, and a locked verification kit then checks the result against the model's own reference code before anything ships. Every number on this page comes from that check.

Want your model on your device? Start a job at nnopt.dev.

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

Model tree for nnopt-dev/LFM3-Omni-2B-OpenCL

Quantized
(52)
this model