Featured Teardown · Strategy Signature № 03 · INTERFERENCE

本機 Gemma 4 e2b vs 雲端 Gemma 4 31B:100 個任務跑完,誰真的比較快、比較準?Local Gemma 4 e2b vs Cloud Gemma 4 31B: After 100 Tasks, Which Is Actually Faster and More Accurate?

TL;DR:本機 gemma4:e2b、雲端舊世代 gemma-3n-e2b-it、雲端新世代 gemma-4-31b-it(都是 NVIDIA NIM 免費層),100 題三方實測——速度跟準確率都是舊世代雲端小模型贏(47秒、92.5%),本機第二(102秒、72.5%),新世代雲端大模型墊底而且不穩(178秒、10% 長尾、87.5%)。三邊帳單都是 NT$0。

TL;DR: Local gemma4:e2b, cloud's older-generation gemma-3n-e2b-it, and cloud's newer gemma-4-31b-it (all NVIDIA NIM free tier), 100 tasks, three-way measured — the older-gen cloud small model wins on both speed and accuracy (47s, 92.5%), local is second (102s, 72.5%), and the newer, bigger cloud model comes in last and least consistent (178s, 10% tail latency, 87.5%). All three sides billed NT$0.

我原本就好奇本地跑、雲端跑,兩種方式實際跑起來到底差在哪——不是規格表上的數字差異,是真的丟 100 個任務下去,時間、準確率、帳單會長什麼樣子。這次挑了三個模型:本機 gemma4:e2b、雲端舊世代 gemma-3n-e2b-it、雲端新世代 gemma-4-31b-it(後兩個都用 NVIDIA NIM 免費層跑),100 個真實任務、實測數字。

I'd been curious about local vs cloud inference for a while — not the spec-sheet differences, but what actually happens when you throw 100 real tasks at each: time, accuracy, the real bill. This run pits three models against each other: local gemma4:e2b, cloud's older-generation gemma-3n-e2b-it, and cloud's newer gemma-4-31b-it (the latter two via NVIDIA NIM's free tier) — 100 real tasks, measured.


為什麼挑這三個模型比?

先講兩個模型的組合:

  1. 同源比較更乾淨:本機 gemma4:e2b(5.1B)、雲端 google/gemma-4-31b-it(NVIDIA NIM 免費層)——同一個 Gemma 4 家族,只換執行環境(本機 vs 雲端),把「哪裡跑」這個變數單獨隔離出來,不被「完全不同模型」的架構差異汙染比較。
  2. 反映真實情境:雲端服務商通常也傾向配置比本機能跑的更大的模型,31B 對 5.1B 不是刻意選的不公平對照,而是多數人實際會遇到的情境——本機裝得下的模型,跟雲端上點得到的模型,體型本來就不一樣。

第三個模型是後來加的:本機那個 gemma4:e2b,NIM 上其實沒有對應版本。NIM 目錄裡有個名字很像的 gemma-3n-e2b-it,但那是完全不同世代(Gemma 3n, 不是 Gemma 4)。查證清楚之後,乾脆把它也拉進來當第三條路線——不是硬湊 一個不存在的對照組,而是多一個「世代」維度:舊世代雲端小模型,跟本機、 跟新世代雲端大模型,三邊放在一起看。這樣可以把「變慢是因為雲端」跟 「變慢是因為又大又新」這兩件事拆開,不會混在一起。

Why these three models?

The two-model pairing first:

  1. A cleaner same-family comparison: local gemma4:e2b (5.1B) and cloud google/gemma-4-31b-it (NVIDIA NIM free tier) are the same Gemma 4 family — only the execution environment changes (local vs cloud), isolating "where it runs" instead of confounding the comparison with a completely different architecture.
  2. Reflects a realistic scenario: cloud providers tend to default to bigger models than a laptop can run. 31B vs 5.1B isn't an artificially unfair pairing — it's what most people actually run into: what fits on your machine and what's available in the cloud are simply different sizes.

The third model came later: there's no NIM equivalent of the local gemma4:e2b. NIM's catalog has a similarly-named gemma-3n-e2b-it, but that's a completely different generation (Gemma 3n, not Gemma 4). After confirming that, it got pulled in as a third route anyway — not to force a comparison that doesn't exist, but to add a "generation" dimension: an older, smaller cloud model sitting alongside local and the newer, bigger cloud model. That lets "is it slow because it's cloud" and "is it slow because it's big and new" get separated instead of tangled together.


本機跟雲端,底層到底怎麼跑?

在看數字之前,先搞懂兩邊實際上在做什麼——這樣後面的速度差距才有解釋,不是憑空冒出來的。

本機 gemma4:e2b(Ollama):Ollama 底層是 llama.cpp,模型檔案格式是 GGUF——把模型權重從訓練時的高精度(例如 32-bit 浮點數)壓縮成更低位元的整數表示,副作用是檔案變小、載入變快、推論用的記憶體變少,代價是損失一點精確度。Ollama 預設用的量化等級是 Q4_K_M(4-bit)。gemma4:e2b 另外還是一個「thinking 模型」:生成答案前,模型會先在一個獨立的推理通道(thinking)裡「想」一輪,這個通道跟最終答案(response / content)分開計算 token 預算——這正是我們踩到的坑的根源(見下段)。

雲端 gemma-4-31b-it(NVIDIA NIM):NIM 不是一個模型,是 NVIDIA 包好的容器化推論微服務——把 TensorRT-LLM、vLLM、Triton Inference Server 這類已經做過 GPU 底層最佳化(KV-cache、paged attention、batching、FP8 等)的推論引擎,跟一個 OpenAI 相容的 REST API 包在一起丟給你用。你打的每一個 request,背後是 NVIDIA 的 GPU 叢集用這套最佳化過的引擎執行;免費層代表你在跟其他使用者共用排隊順序,沒有專屬算力保證——這是我們這次量到長尾延遲的合理解釋。

這解釋了那個踩坑gemma4:e2b 的 thinking 通道預設是開啟的,如果 num_predict(本機這邊控制輸出上限的參數)設太低,思考過程會把整個預算吃光,最終答案的 response 欄位收到空字串——即使 eval_count 顯示 token 有跑滿。要拿到真正的答案,得在請求裡明確加 think: false

How do local and cloud actually run under the hood?

Before the numbers, it's worth understanding what each side is actually doing — that's what explains the speed gap later, not magic.

Local gemma4:e2b (Ollama): Ollama runs on llama.cpp under the hood, and its model file format is GGUF — training-time weights (e.g. 32-bit float) get compressed into lower-bit integer representations, which shrinks file size, speeds up loading, and cuts inference memory, at the cost of some precision. Ollama's default quantization level is Q4_K_M (4-bit). gemma4:e2b is also a "thinking model": before writing its answer, it reasons in a separate internal channel (thinking), which draws from the same token budget as the final answer (response / content) but is accounted separately — this is exactly the root cause of the pitfall below.

Cloud gemma-4-31b-it (NVIDIA NIM): NIM isn't a model — it's NVIDIA's containerized inference microservice, packaging GPU-optimized engines (TensorRT-LLM, vLLM, Triton Inference Server — with KV-cache, paged attention, batching, FP8, etc. already tuned) behind an OpenAI-compatible REST API. Every request you send runs on NVIDIA's GPU cluster through that optimized engine; the free tier means you're sharing a queue with other users, with no dedicated capacity guarantee — a reasonable explanation for the tail latency measured here.

This explains the pitfall we hit: gemma4:e2b's thinking channel defaults to on. If num_predict (the local-side output cap) is set too low, the reasoning process consumes the entire budget and the final response field comes back empty — even though eval_count shows tokens were generated. Getting a real answer requires explicitly setting think: false in the request.


100 個任務怎麼設計的?

三類任務,模擬真實使用場景:

類別數量描述
摘要40中文工作/生活筆記,一句話摘要
分類40四選一(工作/學習/個人/待處理),有已知正解可比對準確率
翻譯20英文段落翻繁體中文

三個跑法:

  • 本機gemma4:e2b,串行(一次一個)
  • 雲端(舊世代)google/gemma-3n-e2b-it(NVIDIA NIM 免費層),併發 4
  • 雲端(新世代)google/gemma-4-31b-it(NVIDIA NIM 免費層),併發 4

踩了一個坑值得記錄:gemma4:e2b 是 thinking 模型,第一次跑測時沒加 think: false,結果 40 篇摘要全部回傳空字串——num_predict 配額被 內部推理過程吃光,答案根本沒生出來。加上 think: false 後重跑, 100/100 才全部拿到真實內容。

How were the 100 tasks designed?

Three categories, modeled on real usage:

CategoryCountDescription
Summary40Chinese work/life notes, one-sentence summary
Classification404-way (work/study/personal/followup), has known ground truth for accuracy scoring
Translation20English paragraphs to Traditional Chinese

Three runners:

  • Local: gemma4:e2b, serial (one at a time)
  • Cloud (older generation): google/gemma-3n-e2b-it (NVIDIA NIM free tier), concurrency 4
  • Cloud (newer generation): google/gemma-4-31b-it (NVIDIA NIM free tier), concurrency 4

One real pitfall worth recording: gemma4:e2b is a thinking model. The first run didn't set think: false, and all 40 summaries came back as empty strings — the num_predict budget got consumed by the internal reasoning trace before any answer was written. Adding think: false and rerunning got 100/100 real content.


誰真的比較快?

指標本機 gemma4:e2b(serial)雲端 gemma-3n-e2b-it(併發4,舊世代)雲端 gemma-4-31b-it(併發4,新世代)
總任務時間102.3 秒(1.7 分鐘)47.3 秒(0.8 分鐘)178.5 秒(3.0 分鐘)
平均單題延遲1.02 秒1.86 秒4.99 秒
p90 延遲1.54 秒3.16 秒10.09 秒
最慢單題1.79 秒3.66 秒47.05 秒
超過 10 秒的題數0 / 1000 / 10010 / 100

第一個意外:本機比新款雲端模型快,即使雲端開了 4 併發——直覺上會覺得 本機小時級、雲端分鐘級,實測完全相反,因為這次比的是免費層排隊中的 31B 大模型,本機是專門優化過的 5.1B 小模型。

第二個更意外:雲端最快的不是新模型,是舊模型。 gemma-3n-e2b-it (舊世代、小尺寸)batch 完成只要 47.3 秒——比本機還快,而且延遲完全 穩定、零長尾。這代表「雲端慢」這個直覺本身就不成立:真正拖慢速度的是 「大模型 + 免費層排隊」,控制模型尺寸之後,雲端可以比本機更快。

雲端 31B 的長尾延遲是真實存在的可靠度問題:10% 的題目卡在 10 秒以上, 最慢一題等了 47 秒。本機跟舊世代雲端模型全程零長尾。如果你的應用場景 在意 p99 延遲(例如即時互動),這個數字比平均值更該看。

Who's actually faster?

MetricLocal gemma4:e2b (serial)Cloud gemma-3n-e2b-it (concurrency 4, older gen)Cloud gemma-4-31b-it (concurrency 4, newer gen)
Total batch time102.3s (1.7 min)47.3s (0.8 min)178.5s (3.0 min)
Avg per-task latency1.02s1.86s4.99s
p90 latency1.54s3.16s10.09s
Slowest single task1.79s3.66s47.05s
Tasks over 10s0 / 1000 / 10010 / 100

First surprise: local beat the newer cloud model, even with cloud running 4-way concurrency. The intuitive assumption is that local takes hours and an API takes minutes — the measured reality is the opposite, because this comparison pits a queued free tier serving a 31B model against a purpose-optimized 5.1B local model.

Second, bigger surprise: the fastest cloud model isn't the new one — it's the old one. gemma-3n-e2b-it (older generation, small size) finished the batch in just 47.3 seconds — faster than local, with completely consistent latency and zero tail. That means "cloud is slow" was never actually true; what actually slows things down is "big model + free-tier queueing." Control for model size, and cloud can beat local outright.

Cloud 31B's tail latency is a real reliability concern: 10% of tasks took over 10 seconds, with the slowest at 47 seconds. Local and the older-generation cloud model both had zero tail latency. If your use case cares about p99 latency (real-time interaction, say), that number matters more than the average.


帳單怎麼算,差多少?

  • 本機電費:總推論時間只有 102.3 秒,用文獻估計的 20W 功耗換算(非即時量測——這台機器沒有 sudo 權限跑 powermetrics,這裡誠實揭露是估計值),電費約 NT$0.0026,四捨五入等於零。
  • 雲端費用(兩條路線都是)US$0.00。這次用的是 NVIDIA NIM 免費層(依 ADR-016 的 scoped exception),無論是 gemma-3n-e2b-it 還是 gemma-4-31b-it,實際帳單都是 0。這不代表付費層的真實定價——NVIDIA 對這兩個模型的正式費率未在此次驗證,不臆測數字。

100 個任務的金錢差距是 兩邊都是 NT$0。原本猜這個差距大概是「便當錢 等級」,實測發現連便當錢都不到——兩邊都免費。在這個量級,「哪個比較 便宜」從一開始就不是有意義的問題。

How does the bill work out?

  • Local electricity: total inference time was only 102.3 seconds. At a documented estimated draw of 20W (not a live measurement — this machine has no sudo access to run powermetrics, disclosed here as an estimate), the cost comes to about NT$0.0026, rounding to zero.
  • Cloud cost (both routes): US$0.00. This run used NVIDIA NIM's free tier (ADR-016's scoped exception) for both gemma-3n-e2b-it and gemma-4-31b-it, so the actual bill is zero either way. This does not represent real paid-tier pricing — NVIDIA's official rate for either model wasn't verified in this run, and no number is guessed here.

For 100 tasks, the money gap is NT$0 on both sides. I'd guessed the gap would land around "a lunch box's worth" — the measured reality doesn't even reach that; both sides are free. At this scale, "which is cheaper" was never a meaningful question to begin with.


分類準確率:不是新的、大的就贏

摘要跟翻譯是開放式生成,三邊主觀看都通順、忠於原意,差異是用字風格, 不是對錯——不適合硬打分數,直接放本機跟新款雲端的實例讓你自己判斷:

摘要範例(S001)

  • 本機:「供應商晶片交期延兩週,需提前預警客戶;付款條件調整為月結45,財務需重新計算現金流,下次進度定於下週四。」
  • 雲端 31B:「第三季晶片交期延遲兩週需通知客戶,付款條件改為月結45天需重新試算現金流,下次會議定於下週四。」

翻譯範例(T001)

  • 本機:「在本地運行大型語言模型是以犧牲便利性來換取控制權。你放棄了雲端 API 近乎即時的擴展能力,但你換來的是對你資料的完全所有權,以及可預測、重複性的成本,而不是隨著使用量而不斷增加的帳單。」
  • 雲端 31B:「在本地端執行大型語言模型是以便利性換取控制權。雖然你放棄了雲端 API 近乎即時的擴展能力,但你獲得了對數據的完全所有權,且成本固定可預測,而非隨著使用量增加而成長的帳單。」

分類題不一樣——這 40 題每題都有已知正解,可以算真實準確率:

本機 gemma4:e2b雲端 gemma-3n-e2b-it(舊)雲端 gemma-4-31b-it(新)
正確 / 總數29 / 4037 / 4035 / 40
準確率72.5%92.5%87.5%

跟速度一樣的反轉:準確率最高的不是最新最大的模型,是舊世代的 gemma-3n-e2b-it。本機常見錯誤是把「個人」誤判成「工作」,還自己 發明過選項外的第五類「社交」;gemma-3n-e2b-it 只錯 3 題,同樣是 「個人」判斷失準的模式,但頻率低很多。「新的、大的模型比較準」在這個 分類任務上並不成立——本機小模型在開放式生成夠用,但需要精準判斷、 嚴守選項邊界的任務上明顯較弱;至於雲端該選哪個模型,答案不是「選新的」, 是「兩個都試一次,看實際數字」。

Classification accuracy: newer and bigger isn't automatically better

Summary and translation are open-ended generation — all three sides read as coherent and faithful to the source on inspection, with differences in style rather than correctness, so they don't suit a hard score. Here are the local vs. newer-cloud examples so you can judge for yourself:

Summary example (S001)

  • Local: "Supplier's chip lead time slipped two weeks, need to warn the client early; payment terms moved to net-45, finance needs to rerun cash flow; next check-in set for Thursday."
  • Cloud 31B: "Q3 chip delivery delayed two weeks, client needs notice; payment terms changed to net-45 requiring a cash flow re-forecast; next meeting set for Thursday."

Translation example (T001)

  • Local: "在本地運行大型語言模型是以犧牲便利性來換取控制權。你放棄了雲端 API 近乎即時的擴展能力,但你換來的是對你資料的完全所有權,以及可預測、重複性的成本,而不是隨著使用量而不斷增加的帳單。"
  • Cloud 31B: "在本地端執行大型語言模型是以便利性換取控制權。雖然你放棄了雲端 API 近乎即時的擴展能力,但你獲得了對數據的完全所有權,且成本固定可預測,而非隨著使用量增加而成長的帳單。"

Classification is different — all 40 items have known ground truth, so a real accuracy number is possible:

Local gemma4:e2bCloud gemma-3n-e2b-it (older)Cloud gemma-4-31b-it (newer)
Correct / total29 / 4037 / 4035 / 40
Accuracy72.5%92.5%87.5%

The same reversal as speed: the most accurate model isn't the newest or biggest — it's the older-generation gemma-3n-e2b-it. Local's common failure mode was mislabeling "personal" as "work," plus inventing a fifth category ("social") outside the four given options; gemma-3n-e2b-it only missed 3, the same kind of "personal" misjudgment but far less often. "Newer and bigger means more accurate" doesn't hold on this classification task — the local small model is fine for open-ended generation but clearly weaker on tasks needing precise judgment within strict option boundaries; and picking a cloud model isn't "pick the newer one," it's "test both and look at the actual numbers."


別人怎麼比:外部研究怎麼說?

來源:

這不是第一個做本機 vs 雲端經濟學比較的實驗,有兩條外部證據值得對照:

我們踩的 thinking 模型坑,早就有人回報過。 ollama/ollama GitHub issue #16583 記錄了一模一樣的問題,而且是同一個模型家族:Gemma 4(E4B、12B 變體)開啟 thinking 後,num_predict 被推理過程整個吃光,content 欄位收到空字串。回報者的修法跟我們一樣——加 think: false;關掉後在 RTX 3090 上量到延遲約 0.5 秒、任務準確率 6/6。這不是這台機器獨有的巧合,是 Gemma 4 thinking 模式已知的特性。

但本機速度贏雲端這件事,是這次的特例,不是通則——這點要老實講。 2026 年的社群評測普遍發現:TTFT(首字延遲)本機通常落在 50–200ms、雲端 API 落在 200–800ms(方向跟我們一致,本機較快);但看總持有成本,個人開發者的本機硬體投資通常要 7 個月左右才能打平累積的 API 花費,中量級團隊要 18–24 個月——換句話說在低頻、偶發使用的量級,雲端 API 通常在總成本上贏,因為你不用為閒置硬體付錢。我們這次 100 題的規模還不到那個打平的量級,量到的只是單題邊際成本,本機的邊際成本本來就接近零。品質方面,普遍發現是最好的本機開源模型在複雜推理任務上仍落後前沿雲端模型約 10–20%——跟我們自己量到的分類準確率差距(72.5% vs 87.5%,15 個百分點)方向和量級都吻合。

結論是:我們這次的速度結果是真的,但不該過度推廣——它是這個特定組合(優化過的小型本機模型 vs 排隊中的免費層大模型)才有的結果。品質落差跟 thinking 模型的坑,反而跟其他人已經記錄下來的規律吻合。

What does the wider community find on local vs cloud?

Sources:

This isn't the only experiment on local vs cloud economics. Two threads of external evidence are worth cross-checking against:

On our own thinking-model pitfall — someone else already filed it. GitHub issue #16583 on ollama/ollama documents the exact same bug, on the exact same model family: Gemma 4 (E4B and 12B variants) with thinking enabled, num_predict consumed entirely by the reasoning trace, empty content field. The reporter's fix matches ours — think: false — and with it disabled, they measured ~0.5s latency on an RTX 3090 with 6/6 accuracy on their task. This isn't a one-off fluke on this machine; it's a known characteristic of Gemma 4's thinking mode.

On general local-vs-cloud economics, our result is the exception, not the rule — and that's worth being honest about. 2026 community benchmarks generally find: time-to-first-token is typically 50–200ms locally vs 200–800ms for cloud APIs (favoring local, consistent with our result); but on total cost of ownership, a solo developer's local hardware investment typically breaks even against API spend around 7 months in, and medium-volume teams around 18–24 months — meaning at low, occasional usage, cloud APIs usually win on total cost, because you never pay for idle hardware. Our 100-task run is too small a sample to hit that break-even math; it only shows the per-task marginal cost, where local's marginal cost is close to zero. On quality, the general finding is that the best local open models still lag frontier cloud models by roughly 10–20% on complex reasoning — in the same direction and rough magnitude as our own classification gap (72.5% vs 87.5%, a 15-point spread).

The takeaway: our speed result is real but shouldn't be over-generalized — it's specific to this pairing (a small, well-optimized local model vs a large model on a queued free tier). The quality gap and the thinking-model pitfall, on the other hand, match the wider pattern other people have already documented.


原理分析:這些數字站得住學理嗎?

來源:

三個模型表現不一樣,不是隨機噪聲,背後有各自的架構跟訓練方式可以解釋—— 但解釋力道不是每一項都一樣強,這段老實拆開講。

速度差距:解釋力最強,幾乎完全對得上架構。 gemma-3n-e2b-it 快, 不是因為「舊」,是因為它用的是 MatFormer(Matryoshka Transformer) 巢狀架構——E2B 不是一個獨立訓練的小模型,是跟更大的 E4B 共同訓練 出來的嵌套子網路,執行時只啟用內層參數,配合 Per-Layer Embedding(PLE) 把大部分嵌入參數留在模型記憶體之外、依需要載入。Google 官方文件寫得 很白:E2B 標示 5B 參數,但實際執行時的有效參數只需要約 19 億。 這代表它在 NVIDIA 的 GPU 上,每個 request 吃的算力天生就比一般同標籤的 稠密模型少很多——伺服端算得快、排隊壓力也小,這正好解釋了它為什麼是 三邊裡最快、也最沒有長尾延遲的。反過來,gemma-4-31b-it 是傳統稠密 架構,31B 參數每個 token 都要算,免費層排隊時自然拖得比較久。速度這條 線,架構理論跟實測數字完全對得上,沒有意外。

準確率差距:有理論支撐,但不是「新的不如舊的」這麼簡單。 這裡容易 誤讀成「舊模型比較準」,更精確的說法是「格式遵循能力不是單純跟參數量 走的」。已有研究指出,模型對嚴格輸出格式的遵循度(例如「只能回答這 四個詞其中一個」)在不同模型間可以差到 40-60 個百分點,而且這個落差 主要由訓練時有沒有針對性做過格式約束的微調決定,不是模型大小決定的。 另外,Inverse Scaling Prize 這篇 研究記錄了一個違反直覺但已被證實的現象:模型規模變大後,有時反而更 傾向依賴內部記憶到的慣性模式,蓋過對窄範圍指令(像「只能選這四類之一」) 的精確遵守——這是四個已知成因之一。gemma-3n-e2b-it 的 MatFormer 共同訓練機制,讓小尺寸的推論路徑也能繼承跟大模型共訓時學到的品質, 這可能是它在這種「窄範圍強制選擇」任務上意外準的原因,但這篇研究本身 也強調:多數 inverse scaling 案例,規模繼續往上拉最終還是會反轉回來 (U 型曲線)——不是「規模沒用」,是「規模跟任務類型的關係不是單調的」。

本機準確率偏低:量化不是主因,模型體量才是。 gemma4:e2b 用 Q4_K_M 4-bit 量化,業界對這個量化等級的一般性測量顯示,在 MMLU 這類 通用 benchmark 上的準確率損失通常只有 1-3%,遠小於我們量到的 15-20 個百分點落差。誠實講:量化不足以解釋這個缺口,比較合理的解釋是本機 5.1B 這個尺寸本身、加上沒有針對這種強制分類格式做過專門優化,兩者疊加 的結果——不能把責任全推給「量化拖累了它」。

要老實承認的限制:分類題只有 40 題,gemma-3n-e2b-itgemma-4-31b-it 只差 2 題(37 對 35)。這個差距方向合理、有架構理論 支撐,但樣本數不足以宣稱這是穩定的統計規律——它更適合當作「值得繼續 觀察的訊號」,不是「已經證實的定律」。

Mechanism analysis: does the theory hold up?

Sources:

Three models, three different profiles — not random noise. Each has an architectural or training explanation, though the explanatory strength isn't the same across all three findings, so this breaks it down honestly.

Speed gap: strongest explanation, matches architecture almost exactly. gemma-3n-e2b-it is fast not because it's "old" — it's because it uses a MatFormer (Matryoshka Transformer) nested design. E2B isn't an independently trained small model; it's a nested sub-network jointly trained alongside the larger E4B, activating only the inner parameters at inference, paired with Per-Layer Embedding (PLE) that keeps most embedding parameters out of model memory and loads them on demand. Google's own documentation states it plainly: E2B is labeled 5B parameters, but the effective parameter load at runtime is only about 1.9 billion. That means every request costs inherently less compute on NVIDIA's GPUs than a conventional dense model of the same nominal label — faster to serve, less queueing pressure — which lines up exactly with why it was the fastest of the three with zero tail latency. gemma-4-31b-it, by contrast, is a conventional dense architecture where every token across all 31B parameters gets computed, so free-tier queueing naturally drags longer. On speed, theory and measurement line up cleanly — no surprise here.

Accuracy gap: theory-backed, but not as simple as "old beats new." It's easy to misread this as "older models are more accurate" — the more precise framing is "format compliance doesn't simply track parameter count." Research has found that adherence to strict output formats (like "answer with exactly one of these four words") can vary by 40-60 percentage points between models, and that gap is driven mainly by whether a model was specifically fine-tuned for format constraints, not by model size. Separately, the Inverse Scaling Prize research documents a counterintuitive but verified phenomenon: as scale increases, models sometimes lean more heavily on memorized internal priors, overriding precise compliance with narrow instructions (like "pick exactly one of these four categories") — one of four identified causes. gemma-3n-e2b-it's MatFormer joint-training may let its small inference path inherit quality learned during co-training with the larger model, which could explain why it did unexpectedly well on this narrow, forced-choice task — but the same research stresses that most inverse-scaling cases eventually reverse with further scale (a U-shaped curve): scale isn't useless, its relationship with task type just isn't monotonic.

Local's lower accuracy: quantization isn't the main cause, model size is. gemma4:e2b runs Q4_K_M 4-bit quantization. General industry measurements of this quantization level typically show only 1-3% accuracy loss on benchmarks like MMLU — far smaller than the 15-20 point gap measured here. Honestly: quantization alone doesn't explain this gap. The more defensible explanation is the combination of the local model's raw 5.1B size and the lack of specialized tuning for this exact forced-choice format — not quantization taking the blame on its own.

A limitation worth admitting honestly: the classification set is only 40 items, and gemma-3n-e2b-it beat gemma-4-31b-it by just 2 questions (37 vs 35). The direction is theory-consistent, but the sample size isn't large enough to call this a stable statistical law — it's better treated as a signal worth watching, not an established rule.


什麼情境下該選本機、什麼情境下該選雲端?

情境我會用
日常筆記摘要、翻譯這類開放式生成本機 gemma4:e2b——夠快、免費、資料不出機器
需要精準判斷、嚴守選項邊界的分類/決策雲端——準確率優勢在這裡才有意義,但選模型前先兩個都測一次
機密資料(NDA、個資、未公開合約)本機,沒有選擇
在意 p99 延遲、不能接受長尾等待本機或雲端舊世代小模型——這次雲端 31B 有 10% 題目超過 10 秒,舊模型跟本機都零長尾
需要比本機記憶體裝得下更大的模型雲端——本機的天花板是機器規格
免費額度用盡、需要穩定 SLA重新評估付費層,這次的免費層數字不代表付費層

When should you pick local, and when should you pick cloud?

SituationI'd use
Open-ended generation like note summaries, translationLocal gemma4:e2b — fast enough, free, data never leaves the machine
Classification/decisions needing precise judgment within strict optionsCloud — this is where the accuracy edge matters, but test more than one model before picking
Confidential data (NDA, PII, unreleased contracts)Local, no choice
p99 latency matters, can't tolerate tail waitsLocal or cloud's older small model — cloud's 31B hit 10%+ of tasks over 10s here, while the older model and local both had zero tail latency
Need a model bigger than local memory can holdCloud — local's ceiling is your machine's specs
Free tier exhausted, need a real SLARe-evaluate against a paid tier — these free-tier numbers don't represent it

共振站結論

波形評級:INTERFERENCE

不是「本機贏」或「雲端贏」的二選一,甚至也不是「本機 vs 雲端」這條線 能決定的。這次實測拆出兩個變數:位置(本機/雲端)跟世代/尺寸(舊小/ 新大)。位置這條線上,本機比新款雲端模型快;但世代這條線上,雲端舊 小模型比本機還快、還準。真正決定輸贏的是後者,不是前者。

跑完這 100 題之後我自己的實際變化:日常筆記類任務(摘要、翻譯,占我多數 用量)留在本機,圖的是資料不出機器、免費、夠快;需要嚴格分類、決策類的 任務改用雲端,但選哪個雲端模型會先兩個都測一次,不會預設「新的、大的 比較好」。免費層的長尾延遲提醒我:如果要把雲端 API 用在對延遲敏感的 場景,得先確認付費層的 SLA,這次的數字不能直接套用。

在 Ollama Library 看 gemma4 →

NVIDIA NIM 免費層說明 →

Verdict

Waveform: INTERFERENCE

This isn't "local wins" or "cloud wins" — it isn't even something the local-vs-cloud axis alone can decide. Two variables came apart in this run: location (local/cloud) and generation/size (older-small/newer-big). On location, local beat the newer cloud model. On generation, cloud's older small model beat local outright, on both speed and accuracy. The second variable is what actually decided the outcome, not the first.

What changed for me after these 100 tasks: daily note-class tasks (summaries, translation — most of my volume) stay local, for free, fast-enough, data-never-leaves-the-machine reasons. Tasks needing strict classification or decisions move to the cloud, but which cloud model gets picked now means testing more than one rather than defaulting to "newer and bigger." The free tier's tail latency is a reminder: if you're putting a cloud API in a latency-sensitive path, check the paid tier's actual SLA first — these numbers don't transfer directly.

See gemma4 on Ollama Library →

NVIDIA NIM free tier →