---
title: "推测解码 A/B：动手前要问的问题"
url: https://memory.wiki/8KlMksfh
updated: 2026-11-16T21:55:31.675Z
source: "memory.wiki"
---
# 推测解码 A/B：动手前要问的问题

## 「推测解码 A/B」的背景

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

## 最小流程

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

## 安装方式的选择

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

## 值得写进文档的设置

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

## 出问题时

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

## 新机器检查清单

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

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

想了解更多，可以看看[本地 AI 教程中心](https://microaione.com/tutorials/)和[Windows 上 Dify + Ollama](https://microaione.com/tutorials/dify-local-llm-windows-ollama/)。


## 速记要点

- 每次变更都写上日期和负责人。
- 演练恢复，而不只是做备份。
- 公布助手会拒绝做的事。
- 每次请求都记录模型名称和版本。

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

---

## Summary
在本地AI部署中，通过每次仅进行一项改动并记录详细的配置与测试结果，可以有效降低因环境变化导致的故障排查难度。建立标准化的安装流程与文档记录，是确保本地模型服务稳定运行的关键。

## Themes
- Local AI deployment workflow
- System stability management
- Model testing methodology
- Infrastructure documentation best practices

## Key takeaways
- Maintain a written log of operating system, driver, runtime, and model versions before making any changes.
- Use a consistent set of ten to twenty prompts to compare performance and resource usage after every modification.
- Avoid embedding large model weights directly into container images by using mounted volumes for storage.
- New machine setups should prioritize verifying hardware recognition and runtime functionality with a single small model before scaling.
- Documenting recovery procedures is more critical than simply performing backups.

## Insights
- Software volatility in local AI stacks is primarily driven by external dependencies like drivers and runtimes rather than the models themselves.
- The most effective way to isolate failures in complex local AI environments is to strictly enforce a single-variable change policy during updates.
- Documenting the reasoning behind exceptions to default configurations is as important as documenting the configurations themselves.

## Open questions / gaps
- How should one handle versioning conflicts when multiple services require different versions of the same runtime on a single host?

