慣性聚合 高效追蹤和閱讀你感興趣的部落格、新聞、科技資訊
閱讀原文 在慣性聚合中打開

推薦訂閱源

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python)
🔒 我用 Gemma 4 在本地取代了 ChatGPT — 我的隱私發生了什麼變化
Mamoor Ahmad · 2026-05-24 · via DEV Community

這是一份提交給Gemma 4挑戰:寫關於Gemma 4

Local AI Privacy

🎬 人們不常談論的問題

每當你將文件貼入ChatGPT、Claude或Gemini時,你的數據會離開你的電腦。 📤

📋 医療記錄
📜 法律合約
💰 財務報表
📓 個人日記
🔐 伺服器日誌帶有 API 金鑰

它會傳送到數據中心。由別人的 GPU 進行處理。而且 — 取決於提供者的政策 — 可能會用於訓練未來的模型。 😰

我們都知道這一點。我們還是這麼做。因為替代方案更糟:完全沒有 AI 的幫助

Thinking GIF

Gemma 4 改變了這個公式。🔥


🧪 這個實驗

我花費了一週替換我的雲端 AI 使用為Gemma 4 完全在我的筆記型電腦上運行對於任何敏感資訊。不進行 API 呼叫。不使用雲端推論。本地的一切。🏠

💻 我的設定

組件 細節
🖥️ 筆記型電腦 ThinkPad T14, 32GB RAM, NVIDIA RTX 4060 (8GB VRAM)
🧠 型號 Gemma 4 E4B (4B 有效參數)
⚙️ 執行時 Ollama (免費, 不需要帳號)
📏 語境 128K 令牌
💰 費用 $0 (僅電費)

📋 我測試了什麼

  1. 📋 分析一份40頁的僱傭合約
  2. 🏥 摘要醫療實驗室結果
  3. 💰 审閱3個月的銀行對賬
  4. 📓 處理個人日記條目以尋找模式
  5. 🔐 分析包含API金鑰的伺服器日誌

📋 測試 1:僱傭合約

Contract Analysis

我透過Ollama將一份40頁的僱傭協議輸入到Gemma 4 E4B。整份文件適合在128K的上下文視窗內,還有多餘空間。 📄

💬 我的提示

Identify any clauses that are unusually restrictive compared to 
industry standards. Flag anything that could limit my future 
employment options.

進入全螢幕模式 離開全螢幕模式

⚡ 結果

🔴 CRITICAL FINDINGS:

1. NON-COMPETE (Section 7.2): 24-month duration with no 
   geographic limit. Industry standard is 6-12 months with 
   defined territory.
   ⚠️ HIGH RISK — potentially unenforceable.

2. IP ASSIGNMENT (Section 9.1): "All inventions conceived 
   during employment" includes personal time + personal 
   resources. Broader than standard "work product" language.
   ⚠️ MEDIUM RISK — may conflict with state labor codes.

3. NON-SOLICITATION (Section 7.3): Extends to "any person 
   who was a client during the preceding 36 months" — 3x 
   the typical 12-month lookback.
   ⚠️ MEDIUM RISK — overbroad definition.

進入全螢幕模式 離開全螢幕模式

🎯 評定

確實有用。它抓到了我會注意到的24個月不競爭協議問題,但也標示出了36個月的回溯期間 我本會將其略過。我不是律師,但作為第一階段審閱工具?太棒了。 ⭐⭐⭐⭐

⏱️ 速度: 整體分析約需12秒。


🏥 測試2:醫療實驗室結果

Medical Data

我輸入了一份血檢報告的PDF(標準CBC檔案)。這就是類似這種文件我從來不會上傳到雲端 AI. 🚫☁️

💬 我的提示

Explain each result in plain language. Flag anything outside 
normal range and suggest questions to ask my doctor.

進入全螢幕模式 離開全螢幕模式

⚡ 結果

📊 BLOOD WORK ANALYSIS:

✅ HEMOGLOBIN: 16.8 g/dL (Normal: 13.5-17.5) — Within range

⚠️ WHITE BLOOD CELLS: 11.2 K/uL (Normal: 4.5-11.0) 
   → Slightly elevated. Could indicate mild infection, 
     stress, or inflammation.
   → ❓ "Should we retest in 2 weeks?"

⚠️ PLATELETS: 145 K/uL (Normal: 150-400)
   → Slightly low. Often benign, but worth monitoring.
   → ❓ "Is this consistent with previous results?"

⚠️ CHOLESTEROL (LDL): 142 mg/dL (Optimal: <100)
   → Above optimal. Dietary changes may help.
   → ❓ "What's my 10-year cardiovascular risk?"

進入全螢幕模式 離開全螢幕模式

🎯 評斷

準確、清晰,以及"問醫問題" 的框架很聰明 — 它將 AI 定位為一個 準備工具,而不是診斷師。我對比了實驗室的參考表檔。全都正確。⭐⭐⭐⭐⭐

🔒 隱私價值

這是絕殺用例. 醫療數據是我絕對不會貼入雲端 AI 的東西。本地的 Gemma 4 使其成為可能。

Mind Blown GIF


💰 測試 3:銀行賬單分析

Financial Data

我將3 個月的銀行賬單導出為 CSV 檔案並輸入到 Gemma 4。 📊

💬 我的提示

Categorize my spending. Identify subscriptions I might have 
forgotten about. Flag any unusual transactions.

Enter fullscreen mode Exit fullscreen mode

⚡ 結果

💸 SPENDING BREAKDOWN (3-month total: $8,420):

  🏠 Housing:      $4,200  (49.9%)
  🍕 Food/Dining:  $1,580  (18.8%)
  🚗 Transport:    $890    (10.6%)
  🛒 Shopping:     $720    (8.6%)
  📱 Subscriptions: $340   (4.0%)
  🎮 Entertainment: $290   (3.4%)
  ❓ Other:        $400    (4.8%)

🔍 FORGOTTEN SUBSCRIPTIONS:
  ⚠️ "StreamVault Pro" — $14.99/mo × 3 = $44.97
     Last login: Never. Consider canceling!
  ⚠️ "CloudBackup Plus" — $9.99/mo × 3 = $29.97
     Duplicate of "BackupSafe" subscription!

🚩 UNUSUAL TRANSACTIONS:
  🔴 $347.82 at "AMZN MKTP" — 3x your average
  🔴 $89.00 "ANNUAL FEE" — Credit card fee (was $0 year 1)

Enter fullscreen mode Exit fullscreen mode

🎯 判決

它抓住了兩份重複訂閱我已付了6個月!💸 支出細分我可以從Mint獲得,但"被忘記的訂閱"這個角度真的更好。⭐⭐⭐⭐


📓 測試 4:個人日記分析

Personal Journal

這就是我所選的。絕對不應該用雲端 AI. 🚫☁️ 我輸入了 3 個月的個人日記條目(從 Day One app 輸出)。 📓

💬 我的提示

Identify recurring emotional patterns. What topics come up 
most when I'm stressed? What activities correlate with 
better mood?

進入全螢幕模式 退出全螢幕模式

⚡ 結果

🧠 EMOTIONAL PATTERN ANALYSIS:

When stressed, you tend to write about:
  1. 💼 Work deadlines (23 mentions in low-mood entries)
  2. 😴 Sleep quality (18 mentions — strong next-day correlation)
  3. 🏠 Social isolation (12 mentions — weekends alone score lower)

Activities correlating with positive entries:
  1. 🏃 Morning exercise (78% of "good day" entries)
  2. 🍳 Cooking at home (65% correlation)
  3. 📖 Reading before bed (52% — stronger than screen time)

💡 KEY INSIGHT: Your Sunday entries consistently score lower. 
   The pattern suggests "Sunday scaries" — anticipatory 
   anxiety about the work week.

進入全螢幕模式 退出全螢幕模式

🎯 評判

星期日模式是真的 — 我曾模糊地注意到它,但看到它量化後感覺完全不一樣。 😳 睡眠與心情的相關性是我猜測到的,但無法向自己證明。 ⭐⭐⭐⭐⭐

🔒 為何這很重要

這是非常個人化的數據。它的事實是從未離開過我的筆記型電腦 才是我願意做這個實驗的整個原因.

Mind Blown GIF


🔐 測試 5: 伺服器日誌分析

Server Security

我輸入了包含 API 金鑰、令牌和內部網址 的應用程式日誌 — 這種內容如果發送到任何雲服務都會是個安全噩夢。 🔐

💬 我的提示

Find any exposed credentials, API keys, or sensitive data 
in these logs. Categorize by severity.

進入全螢幕模式 退出全螢幕模式

⚡ 結果

🔴 CRITICAL (3 findings):
  - Line 847: API key "sk-proj-***" in error stack trace
  - Line 1203: DB connection string with password in debug log
  - Line 1567: JWT token logged on failed auth attempt

🟡 WARNING (5 findings):
  - Internal IPs exposed in proxy headers (lines 234, 891)
  - User emails in query parameters (lines 445, 672, 1103)
  - Stack traces revealing framework versions

🟢 INFO (12 findings):
  - Standard debug output, no sensitive data

進入全螢幕模式 退出全螢幕模式

🎯 評定

這正是您期望從日誌分析工具獲得的。它發現了真正的問題。而且由於所有操作都在本地進行,因此沒有任何風險 不應傳送至任何地方。 ⭐⭐⭐⭐⭐


📊 數據:本地對雲端

指標 🏠 Gemma 4 E4B (本地) ☁️ ChatGPT (雲端)
🔒 隱私 ✅ 數據從不離開筆記型電腦 ❌ 傳送至伺服器
速度 ~每回覆8-15秒 ~每回覆2-5秒
🎯 品質 ⭐⭐⭐⭐ (非常棒) ⭐⭐⭐⭐⭐ (稍好一些)
💰 費用 免費 (僅電費) $20/月 (Plus)
📡 可用性 ✅ 無線外亦可運作 ❌ 需要網絡
📏 語境 128K tokens 128K tokens
🗑️ 數據保留 供應商相關

🤔 我所學到的

💡 Gemma 4 不是 ChatGPT 的替代品。它是一種不同的東西。

對於通用程式設計、創意寫作和廣泛知識問題 — ChatGPT 和 Claude 還是更好。我不會假裝不是這樣。 🤷

但對於 敏感資料處理 — 你永遠不會信任給雲端 API 的那些資料 — Gemma 4 是一個 真正的變革者

使用案例 為何本地化很重要
📋法律文件 律師-客戶特權
🏥醫療數據 HIPAA合規性憂慮
💰財務數據 銀行監管規定
📓個人日記 極致親密
🔐 安全日誌 零憑證洩露風險

🏆 128K 上下文視窗才是真正的英雄

之前的本地模型 (Llama 2, Mistral 7B) 具有 4K-8K 上下文視窗。你無法容納一個真正的文件。😩

Gemma 4的128K視窗表示你可以輸入一個50頁PDF而且仍然有空间放置您的提示。那就是與...之間的差異。玩具和工具. 🔧

🥷 E2B 模型是潛力股

每個人都正在寫關於E4B和31B密集的內容。但E2B 模型 (2B 有效參數) 在一個 Raspberry Pi 5 上運行。 🍓

如果你需要為一個 手機應用程式或 IoT 設備 設計一個注重隱私的 AI,E2B 就是答案。沒人討論它,因為它只是 "只有" 2B 個參數 — 但對於結構化萃取任務,它卻是 惊人地有能. 💪


🚀 開始使用 (5分鐘)

# Step 1: Install Ollama (macOS/Linux/Windows) ⚙️
curl -fsSL https://ollama.com/install.sh | sh

# Step 2: Pull Gemma 4 E4B (~3GB download) 📥
ollama pull gemma4:4b

# Step 3: Run it! 🎉
ollama run gemma4:4b

# That's it. You're running a local AI.
# No API key. No account. No data leaving your machine. 🔒

進入全螢幕模式 退出全螢幕模式

Chef's Kiss GIF

對於128K的上下文窗口,請使用OpenRouter免費版本(不需要信用卡):

# Via OpenRouter API (free tier) 🆓
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer YOUR_FREE_KEY" \
  -d '{"model": "google/gemma-4-e4b", "messages": [...]}'

進入全螢幕模式 退出全螢幕模式


💡 總結心得

Lightbulb GIF

雲端人工智能適合一般任務。但有一種工作類型 — 對於敏感資料 — 以往的答案是「完全不要使用人工智能」。 🚫

Gemma 4 關閉了這個差距.

您現在可以:

  • 📋 审閱您的法律合約 — 私底下
  • 🏥 分析您的醫療記錄 —在地
  • 💰 审計您的財務數據 — 免費
  • 📓 處理您的個人日記 — 安全地
  • 🔐 扫描您的安全日誌 — 安全地

那不是基準改善。那是一項功能,在之前不存在。 🚀


🎯 你會用本地 AI 做什麼?

Thanks GIF

我很好奇 — 什麼敏感的使用案例會讓你信任本地模型?你試過用 Gemma 4 進行注重隱私任務嗎? 🤔

在下方分享你的經驗! 👇


感謝閱讀!如果這讓你了解到本地 AI 能為隱私帶來什麼,請點一個 ❤️ 分享你自己的經驗。

🔗 資源: