{
  "schema_version": "1.0",
  "id": "T-583a918e2005",
  "url": "https://gpuatlas.top/articles/T-583a918e2005/",
  "title": "32G 显存跑本地模型，怎么给长上下文留空间？",
  "summary": "32G长文需联合安排权重精度与缓存，Qwen3 14B高精度算例显示加载成功不代表32K可用。",
  "language": "zh-Hans",
  "category": {
    "id": "c-11",
    "name": "按显存找方案",
    "url": "https://gpuatlas.top/categories/c-11/"
  },
  "topics": [],
  "body_text": "32G显存读长文，先判断任务更依赖较高权重精度，还是必须容纳较长材料。预算把权重、缓存、缓冲和其他程序分开，统一GB与GiB，不能直接按标称数字相减。\n\n以Qwen3 14B为条件例子，实际约14.8B参数，16bit原始权重约29.6GB，即约27.57GiB。40层、8个KV头、头维128结构下，常规单序列16bit KV在8192 token约1.25GiB、32768约5GiB。\n\n若假设可用预算恰为32GiB，权重小计与32K缓存相加已约32.57GiB，尚无其他开销。它说明高精度权重能加载，也不能证明长文可用；这个算例不是硬件测量，更不能套给所有14B结构。\n\n先用短请求建立质量基线，再比较明确兼容的量化或缓存方案，固定输入每次改变一项。材料、模板、历史、思考和答案共同计入长度，分别观察输入与生成峰值。\n\n对Qwen3 14B，可用同一份长材料比较高精度短输入与兼容量化后的所需长度，检查前、中、后事实的引用和遗漏，截断单列。保存文件、缓存条件、实际token与完整等待，再决定是否以部分权重精度换取材料空间；模型侧最大值不能替代这份材料的结果。",
  "published_at": null,
  "modified_at": "2026-11-26T15:17:38.690397+00:00",
  "evidence": {
    "type": "documentation_and_conditional_estimates",
    "hardware_tested": false,
    "note": "资料解释与条件估算，非硬件实测。"
  },
  "sources": [
    {
      "id": "qwen3-14b",
      "url": "https://huggingface.co/Qwen/Qwen3-14B/raw/main/README.md",
      "retrieved_at": "2026-11-25T10:43:11.065868+00:00"
    },
    {
      "id": "qwen3-14b-config",
      "url": "https://huggingface.co/Qwen/Qwen3-14B/resolve/main/config.json",
      "retrieved_at": "2026-11-25T10:43:11.065868+00:00"
    },
    {
      "id": "vllm-memory",
      "url": "https://raw.githubusercontent.com/vllm-project/vllm/main/docs/configuration/conserving_memory.md",
      "retrieved_at": "2026-11-25T09:52:45.997121+00:00"
    }
  ],
  "revision_note": "完善阅读结构；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-583a918e2005/",
    "json": "https://gpuatlas.top/data/articles/T-583a918e2005.json",
    "markdown": "https://gpuatlas.top/data/articles/T-583a918e2005.md"
  }
}
