
I've written before about how tight our flash budget already is on the sensor nodes we build — every extra kilobyte competes with firmware and mesh stack that's already living close to the edge of what fits. So when TinyML started showing up regularly in things I was reading, my first reaction was mild skepticism: machine learning on a microcontroller with a few hundred kilobytes of flash and a similarly modest amount of RAM sounds, on its face, like a stretch. But I was curious enough to actually dig in rather than dismiss it, so here's where that thinking landed. This is exploratory — nobody has tried putting a model on our hardware, and this isn't a plan to.
What TinyML actually is
The core idea is straightforward once you see it: take a neural network, quantize its weights down from 32-bit floats to 8-bit integers (or sometimes even lower precision), prune it aggressively, and run inference — not training, just inference — on a microcontroller instead of a phone or a server. Frameworks like TensorFlow Lite Micro (and a few others in that space) exist specifically to run these quantized models within tight memory budgets, without an operating system or a filesystem, just a static memory arena and a bunch of pre-compiled operator kernels. The models that fit are small by ML standards — nowhere near a large language model or even a full-size image classifier — but genuinely capable of tasks like keyword spotting, simple gesture recognition, or basic pattern classification.
Where it could plausibly matter for a sensor node
The use case that actually makes sense for something like our hardware class isn't "run a sophisticated model" — it's using a tiny model to reduce how much data needs to go over the mesh in the first place. A vibration sensor that normally reports raw readings periodically could instead run a small anomaly-detection model locally and only transmit when it sees something that looks abnormal, rather than transmitting a full time series every cycle. Given how precious airtime and power budget are on a LoRa link with duty cycle limits, "detect locally, report rarely" is a genuinely appealing shape for a use case — it's the same instinct behind edge computing generally, just at a much smaller scale than most people mean when they say that phrase.
Simple pattern or anomaly detection on sensor data — is this reading in a normal range given recent history, does this look like a known failure signature — is a much more modest ask than anything resembling a "real" ML model, and modest is exactly what fits in a few tens of kilobytes of quantized weights.
Why I'm not holding my breath
The catch is exactly the constraint I already know intimately from the flash-budget side of things: a model has to compete for space with firmware that's already tight. Our nodes are running a mesh protocol stack, sensor drivers, over-the-air update logic, and the application logic itself, all within a flash budget that already has uncomfortably little headroom. Bolting a model — even a small quantized one — onto that picture means either the model has to be genuinely tiny, or something else has to get smaller, and neither of those is free. RAM is the other side of the same coin: inference needs scratch buffers for intermediate activations, and RAM on these parts is even more constrained than flash, proportionally.
None of that makes TinyML impossible for a device in our class — it's more that the realistic version is narrow: a very small, purpose-built model doing one specific classification task, not a general-purpose "smart sensor" story. And it would need a genuinely compelling use case to be worth the budget it eats, because that budget is already spoken for.
I don't have a conclusion here so much as an open question I'm going to keep turning over. If anyone's actually done this on hardware in our weight class and has real numbers on flash/RAM cost versus what it bought them, I'd love to hear about it — I'm reading, not building, at this stage.

我之前寫過我們做的感測器節點 flash 預算已經有多緊——每多用一 KB,都得跟已經逼近極限的韌體與 mesh stack 搶空間。所以當 TinyML 開始頻繁出現在我讀的東西裡時,我第一反應是有點懷疑:在一顆只有幾百 KB flash、RAM 也差不多寒酸的 microcontroller 上做機器學習,聽起來一開始就很勉強。但我還是好奇到想真的鑽進去看看,而不是直接打發掉,所以這篇就是我想到哪寫到哪的結果。這篇是探索性質——沒有人在我們的硬體上真的試過模型,這也不是一個計畫。
TinyML 到底是什麼
核心概念其實一看就懂:拿一個神經網路,把它的權重從 32 位元浮點數量化成 8 位元整數(有時候甚至更低精度),大幅剪枝,然後做推論——不是訓練,只有推論——跑在 microcontroller 上,而不是手機或伺服器。像 TensorFlow Lite Micro(還有這個領域的其他幾個框架)就是專門為了在緊繃的記憶體預算內跑這些量化過的模型而存在的,沒有作業系統、沒有檔案系統,就是一塊靜態記憶體區域加上一堆預先編譯好的運算元 kernel。能塞進去的模型以 ML 的標準來說很小——完全比不上大型語言模型,甚至比不上一個完整尺寸的圖像分類器——但確實能勝任像關鍵字偵測、簡單手勢辨識、或基本的模式分類這類任務。
這對感測器節點來說可能有意義的地方在哪
對我們這類硬體來說,真正說得通的使用情境不是「跑一個精密的模型」,而是用一個很小的模型去減少一開始需要透過 mesh 傳送的資料量。一個平常定期回報原始讀數的振動感測器,可以改成在本地跑一個小型異常偵測模型,只有在偵測到看起來不正常的東西時才傳送,而不是每個週期都傳送完整的時間序列。考量到在有 duty cycle 限制的 LoRa 連結上,空中時間跟電力預算有多珍貴,「本地偵測、很少回報」這個形狀對一個使用情境來說確實很吸引人——這跟一般所謂的 edge computing 背後是同一種直覺,只是規模比大部分人講這個詞時想的小得多。
對感測器資料做簡單的模式或異常偵測——這個讀數相對最近的歷史算不算正常範圍、這看起來像不像某個已知的故障特徵——這是比任何「真正」的 ML 模型都謙虛得多的要求,而謙虛正好就是幾十 KB 量化權重能裝下的東西。
為什麼我沒有太樂觀
問題就出在我從 flash 預算那篇已經很熟悉的限制上:一個模型得跟已經很緊繃的韌體搶空間。我們的節點跑著 mesh 協定 stack、感測器驅動、OTA 更新邏輯,還有應用邏輯本身,全部塞在一個本來餘裕就少得不太舒服的 flash 預算裡。把一個模型——就算是很小、量化過的——硬塞進這個局面,代表要嘛模型得真的非常小,要嘛得有別的東西縮小,而這兩者都不是免費的。RAM 是同一個問題的另一面:推論需要暫存區來放中間的 activation 值,而這些晶片上的 RAM 按比例來說比 flash 更緊。
這不代表 TinyML 對我們這類裝置來說不可能——比較像是現實可行的版本很窄:一個非常小、專門為單一分類任務打造的模型,而不是一個通用的「智慧感測器」故事。而且它需要一個真正有說服力的使用情境,才值得吃掉那份預算,因為那份預算早就有人在用了。
我這邊與其說有個結論,不如說有個我會繼續放在心上翻來覆去想的開放問題。如果有人真的在跟我們同一個量級的硬體上試過,而且有 flash/RAM 成本對比實際效益的真實數字,我很想聽聽——我現在這個階段是在讀資料,不是在動手做。