Qwen3.5-2B for the Snapdragon 8 Gen 1 NPU — LiteRT-LM
Qwen/Qwen3.5-2B packaged for LiteRT-LM and compiled for the Hexagon NPU of the Snapdragon 8 Gen 1 (SM8450, Hexagon v69), as 9 QNN contexts. Built for and measured on a Samsung Galaxy S22 Ultra (SM-S908E).
Two bundles, same weights, different KV-cache size:
qwen35-2b_sm8450.litertlm— context 4096qwen35-2b-ctx16384_sm8450.litertlm— context 16384
Text only. Thinking mode works: the model reasons in <think> … </think> and then answers.
Google publishes LiteRT-LM bundles for SM8550, SM8650 and SM8750 only. A bundle for another Hexagon version gets
Failed to create QNN context: 1002, so this one had to be built.
The easy way to run it: AutoDroid Studio
AutoDroid Studio is the Android app this model was built for and measured in. It runs these bundles on the NPU of a Snapdragon 8 Gen 1 phone, exactly as published here. "Running it" below is for people who want to drive it by hand.
Why use it:
- Nothing to set up. No runner to build, no
adb, no environment variables. The app sets up the Qualcomm runtime itself and finds and downloads models from Hugging Face in its own browser. - Chat on the phone, with the model's reasoning shown when you want it, and a benchmark to compare models and backends on your own hardware.
- A model server for your other devices. An OpenAI-compatible HTTP API, a web dashboard and an MCP endpoint on your local network, so existing tools, scripts and agents on your computer can use the phone as their model backend. A spare phone on a charger works well for this.
- Automation. A visual workflow builder with 70+ task types (AI steps, HTTP, RSS, PDF, OCR, SQLite, JavaScript), run on a schedule, from a webhook or as a Telegram or Discord bot.
- Your own documents. On-device embeddings, so the chat model can answer from your files.
- Private. No ads, no analytics, no account. Models run on the phone, and your data leaves it only when you send it somewhere yourself.
Get AutoDroid Studio on Google Play
At a glance
| Files | qwen35-2b_sm8450.litertlm (2.16 GB), qwen35-2b-ctx16384_sm8450.litertlm (2.16 GB) |
| Base model | Qwen/Qwen3.5-2B (hybrid: gated delta-net layers + 6 attention layers) |
| Contexts | 4096 or 16384 tokens, shared by prompt and answer |
| On the NPU | all decoder layers + lm_head, 9 QNN contexts |
| Weights | 8-bit, lm_head 4-bit |
| Activations / KV cache | 16-bit / 8-bit (recurrent state buffers aligned) |
| Calibration | 16 prompts, 64 new tokens each, thinking on and off |
| QNN SDK | QAIRT 2.50.0.260828 |
| LiteRT-LM | v0.17.1 |
Measured on the phone (Galaxy S22 Ultra, big cores, from a shell)
| Decode | Prefill | |
|---|---|---|
qwen35-2b_sm8450.litertlm (ctx 4096) |
~16 tok/s | ~16 tok/s |
qwen35-2b-ctx16384_sm8450.litertlm (ctx 16384) |
~8 tok/s | ~12.6 tok/s |
A 32768-token build was made too but is not published: its lm_head context cannot be created on the DSP (the K/V I/O buffers at that size push the process past its mapping budget).
Quality
CLI eval (6 prompts: a fact, arithmetic, a haiku, a two-sentence explanation, a list, a translation), greedy, raw prompt: 6 of 6 correct, thinking on and off. The 16384 build answered a needle-in-a-haystack question correctly from an 8,976-token prompt (prefill took 12 minutes at 12.6 tok/s). Through an Android app's OpenAI-style endpoint it answered single- and multi-turn chats with the reasoning split from the answer.
Qwen3.5-2B has no massive activations (residual max ~30), so the plain int16 recipe is enough.
Files
| File | SHA-256 |
|---|---|
qwen35-2b_sm8450.litertlm |
3dcd348bbabf7f6c103ad49050d69a7644f26a4f7ad9f03c7b1226633daf2a0f |
qwen35-2b-ctx16384_sm8450.litertlm |
8b5bfbef1af4f215a28291eef8c5c97ee9ab0b5614481d3570e1f1570bae7ea9 |
The tokenizer, chat template and generation metadata are inside the .litertlm; there is nothing
else to download. Not included: the Qualcomm runtime libraries and the LiteRT dispatch library
(see "Running it").
Running it
You need three things besides the bundle. None are included: they are Qualcomm's or Google's to distribute, and the LiteRT ones must match each other.
- QAIRT 2.50 runtime, from
lib/aarch64-android/andlib/hexagon-v69/unsigned/:libQnnHtp.so,libQnnSystem.so,libQnnHtpV69Stub.so,libQnnHtpV69Skel.so. The context binaries inside the bundle were compiled with 2.50.0.260828, and the runtime has to be 2.50 too; the stock 2.39 libraries fail with "Qnn System library version 1.5.0 is mismatched". libLiteRtDispatch_Qualcomm.sobuilt from the LiteRT commit your LiteRT-LM embeds (LiteRT-LM v0.17.1 -> LiteRT9fe5be4). LiteRT 2.2.0's dispatch library crashes LiteRT-LM v0.17.1 when a model is unloaded.litert_lm_main/litert_lm_advanced_mainfrom LiteRT-LM v0.17.1, built for Android arm64.
Put everything in one folder on the phone, then:
cd /data/local/tmp/litert
export LD_LIBRARY_PATH=$PWD ADSP_LIBRARY_PATH=$PWD
./litert_lm_advanced_main --backend=npu --model_path=$PWD/qwen35-2b_sm8450.litertlm \
--litert_dispatch_lib_dir=$PWD --use_session --async=false \
--max_num_tokens=2048 --input_prompt_file=$PWD/prompt.txt
prompt.txt holds the fully rendered conversation (--use_session takes raw text):
<|im_start|>user
What is the capital of France?<|im_end|>
<|im_start|>assistant
<think>
Thinking on ends the prompt with <think>\n; thinking off ends it with
<think>\n\n</think>\n\n. The stop token is <|im_end|>.
Notes:
- The NPU executor is greedy. Temperature, top-k and seed have no effect on this path.
- One NPU model per process. Unloading a LiteRT NPU model leaves its I/O buffers registered on
the DSP ("Failed to deregister memHandles"); the next, different model can then fail to map
its contexts (
fastrpc_mmapfailed, "Failed to create QNN context: 1002"). Reloading the same model is fine. Restart the process to switch models. - Prompts go in one token per call, so prompt speed equals decode speed (see "Why one graph").
- A foreground/backgrounded app is scheduled on the little cores on some Samsung builds; the CLI
numbers above were taken with
taskset f0(big cores) from a shell.
How it was built
Exported with a purpose-written Qwen3.5 decode-step exporter (one decode signature; the
gated delta-net recurrence and 6 attention layers are expressed with ops v69 handles correctly),
calibrated on 16 self-generated prompts, quantized to static int16 activations / int8 weights /
int8 K and V with a 4-bit lm_head, split into 9 contexts every 3 layers, and compiled with the
Qualcomm AOT plugin for SM8450. The bundle's metadata (reasoning channel, <|im_end|> stop) is
patched so LiteRT-LM and clients see the thinking split.
Why one graph
QNN weight sharing between a prefill graph and a decode graph needs Hexagon v73 or newer. On v69 a
two-graph bundle holds every weight twice, and one process can map only about 1.85 GB on this
phone's cDSP. So the bundle has a single decode graph that also serves as prefill_1.
v69 workarounds baked into the build
Each of these was reproduced on the phone and the export/quantizer avoids it:
- A binary op that broadcasts both operands, and a matmul whose left operand is a slice at a non-zero offset, give wrong results on v69.
- All-zero weight rows get a per-channel scale of about 1e-11 and the HTP saturates the channel; they are given the median scale.
- The Qualcomm plugin's
CONV_2Dpath mishandles INT4 filters (axis not remapped, filter unpacked twice); 4-bit 1x1 convs are emitted asFULLY_CONNECTED. - A 1.6 GB QNN context cannot be created ("Failed to create QNN context: 1002"), so the graph is cut into ~170 MB contexts with a CPU-only no-op between stretches.
- Every QNN graph input/output has to be a buffer LiteRT binds; no NPU op may consume an XNNPACK output and no op may be left with an unconsumed output ("No memHandle provided").
Limitations
- Snapdragon 8 Gen 1 (SM8450, Hexagon v69) only. The context binaries are compiled for that DSP; other chips answer "Failed to create QNN context: 1002".
- Text only.
- It needs most of the phone's free memory. The contexts total about the DSP's per-process budget; close heavy apps first.
- Quantization costs quality compared with the float model. The checks listed above are small (6 prompts); there is no benchmark suite behind this.
- Tool calling was not tested.
- These bundles were built on a PC with a custom pipeline (not Google's published recipe, which has no SM8450 target) and are an unofficial community build, provided as is, with no warranty.
Licence and credits
The model weights derive from Qwen/Qwen3.5-2B and are under the same licence (apache-2.0). Compiled with Google's LiteRT / LiteRT-LM tooling and Qualcomm AI Engine Direct. This is an unofficial community build, not affiliated with the authors of the base model, Google or Qualcomm.