{
  "schema_version": "1.0",
  "id": "T-22e109807d18",
  "url": "https://gpuatlas.top/articles/T-22e109807d18/",
  "title": "给 DeepSeek R1 蒸馏版 32B 做 QLoRA，怎么估算自己显存够不够？",
  "summary": "R1蒸馏32B QLoRA先核实际低位基础，再列适配器状态与激活，理想16GB不能当总训练门槛。",
  "language": "zh-Hans",
  "category": {
    "id": "c-18",
    "name": "模型微调",
    "url": "https://gpuatlas.top/categories/c-18/"
  },
  "topics": [
    {
      "id": "model-b64bc5faa8",
      "name": "DeepSeek R1",
      "kind": "model",
      "description": "完整版与蒸馏版的硬件需求不能混算。分别查看权重预算、多卡部署、量化运行及微调相关问题。",
      "url": "https://gpuatlas.top/topics/model-b64bc5faa8/"
    }
  ],
  "body_text": "给DeepSeek-R1-Distill-Qwen-32B做QLoRA前，要先固定模型发布与实际低位训练路径。按名义32B统一用4bit计算，原始数据约16GB，即约14.90GiB；实际参数、元数据与未量化部分尚未计入，训练总显存还要继续核算。\n\n再列适配器参数、梯度、优化器状态、反向激活与缓冲，模块、rank、精度、长度和微批量共同影响峰值。基础冻结不表示反向没有成本，64层推理KV也不能替代训练预算。\n\n按支持流程准备模型并核实际可训练参数，用真实处理后样本完成前向、反向和更新。数据中的推理及最终答案检查损失范围，不能只用很短问题或模型加载证明训练可用。\n\n基础不足先核精度布局，反向不足再比较微批量、长度、检查点或受支持分片。梯度累积不消除单条长样本需求，重计算、通信、主存与保存汇总都要纳入完整流程。\n\n32B方案若依靠分片完成训练，还要观察保存汇总，并在新进程恢复适配器。随后用未训练过的推理题确认最终结论，不能只看思考过程是否更长。保存阶段超预算就调整部署，恢复后答案退步则回查数据；约16GB理想基础权重无法替这两段流程给出整套训练的省显存比例。",
  "published_at": null,
  "modified_at": "2026-11-26T15:00:32.276655+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": "peft-quantization",
      "url": "https://raw.githubusercontent.com/huggingface/peft/main/docs/source/developer_guides/quantization.md",
      "retrieved_at": "2026-11-25T09:52:45.997121+00:00"
    },
    {
      "id": "transformers-training-memory",
      "url": "https://raw.githubusercontent.com/huggingface/transformers/main/docs/source/en/model_memory_anatomy.md",
      "retrieved_at": "2026-11-25T10:16:15.738480+00:00"
    }
  ],
  "revision_note": "更新使用说明与操作示例；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-22e109807d18/",
    "json": "https://gpuatlas.top/data/articles/T-22e109807d18.json",
    "markdown": "https://gpuatlas.top/data/articles/T-22e109807d18.md"
  }
}
