{
  "schema_version": "1.0",
  "id": "T-4a52a8aee0b2",
  "url": "https://gpuatlas.top/articles/T-4a52a8aee0b2/",
  "title": "DeepSeek R1 蒸馏版 32B 想读长文档，上下文开多大才不容易爆显存？",
  "summary": "DeepSeek R1蒸馏32B长文需同时预算较大权重与缓存，先用算例筛选，再检查完整推理。",
  "language": "zh-Hans",
  "category": {
    "id": "c-02",
    "name": "推理与上下文",
    "url": "https://gpuatlas.top/categories/c-02/"
  },
  "topics": [
    {
      "id": "model-b64bc5faa8",
      "name": "DeepSeek R1",
      "kind": "model",
      "description": "完整版与蒸馏版的硬件需求不能混算。分别查看权重预算、多卡部署、量化运行及微调相关问题。",
      "url": "https://gpuatlas.top/topics/model-b64bc5faa8/"
    }
  ],
  "body_text": "DeepSeek-R1-Distill-Qwen-32B读长文，要为材料和完整推理共同留空间。输入、模板、历史、思考与最终答案都计入总token，不能只按文档长度设置上限。\n\n配置64层、8个KV头、头维128。常规单序列16bit KV在8K约2GiB、16K约4GiB、32K约8GiB，权重、分页元数据与缓冲未计，权重量化也不会自动改变缓存位宽。\n\n按32B名义规模，理想4bit原始权重约16GB，即约14.90GiB。假设可用预算为24GiB，仅它与32K缓存相加就约22.90GiB，还没有其他开销。这个算例能帮助排除过紧的方案，实际文件和后端仍需另核。\n\n先用单请求和有限输出检查常见材料，再逐档增加长度。输入阶段失败先看实际token、预留与处理峰值；生成后段失败再查总长度和活动状态。每次调整一项并重跑原题，截断不能算完成。\n\n在上述24GiB假设下，不宜看到权重能放入就直接采用32K。可以先缩短材料并保留推理空间，用一份已知结论的文档检查答案引用了哪些段落；若资源充足却遗漏关键证据，改进材料组织或检索，比继续扩大缓存更贴近问题。保存失败发生在输入还是生成阶段，方便下次调整。",
  "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": "r1-distill-32b",
      "url": "https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B/raw/main/README.md",
      "retrieved_at": "2026-11-25T11:23:02.755600+00:00"
    },
    {
      "id": "r1-distill-32b-config",
      "url": "https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-32B/resolve/main/config.json",
      "retrieved_at": "2026-11-25T11:23:02.755600+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-4a52a8aee0b2/",
    "json": "https://gpuatlas.top/data/articles/T-4a52a8aee0b2.json",
    "markdown": "https://gpuatlas.top/data/articles/T-4a52a8aee0b2.md"
  }
}
