Featured Teardown · Local AI Signature № 01 · CLEAN-SIGNAL

Ollama 教學:三個指令在 MacBook M1 跑本地 AI,資料完全不出去Ollama Quickstart: Three Commands to Run Local AI on MacBook M1, Data Never Leaves

下週要簽租屋契約。房東傳來一份 PDF,我想在簽之前用 AI 問清楚幾個條款,但不想把這份文件傳到美國的伺服器上。

I had a rental contract to sign. My landlord sent over a PDF — Taiwan's government-standard template, 13 pages of dense legal text. I wanted to ask an AI about a few clauses before signing, but I wasn't comfortable uploading that document to a server in California.

這就是為什麼我開始玩本地 LLM。

So I set up a local LLM instead. Here's how it went.


先說設備需求

項目最低建議我的環境
RAM8GB16GBM1 16GB ✅
儲存空間10GB 可用20GB+依個人狀況
系統macOS 12+macOS 14+確認一下

8GB 的 MacBook 跑得動,但速度慢、風扇會吵。16GB 以上才是真正流暢的體驗。

Requirements

ItemMinimumRecommendedMy setup
RAM8GB16GBM1 16GB ✅
Storage10GB free20GB+Depends
macOS12+14+Check yours

8GB will work but you'll hit swap — slow output, loud fan. 16GB+ is the smooth experience.


三個指令跑起來

1. 下載 Ollama

前往 ollama.com 下載 macOS 安裝包,拖進 Applications,開啟。選單列會出現一個羊駝圖示,代表服務在背景執行。

確認有沒有裝好:

ollama --version

有跑出版本號就是裝好了。

2. 下載模型

ollama pull gemma4:e2b

白話講:這個指令把約 7.2GB 的模型檔案下載到你電腦。等它跑完,大概 10-20 分鐘視網速而定。

為什麼選 gemma4:e2b?這是 Google Gemma 4 系列中的小型版本(Efficient 2B,約 20 億參數),16GB RAM 跑起來不會喘。繁體中文比前代好一點,至少對我來說感受明顯。

📌 為什麼不用 DeepSeek?
DeepSeek 是中國公司開發的模型,部分版本的資料處理政策不適合台灣個資法場景。共振站優先推薦資料主權明確的非中國團隊模型。禁用清單包含 Qwen、Yi、DeepSeek、ChatGLM。

3. 開始對話

ollama run gemma4:e2b

模型載入需要 10-15 秒,之後就可以輸入問題。

Three commands

1. Install Ollama

Download the macOS installer from ollama.com, drag to Applications, launch. A llama icon appears in the menu bar — that's the background service running.

Confirm it's installed:

ollama --version

If you see a version number, you're good.

2. Pull the model

ollama pull gemma4:e2b

This downloads ~7.2GB of model weights to your machine. Takes 10–20 minutes depending on your connection.

Why gemma4:e2b? It's Google's Gemma 4 Efficient 2B — roughly 2 billion parameters, fits comfortably in 16GB RAM. Traditional Chinese quality is noticeably better than the previous generation.

📌 Why not DeepSeek?
DeepSeek is developed by a Chinese company. Several versions have data handling policies that conflict with Taiwan's Personal Data Protection Act requirements. Resonance Stack only recommends models with clear data sovereignty from non-Chinese teams. Blocked list: Qwen, Yi, DeepSeek, ChatGLM.

3. Start chatting

ollama run gemma4:e2b

Takes 10–15 seconds to load, then you're in.


坑:它預設講英文

這是你在其他教學看不到的地方。

gemma4:e2b 預設回應英文。不管你用中文問它,第一個回應很可能是英文。解法超簡單——每個 prompt 開頭加這一句:

請務必使用繁體中文台灣用語回答。

加了這句,後面就正常了。這不是 Ollama 的問題,是 gemma4:e2b 這個模型的預設行為。(我替你踩過了。)

The gotcha: it defaults to English

This is the thing other tutorials skip.

gemma4:e2b responds in English by default. Even if you write your question in Chinese, the first reply will likely come back in English. The fix is a one-line prefix at the start of every prompt:

請務必使用繁體中文台灣用語回答。

(Translation: "Please respond in Traditional Chinese with Taiwanese vocabulary.")

Add that line, and it works correctly. This is the model's default behavior — nothing to do with Ollama itself. (I burned one prompt so you don't have to.)


實際場景:把租屋契約拿來問

廢話少說,直接用。

我把台灣內政部 114 年 4 月 18 日最新版公版契約的三個條款——押金(第五條)、電費(第六條)、修繕(第九條)——貼進去,然後問:

請務必使用繁體中文台灣用語回答。

以下是台灣內政部公版住宅租賃定型化契約的三個條款:

第五條 押金:最高不得超過二個月租金之總額,
租期屆滿房東須返還押金。

第六條(電費):以用電度數計費者,
每度電費不得超過台電帳單「當期每度平均電價」。

第九條 修繕:房屋損壞原則由房東負責修繕。
如房東遲不修繕,房客可催告,催告無效後得自行修繕並請求償還費用。

我下週要簽這份契約,身為房客有什麼要特別注意的?
請用白話說明,重點就好,不用長篇大論。
gemma4:e2b 回應:台灣內政部公版租屋契約三條款的房客注意事項

31 秒後跑出的回應把三條款各自說清楚了:押金上限兩個月、電費必須按台電計費、修繕催告流程。繁體中文正常,「押金」「催告」「承租人」這些法律用語都理解正確。用了幾個 emoji(🔑 💡)——排版清楚,但 AI 味明顯,習慣就好。品質:4/5。

The actual test: my rental contract

I pasted three clauses from Taiwan's government-standard rental contract (Ministry of the Interior, latest version April 2026) directly into the prompt:

請務必使用繁體中文台灣用語回答。

以下是台灣內政部公版住宅租賃定型化契約的三個條款:

第五條 押金:最高不得超過二個月租金之總額,
租期屆滿房東須返還押金。

第六條(電費):以用電度數計費者,
每度電費不得超過台電帳單「當期每度平均電價」。

第九條 修繕:房屋損壞原則由房東負責修繕。
如房東遲不修繕,房客可催告,催告無效後得自行修繕並請求償還費用。

我下週要簽這份契約,身為房客有什麼要特別注意的?
請用白話說明,重點就好,不用長篇大論。

(The prompt stays in Chinese — that's what actually gets sent to Ollama.)

gemma4:e2b 回應:台灣內政部公版租屋契約三條款的房客注意事項

31 seconds. The model correctly explained all three clauses: deposit cap (two months max), electricity must follow Taiwan Power's actual rate, repair request procedure. Traditional Chinese was clean, legal terms were understood correctly. Added some emoji (🔑 💡) — readable but unmistakably AI-flavored. Quality: 4/5.


追問一:房東說每度5元,合法嗎?

看到第六條電費的說明,馬上想到一個真實問題。很多房東收每度 NT$5,但台電帳單的當期每度平均電價大概是 NT$3.5。這樣收合法嗎?

繼續問:

請務必使用繁體中文台灣用語回答。

背景:台灣內政部公版住宅租賃定型化契約第六條規定:
「以用電度數計費者,每度電費不得超過台電帳單『當期每度平均電價』。」

問題:房東說每度電費收5元。台電帳單當期每度平均電價是3.5元。
房東這樣收合法嗎?假設每月用100度電,差多少錢?身為房客可以怎麼做?
gemma4:e2b 回應:電費每度NT$5合法性分析與NT$150差額計算

36 秒後的回答:

  • 合法嗎? 不合法。NT$5 超過 NT$3.5 的上限,違反第六條。
  • 差多少錢? 100 度 × NT$3.5 = NT$350(上限),房東收 NT$500,每月多付 NT$150
  • 可以怎麼做? 三步:蒐集台電帳單作為證據 → 書面告知房東引用第六條 → 協商無效則申訴主管機關。

計算正確,法條引用正確,三步驟沒有廢話。4/5。

Follow-up 1: Is NT$5 per unit legal?

Clause 6 (electricity) prompted an obvious follow-up. Many landlords in Taiwan charge a flat NT$5 per kWh, but Taiwan Power's actual average rate is around NT$3.5. Is that legal?

請務必使用繁體中文台灣用語回答。

背景:台灣內政部公版住宅租賃定型化契約第六條規定:
「以用電度數計費者,每度電費不得超過台電帳單『當期每度平均電價』。」

問題:房東說每度電費收5元。台電帳單當期每度平均電價是3.5元。
房東這樣收合法嗎?假設每月用100度電,差多少錢?身為房客可以怎麼做?
gemma4:e2b 回應:電費每度NT$5合法性分析與NT$150差額計算

36 seconds:

  • Legal? No. NT$5 exceeds the NT$3.5 cap — violates Clause 6.
  • How much extra? 100 units × NT$3.5 = NT$350 (legal max). Landlord charging NT$500. That's NT$150 overpayment per month — about US$4.50.
  • What can I do? Three steps: collect Taiwan Power bills as evidence → send written notice citing Clause 6 → escalate to the housing authority if no response.

Correct math, correct legal citation, no fluff. 4/5.


追問二:契約裡禁止我申請租金補貼,這合法嗎?

這個問題比電費更有趣。有些房東會在契約裡加一條:「承租人不得向政府申請任何形式之租金補貼或住宅津貼。」表面上看是雙方同意的契約條款,但這樣真的有法律效力嗎?

拿內政部契約的「不得記載事項」第十點來問:

請務必使用繁體中文台灣用語回答。

台灣內政部公版住宅租賃定型化契約 不得記載事項第十點 規定:
「不得記載承租人不得申請租金補貼。」

情境:我在準備簽的契約裡,發現房東加了一條額外條款:
「承租人不得向政府申請任何形式之租金補貼或住宅津貼。」

問題:
1. 房東這條合法嗎?
2. 我如果簽了,這條有效嗎?
3. 台灣的租金補貼怎麼申請?申請成功的話,我的房東會受到什麼影響?
gemma4:e2b 回應:契約禁止申請租金補貼條款的合法性分析

45 秒後的回答值得拆開來說:

問題 1(合法嗎):模型的回答有點保守,繞了一圈說「契約自由有其限制」,沒有直接說這條明確違反內政部規定。正確答案比這更直接:「不得記載事項」第十點已經明確禁止,這類條款直接違法,無需討論。

問題 2(簽了有沒有效):這裡模型說得最不準。它說這條「在形式上是有效的」,但這是錯的。定型化契約若有違反強制規定的條款,依《消費者保護法》第 12 條,該條款無效。就算你簽了,這條也不能對你主張。

問題 3(怎麼申請):這段還可以,方向正確,說要透過地方政府申請,提供收入及居住證明。

整體評分:3/5。前兩個問題模型太保守,沒有直接點出「這條就是違法、就是無效」。這是 2B 小模型在法律判斷上的真實限制——它給的是「諮詢方向」,不是「法律結論」。如果是真的要爭取自身權益,這個工具幫你準備問題,不幫你下定論。

Follow-up 2: My contract bans me from applying for housing subsidies. Legal?

This one gets more interesting. Some landlords add a clause like: "Tenant may not apply to any government rental subsidy or housing allowance program." Looks like a mutual agreement — but is it enforceable?

I tested it against Prohibited Clause No. 10 from the Ministry of the Interior's own contract template:

請務必使用繁體中文台灣用語回答。

台灣內政部公版住宅租賃定型化契約 不得記載事項第十點 規定:
「不得記載承租人不得申請租金補貼。」

情境:我在準備簽的契約裡,發現房東加了一條額外條款:
「承租人不得向政府申請任何形式之租金補貼或住宅津貼。」

問題:
1. 房東這條合法嗎?
2. 我如果簽了,這條有效嗎?
3. 台灣的租金補貼怎麼申請?申請成功的話,我的房東會受到什麼影響?
gemma4:e2b 回應:契約禁止申請租金補貼條款的合法性分析

45 seconds. Worth unpacking each answer:

Q1 (Is it legal?): The model was hedgy — it circled around "contract freedom has limits" without clearly stating this clause directly violates the Ministry's prohibited clause list. The correct answer is more direct: Prohibited Clause No. 10 explicitly bans this. It's illegal, full stop.

Q2 (Enforceable if I sign?): This is where the model got it wrong. It said the clause is "formally valid." That's incorrect — under Taiwan's Consumer Protection Act Article 12, standard contract clauses that violate mandatory regulations are void. Even if you sign, the clause cannot be enforced against you.

Q3 (How to apply for subsidies?): Reasonable answer — apply through local government with income and residency documentation. Direction is correct.

Overall: 3/5. The model was too cautious on the legal questions, stopping short of clear conclusions. This is a real limitation of a 2B model on legal reasoning — it points you in the right direction but won't commit to a verdict. Use it to prepare your questions, not to reach your conclusions.


電費估算

MacBook M1 推論時功耗約 15-20W。以台電當期費率計算,每天跑 2 小時,一個月電費約 NT$3-5。

這個模型不是要取代 Claude Pro——複雜推理還是有差距,租金補貼那題就是例子。但對於「讀懂手邊那份文件」「找出有問題的條款」這類任務,三個指令、七分鐘、資料完全不出機器,門檻已經很低了。

Running cost

MacBook M1 draws about 15–20W during inference. At Taiwan Power's current rates, running it 2 hours a day costs roughly NT$3–5 per month.

This isn't a Claude Pro replacement — the rental subsidy question showed the gap on legal reasoning. But for "help me understand this document" and "flag the suspicious clauses" tasks, three commands, seven minutes, and your data stays on your machine. That's a low bar to clear.


記憶體佔用與推論速度

活動監視器(記憶體分頁):ollama 佔用 7.28 GB,Claude 各行程共約 1 GB,記憶體壓力圖全程綠色,交換檔僅 844.3 MB

截圖時同時開著 Claude app(用來寫這篇文章),兩個 app 一起跑。數據很直觀:

  • ollama(gemma4:e2b 載入中):7.28 GB,等同模型檔案大小,符合預期
  • Claude 各行程(Claude、claude、Claude Helper × 2):合計約 1 GB
  • 系統整體:記憶體壓力圖全程綠色,交換檔僅 844.3 MB,遠低於警戒線

兩個 app 同時執行、系統沒有喘、風扇沒有轉——M 系列晶片的統一記憶體架構讓這件事成立。

回應速度方面,三次實驗分別是 31 秒、36 秒、45 秒,折合約 20-30 tokens/秒。比 ChatGPT 慢,但對「拿一份文件來問」這類場景完全夠用——你問一次、等半分鐘、看完答案,這個節奏不影響工作流。

Memory footprint and inference speed

Activity Monitor (Memory tab): ollama at 7.28 GB, Claude processes totaling ~1 GB, memory pressure graph green throughout, swap only 844.3 MB

This was taken while Claude was also open — both apps running simultaneously. The numbers tell a clean story:

  • ollama (gemma4:e2b loaded): 7.28 GB — roughly equal to the model file size, as expected
  • Claude processes (Claude, claude, Claude Helper × 2): ~1 GB combined
  • System overall: memory pressure graph stays green throughout, swap at just 844.3 MB

Two apps running, machine not sweating, fan not spinning. That's Apple Silicon's unified memory architecture doing what it's supposed to do.

Inference speed: the three experiments ran in 31s, 36s, and 45s — roughly 20–30 tokens per second. Slower than ChatGPT, but for "paste a document and ask a question" workflows it's plenty. You ask, wait thirty seconds, read the answer. That cadence doesn't interrupt a work session.


常見問題

Q:Ollama 和 ChatGPT 最大的差別是什麼? A:資料不出機器。你問的問題、貼的文件,全部留在你的電腦。沒有伺服器、沒有記錄、沒有傳輸費用。

Q:gemma4:e2b 的繁體中文夠用嗎? A:日常文件分析(租屋契約、電費計算)夠用。精確的法律意見仍然要找律師,AI 是輔助工具。記得每個 prompt 開頭加繁中指令,不然它預設英文。

Q:8GB RAM 的 MacBook 跑得動嗎? A:跑得動,但速度明顯慢、風扇可能吵。gemma4:e2b 建議 16GB 以上才是流暢體驗。

FAQ

Q: What's the main difference from ChatGPT? A: Your data doesn't leave your machine. Whatever you type, whatever you paste — stays on your computer. No server logs, no transmission fees, no terms of service edge cases.

Q: Is the Traditional Chinese quality good enough? A: For everyday document analysis (rental contracts, utility calculations), yes. For precise legal advice, still talk to a lawyer — AI is a research tool, not a verdict machine. Don't forget the Chinese prefix on every prompt or it'll answer in English.

Q: Can I run this on 8GB RAM? A: Yes, but you'll hit swap — noticeably slower output, fans might spin up. 16GB+ is the comfortable experience.


共振站結論

波形評級:CLEAN_SIGNAL

適合你,如果:

  • 處理租屋契約、工作合約等不想傳雲端的文件
  • MacBook M 系列,16GB RAM 以上
  • 每個月 AI 工具費用已經讓你皺眉
  • 願意在每個 prompt 開頭加一句話

暫不適合你,如果:

  • 需要複雜法律判斷或精確法律結論
  • MacBook RAM 只有 8GB 而且非常在意速度
  • 完全不想碰 Terminal

我自己同時有訂 Claude Pro 和 Gemini Advanced,各有各的強項,短期內不打算取消。但 gemma4:e2b 在某些工作上的使用反而越來越多——特別是中文語意辨識和標注這類需要大量重複執行的任務,跑在本機不用擔心 token 額度,想跑幾次就跑幾次。這塊比較複雜,改天再深入探討。

NOTE: gemma4:e2b 的 thinking mode 會在回答前輸出思考過程,Terminal 顯示一大堆控制字元,看起來很亂。這不是壞掉,是正常行為。最終答案在最後面找。

前往 Ollama 官網 →

Verdict

Waveform: CLEAN_SIGNAL

Good fit if you:

  • Have documents (contracts, agreements) you don't want to upload to the cloud
  • Have a MacBook M-series with 16GB+ RAM
  • Are already paying for too many AI subscriptions
  • Don't mind a one-line prefix on every prompt

Not the right tool if you:

  • Need precise legal conclusions (it hedges)
  • Have 8GB RAM and care about speed
  • Want zero Terminal interaction

For what it's worth: I still subscribe to both Claude Pro and Gemini Advanced — they each have strengths I'm not ready to give up. But gemma4:e2b gets more of my day-to-day usage than I expected, particularly for Chinese semantic analysis and annotation tasks that run repeatedly. No token quotas to think about — just run it as many times as you need. That whole workflow deserves its own post.

NOTE: gemma4:e2b's thinking mode outputs its reasoning process before answering, filling your Terminal with ANSI escape characters. It's not broken — just scroll past the noise. The real answer is at the end.

Visit Ollama →