{
  "schema_version": "1.0",
  "id": "T-ee0f4dae9399",
  "url": "https://gpuatlas.top/articles/T-ee0f4dae9399/",
  "title": "48G 显存想做微调，怎么选模型规模和训练方式？",
  "summary": "48G微调先以验证任务选择更新方式，真实长度的反向、更新和保存恢复共同界定模型规模。",
  "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": "48G显存做微调，先看想改善什么任务，再选LoRA、QLoRA或全参数更新。格式、风格与特定任务适配可先比较参数高效方法，验证不足再考虑更多参数参与，容量大不代表必须全参数训练。\n\n预算分别列权重、梯度、优化器状态、激活和临时缓冲。状态布局取决于框架、精度与优化器，推理权重大小不能替代训练预算，低位基础权重也不会取消反向激活。\n\n先检查处理后的真实样本，确认模板、截断和损失掩码。用代表性长度完成前向、反向、更新，再保存并新进程恢复验证。只有短样本一步成功，不能推广到整个数据集。\n\n反向超显存时，分别比较微批量、长度和受支持的激活重计算；保存失败则检查状态汇总、CPU内存和文件系统。分片还会增加通信，卸载会改变主存与完整时间，不能只看稳定训练阶段。\n\n48G上的LoRA已改善目标格式后，先看未见样本的内容和完整性，再判断是否需要更多参数参与。吞吐统一有效训练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": "torch-checkpoint",
      "url": "https://docs.pytorch.org/docs/2.15/checkpoint.html",
      "retrieved_at": "2026-11-25T10:16:15.738480+00:00"
    }
  ],
  "revision_note": "完善阅读结构；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-ee0f4dae9399/",
    "json": "https://gpuatlas.top/data/articles/T-ee0f4dae9399.json",
    "markdown": "https://gpuatlas.top/data/articles/T-ee0f4dae9399.md"
  }
}
