<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anguo</title>
    <description>The latest articles on DEV Community by Anguo (@anguoyang).</description>
    <link>https://dev.to/anguoyang</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4220481%2F21fcf79b-9579-4b22-b0c4-cb98d6ce8440.png</url>
      <title>DEV Community: Anguo</title>
      <link>https://dev.to/anguoyang</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anguoyang"/>
    <language>en</language>
    <item>
      <title>All We Got Was "Exit Code 14" — the Real Answer Was One Number: 68</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Thu, 19 Nov 2026 08:12:28 +0000</pubDate>
      <link>https://dev.to/anguoyang/all-we-got-was-exit-code-14-the-real-answer-was-one-number-68-ndd</link>
      <guid>https://dev.to/anguoyang/all-we-got-was-exit-code-14-the-real-answer-was-one-number-68-ndd</guid>
      <description>&lt;p&gt;YOLOv11-N, quantized w8a16, compiled for the RB3 Gen 2 (Qualcomm QCS6490). The job died at the context-binary step with exactly one piece of feedback: exit code 14. No layer name, no reason, nothing to search for.&lt;/p&gt;

&lt;p&gt;The same model in w8a8 went through fine — 5.03 ms on the NPU, against 134.7 ms for the default TFLite path. So the "safer precision" option produced no binary at all, and the tool couldn't tell us why.&lt;/p&gt;

&lt;p&gt;The compile job was jp1193rnp, back in early November. I filed an issue (qualcomm/ai-hub-models#364) asking for one thing: whatever diagnostic exists underneath, surface it. A bare exit code isn't an error message, it's a locked door.&lt;/p&gt;

&lt;p&gt;Ten days later the maintainer pasted the line the toolchain had been swallowing:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[4294967295] has incorrect Value 68, expected &amp;gt;= 73&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's the whole story in one line. The RB3 Gen 2's DSP is a Hexagon v68. Quantizing to w8a16 makes the compiler emit int16×int16 matmul kernels — and v68 doesn't have one. Those kernels need v73 or newer. Nothing was wrong with the model, the calibration, or the export. A dtype choice in a config file had quietly asked the chip for an instruction its generation doesn't ship.&lt;/p&gt;

&lt;p&gt;The workarounds are simple once you know: stay on w8a8 for this silicon, or bring a custom AIMET config that keeps matmuls out of int16. The maintainer also forwarded the "surface the diagnostic" request to the QAIRT team, which is where the message gets swallowed — so the issue did its job even though the answer took ten days.&lt;/p&gt;

&lt;p&gt;If you deploy to Hexagon v68 parts, treat w8a16 as unsupported for anything with matmuls and default to w8a8. And when a vendor tool hands you a bare exit code, the real error almost always exists one layer down. Filing for it is worth the ten minutes.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>embedded</category>
      <category>qualcomm</category>
    </item>
    <item>
      <title>Six Graphs Out of Nine: InternVL3.5-2B on QCS6490, and the FP32 Tensor Hiding in the Vendor's Own Asset</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Mon, 16 Nov 2026 04:26:21 +0000</pubDate>
      <link>https://dev.to/anguoyang/six-graphs-out-of-nine-internvl35-2b-on-qcs6490-and-the-fp32-tensor-hiding-in-the-vendors-own-3oib</link>
      <guid>https://dev.to/anguoyang/six-graphs-out-of-nine-internvl35-2b-on-qcs6490-and-the-fp32-tensor-hiding-in-the-vendors-own-3oib</guid>
      <description>&lt;h1&gt;
  
  
  Six Graphs Out of Nine: InternVL3.5-2B on QCS6490, and the FP32 Tensor Hiding in the Vendor's Own Asset
&lt;/h1&gt;

&lt;p&gt;After two LLMs went through the manual export chain on the Qualcomm QCS6490 (Dragonwing RB3 Gen 2) — Qwen3-0.6B at 1,555 tok/s prefill, Llama 3.2 1B at 1,024 — the obvious next step was a vision-language model. InternVL3.5-2B: an InternViT vision encoder feeding a Qwen3-style text backbone, Apache-2.0, and nobody had published a single number for it on this chip.&lt;/p&gt;

&lt;p&gt;This time the export script wasn't the problem. The wall was inside the vendor's own pre-quantized asset.&lt;/p&gt;

&lt;h2&gt;
  
  
  What got measured
&lt;/h2&gt;

&lt;p&gt;The model splits into 9 graphs: one vision encoder (448×448 image in, 256 visual tokens out) and a text backbone in 4 parts × 2 graphs each (a 128-token prompt graph and a 1-token decode graph), context 512, w4a16 — same manual AI Hub chain as the earlier entries, same per-graph profile method on real hardware. All 9 graphs compiled. Six profiled on the device:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Graph&lt;/th&gt;
&lt;th&gt;Prompt (128 tok)&lt;/th&gt;
&lt;th&gt;Decode (1 tok)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Part 1 — layers 0–8&lt;/td&gt;
&lt;td&gt;compose FAILED&lt;/td&gt;
&lt;td&gt;compose FAILED&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Part 2 — layers 9–17&lt;/td&gt;
&lt;td&gt;68,980 µs&lt;/td&gt;
&lt;td&gt;20,224 µs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Part 3 — layers 18–26&lt;/td&gt;
&lt;td&gt;69,011 µs&lt;/td&gt;
&lt;td&gt;20,300 µs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Part 4 — layer 27 + lm_head&lt;/td&gt;
&lt;td&gt;36,122 µs&lt;/td&gt;
&lt;td&gt;22,291 µs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vision encoder&lt;/td&gt;
&lt;td&gt;compose FAILED&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Parts 2–4 subtotal: 174,113 µs per 128 prompt tokens, 62,815 µs per decode token. &lt;strong&gt;There is no full-model tok/s in this post, deliberately.&lt;/strong&gt; Part 1 sits on the critical path of every forward pass; adding up the survivors and presenting a total would fabricate a number the hardware never produced. The bench records the total as UNKNOWN and keeps the per-part figures.&lt;/p&gt;

&lt;h2&gt;
  
  
  The blocker, precisely
&lt;/h2&gt;

&lt;p&gt;Linking the text graphs fails with the device naming the culprit itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Tensor '/model/model/layers.2/mlp/down_proj/Conv_bias' has a floating-point
type which is not supported by the targeted device. Please quantize the
model including its I/O and try again.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Profiling part 1 and the vision encoder dies one step later, at &lt;code&gt;QnnModel_composeGraphsFromDlc: MODEL_GRAPH_ERROR&lt;/code&gt; — five-plus attempts on part 1, three on the vision encoder, identical error. One bounded experiment to localize it: recompiling part 1 with &lt;code&gt;-O1&lt;/code&gt; instead of &lt;code&gt;-O0&lt;/code&gt; changed nothing. Compile options are innocent. The defect is in the shipped &lt;code&gt;fp16mix&lt;/code&gt; AOT asset: at least one Conv bias in part 1 (the linker names layer 2's &lt;code&gt;down_proj&lt;/code&gt; bias) went out unquantized, and the vision encoder carries the same class of problem — while the corresponding tensors in parts 2–4 compose and run fine. The official Genie pipeline presumably massages these tensors somewhere on the local side; the manual chain bypasses that pipeline and drives straight into them. An issue with the job IDs and the exact error strings is going to the vendor, same as the export-script bug before it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three side quests, for anyone reproducing this
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The template pins transformers 5.7.0.&lt;/strong&gt; The environments that exported Qwen3 and Llama (transformers 4.45) can't even import this model's template. Each model in this series now gets its own pinned environment; sharing one is a false economy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;aimet-onnx has no aarch64 wheel.&lt;/strong&gt; On the ARM64 build machine, &lt;code&gt;pip install aimet-onnx==2.37.0&lt;/code&gt; finds no matching distribution at all — and the vision encoder's class eagerly builds an AIMET QuantSim session at collection time, so the split dies with a NameError before doing anything. Reading the code showed that session is only used by &lt;code&gt;forward()&lt;/code&gt; for local evaluation; the hub deployment path just moves the pre-built ONNX bundle from the AOT checkpoint. So the split no-ops that one initializer — and then verifies the claim instead of trusting it: the serialized vision encoder ONNX and its encodings file came out byte-identical (sha256) to the vendor's originals. A patch you can't verify is a patch you don't ship.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The 9.39 GB asset download stalls silently at 70%.&lt;/strong&gt; The built-in downloader froze at 6,611,808,256 bytes — progress bar static, temp file not growing, process alive, connection dead, no timeout anywhere. Fix: kill it, move the partial file into the cache position, and finish with &lt;code&gt;curl -C -&lt;/code&gt; (the S3 bucket honors Range requests). Final size matched Content-Length exactly and the archive tested clean. Lesson now applied to the whole series: fetch big assets into the cache with a resumable tool first, then start the pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this leaves the series
&lt;/h2&gt;

&lt;p&gt;Two LLMs measured end to end, one VLM measured in the six graphs the vendor's asset allows, with the blocker root-caused to a specific tensor in a specific layer. That's the honest state of InternVL3.5-2B on QCS6490 today — first public record either way. If the vendor fixes the asset, the remaining three graphs are a re-run away, and this post gets a sequel with the full row filled in.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Method note: figures are per-graph AI Hub profile &lt;code&gt;estimated_inference_time&lt;/code&gt; on the RB3 Gen 2 device, not a Genie end-to-end run — the same method as the Qwen3-0.6B and Llama 3.2 1B entries. Full job IDs and the failure record are on the model's Hugging Face card (anguoyang/internvl3.5-2b-qcs6490) and in the qcs-bench leaderboard.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>qualcomm</category>
      <category>ai</category>
      <category>machinelearning</category>
      <category>edgeai</category>
    </item>
    <item>
      <title>The workaround generalizes: Llama 3.2 1B on QCS6490 — 1,024 tok/s prefill, 16.4 tok/s decode</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Sun, 15 Nov 2026 05:10:38 +0000</pubDate>
      <link>https://dev.to/anguoyang/the-workaround-generalizes-llama-32-1b-on-qcs6490-1024-toks-prefill-164-toks-decode-576b</link>
      <guid>https://dev.to/anguoyang/the-workaround-generalizes-llama-32-1b-on-qcs6490-1024-toks-prefill-164-toks-decode-576b</guid>
      <description>&lt;h1&gt;
  
  
  The workaround generalizes: Llama 3.2 1B on QCS6490 — 1,024 tok/s prefill, 16.4 tok/s decode
&lt;/h1&gt;

&lt;p&gt;Yesterday I published the first public GenAI numbers for Qualcomm's QCS6490: Qwen3-0.6B at 1,555 tok/s prefill and 24.6 tok/s decode. Getting there took a hand-built chain, because the official AI Hub export script passes a flag the compiler rejects (&lt;code&gt;--output_names is not supported for AIMET ONNX models&lt;/code&gt;, upstream issue #366, fix promised in v0.67.0 but not out yet).&lt;/p&gt;

&lt;p&gt;The obvious next question: was that a one-off rescue, or does the same manual chain carry other models? Today it carried the best-known small model of all — Llama 3.2 1B Instruct.&lt;/p&gt;

&lt;h2&gt;
  
  
  Same chain, no new surprises
&lt;/h2&gt;

&lt;p&gt;The recipe is identical: take the pipeline's own compile parameters from a failed export job, drop the one bad flag, pin the input shapes the script forgot to pin (that omission killed my first attempt on Qwen3 — dynamic shapes, dead on arrival), and submit the compile jobs through the Hub API directly. Six compile jobs, one link job, six profile jobs on a real Dragonwing RB3 Gen 2 board. Everything passed. The bug is still in the script; the chain still goes around it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;p&gt;Llama 3.2 1B Instruct, w4a16, context length 512, measured on RB3 Gen 2 (QCS6490):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Prefill: 1,024 tok/s&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decode: 16.4 tok/s&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Method, stated plainly because it matters: these are derived from per-graph profiles on the real device — the same method as yesterday's Qwen3 numbers, which is exactly why the two rows are comparable. They are not a Genie end-to-end run; an end-to-end figure would include runtime overheads the per-graph numbers don't. I'd rather publish the method with the numbers than a bigger number with no method.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Quant&lt;/th&gt;
&lt;th&gt;Context&lt;/th&gt;
&lt;th&gt;Prefill (tok/s)&lt;/th&gt;
&lt;th&gt;Decode (tok/s)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3-0.6B&lt;/td&gt;
&lt;td&gt;w4a16&lt;/td&gt;
&lt;td&gt;512&lt;/td&gt;
&lt;td&gt;1,555&lt;/td&gt;
&lt;td&gt;24.6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Llama 3.2 1B Instruct&lt;/td&gt;
&lt;td&gt;w4a16&lt;/td&gt;
&lt;td&gt;512&lt;/td&gt;
&lt;td&gt;1,024&lt;/td&gt;
&lt;td&gt;16.4&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;To my knowledge this is the first public measurement of Llama 3.2 1B on QCS6490. If you have an earlier one, I'd genuinely like to see it — the whole point of publishing these is that the table should exist somewhere public.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a second row matters
&lt;/h2&gt;

&lt;p&gt;One model through a workaround is an anecdote. Two models, from two different families, through the same chain with no new surprises is a method. The gradient is the real product here: 0.6B and 1B are now filled in, and the same chain is queued for Qwen3-1.7B and Llama 3.2 3B, so the curve of "what actually runs on this chip, and how fast" stops being extrapolation and becomes measurement.&lt;/p&gt;

&lt;p&gt;All data, including the failures, lives in the open benchmark repo (qcs-bench) and on the model card:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model card: &lt;a href="https://huggingface.co/anguoyang/llama-3.2-1b-qcs6490" rel="noopener noreferrer"&gt;https://huggingface.co/anguoyang/llama-3.2-1b-qcs6490&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Benchmark data: &lt;a href="https://github.com/anguoyang/qcs-bench" rel="noopener noreferrer"&gt;https://github.com/anguoyang/qcs-bench&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Llama 3 license applies to the model; what's published here is measurements and the path that produced them.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>qualcomm</category>
      <category>llm</category>
    </item>
    <item>
      <title>Contributing a model to Qualcomm's AI Hub catalog: every failure was packaging, not ML</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Sat, 14 Nov 2026 22:24:42 +0000</pubDate>
      <link>https://dev.to/anguoyang/contributing-a-model-to-qualcomms-ai-hub-catalog-every-failure-was-packaging-not-ml-1bl6</link>
      <guid>https://dev.to/anguoyang/contributing-a-model-to-qualcomms-ai-hub-catalog-every-failure-was-packaging-not-ml-1bl6</guid>
      <description>&lt;p&gt;I'm onboarding NanoDet as an external recipe for Qualcomm's &lt;code&gt;qai-hub-models&lt;/code&gt; (the official flow publishes to my own Hugging Face namespace and gets aggregated on the catalog page). The model code was never the problem. Every single wall I hit was Python packaging. Four of them, in order:&lt;/p&gt;

&lt;h2&gt;
  
  
  Wall 1: the upstream wheel is missing its own subpackages
&lt;/h2&gt;

&lt;p&gt;Upstream NanoDet's &lt;code&gt;model/&lt;/code&gt; and &lt;code&gt;data/&lt;/code&gt; directories have no &lt;code&gt;__init__.py&lt;/code&gt;. Its &lt;code&gt;setup.py&lt;/code&gt; uses &lt;code&gt;find_packages()&lt;/code&gt;, so those directories simply don't make it into the wheel. &lt;code&gt;pip install&lt;/code&gt; succeeds; the first import dies with &lt;code&gt;ModuleNotFoundError&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The near-miss: my first self-check compared against the &lt;em&gt;source tree&lt;/em&gt;, where everything exists, and almost recorded a false pass. &lt;strong&gt;Validate the installed artifact, never the source tree.&lt;/strong&gt; &lt;code&gt;pip show -f&lt;/code&gt; and a clean-venv import are the check; the repo checkout is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dead end: bridging with &lt;code&gt;pkgutil.extend_path&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;I tried to bridge the recipe folder and the upstream package with a namespace-style &lt;code&gt;extend_path&lt;/code&gt; trick. It can't work here: the recipe folder and the upstream package shadow each other by name, and there is no extendable target on &lt;code&gt;sys.path&lt;/code&gt;. Measured, understood, abandoned.&lt;/p&gt;

&lt;h2&gt;
  
  
  The supported route: &lt;code&gt;external_repos&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The framework has an official mechanism for exactly this: the recipe's manifest declares the upstream repo and a pinned commit. On first import the framework clones it, adds the missing &lt;code&gt;__init__.py&lt;/code&gt; files itself, and rewrites the clone's absolute imports to fully-qualified paths. After switching to it: tests 4/4.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wall 2: the official template's undeclared dependencies
&lt;/h2&gt;

&lt;p&gt;In a clean &lt;code&gt;pip install qai-hub-models&lt;/code&gt; environment, validation died at step one. The Yolo template hard-imports &lt;code&gt;podm&lt;/code&gt;, &lt;code&gt;ultralytics&lt;/code&gt;, and &lt;code&gt;shapely&lt;/code&gt;; none are declared by the base package. Extra trap: the metrics library's distribution name is &lt;code&gt;object-detection-metrics&lt;/code&gt; — PyPI's &lt;code&gt;podm&lt;/code&gt; package is an unrelated project, and installing it just moves the error. (Also pin &lt;code&gt;setuptools&lt;/code&gt;: ≥82 removed &lt;code&gt;pkg_resources&lt;/code&gt;, which breaks pytorch-lightning-era dependencies.) Filed upstream as qualcomm/ai-hub-models#363. After installing the three, the same recipe validates &lt;strong&gt;28 passed / 0 failed / 0 warnings&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;Onboarding a model to someone else's catalog is a packaging audit wearing an ML costume. The checks that mattered: install into a clean venv, import from the wheel, run the official validator against the installed artifact. The model itself — the part I expected to fight — never objected once.&lt;/p&gt;

</description>
      <category>qualcomm</category>
      <category>python</category>
      <category>packaging</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>World First: GenAI Benchmarks for QCS6490 — Qwen3-0.6B at 1,555 tok/s Prefill, 24.6 tok/s Decode</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Sat, 14 Nov 2026 13:55:26 +0000</pubDate>
      <link>https://dev.to/anguoyang/the-export-script-was-the-bug-first-llm-numbers-on-qcs6490-qwen3-06b-1555-toks-prefill-5699</link>
      <guid>https://dev.to/anguoyang/the-export-script-was-the-bug-first-llm-numbers-on-qcs6490-qwen3-06b-1555-toks-prefill-5699</guid>
      <description>&lt;p&gt;Three days ago I asked a simple question: how fast does a small LLM run on a Qualcomm QCS6490? Qualcomm's model zoo publishes GenAI numbers for flagship phones and X Elite laptops. For the industrial chip in the Dragonwing RB3 Gen 2 kit — nothing. A blank page. So I measured it myself, with Qwen3-0.6B (official pre-quantized w4a16 package, context 512).&lt;/p&gt;

&lt;p&gt;It took four attempts and three distinct dead ends.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dead end 1: the plumbing.&lt;/strong&gt; The stock export's built-in downloader stalled at zero bytes for fifteen minutes. A manual resumable download fixed that (3.1 GB), then the unpack step wrote into a 512 MB tmpfs and died. Annoying, fixable, not interesting yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dead end 2: the compiler rejection.&lt;/strong&gt; The AI Hub compile job came back with: &lt;code&gt;--output_names is not supported for AIMET ONNX models.&lt;/code&gt; My first suspicion was the chip — maybe QCS6490 just isn't a GenAI target. So I ran the identical package against a Galaxy S25, a device Qualcomm officially supports for this model. Identical rejection, word for word. Not the chip. Reading the client source afterwards: the export helper appends &lt;code&gt;--output_names&lt;/code&gt; unconditionally to every compile. The compiler was never broken; the script was feeding it an option it cannot accept for this model type. I filed it (issue #366 in qualcomm/ai-hub-models); the maintainer confirmed it the next day and scheduled the fix for v0.67.0.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dead end 3: the precision that doesn't exist.&lt;/strong&gt; The llama.cpp runtime path needs q4_0. The model's manifest lists q4_0 as supported — but there is no quantization recipe for it anywhere in the repo, for this model or any other. Supported on paper, unreachable in practice. Filed as #367.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What worked:&lt;/strong&gt; stop arguing with the script and drive the API by hand. I read the failed job's own compile options and its already-uploaded model straight from the API, removed the single offending option, pinned the input shapes myself (the split graphs have dynamic axes; the original job showed exactly how they were pinned), and submitted the compiles directly. Four graph compiles, all green. One link job consolidated them into a single QNN context binary. Then per-graph profile jobs on the real device.&lt;/p&gt;

&lt;p&gt;The structure was a surprise in itself: this model's "2 parts" are the embedding layer alone (one Gather) and the entire 28-layer transformer plus lm_head.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The numbers&lt;/strong&gt; — Qwen3-0.6B, w4a16, context length 512, Dragonwing RB3 Gen 2 (QCS6490):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prefill: &lt;strong&gt;1,555 tok/s&lt;/strong&gt; (a 128-token prompt processes in 82.3 ms)&lt;/li&gt;
&lt;li&gt;Decode: &lt;strong&gt;24.6 tok/s&lt;/strong&gt; (40.7 ms per token)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Method note, because it matters: these are derived from per-graph profile timings on real silicon (embedding graph + transformer graph, prompt and token variants), not from an end-to-end chat demo. Every compile, link and profile job is linked in the public record below, so the whole chain is auditable and reproducible.&lt;/p&gt;

&lt;p&gt;These are the first GenAI tokens/second numbers ever published for QCS6490. First — as in nobody, including Qualcomm, had put a number on this chip before. The flagship phones have had their scorecards for a while; the board that actually ships in industrial products was a blank page until today.&lt;/p&gt;

&lt;p&gt;Full record, all job links, and the other models measured on this chip (vision models included): &lt;a href="https://github.com/anguoyang/qcs-bench" rel="noopener noreferrer"&gt;https://github.com/anguoyang/qcs-bench&lt;/a&gt;&lt;br&gt;
Model card: &lt;a href="https://huggingface.co/anguoyang/qwen3-0.6b-qcs6490" rel="noopener noreferrer"&gt;https://huggingface.co/anguoyang/qwen3-0.6b-qcs6490&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When v0.67.0 lands I'll re-run the stock one-command export and publish the comparison. The hand-built chain gives it something to be checked against — which is really what a benchmark is for.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>embedded</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
    <item>
      <title>From five broken transformers versions to 4.45 seconds on the board: getting Qwen2-VL-2B's vision tower onto an RK3588</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Fri, 13 Nov 2026 01:18:24 +0000</pubDate>
      <link>https://dev.to/anguoyang/from-five-broken-transformers-versions-to-445-seconds-on-the-board-getting-qwen2-vl-2bs-vision-133j</link>
      <guid>https://dev.to/anguoyang/from-five-broken-transformers-versions-to-445-seconds-on-the-board-getting-qwen2-vl-2bs-vision-133j</guid>
      <description>&lt;p&gt;Two days ago this model wouldn't even export. Today its vision tower runs on a real RK3588 board: a 392×392 image encoded in &lt;strong&gt;4,445.68 ms&lt;/strong&gt; (median of three independent processes), model load about 7.3 seconds, zero RKNN errors at runtime. This is a field note from the conversion chain — what broke, what the fix actually was, and what the number does and doesn't mean.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it started: the official demo doesn't run on the transformers it targets
&lt;/h2&gt;

&lt;p&gt;Rockchip's official RKLLM multimodal demo ships a Vision export script that assumes an older transformers contract: &lt;code&gt;model.visual&lt;/code&gt;, and a &lt;code&gt;rotary_pos_emb&lt;/code&gt; argument handed to each block. On transformers 5.8.0 the script dies with an AttributeError — &lt;code&gt;.visual&lt;/code&gt; has moved to &lt;code&gt;.model.visual&lt;/code&gt;. On 4.57.0 it dies differently — a TypeError, because VisionAttention unconditionally unpacks &lt;code&gt;position_embeddings&lt;/code&gt; and gets None.&lt;/p&gt;

&lt;p&gt;We bisected the versions by reading source, not by guessing. The combination that works is &lt;strong&gt;transformers 4.51.3&lt;/strong&gt;: it still has &lt;code&gt;self.visual&lt;/code&gt;, and when &lt;code&gt;position_embeddings&lt;/code&gt; is None it derives it from &lt;code&gt;rotary_pos_emb&lt;/code&gt;. That compatibility was removed in 4.54. The fix is version pinning — nothing more. We tried a &lt;code&gt;.visual&lt;/code&gt; alias shim first; it got past the attribute error and died on the attention contract anyway. A shim that passes the first error and silently produces wrong embeddings would have poisoned every measurement downstream, so it went in the bin.&lt;/p&gt;

&lt;p&gt;One more wrinkle worth naming: the same repository writes its quantization/embeddings script against the 5.x structure (&lt;code&gt;model.model.language_model&lt;/code&gt;), while the Vision export needs the 4.x structure. Half the repo is new, half is old. That's the kind of thing you only find by running it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The chain, step by step
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Vision → ONNX&lt;/strong&gt; (transformers 4.51.3, torch 2.6.0): the exported graph is 53 MB, plus a 2.66 GB data file. &lt;code&gt;onnx.checker&lt;/code&gt; passes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ONNX → RKNN&lt;/strong&gt; (RKNN-Toolkit2): the built model is 1.44 GB. The build log carried 11 E RKNN lines — REGTASK bit-width warnings and two "Unknown op target: 0" — and still finished with &lt;code&gt;rknn building done&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Board&lt;/strong&gt; (RK3588, 3 cores): &lt;code&gt;demo.jpg&lt;/code&gt;, input &lt;code&gt;[1, 392, 392, 3]&lt;/code&gt; NHWC FP16, output &lt;code&gt;[196, 1536]&lt;/code&gt; FP16. Three independent processes: 4,442.44 / 4,445.68 / 4,488.95 ms — median &lt;strong&gt;4,445.68 ms&lt;/strong&gt;. Model load median about 7.3 s. And the part I cared about most: &lt;strong&gt;zero E RKNN lines at runtime&lt;/strong&gt;. The 11 build warnings did not reproduce on the board.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What 4.45 seconds is — and isn't
&lt;/h2&gt;

&lt;p&gt;It is the vision tower only. The language half of this model — the RKLLM export that turns the whole thing into a runnable &lt;code&gt;.rkllm&lt;/code&gt; — is still waiting on a GPU machine that went offline mid-download. So this is not end-to-end question-answering speed, and I won't dress it up as that. The full 24-question run (the demo's own 20 MMBench questions plus 4 of our own in Chinese) is the next wave, once the language model lands.&lt;/p&gt;

&lt;p&gt;What the number does say: the vision tower is real, on-device, and reproducible to within ~1% across processes. The conversion chain that looked broken two days ago is one missing half away from a working on-board VLM.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule to take home
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pin the version; don't patch upstream.&lt;/strong&gt; When a vendor demo and a library disagree, the fix that survives is the boring one — a version that satisfies both contracts — not a shim that makes the error go away and leaves you wondering whether the numbers are real. And measure the tower before you claim the model works: a 4.45-second encode is a fact you can build on; a "VLM runs on RK3588" headline, at this stage, would be a wish.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>llm</category>
      <category>rockchip</category>
    </item>
    <item>
      <title>The camera inputs your profile inventory never sees</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Thu, 12 Nov 2026 22:28:39 +0000</pubDate>
      <link>https://dev.to/anguoyang/the-camera-inputs-your-profile-inventory-never-sees-ncn</link>
      <guid>https://dev.to/anguoyang/the-camera-inputs-your-profile-inventory-never-sees-ncn</guid>
      <description>&lt;p&gt;A profile-based ONVIF inventory has a blind spot: it only sees inputs that some profile references. A camera can have a video source with no profile bound to it — a second sensor, a spare input, a channel the installer never configured — and a profile-only scan will never mention it. That is what &lt;a href="https://github.com/anguoyang/onvif-scan" rel="noopener noreferrer"&gt;onvif-scan&lt;/a&gt; v0.4.0 closes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Independent source enumeration
&lt;/h2&gt;

&lt;p&gt;After imaging the profiles, the scanner now also queries &lt;code&gt;GetVideoSources&lt;/code&gt; and &lt;code&gt;GetVideoSourceConfigurations&lt;/code&gt; (Media1) — or &lt;code&gt;GetVideoSourceConfigurations&lt;/code&gt; alone on Media2, which has no &lt;code&gt;GetVideoSources&lt;/code&gt; operation at all. The report lists every source with its token, name and where the name came from, and marks which sources are &lt;strong&gt;not bound to any profile&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Two details matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sources are deduplicated by token, not by configuration.&lt;/strong&gt; One physical source can carry several configurations (main and sub streams, for instance). Counting configurations as channels was a bug we already fixed in v0.2; the enumeration keeps that discipline — one source stays one source.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The report makes no device-type inference.&lt;/strong&gt; Several sources can mean a multi-sensor camera just as well as a recorder. The report states the count and the unbound marking and stops there. No guessing, no brand tables.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One protocol note, same shape as the v0.2 Media2 fix: the Media2 &lt;code&gt;GetVideoSourceConfigurations&lt;/code&gt; request is a bare operation element — the operation is typed &lt;code&gt;tr2:GetConfiguration&lt;/code&gt;, so both token children are optional and omitted when listing everything. No wrapper element.&lt;/p&gt;

&lt;h2&gt;
  
  
  Also in this release
&lt;/h2&gt;

&lt;p&gt;The baseline diff now compares source token sets as a seventh change class, and the CSV gains &lt;code&gt;source_count&lt;/code&gt; / &lt;code&gt;unbound_source_count&lt;/code&gt; columns. 129 tests pass on a LAN host including full WS-Discovery end-to-end runs.&lt;/p&gt;

&lt;p&gt;Still simulation-verified only — no real-camera reports yet. If you run it on real hardware, a sanitised device report through the repo's issue template helps more than a star.&lt;/p&gt;

&lt;p&gt;Repo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/anguoyang/onvif-scan" rel="noopener noreferrer"&gt;https://github.com/anguoyang/onvif-scan&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Release:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/anguoyang/onvif-scan/releases/tag/v0.4.0" rel="noopener noreferrer"&gt;https://github.com/anguoyang/onvif-scan/releases/tag/v0.4.0&lt;/a&gt;&lt;/p&gt;

</description>
      <category>onvif</category>
      <category>python</category>
      <category>opensource</category>
      <category>iot</category>
    </item>
    <item>
      <title>Same quantized model, two different fates: one chip refused it, the other ran it in 1.39 ms</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Thu, 12 Nov 2026 01:41:40 +0000</pubDate>
      <link>https://dev.to/anguoyang/same-quantized-model-two-different-fates-one-chip-refused-it-the-other-ran-it-in-139-ms-2d5d</link>
      <guid>https://dev.to/anguoyang/same-quantized-model-two-different-fates-one-chip-refused-it-the-other-ran-it-in-139-ms-2d5d</guid>
      <description>&lt;p&gt;I took one quantized NanoDet model and offered it to two Qualcomm devices. One refused to load it at all. The other ran all 324 layers on the NPU in 1.39 ms. The model was identical. The quantization was identical. The difference was a float tail the quantizer couldn't touch — and whether the device was willing to look past it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The model
&lt;/h2&gt;

&lt;p&gt;NanoDet, quantized to w8a8 with 23 real images from COCO val2017 as calibration data. (24 were planned; one download failed, and I'd rather say so than pretend the set was clean.) Same graph, two devices: a Dragonwing RB3 Gen 2 (QCS6490) and a Galaxy S25.&lt;/p&gt;

&lt;h2&gt;
  
  
  What each device did with it
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Device&lt;/th&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;RB3 Gen 2&lt;/td&gt;
&lt;td&gt;TFLite, float&lt;/td&gt;
&lt;td&gt;90.0 ms — 352 layers: CPU 169, GPU 123, NPU 60. CPU time alone was 85% of the run&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RB3 Gen 2&lt;/td&gt;
&lt;td&gt;TFLite, w8a8&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;6.47 ms&lt;/strong&gt; (median 7.61 ms) — &lt;strong&gt;439 layers, all on the NPU&lt;/strong&gt;. Roughly 14× faster than float on the same path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RB3 Gen 2&lt;/td&gt;
&lt;td&gt;Precompiled QNN, w8a8&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Rejected&lt;/strong&gt; — the graph carries float tail tensors the quantizer can't convert (distribution integral and box-coordinate decode arithmetic after the GFL head). The device requires quantized I/O, tail included&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Galaxy S25&lt;/td&gt;
&lt;td&gt;Precompiled QNN, w8a8&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;1.39 ms&lt;/strong&gt; (median 1.40 ms) — 324 layers, all on the NPU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Galaxy S25&lt;/td&gt;
&lt;td&gt;Precompiled QNN, float&lt;/td&gt;
&lt;td&gt;1.47 ms — also all NPU&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;(The layer counts differ between precisions because a quantized graph carries extra quantize ops. Compare latencies, not layer counts, across precisions.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the same graph has two fates
&lt;/h2&gt;

&lt;p&gt;YOLOv11-N quantized cleanly on the RB3 in the earlier experiment — 341 layers, all NPU, 5.03 ms — because its export is raw convolution output. NanoDet's export carries its decode arithmetic inside the graph: the GFL head's distribution integral and the box-coordinate decode run in float, after the convolutions. The quantizer can't convert that tail, and the RB3's QNN path won't accept a graph whose I/O isn't fully quantized. Same quantized graph, same device family — one model's tail is clean, the other's isn't.&lt;/p&gt;

&lt;p&gt;The S25 takes the same graph and runs it in 1.39 ms, because its QNN path accepts it. And note the S25's float path is 1.47 ms — on the flagship, quantization buys almost nothing, because the float path was already all-NPU. On the RB3, quantization is the difference between 90 ms and 6.47 ms, because the float path was mostly CPU.&lt;/p&gt;

&lt;p&gt;Two ways to fix the RB3 rejection are on the table: compile the quantized model through TFLite instead (convolutions on the NPU, tail on the CPU), or split the export — backbone and head as pure convolutions through QNN, decode on the host. Both concede the same point: the decode tail belongs on the host, not in the graph.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule to take home
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Quantization is a property of the graph and the device's I/O contract, not of the model alone.&lt;/strong&gt; A model can be "quantized" and still be un-runnable on a given device, if its tail carries float arithmetic the device won't accept. When you report a quantized benchmark, name the path and the device — "w8a8" alone says nothing about whether it ran, let alone how fast.&lt;/p&gt;

&lt;p&gt;Same story as the 27× gap in the earlier experiment, from the other side: there, the runtime path decided the speed. Here, the runtime path decides whether the model runs at all. Both times the evidence that mattered was the per-layer profile, not the headline number.&lt;/p&gt;

&lt;p&gt;The model itself is now published as an AI Hub external recipe — &lt;a href="https://huggingface.co/anguoyang/nanodet" rel="noopener noreferrer"&gt;https://huggingface.co/anguoyang/nanodet&lt;/a&gt; — with w8a8 in its supported precisions and the RB3 QNN rejection recorded in the recipe's own test report, so the next person hits the signpost instead of the wall.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>benchmarking</category>
      <category>qualcomm</category>
    </item>
    <item>
      <title>ONVIF inventory that notices when something changes</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Tue, 10 Nov 2026 21:24:47 +0000</pubDate>
      <link>https://dev.to/anguoyang/onvif-inventory-that-notices-when-something-changes-43b8</link>
      <guid>https://dev.to/anguoyang/onvif-inventory-that-notices-when-something-changes-43b8</guid>
      <description>&lt;p&gt;Scanning a LAN for ONVIF cameras is the easy part. The useful part is noticing when something &lt;em&gt;changed&lt;/em&gt;: a camera replaced, firmware bumped, a profile vanished, a device that moved to a new IP. That is what &lt;a href="https://github.com/anguoyang/onvif-scan" rel="noopener noreferrer"&gt;onvif-scan&lt;/a&gt; v0.3.0 adds.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSV export
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;scan --csv inventory.csv&lt;/code&gt; writes one row per device × profile — because the interesting data (encoder options, PTZ, source association) lives at profile level, and rolling it up per device would either lose fields or invent aggregates. Columns are fixed, values are UTF-8+BOM for Excel, unknowns are empty cells, and the findings column carries finding &lt;em&gt;codes&lt;/em&gt; only — the detail text stays in the JSON report. It is built from the same scrubbed report object as the JSON and HTML, so a password cannot leak into the CSV through a different code path. Opt-in only; it does not appear unless you ask for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Offline baseline diff
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;onvif-scan diff old.json new.json&lt;/code&gt; compares two inventory reports without scanning anything and without credentials. It reports added/removed devices, firmware changes, level changes, profile-set drift, channel-count changes, finding-code changes and declared-service changes.&lt;/p&gt;

&lt;p&gt;Two details matter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Identity is MAC first, IP as fallback.&lt;/strong&gt; Cameras change IP addresses; matching by IP alone would report one device as two (a disappearance plus an appearance). A MAC that appears or disappears is reported as added/removed — honestly, since the identity key itself changed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exit codes are made for cron: 0 = no change, 1 = changes found, 2 = bad input.&lt;/strong&gt; 1 is not a failure. A scheduled job can run the scan, diff against last week, and alert only on 1.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Also in this release
&lt;/h2&gt;

&lt;p&gt;The issue tracker is now empty: &lt;code&gt;--lang zh-CN&lt;/code&gt; for the HTML report and a Scopes-minimal ProbeMatch fixture both landed. 115 tests pass on a LAN host including full WS-Discovery end-to-end runs.&lt;/p&gt;

&lt;p&gt;Still simulation-verified only — no real-camera reports yet. If you run it on real hardware, a sanitised device report through the repo's issue template helps more than a star.&lt;/p&gt;

&lt;p&gt;Repo:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/anguoyang/onvif-scan" rel="noopener noreferrer"&gt;https://github.com/anguoyang/onvif-scan&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Release:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/anguoyang/onvif-scan/releases/tag/v0.3.0" rel="noopener noreferrer"&gt;https://github.com/anguoyang/onvif-scan/releases/tag/v0.3.0&lt;/a&gt;&lt;/p&gt;

</description>
      <category>onvif</category>
      <category>python</category>
      <category>opensource</category>
      <category>iot</category>
    </item>
    <item>
      <title>Same model, same chip, 27 apart: the runtime path is the performance</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Mon, 09 Nov 2026 00:28:43 +0000</pubDate>
      <link>https://dev.to/anguoyang/same-model-same-chip-27x-apart-the-runtime-path-is-the-performance-4cig</link>
      <guid>https://dev.to/anguoyang/same-model-same-chip-27x-apart-the-runtime-path-is-the-performance-4cig</guid>
      <description>&lt;p&gt;YOLOv11-N on a Qualcomm Dragonwing RB3 Gen 2 (QCS6490), measured on Qualcomm AI Hub's real-device workbench. Depending on which runtime path I took, the same model on the same chip took &lt;strong&gt;134.7 ms&lt;/strong&gt; or &lt;strong&gt;5.03 ms&lt;/strong&gt;. "It runs" told me nothing. Here are all six paths, including the four that failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The six paths
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Path&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;th&gt;Layer placement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;TFLite (default)&lt;/td&gt;
&lt;td&gt;134.7 ms&lt;/td&gt;
&lt;td&gt;343 layers: &lt;strong&gt;19 NPU&lt;/strong&gt;, 168 GPU, 156 CPU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Precompiled QNN, FP32&lt;/td&gt;
&lt;td&gt;rejected&lt;/td&gt;
&lt;td&gt;the device demands quantized I/O — a float model doesn't get in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Precompiled QNN, w8a16 QDQ&lt;/td&gt;
&lt;td&gt;conversion failed&lt;/td&gt;
&lt;td&gt;server returns a bare &lt;code&gt;exit code 14&lt;/code&gt;, no actionable detail&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;QNN DLC, FP32&lt;/td&gt;
&lt;td&gt;compiles, fails on device&lt;/td&gt;
&lt;td&gt;&lt;code&gt;QnnModel_composeGraphsFromDlc: MODEL_GRAPH_ERROR&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Precompiled QNN, w8a8 QDQ&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;5.03 ms&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;341 layers, all NPU&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Galaxy S25 (control), TFLite and QNN&lt;/td&gt;
&lt;td&gt;~2.9 ms both&lt;/td&gt;
&lt;td&gt;all NPU&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Notes on the failures, because they're the useful part:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Path 1 is the dangerous one: it &lt;em&gt;works&lt;/em&gt;. It just quietly runs most of the network on GPU and CPU. Without the per-layer profile I would have written down "RB3 Gen 2 does YOLOv11-N in 134.7 ms" and moved on.&lt;/li&gt;
&lt;li&gt;Path 3's failure is a dead end with no signpost — a context-binary conversion that returns only an exit code. I filed it upstream (qualcomm/ai-hub-models#364) with the job details; if you hit the same wall, that's the thread to watch.&lt;/li&gt;
&lt;li&gt;Path 4 is the classic: "it compiled" is not "it runs". Graph composition is a separate gate, on the device, and it can say no.&lt;/li&gt;
&lt;li&gt;Path 6 is the control that makes the story: on a flagship phone, even the default TFLite delegate lands everything on the NPU. The broken default is specific to the edge SoC path, not to the model and not to TFLite in general.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The rule I'm taking away
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A latency number without its path is not a measurement.&lt;/strong&gt; Runtime, precision, and layer placement are part of the number. The per-layer profile is the only evidence that distinguishes "the NPU is slow" from "the NPU never got the work" — and those two conclusions lead to opposite decisions (different chip vs. different export settings).&lt;/p&gt;

&lt;p&gt;This is the same disease I keep meeting on Rockchip boards, where an RKNN model can silently fall back to CPU operator by operator. Different vendor, different toolchain, identical failure mode: the default path is optimistic, the profile doesn't lie.&lt;/p&gt;

&lt;p&gt;If you're benchmarking edge AI, publish the path with the number. If you're reading a benchmark that doesn't, you now know what it might be hiding.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Whisper on the RK3588 NPU: the encoder offload works — everything around it is the real lesson</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Mon, 09 Nov 2026 00:26:35 +0000</pubDate>
      <link>https://dev.to/anguoyang/whisper-on-the-rk3588-npu-the-encoder-offload-works-everything-around-it-is-the-real-lesson-10en</link>
      <guid>https://dev.to/anguoyang/whisper-on-the-rk3588-npu-the-encoder-offload-works-everything-around-it-is-the-real-lesson-10en</guid>
      <description>&lt;p&gt;Status: encoder offload merged into a working whisper.cpp path on an RK3588 board, transcription byte-identical to the CPU reference, PR filed upstream (ggml-org/whisper.cpp#4159). This post is the full map — the win, the two dead ends, and the tooling traps — because the dead ends are the part nobody publishes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The win
&lt;/h2&gt;

&lt;p&gt;Whisper's encoder is a fixed-shape graph, which makes it the natural candidate for whole-graph NPU offload. With a native 30-second window export, the geometry lines up exactly with whisper.cpp: ONNX &lt;code&gt;[1,80,3000] → [1,1500,512]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Same board, same input:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RKNN encoder, single run: &lt;strong&gt;703.0 ms&lt;/strong&gt; (of which &lt;code&gt;rknn_run&lt;/code&gt; 676.8 ms)&lt;/li&gt;
&lt;li&gt;CPU encoder: &lt;strong&gt;4,729.4 ms&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;End-to-end transcription: 13.76 s → &lt;strong&gt;11.15 s&lt;/strong&gt;, output byte-identical with the offload on and off&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The glue code is 143 lines. It is small because the measurements came first (see the last section).&lt;/p&gt;

&lt;h2&gt;
  
  
  Reality check 1: NPU time is the small part
&lt;/h2&gt;

&lt;p&gt;Before building anything, I ran Rockchip's official Model Zoo whisper build on the same board. Its RKNN inference totals &lt;strong&gt;2.47 s&lt;/strong&gt; (×realtime 0.225 — matches the official 0.215 claim, good). But the end-to-end wall clock is &lt;strong&gt;16.39 s&lt;/strong&gt;: the Python host side eats roughly &lt;strong&gt;13.9 s&lt;/strong&gt;. Against the CPU build's 28.26 s wall clock, the "NPU version" is only &lt;strong&gt;1.72× faster&lt;/strong&gt; end to end.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NPU fast ≠ product fast.&lt;/em&gt; If your harness is Python and your pre/post-processing is heavy, the accelerator is not your bottleneck.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reality check 2: the decoder graph is structurally wrong
&lt;/h2&gt;

&lt;p&gt;The Model Zoo decoder runs at 87 ms/step, 24 steps ≈ 2.1 s — it runs, but it re-runs the whole graph per token because there is no KV-cache structure. That's why this round offloads the encoder only, and why "just convert the whole model" is a trap (below).&lt;/p&gt;

&lt;h2&gt;
  
  
  The dead ends (with receipts)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Whole-model .rknn conversion was slower than CPU.&lt;/strong&gt; Earlier attempts in upstream issue #1557 measured exactly that; the decoder graph shape is the reason. Skipping this saved me a week.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-operator matmul offload doesn't pay.&lt;/strong&gt; RK3588 GEMM is weak (~FP16 10 GFLOPS per unit), and rknpu2 matmul demands a specific weight repacking (A→(K/8,N,8), B→(M/16,K/32,16,32), C→(N/4,M,4)). Someone built it, measured it, and advised against it — in public, in the same issue thread. Whole-graph or nothing.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Tooling traps worth knowing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A converted .rknn file can lie in its header.&lt;/strong&gt; My first decoder conversion claimed 159,697,664 bytes in the header while actually being 64,778,240 bytes; the runtime rejected it with &lt;code&gt;RKNN_ERR_MODEL_INVALID&lt;/code&gt;. Verify header size against actual file size after every conversion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;rknn-toolkit-lite2&lt;/code&gt; import pollutes &lt;code&gt;logging&lt;/code&gt;&lt;/strong&gt; — it mutates &lt;code&gt;logging._nameToLevel&lt;/code&gt;, after which torch crashes. Lazy-import it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Window geometry is a silent mismatch.&lt;/strong&gt; The Model Zoo build changed &lt;code&gt;CHUNK_LENGTH&lt;/code&gt; to 20 s; its output frame count doesn't match whisper.cpp's native 30 s / 1500 frames. The parts don't compose until you re-export at 30 s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;My own test harness was wrong once&lt;/strong&gt;: an expected-transcript file carried a leading space from test code and nearly failed a correct OFF transcription. Fixed the expectation, not the model output — and kept the correction script as evidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Measurement honesty
&lt;/h2&gt;

&lt;p&gt;The RK3588 board I test on carries production load (load average 16–20 on 8 cores) and no idle window appeared in a week of watching. So every CPU wall-clock number above is a &lt;em&gt;loaded-board&lt;/em&gt; number and is labeled as such wherever I cite it. The per-call NPU figures (703 ms etc.) are single-run timings inside one process and are not load-sensitive in the same way, but the comparison context matters and I'd rather state it than hide it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The order that made this cheap
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;CPU baseline first → the encoder was the single biggest item (9.57 s median encode on an 11 s clip, loaded board).&lt;/li&gt;
&lt;li&gt;Model Zoo run → proved the whole-graph NPU ceiling and exposed the host-overhead problem before I wrote any code.&lt;/li&gt;
&lt;li&gt;Only then, 143 lines of glue — after a reuse inventory (the OpenVINO backend precedent is 108+31 lines of registration code) instead of hand-rolling a ggml operator backend.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Measure first, write code last. The PR is ggml-org/whisper.cpp#4159 if you want to follow or review.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The official RKLLM vision demo doesn't run on the transformers it targets — a five-version bisection</title>
      <dc:creator>Anguo</dc:creator>
      <pubDate>Sun, 08 Nov 2026 22:11:01 +0000</pubDate>
      <link>https://dev.to/anguoyang/the-official-rkllm-vision-demo-doesnt-run-on-the-transformers-it-targets-a-five-version-bisection-4a7i</link>
      <guid>https://dev.to/anguoyang/the-official-rkllm-vision-demo-doesnt-run-on-the-transformers-it-targets-a-five-version-bisection-4a7i</guid>
      <description>&lt;p&gt;I'm converting Qwen2-VL-2B-Instruct to run on a Rockchip board with Rockchip's official &lt;code&gt;rknn-llm&lt;/code&gt; toolkit. Step one is exporting the vision tower to ONNX with the repo's own multimodal demo script. It did not run. Not on my code — on the repo's own script, with the transformers generation the repo's newer scripts are written for.&lt;/p&gt;

&lt;p&gt;Here is the failure trail, version by version:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;transformers&lt;/th&gt;
&lt;th&gt;result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;5.8.0&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;AttributeError&lt;/code&gt; — the export script reads &lt;code&gt;model.visual&lt;/code&gt;; in 5.x the attribute moved to &lt;code&gt;model.model.visual&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4.57.0&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;TypeError&lt;/code&gt; — &lt;code&gt;VisionAttention&lt;/code&gt; unconditionally unpacks &lt;code&gt;position_embeddings&lt;/code&gt;, which comes back as &lt;code&gt;None&lt;/code&gt; under the script's calling convention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4.54.x&lt;/td&gt;
&lt;td&gt;still broken — the &lt;code&gt;rotary_pos_emb&lt;/code&gt; fallback (deriving &lt;code&gt;position_embeddings&lt;/code&gt; when it is &lt;code&gt;None&lt;/code&gt;) was removed in this generation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4.51.3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;works&lt;/strong&gt; — source check confirms it has both &lt;code&gt;self.visual&lt;/code&gt; and the &lt;code&gt;rotary_pos_emb&lt;/code&gt; fallback&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So the export script is written against a pre-4.54 contract, while sitting in the same repo as a quantization script that already uses the 5.x module layout (&lt;code&gt;model.model.language_model&lt;/code&gt;). One repo, half new, half old — and nothing in the repo tells you which half wants which transformers. I ended up running two environments side by side: 4.51.3 (+ torch 2.6.0) for the vision export, 5.8.0 for the quantization embeds.&lt;/p&gt;

&lt;p&gt;Two ground rules I kept while doing this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No patching the upstream script, no monkeypatching the model.&lt;/strong&gt; I did try a &lt;code&gt;.visual&lt;/code&gt; alias shim early on: it cleared the attribute error and then died on the attention contract anyway. Even if it had "worked", a shim that changes how embeddings flow risks silently wrong embeddings — which would poison every benchmark that follows. Version pinning only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify against source, not vibes.&lt;/strong&gt; The 4.51.3 answer came from reading the transformers source at each generation and checking both conditions, then confirming with the actual export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Result: the vision tower exported cleanly — a 53 MB ONNX graph plus 2,661,085,184 bytes of weights, &lt;code&gt;onnx.checker&lt;/code&gt; passing.&lt;/p&gt;

&lt;p&gt;Next steps are the quantization, the RKLLM export, and then the part I actually care about: on-board numbers (vision encode per call, prefill/decode tokens/s) and a 24-question quality check including Chinese signage/OCR-style prompts. If the version archaeology above saves you an afternoon, the board numbers in part two might save you a purchase decision.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/airockchip/rknn-llm" rel="noopener noreferrer"&gt;https://github.com/airockchip/rknn-llm&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
