{
  "schema_version": "1.0",
  "id": "T-074199fddf10",
  "url": "https://gpuatlas.top/articles/T-074199fddf10/",
  "title": "给 DeepSeek R1 0528 Qwen3 8B 做 QLoRA，怎么估算自己显存够不够？",
  "summary": "R1-0528-Qwen3-8B QLoRA先配套DeepSeek配置，理想4.1GB权重之外需列适配器状态和激活，用完整更新判断容量。",
  "language": "zh-Hans",
  "category": {
    "id": "c-18",
    "name": "模型微调",
    "url": "https://gpuatlas.top/categories/c-18/"
  },
  "topics": [
    {
      "id": "model-3387ea7659",
      "name": "Qwen3",
      "kind": "model",
      "description": "从小模型到更大参数档位，按显卡搭配查看 Qwen3 的运行条件，并查找长文本微调与适配器验证问题。",
      "url": "https://gpuatlas.top/topics/model-3387ea7659/"
    },
    {
      "id": "model-b64bc5faa8",
      "name": "DeepSeek R1",
      "kind": "model",
      "description": "完整版与蒸馏版的硬件需求不能混算。分别查看权重预算、多卡部署、量化运行及微调相关问题。",
      "url": "https://gpuatlas.top/topics/model-b64bc5faa8/"
    }
  ],
  "body_text": "先固定DeepSeek-R1-0528-Qwen3-8B及训练工具。官方说明结构与Qwen3 8B相同，但配置和分词器应来自DeepSeek，不能只替换权重后混用原版文件。\n\n按基础模型约8.2B规模，统一4bit原始算术约4.1GB，实际元数据、未量化层和文件布局另核。QLoRA还需适配器参数、梯度、优化器状态、反向激活与缓冲，不能把小计当总训练显存。\n\n按实际支持流程准备并核可训练参数，明确目标模块、rank、精度与优化器。用真实处理后长度和微批量完成前向、反向及更新，记录峰值阶段，推理能加载不是训练证明。\n\n驻留不足先查精度布局，反向不足再比较微批量、长度组织和受支持检查点或分片。梯度累积不消除单条过长需求，重计算、通信和主存需计入完整时间，推理KV不能代替激活预算。\n\n估算通过后，还要把适配器保存下来，在新进程中恢复。例如原本要训练长篇问答，就用未参与训练的长题核对答案是否完整、是否出现重复；只证明短题能推理，仍不足以选定这套训练配置。记录DeepSeek基础修订、模块和rank，才能把容量结果对应回实际方案。",
  "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-0528-8b",
      "url": "https://huggingface.co/deepseek-ai/DeepSeek-R1-0528-Qwen3-8B/raw/main/README.md",
      "retrieved_at": "2026-11-25T11:23:02.755600+00:00"
    },
    {
      "id": "r1-0528-8b-config",
      "url": "https://huggingface.co/deepseek-ai/DeepSeek-R1-0528-Qwen3-8B/resolve/main/config.json",
      "retrieved_at": "2026-11-25T11:23:02.755600+00:00"
    },
    {
      "id": "qwen3-8b",
      "url": "https://huggingface.co/Qwen/Qwen3-8B/raw/main/README.md",
      "retrieved_at": "2026-11-25T09:52:45.997121+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-074199fddf10/",
    "json": "https://gpuatlas.top/data/articles/T-074199fddf10.json",
    "markdown": "https://gpuatlas.top/data/articles/T-074199fddf10.md"
  }
}
