---
title: "不用公式讲推测解码：实操清单"
url: https://memory.wiki/YJ2LK4tm
updated: 2026-11-19T21:53:55.653Z
source: "memory.wiki"
---
# 不用公式讲推测解码：实操清单

## 「不用公式讲推测解码」的背景

何时省时；何时浪费显存。软件是本地 AI 栈里变化最快的部分。上个月还好好的配置，可能因为驱动更新、运行时升级或模型打包方式变化而出问题。一份简短的书面流程能让这些变化变得平淡无奇。

## 最小流程

1. 改动前记下操作系统、显卡驱动、运行时版本和模型文件。
2. 只做一项改动：新运行时、新量化、新上下文长度或新模型。
3. 用同一组十到二十个提示词测试，语言要和用户实际使用的一致。
4. 把回答和资源占用与上一次对比。
5. 保留或回滚，并写下决定和日期。

## 安装方式的选择

单机上原生安装最简单，也能避开显卡直通的麻烦。多个服务共用一台主机或需要可复现部署时，容器更合适；模型用挂载卷，不要把几十 GB 的权重打进镜像。Windows 上 WSL2 很好用，但虚拟磁盘会悄悄变大，要盯住剩余空间。macOS 上先决定用 llama.cpp 还是 MLX，并保持目录结构整洁。

## 值得写进文档的设置

- 团队默认温度和系统提示词，例外要写理由。
- 每个模型的上下文长度和并行槽位数。
- 启用了哪些功能：工具调用、推测解码、图像输入。
- 日志存在哪里、保留多久。

## 出问题时

收集完整的报错文本、触发它的命令或界面操作，以及当时的资源占用。很多报告最后发现是内存不足、提示词模板不对或文件没下完整。发帖前先搜共享的故障维基，找到解决办法后补进去。

## 新机器检查清单

- 先装显卡驱动，确认系统能识别显卡。
- 只装一个运行时，并确认它能调用显卡。
- 拉一个小模型，跑一个短提示词，记下内存占用。
- 把模型目录放到剩余空间充足的硬盘上并更新路径。
- 第一个模型稳定之后再加第二个。
- 趁记忆还新，把操作步骤写进共享文档。

按这个顺序，问题很容易定位。一次装好几个工具和模型，就很难判断是哪项改动导致了故障。

延伸阅读：[本地 AI 教程中心](https://microaione.com/tutorials/)，以及[显存与模型尺寸速查表](https://microaione.com/match/vram-table/)。


## 速记要点

- 检索文本和上传文件一律视为不可信。
- 所有运行时共用一个模型目录。
- 演练恢复，而不只是做备份。
- 商用前先读模型许可证。

*作者：[本地AI 1号网](https://microaione.com/)，深圳团队，专注本地大模型软硬件、装机与私有化部署。*

---

## Summary
本地AI部署应遵循单项改动与标准化测试的原则，通过记录环境配置和资源占用情况来确保系统稳定性。遇到故障时应通过对比基准数据与系统日志，逐步排查内存或配置问题。

## Themes
- Local AI deployment
- System maintenance workflows
- Troubleshooting methodology
- Infrastructure best practices

## Key takeaways
- Changes to local AI stacks should be tested one variable at a time to simplify troubleshooting.
- Model weights should be stored in mounted volumes rather than baked into container images.
- WSL2 users must actively monitor virtual disk space to prevent silent storage exhaustion.
- Documentation should include team defaults for temperature, system prompts, and model-specific context lengths.
- New machine setups should verify hardware recognition and runtime capability before scaling to multiple models.

## Insights
- The document treats software instability as a constant, prioritizing process documentation over permanent configuration.
- It emphasizes that hardware and runtime changes should be isolated to single variables to ensure diagnostic clarity.
- The advice suggests that infrastructure management, such as storage and containerization, is as critical as model selection for local AI performance.

## Open questions / gaps
- How to specifically optimize speculative decoding parameters for different hardware configurations.

