{
  "schema_version": "1.0",
  "id": "T-503d13396d2d",
  "url": "https://gpuatlas.top/articles/T-503d13396d2d/",
  "title": "48G 显存跑本地模型，怎么给长上下文留空间？",
  "summary": "48G长文需联合选择权重精度和活动序列，32B条件算例可展示多请求缓存挤压余量。",
  "language": "zh-Hans",
  "category": {
    "id": "c-11",
    "name": "按显存找方案",
    "url": "https://gpuatlas.top/categories/c-11/"
  },
  "topics": [],
  "body_text": "48G显存读长文，先决定需要单用户长材料还是多人短问答，再选权重精度。同一份剩余空间不能同时分配给所有用途，模型加载成功也不能代表全部长度通过。\n\n以Qwen3 32B为条件例子，实际约32.8B参数，统一8bit原始数据约32.8GB，即约30.55GiB。常规单序列16bit KV在8192 token约2GiB、32768约8GiB，量化元数据和工作缓冲另计。\n\n若假设可用预算恰为48GiB，权重小计与两个32K序列KV已约46.55GiB，尚无其他开销。这只是明确假设的算术，用来提示并发改变边界，不是设备保证，也不能推广到其他32B结构。\n\n先固定文件单请求逐档加长，再固定长度增加活动序列，分别记录输入和生成峰值。权重与缓存精度分开写，工具预分配的缓存也不能直接理解为当前材料已实际使用全部空间。\n\n在这套Qwen3 32B方案中，可先让一份长材料回答前、中、后的事实，再同时提交第二份同长度材料，比较遗漏、峰值和完整等待。若单请求通过而双请求失败，就逐项比较兼容低位、缓存策略或无关历史。保存实际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-32b",
      "url": "https://huggingface.co/Qwen/Qwen3-32B/raw/main/README.md",
      "retrieved_at": "2026-11-25T10:43:11.065868+00:00"
    },
    {
      "id": "qwen3-32b-config",
      "url": "https://huggingface.co/Qwen/Qwen3-32B/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-503d13396d2d/",
    "json": "https://gpuatlas.top/data/articles/T-503d13396d2d.json",
    "markdown": "https://gpuatlas.top/data/articles/T-503d13396d2d.md"
  }
}
