{
  "schema_version": "1.0",
  "id": "T-37d4cf3752e8",
  "url": "https://gpuatlas.top/articles/T-37d4cf3752e8/",
  "title": "80G 显存想做微调，怎么选模型规模和训练方式？",
  "summary": "80G微调先选择更新方式和验证任务，按完整训练循环的状态、激活及恢复成本评估规模。",
  "language": "zh-Hans",
  "category": {
    "id": "c-11",
    "name": "按显存找方案",
    "url": "https://gpuatlas.top/categories/c-11/"
  },
  "topics": [
    {
      "id": "task-e33d9598da",
      "name": "微调",
      "kind": "task",
      "description": "让模型适应自己的任务，从训练方式、样本和显存预算入手，最后验证适配器是否真正起效。",
      "url": "https://gpuatlas.top/topics/task-e33d9598da/"
    },
    {
      "id": "task-796e01d5af",
      "name": "训练",
      "kind": "task",
      "description": "模型训练时的资源占用与推理不同。查看优化器、激活值、并行策略和中断恢复相关问题。",
      "url": "https://gpuatlas.top/topics/task-796e01d5af/"
    }
  ],
  "body_text": "80G显存做微调，先确定任务与更新方式，再选模型规模。LoRA、QLoRA和全参数更新的状态结构不同，不能用同一张推理显存表判断边界。更大模型只有改善验证质量或总耗时，才值得增加资源。\n\n预算分开列权重、梯度、优化器状态、激活和临时缓冲。LoRA通常冻结基础权重，QLoRA压低基础权重驻留，但激活与其他训练状态并不会全部变成低位。具体精度布局由框架和优化器决定。\n\n先做最小完整循环：读取处理后的真实长度样本，前向、反向、更新、保存，再新进程加载并验证。加载成功或只跑前向，无法覆盖反向状态分配与恢复问题。\n\n反向失败先检查微批量、有效长度和激活，比较受支持的重计算；保存失败则区分GPU汇总、CPU内存、磁盘与权限。按阶段定位，避免保存出错却反复降低训练长度。\n\n使用梯度累积时，有效批量按微批量、累积步数和实际数据并行副本计算，不把模型分片卡都当独立样本副本。容量仍不足再比较分片或卸载，同时记录通信、主存与完整时间。\n\n吞吐应说明有效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": "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"
    },
    {
      "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": "torch-fsdp",
      "url": "https://docs.pytorch.org/docs/2.15/fsdp.html",
      "retrieved_at": "2026-11-25T10:21:36.176985+00:00"
    },
    {
      "id": "deepspeed-zero",
      "url": "https://deepspeed.readthedocs.io/en/latest/zero3.html",
      "retrieved_at": "2026-11-25T10:21:36.176985+00:00"
    }
  ],
  "revision_note": "完善阅读结构；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-37d4cf3752e8/",
    "json": "https://gpuatlas.top/data/articles/T-37d4cf3752e8.json",
    "markdown": "https://gpuatlas.top/data/articles/T-37d4cf3752e8.md"
  }
}
