<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>LLM｜林鼎淵 Dean Lin</title>
    <link>https://deanlin.net/tags/llm/</link>
    <image><url>https://deanlin.net/images/author_hu_aa256fc934e9a932.jpg</url><title>LLM｜林鼎淵 Dean Lin</title><link>https://deanlin.net/tags/llm/</link><width>144</width><height>144</height></image>
    <description>林鼎淵（Dean Lin）的部落格：生成式 AI 企業內訓講師、外商資安公司軟體專家、7 本書作者。400 多篇文章用白話分享生成式 AI 實戰、Claude Code 與 Vibe Coding 教學、團隊合作與職場成長。</description>
    <generator>Hugo</generator>
    <language>zh-tw</language>
    <copyright>© 2020–2026 林鼎淵 Dean Lin</copyright>
    <lastBuildDate>Thu, 11 Jan 2024 13:25:42 +0800</lastBuildDate>
    <atom:link href="https://deanlin.net/tags/llm/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>不用網路！在電腦安裝類 ChatGPT 的 AI，還可以上傳文件對話（GPT4All）</title>
      <link>https://deanlin.net/blog/202401/gpt4all-offline-ai/</link>
      <pubDate>Thu, 11 Jan 2024 13:25:42 +0800</pubDate>
      <guid>https://deanlin.net/blog/202401/gpt4all-offline-ai/</guid>
      <dc:creator>林鼎淵</dc:creator>
      <category>AI 實戰</category>
      <description>使用 ChatGPT 等 AI 聊天機器人時，我們會被提醒不可上傳個人、公司的隱私資料。儘管 ChatGPT、Copilot 有推出企業方案，宣稱不會將客戶的資料拿去訓練，但很多公司對此還是持保留態度。因此在本地安裝 LLM 大語言模型的 GPT4All…</description>
      <media:content url="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-og_hu_fa2ca89c00ce1609.jpg" medium="image" type="image/jpeg" width="1200" height="675" />
      <content:encoded><![CDATA[<h2 id="不用網路在電腦安裝類-chatgpt-的-ai還指定對話的文件gpt4all">不用網路！在電腦安裝類 ChatGPT 的 AI，還指定對話的文件（GPT4All）<a class="h-anchor" href="#%e4%b8%8d%e7%94%a8%e7%b6%b2%e8%b7%af%e5%9c%a8%e9%9b%bb%e8%85%a6%e5%ae%89%e8%a3%9d%e9%a1%9e-chatgpt-%e7%9a%84-ai%e9%82%84%e6%8c%87%e5%ae%9a%e5%b0%8d%e8%a9%b1%e7%9a%84%e6%96%87%e4%bb%b6gpt4all" aria-label="這個段落的連結"></a></h2>
<p>使用 ChatGPT 等 AI 聊天機器人時，我們會被提醒不可上傳個人、公司的隱私資料。</p>
<p>儘管 ChatGPT、Copilot 有推出企業方案，宣稱不會將客戶的資料拿去訓練，但很多公司對此還是持保留態度。</p>
<p>因此在本地安裝 LLM 大語言模型，即使沒有網路也能使用的 GPT4All 也許是個不錯的替代方案，他在 Windows、Mac、Ubuntu 都能輕鬆使用。</p>
<figure class="figure"><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-01.webp" width="1013" height="570" alt="在 ChatGPT 當機的時候就會覺得有他挺方便的" fetchpriority="high" decoding="async">
  <figcaption>在 ChatGPT 當機的時候就會覺得有他挺方便的</figcaption>
</figure>

<pre tabindex="0"><code>文章大綱

▋STEP 1：下載 GPT4All
▋STEP 2：安裝 GPT4All
▋STEP 3：安裝 LLM 大語言模型
▋STEP 4：開始使用 GPT4All
▋STEP 5：調整 GPT4All 設定
▋Bonus：指定對話的文件（LocalDocs）
</code></pre><h2 id="step-1下載-gpt4all">STEP 1：下載 GPT4All<a class="h-anchor" href="#step-1%e4%b8%8b%e8%bc%89-gpt4all" aria-label="這個段落的連結"></a></h2>
<p>GPT4All 的操作介面跟 ChatGPT 很像，你也可以將聊天記錄保存在自己的電腦，進入官網後挑選自己的作業系統下載就好：</p>
<a class="linkcard" href="https://gpt4all.io/index.html" target="_blank" rel="noopener">
  <span class="lc-body">
    <span class="lc-title">GPT4All</span>
    <span class="lc-desc">Free, local and privacy-aware chatbots</span>
    <span class="lc-site"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17 17 7M8.5 7H17v8.5"/></svg>gpt4all.io</span>
  </span>
  <span class="lc-thumb">
    <img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-card-01_hu_69994bf4ff2dc747.webp" width="320" height="320" alt="" loading="lazy" decoding="async">
  </span>
</a>

<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-02.webp" width="1400" height="626" alt="STEP 1：下載 GPT4All（圖 2）" loading="lazy" decoding="async"></p>
<p>往下滑一些會看到不同模組（Model）的效能測試數據。</p>
<figure class="figure"><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-03.webp" width="1400" height="1130" alt="包含是非題、日常理解能力、推理能力、學術問題等測試項目" loading="lazy" decoding="async">
  <figcaption>包含是非題、日常理解能力、推理能力、學術問題等測試項目</figcaption>
</figure>

<hr>
<h2 id="step-2安裝-gpt4all">STEP 2：安裝 GPT4All<a class="h-anchor" href="#step-2%e5%ae%89%e8%a3%9d-gpt4all" aria-label="這個段落的連結"></a></h2>
<p>在安裝上，只要一直按「Next」下一步就好。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-04.webp" width="1224" height="1000" alt="STEP 2：安裝 GPT4All（圖 4）" loading="lazy" decoding="async"></p>
<p>同意使用者條款要打勾才能下一步</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-05.webp" width="1224" height="1000" alt="STEP 2：安裝 GPT4All（圖 5）" loading="lazy" decoding="async"></p>
<p>➤ <strong>小提醒</strong>：如果官網最新的版本有問題，可以去官方 Github 下載穩定版（筆者下載的是 2.5.4）</p>
<a class="linkcard" href="https://github.com/nomic-ai/gpt4all/releases" target="_blank" rel="noopener">
  <span class="lc-body">
    <span class="lc-title">Releases · nomic-ai/gpt4all</span>
    <span class="lc-desc">gpt4all: open-source LLM chatbots that you can run anywhere - Releases · nomic-ai/gpt4all</span>
    <span class="lc-site"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M7 17 17 7M8.5 7H17v8.5"/></svg>github.com</span>
  </span>
  <span class="lc-thumb">
    <img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-card-02_hu_5a8ac8bf10532f4b.webp" width="320" height="320" alt="" loading="lazy" decoding="async">
  </span>
</a>

<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-06.webp" width="1400" height="694" alt="STEP 2：安裝 GPT4All（圖 6）" loading="lazy" decoding="async"></p>
<hr>
<h2 id="step-3安裝-llm-大語言模型">STEP 3：安裝 LLM 大語言模型<a class="h-anchor" href="#step-3%e5%ae%89%e8%a3%9d-llm-%e5%a4%a7%e8%aa%9e%e8%a8%80%e6%a8%a1%e5%9e%8b" aria-label="這個段落的連結"></a></h2>
<p>打開 GPT4All 時，他會先詢問你是否要分享數據來改善 GPT4All，<strong>如不想就選擇 No（筆者建議）</strong>。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-07.webp" width="1400" height="785" alt="STEP 3：安裝 LLM 大語言模型（圖 7）" loading="lazy" decoding="async"></p>
<p>然後就會出現下載 LLM 大語言模型的列表，上面會說明這個模型擅長的領域（聊天、寫程式）、由哪間公司訓練、是否能商用，並且提供檔案大小、RAM 需求、參數等資訊，通常檔案越大的效果越好。</p>
<figure class="figure"><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-08.webp" width="1400" height="785" alt="目前看下來，Model 所需要的 RAM 從 1GB~16GB 不等" loading="lazy" decoding="async">
  <figcaption>目前看下來，Model 所需要的 RAM 從 1GB~16GB 不等</figcaption>
</figure>

<p>列表中也有 ChatGPT-3.5、ChatGPT-4 可以選擇，不過需要使用 OpenAI API Key，如果使用這個選項就意味著需要連網與付費。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-09.webp" width="1400" height="785" alt="STEP 3：安裝 LLM 大語言模型（圖 9）" loading="lazy" decoding="async"></p>
<p>這邊我挑選 Orca 2（Full）這個由微軟訓練的模型來實驗。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-10.webp" width="1400" height="785" alt="STEP 3：安裝 LLM 大語言模型（圖 10）" loading="lazy" decoding="async"></p>
<p>➤ <strong>小提醒</strong>：如果你直接下載網路上模型，只要把檔案放到上圖 Download path 的目錄下就可以嚕。</p>
<hr>
<h2 id="step-4開始使用-gpt4all">STEP 4：開始使用 GPT4All<a class="h-anchor" href="#step-4%e9%96%8b%e5%a7%8b%e4%bd%bf%e7%94%a8-gpt4all" aria-label="這個段落的連結"></a></h2>
<p>下載完後，就可以在聊天界面中看到模型嚕～</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-11.webp" width="1400" height="300" alt="STEP 4：開始使用 GPT4All（圖 11）" loading="lazy" decoding="async"></p>
<p>這邊我就先用「請假信」初步測試給大家看看。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-12.webp" width="1265" height="840" alt="STEP 4：開始使用 GPT4All（圖 12）" loading="lazy" decoding="async"></p>
<p>表現的並不是很好，我們再來測試一下「寫程式」的能力。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-13.webp" width="1265" height="908" alt="STEP 4：開始使用 GPT4All（圖 13）" loading="lazy" decoding="async"></p>
<p>基礎程式的表現尚可，但…情境複雜一點的就不行了。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-14.webp" width="1257" height="834" alt="STEP 4：開始使用 GPT4All（圖 14）" loading="lazy" decoding="async"></p>
<p>看起來寫得有模有樣，不過實際上是錯的，但這個題目 GPT-3.5 可以輕鬆答對。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-15.webp" width="859" height="700" alt="STEP 4：開始使用 GPT4All（圖 15）" loading="lazy" decoding="async"></p>
<hr>
<h2 id="step-5調整-gpt4all-設定">STEP 5：調整 GPT4All 設定<a class="h-anchor" href="#step-5%e8%aa%bf%e6%95%b4-gpt4all-%e8%a8%ad%e5%ae%9a" aria-label="這個段落的連結"></a></h2>
<p>點擊上方的「齒輪」，可以進一步調整 GPT4All 的設定。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-16.webp" width="1400" height="296" alt="STEP 5：調整 GPT4All 設定（圖 16）" loading="lazy" decoding="async"></p>
<h3 id="-model調整模型參數">Model（調整模型參數）<a class="h-anchor" href="#-model%e8%aa%bf%e6%95%b4%e6%a8%a1%e5%9e%8b%e5%8f%83%e6%95%b8" aria-label="這個段落的連結"></a></h3>
<ul>
<li><strong>System Prompt</strong>：這是對話開始前會執行的指令，你可以在這邊設定 AI 要扮演的角色（ex:翻譯員、工程師），這邊有很多優秀的 Prompt 可以參考: <a href="https://github.com/f/awesome-chatgpt-prompts">https://github.com/f/awesome-chatgpt-prompts</a></li>
<li><strong>Prompt Template</strong>： 設計 AI 要如何回應你，如果你希望 AI 都以中文回覆，就可以加上「用繁體中文回應。」</li>
<li><strong>Generation Setting</strong>：如果沒有特別需求，筆者並不建議調整；另外 Max Length 儘管可以調整，但如果超過模型可以承受的長度，他是不會理你的。</li>
</ul>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-17.webp" width="1257" height="1003" alt="Model（調整模型參數）（圖 17）" loading="lazy" decoding="async"></p>
<p>下面我讓他扮演詩人（poet）的角色，並用「love」這個主題來作詩。</p>
<figure class="figure"><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-18.webp" width="1257" height="376" alt="大家可以看到就算指定繁體中文，很多時候還是會以簡體呈現。" loading="lazy" decoding="async">
  <figcaption>大家可以看到就算指定繁體中文，很多時候還是會以簡體呈現。</figcaption>
</figure>

<h3 id="-application基礎設定">Application（基礎設定）<a class="h-anchor" href="#-application%e5%9f%ba%e7%a4%8e%e8%a8%ad%e5%ae%9a" aria-label="這個段落的連結"></a></h3>
<ul>
<li><strong>Theme</strong>：調整主題為深色（Dark）、淺色（Light）。</li>
<li><strong>Font Size</strong>：字體大小。</li>
</ul>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-19.webp" width="1257" height="611" alt="Application（基礎設定）（圖 19）" loading="lazy" decoding="async"></p>
<hr>
<h2 id="bonus指定對話的文件localdocs">Bonus：指定對話的文件（LocalDocs）<a class="h-anchor" href="#bonus%e6%8c%87%e5%ae%9a%e5%b0%8d%e8%a9%b1%e7%9a%84%e6%96%87%e4%bb%b6localdocs" aria-label="這個段落的連結"></a></h2>
<p>如果想上傳自己的文件，就需要先去下載對應的 Model。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-20.webp" width="1304" height="770" alt="Bonus：指定對話的文件（LocalDocs）（圖 20）" loading="lazy" decoding="async"></p>
<p>在 LLM 列表中選擇「SBert」這個模型來安裝。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-21.webp" width="1309" height="483" alt="Bonus：指定對話的文件（LocalDocs）（圖 21）" loading="lazy" decoding="async"></p>
<p>點擊齒輪後，在 LocalDocs 分頁透過 Browse 選擇資料夾，點擊 Add 便可新增文件；他支援大多數的文件格式（doc/pdf/txt/html/xls/csv/json…）。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-22.webp" width="1400" height="296" alt="Bonus：指定對話的文件（LocalDocs）（圖 22）" loading="lazy" decoding="async"></p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-23.webp" width="1304" height="315" alt="Bonus：指定對話的文件（LocalDocs）（圖 23）" loading="lazy" decoding="async"></p>
<p>新增後的的路徑會出現在下方。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-24.webp" width="1400" height="410" alt="Bonus：指定對話的文件（LocalDocs）（圖 24）" loading="lazy" decoding="async"></p>
<p>然後我們開一個新的對話來實驗看看，這邊要把對應的 Local Documents 勾選才會生效喔！</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-25.webp" width="1400" height="300" alt="Bonus：指定對話的文件（LocalDocs）（圖 25）" loading="lazy" decoding="async"></p>
<p>下面可以看到 AI 的回答會參考我給予的文件。</p>
<p><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-26.webp" width="1400" height="410" alt="Bonus：指定對話的文件（LocalDocs）（圖 26）" loading="lazy" decoding="async"></p>
<p>不過這部分測試下來，如果把它當成「關鍵字查詢」的工具還算堪用；若想做更進階的應用，像是整合、發想、摘要，AI 的表現都不太好。</p>
<hr>
<h2 id="總結">總結<a class="h-anchor" href="#%e7%b8%bd%e7%b5%90" aria-label="這個段落的連結"></a></h2>
<p>跟官方的 GPT-4 相比，他真的蠻弱（笨）的；這邊分享筆者在體驗後看到的優缺點：</p>
<ul>
<li><strong>優點</strong>：可以不連網使用、隱私性較高、免費。</li>
<li><strong>缺點</strong>：回答速度較慢、無法回答太長的內容、回覆品質較差、理解問題能力較差。</li>
</ul>
<p>如果公司禁止使用 ChatGPT、Bard 等需要連網的 AI 工具，或是你有許多隱私資訊需要處理；也許 GPT4All 會是一個可行的替代方案。大家可以多測試幾個 Model，比較一下各自的差異。</p>
<p>➤ <strong>小提醒：</strong>筆者並沒有仔細研究裡面的程式碼，若打算上傳機敏資料，請自行評估風險。</p>
<a class="linkcard" href="https://deanlin.net/categories/ai/">
  <span class="lc-body">
    <span class="lc-title">AI 實戰</span>
    <span class="lc-desc">實測生成式 AI 工具、Vibe Coding 與自動化流程的第一手心得，把 AI 變成每天都用得上的即戰力。</span>
    <span class="lc-site"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M5 12h14M13 6l6 6-6 6"/></svg>林鼎淵 Dean Lin</span>
  </span>
</a>

<p><strong>想將 AI 導入自己的職場與生活嗎？歡迎<a href="https://www.books.com.tw/products/0011004216">購買筆者出版的新書</a></strong>，幫助您<strong>在 AI 的浪潮中站穩腳步，並在未來的職場競爭中佔據優勢！</strong></p>
<figure class="figure"><img src="https://deanlin.net/blog/202401/gpt4all-offline-ai/images/gpt4all-offline-ai-27.webp" width="1400" height="319" alt="林鼎淵著作《ChatGPT 與 AI 繪圖效率大師（新增 Copilot、Gamma、Runway、Suno）》" loading="lazy" decoding="async">
  <figcaption><a href="https://www.books.com.tw/products/0011004216">https://www.books.com.tw/products/0011004216</a></figcaption>
</figure>

]]></content:encoded>
    </item>
  </channel>
</rss>
