不寫程式也能部署本地 AI:LM Studio 從安裝、挑模型到離線驗收
本地 AI 實作 01|資料核對:2026 年 11 月 30 日
想讓 AI 在自己的電腦整理會議紀錄、改寫文案或閱讀文件,可以先從 LM Studio 桌面版開始。第一次部署的目標很具體:找到來源清楚、電腦負擔得起的模型,讓它完成一個可核對的任務,並確認下載完成後仍能離線使用。
這篇採用圖形介面操作,適合 Windows 與 Apple Silicon Mac 使用者。範例選用 Qwen3-4B 的官方 GGUF 量化檔;選它是為了提供明確的下載目標,不代表它是目前最強模型,也不保證每台電腦都有相同速度。
一、下載之前,先看懂三種容量
硬碟空間放安裝程式與模型檔案;RAM提供作業系統和應用程式使用;獨立顯示卡的 VRAM 則供 GPU 運算使用。模型的下載大小只描述檔案體積,執行時還有上下文快取與其他運算資料需要記憶體。
Apple Silicon 採統一記憶體,CPU、GPU 與系統共用資源。標示 16GB 統一記憶體,不能理解成有 16GB 可以全部交給模型。Windows 的 16GB RAM 加 8GB VRAM,也不能直接當成一張 24GB 顯示卡。
| 平台 | 官方文件列出的重點 | 開始前要做的事 |
|---|---|---|
| Windows x64 | CPU 須支援 AVX2;建議至少 16GB RAM、4GB 專用 VRAM | 查看實際 RAM、GPU 型號與專用顯示記憶體 |
| Apple Silicon Mac | macOS 14.0 以上;建議 16GB 以上記憶體 | 查看晶片與記憶體容量,先關閉高耗用程式 |
| 8GB Apple Silicon Mac | 官方表示可嘗試較小模型與較短上下文 | 降低第一個模型的規模,觀察記憶體壓力 |
| Intel Mac | 官方目前不支援 | 這篇安裝路線不適用 |
表中的「建議」不是任何模型都能運行的保證。先檢查 LM Studio 官方系統需求,再下載符合平台的版本。
二、安裝桌面版,確認推論引擎可用
前往 官方下載頁,選擇作業系統對應的 LM Studio 桌面版。同一網站也提供 Bionic 與無介面的 llmster;本篇的操作位置以 LM Studio 桌面版為準。
LM Studio 是操作介面,模型權重是要下載的檔案,Runtime 則是執行模型的引擎。先保持連線完成首次設定。若軟體要求下載相容引擎,先完成下載,再進行後面的離線測試。
官方支援透過 llama.cpp 執行 GGUF 模型;Apple Silicon 另可使用 MLX。需要查看引擎時,可按 Mac 的 ⌘+Shift+R,或 Windows 的 Ctrl+Shift+R。引擎與格式說明
三、第一個模型怎麼選?用完整來源縮小範圍
開啟 Discover,把以下官方模型網址貼進搜尋欄:
https://huggingface.co/Qwen/Qwen3-4B-GGUF
LM Studio 支援用模型名稱、作者/模型 或完整 Hugging Face 網址搜尋。確認發布者是 Qwen、名稱是 Qwen3-4B-GGUF,再挑下載檔案;不要只看到「Qwen」就任選一個結果。下載模型操作
這個官方儲存庫提供 Q4_K_M、Q5_K_M 等版本。第一輪可先用 Q4_K_M 建立基準;如果記憶體仍有餘裕,再用相同題目比較 Q5_K_M。這是部署起點,並非所有模型都以相同比特數最划算。官方模型卡
量化會降低儲存與執行負擔,也可能改變回答品質。比較時要固定原始模型、提示詞與工作內容,才能知道差異來自哪裡。Q4、Q5 的名稱也不代表整份檔案每個數值都剛好以相同比特儲存。
Apple Silicon 使用者可以另外嘗試 MLX 版本,但要選擇相容的模型檔與引擎;本篇範例仍走 GGUF 路線,方便跟著同一個來源操作。GGUF 與 MLX 都是部署路徑,不能僅憑格式名稱判定哪個必然更快。
四、載入模型,先把上下文控制在 4,096 tokens
下載完成後進入 Chat,開啟模型選擇器,選取剛下載的模型並載入。下載只是把檔案放進硬碟;載入後,推論引擎才會為模型分配記憶體。官方啟動流程
第一次可先使用預設 GPU 設定。如果想指定上下文長度,在 Settings → Developer 開啟 Developer mode,再調整載入設定。目前官方已把舊的 Power User 與 Developer 功能合併,因此舊教學的選單位置可能不同。介面模式說明
建議初始條件如下;這是本文為方便定位問題安排的基準:
| 設定 | 第一輪做法 | 理由 |
|---|---|---|
| 同時載入模型數 | 1 個 | 避免其他模型占用記憶體 |
| Context Length | 4,096 tokens | 先驗證短任務,再逐步增加 |
| GPU Offload | 先採自動設定 | 觀察結果後再調整 |
| 提示詞與採樣設定 | 保留模型預設,使用固定測試題 | 減少同時改動的變數 |
上下文包含提示詞、對話歷史與生成內容等 token 預算,不能直接當成同等中文字數。官方也提供依上下文估算記憶體的功能,說明執行需求會隨設定改變。載入與記憶體估算
要保存設定,可到 My Models 找到模型旁的齒輪,設定預設載入參數。修改這類參數後,重新載入模型,讓下一輪測試確實使用新條件。每個模型的預設設定
五、用一個有標準答案的任務驗收
第一題別只問「你好」。貼上這段可直接核對的內容:
請只根據以下資料,以繁體中文回答。
沒有提供的資訊請寫「資料未提供」,不要自行推測。
活動資料:
活動日期:12 月 10 日
參加人數:18 人
場地預算:新臺幣 6,800 元
餐飲預算:尚未決定
請完成三件事:
1. 用表格列出活動日期、人數、場地預算、餐飲預算。
2. 回答活動在哪一個城市舉辦。
3. 列出仍需主辦方確認的兩項資訊。
/no_think
這裡的 /no_think 是本篇 Qwen3 範例支援的模式指令,用於先做一般回覆驗收;換其他模型時,不應直接假設同樣有效。官方模型卡說明了這項用法。Qwen3 模式切換
檢查四件事:日期和數字是否抄對、餐飲是否保留未定、城市是否承認未提供、待確認事項是否沒有被寫成已確定事實。這比回答看起來流暢更能判斷模型是否適合你的工作。
再換一段自己的非敏感工作資料測一次,記錄模型名稱、量化版本、上下文與錯誤。不要用一次成功推論它能處理全部任務;也不要在還沒釐清資料來源前,把答錯都歸因於模型太小。
六、離線驗收,要另外開一個新對話
先確認模型與 Runtime 都已下載,並在連線狀態下成功回答過一次。接著中斷網路,開新對話,使用剛才同一份資料重新提問。這樣可以驗證本機推論流程是否可用,不會把畫面上原本已有的回覆誤認成測試成功。
依官方文件,已下載模型的基礎聊天、文件問答與本機伺服器可離線運作;搜尋新模型、下載檔案、下載引擎及檢查更新則需要連線。外接的 MCP 工具或遠端服務要另外評估,不能把本機模型的離線能力延伸成所有外掛都不連網。離線操作範圍
本篇選擇的是已下載的本機模型。若改用選用的雲端模型或網路搜尋,資料處理方式會不同;不要只看到同一個 App,就認定所有功能都在本機完成。LM Studio 隱私政策
如果想測文件,可先建立一份短的 .txt,放入剛才的活動資料並附加到對話。LM Studio 也支援 .docx、.pdf;長文件可能使用檢索方式找相關片段,因此找到一段內容不代表完整讀過所有頁面。先用短文件確認能正確引用,再增加長度。文件問答說明
七、遇到問題,按現象縮小原因
| 現象 | 優先檢查與處理 |
|---|---|
| 搜尋不到模型 | 確認連線與完整官方網址;離線時不能搜尋新模型 |
| 模型下載完仍無法啟動 | 核對格式、相容 Runtime 與實際可用記憶體;先縮短上下文 |
| 找不到進階設定 | 到 Settings → Developer 開啟 Developer mode |
| 回答很慢、整台電腦卡頓 | 查看記憶體壓力及 GPU 使用情形;先關閉其他大程式、卸載其他模型 |
| 一直長篇思考 | 本篇 Qwen3 可先用 /no_think;其他模型依各自文件設定 |
| 回答流暢卻編造資料 | 用固定資料題定位錯誤;補足來源、縮小任務,再比較模型 |
上表是排查順序,並非只憑一種現象就能判定唯一原因。
完成後,你應該能指出正在用哪一份模型、它的來源與量化版本,重新載入同樣設定,並在沒有網路時重做一個可核對的任務。有了這個基準,再往文件知識庫、API 或工具操作發展,後續出問題時才有可比較的起點。
練習附件
文末附有 lm-studio-verification.txt,可直接下載並複製測試題。資料為教學用虛構活動,方便重複核對答案。
官方資料
本文依上述官方文件整理操作路徑;未宣稱已在所有作業系統與硬體組合進行實機測試。軟體介面與支援範圍更新時,請以官方文件及實際版本為準。
本地 AI 實作系列
- 01 LM Studio:不寫程式的本地部署入門(本篇)
- 02 Ollama:安裝模型並呼叫本地 API
- 03 硬體與量化:6GB 到 16GB 顯存怎麼選
- 04 圖片辨識:Qwen3-VL 與 JSON 輸出
- 05 文件問答:PDF、RAG 與來源核對
Local AI implementation 01 | Data verification: November 30, 2026
Want to let AI organize meeting records, rewrite manuscripts, or read documents on your own computer, you can start with the LM Studio desktop version. The goal of the first deployment is very specific: find a model with a clear source and a computer that can afford it, let it complete a verifiable task, and confirm that it can still be used offline after downloading.
This article uses graphical interface operations, suitable for Windows and Apple Silicon Mac users. The example uses the official GGUF quantization file of Qwen3-4B; it is chosen to provide a clear download target, not representing it is the current strongest model, nor guaranteeing that every computer has the same speed.
I. Before downloading, first understand the three types of capacity
Hard disk spaceto store installation programs and model files;RAMto provide for the operating system and applications; the VRAM of a standalone graphics card is for GPU calculations. The download size of a model only describes the file volume, and during execution, context caching and other calculation data also require memory.
Apple Silicon uses unified memory, with the CPU, GPU, and system sharing resources. Indicating 16GB of unified memory does not mean that 16GB can be fully allocated to the model. Windows' 16GB RAM plus 8GB VRAM also cannot be directly considered as a 24GB graphics card.
| Platform | Key points listed in the official documentation | Things to do before starting |
|---|---|---|
| Windows x64 | CPU must support AVX2; at least 16GB RAM and 4GB dedicated VRAM are recommended. | Check the actual RAM, GPU model, and dedicated display memory |
| Apple Silicon Mac | macOS 14.0 or later; recommended 16GB or more memory | Check the chip and memory capacity, close high-consumption programs first |
| 8GB Apple Silicon Mac | The official statement suggests trying smaller models and shorter contexts | Reduce the size of the first model and observe the memory pressure |
| Intel Mac | Officially not supported at this time | This installation route does not apply |
The 'recommended' in the table is not a guarantee that any model can run. Check first LM Studio official system requirementsDownload the version that matches the platform again.
II. Install the desktop version and confirm that the inference engine is available
Go to the official download pageand select the LM Studio desktop versioncorresponding to the operating system. The same website also provides Bionic and interface-less llmster; the operation position in this article is based on LM Studio desktop version.
LM Studio is the operation interface, the model weight is the file to be downloaded, and Runtime is the engine that runs the model. First, keep the connection to complete the initial setup. If the software requires downloading a compatible engine, complete the download first, and then perform the subsequent offline test.
The official support is available through llama.cpp to run the GGUF model; Apple Silicon can also use MLX. When you need to view the engine, you can press Mac's ⌘+Shift+Ror Windows' Ctrl+Shift+R。engine and format description
III. How to choose the first model? Use the complete source to narrow down the range
Open Discoverand paste the following official model URL into the search bar:
https://huggingface.co/Qwen/Qwen3-4B-GGUF
LM Studio supports searching by model name,作者/模型 or complete Hugging Face URL. Confirm that the publisher is Qwenand the name is Qwen3-4B-GGUFbefore downloading the file; don't just see 'Qwen' and arbitrarily select a result.Download model operation
This official repository provides Q4_K_M、Q5_K_M and other versions. The first round can use Q4_K_M Establish a baseline; if memory still has surplus, compare Q5_K_M with the same topic. This is the deployment starting point, and not all models are the most cost-effective with the same number of bits.Official model card
Quantization will reduce storage and execution burden, and may also change the answer quality. When comparing, the original model, prompt, and task content must be fixed to know where the difference comes from. The names Q4 and Q5 do not represent that every value in the file is stored with the same number of bits.
Apple Silicon users can also try the MLX version, but they need to choose compatible model files and engines; this article still follows the GGUF route for convenience and to follow the same source operation. Both GGUF and MLX are deployment paths, and it cannot be determined which one is faster just by the format name.
Four, load the model, first control the context to 4,096 tokens
After downloading, enter Chatand open the model selector to select and load the newly downloaded model. Downloading is just putting the file on the hard drive; after loading, the inference engine will allocate memory for the model.Official startup process
The first time, you can use the default GPU settings. If you want to specify the context length, go to Settings → Developer to enable Developer mode and adjust the loading settings. Currently, the official has merged the old Power User and Developer functions, so the menu location of old tutorials may be different.Interface mode description
It is recommended to set the initial conditions as follows; this is the basis for this article to facilitate problem location:
| Settings | First-round approach | Reason |
|---|---|---|
| Number of models loaded simultaneously | 1 | To avoid other models occupying memory |
| Context Length | 4,096 tokens | First verify short tasks, then gradually increase |
| GPU Offload | First, adopt the automatic setting | Observe the results and then adjust |
| Prompt words and sampling settings | Keep the model default, use a fixed test topic | Reduce the number of variables changed at the same time |
The context includes prompt words, conversation history, and generated content, etc. token budget, and cannot be directly equated to the same number of Chinese characters. The official also provides a function to estimate memory based on context, which explains that execution requirements will change with settings.Loading and memory estimation
To save settings, go to My Models Find the gear next to the model, set the default loading parameters. After modifying these parameters, reload the model, so that the next test actually uses the new conditions.Default settings for each model
Five, use a task with a standard answer to verify
The first question should not just ask "hello". Paste this section of directly verifiable content:
請只根據以下資料,以繁體中文回答。
沒有提供的資訊請寫「資料未提供」,不要自行推測。
活動資料:
活動日期:12 月 10 日
參加人數:18 人
場地預算:新臺幣 6,800 元
餐飲預算:尚未決定
請完成三件事:
1. 用表格列出活動日期、人數、場地預算、餐飲預算。
2. 回答活動在哪一個城市舉辦。
3. 列出仍需主辦方確認的兩項資訊。
/no_think
Here is /no_think This is the Qwen3 example support mode instruction, used to first do general reply verification; when switching to other models, do not assume it is directly effective. The official model card explains this usage.Qwen3 mode switching
Check four things: whether the date and numbers are copied correctly, whether the meal is kept undefined, whether the city acknowledges not being provided, and whether the pending confirmation items are not written as confirmed facts. This can better judge whether the model is suitable for your work than the smoothness of the answer.
Then switch to another segment of your own non-sensitive work data and test again, record the model name, quantization version, context, and error. Do not use one successful inference to conclude that it can handle all tasks; also, do not attribute all errors to the model being too small before clarifying the data source.
Six, offline verification requires opening a new conversation
First, confirm that the model and Runtime have been downloaded, and have successfully answered a question while online. Then, disconnect from the network, open a new conversation, and use the same data to ask again. This can verify whether the local inference process is available and will not mistakenly recognize the original response on the screen as a test success.
According to the official documentation, the basic chat, file Q&A, and local server of the downloaded model can work offline; searching for new models, downloading files, downloading engines, and checking updates require a connection. External MCP tools or remote services need to be evaluated separately and cannot extend the offline capability of local models to all plug-ins.Offline operation range
This article chooses the downloaded local model. If you switch to the optional cloud model or network search, the data processing method will be different; do not just see the same App and conclude that all functions are completed locally.LM Studio Privacy Policy
If you want to test the file, you can first create a short one .txt, put in the activity data just now and attach it to the conversation. LM Studio also supports .docx、.pdf; long files may use retrieval methods to find relevant fragments, so finding a piece of content does not mean you have read all the pages. First, use a short file to confirm that it can be correctly referenced, and then increase the length.File Q&A Instructions
Seven, when encountering problems, narrow down the cause according to the phenomenon
| Phenomenon | Prioritize checking and handling |
|---|---|
| Cannot find the model | Confirm the connection and complete official URL; cannot search for new models when offline |
| The model is downloaded but still cannot be started | Check the format, compatible Runtime, and actual available memory; first shorten the context |
| Cannot find advanced settings | Go to Settings → Developer to open Developer mode |
| The response is very slow, and the whole computer is stuck | Check the memory pressure and GPU usage; first close other large programs and uninstall other models |
| Always thinking for a long time | This article Qwen3 can be used first /no_think; other models depend on their own file settings |
| The response is smooth but fabricates data | Use fixed data to locate the error; supplement the source, narrow down the task, and compare the model |
The above table is the troubleshooting order, and it is not possible to determine the unique cause based on one phenomenon alone.
After completing, you should be able to indicate which model you are using, its source and quantization version, reload the same settings, and redo a verifiable task without the internet. With this baseline, you can then develop the file knowledge base, API, or tool operations, and when problems arise later, you will have a comparable starting point.
Practice Attachment
At the end of the text, there is lm-studio-verification.txt, you can directly download and copy the test questions. The data is for teaching purposes, a fictional activity, convenient for repeated verification of answers.
Official data
- LM Studio system requirements
- LM Studio installation and first startup
- Model download and quantization options
- Qwen3-4B-GGUF official model card
- Interface mode、Model default parameters
- Offline operation、Document Q&A
This article is organized based on the above official documents to outline the operation path; it does not claim to have been tested on all operating systems and hardware combinations. When the software interface and support range are updated, please refer to the official documents and actual version.
Local AI practice series
- 01 LM Studio: Local deployment entry without programming (this article)
- 02 Ollama: Install the model and call the local API
- 03 Hardware and quantization: How to choose from 6GB to 16GB of video memory
- 04 Image recognition: Qwen3-VL and JSON output
- 05 Document Q&A: PDF, RAG, and source verification