{
  "schema_version": "1.0",
  "id": "T-81a66a520d41",
  "url": "https://gpuatlas.top/articles/T-81a66a520d41/",
  "title": "Qwen3 14B 微调时想保留长文本，哪些设置最占显存？",
  "summary": "Qwen3 14B长文训练优先核真实长度、有效答案和微批量，激活与状态不能用推理KV或低位权重简单估计。",
  "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": "task-e33d9598da",
      "name": "微调",
      "kind": "task",
      "description": "让模型适应自己的任务，从训练方式、样本和显存预算入手，最后验证适配器是否真正起效。",
      "url": "https://gpuatlas.top/topics/task-e33d9598da/"
    },
    {
      "id": "task-a7bab8d8aa",
      "name": "长文本",
      "kind": "task",
      "description": "长文本训练会增加哪些中间开销？查看序列长度与 batch 的取舍，避免只按模型权重估算显存。",
      "url": "https://gpuatlas.top/topics/task-a7bab8d8aa/"
    }
  ],
  "body_text": "Qwen3 14B长文微调应从处理后的实际token、微批量和损失范围开始估算。训练还要保存反向激活及训练状态，不能直接采用最大推理窗口；普通单序列KV也不能预测训练峰值，QLoRA不会让激活同步变成低位。\n\n核模板、历史、回答、截断、填充与打包，确认关键答案没有被删。保材料而丢回答改变了学习目标，吞吐统一有效训练token，不能只看每秒样本数。\n\n明确LoRA、QLoRA或全参数，以及目标模块、rank、精度和优化器。用真实长样本完成前向、反向与更新，记录各阶段峰值，基础冻结不表示反向没有成本，加载成功也不能代表完整流程。\n\n驻留不足先查精度布局，反向不足再比微批量、长度组织、受支持检查点或分片。梯度累积不解决单条过长输入，重计算、通信和主存需加入完整时间，保存恢复另验。\n\n决定保留多长文本前，先在独立长文中找出答案依赖的证据，再检查处理后的样本是否还包含这些证据与回答。训练能完成却总漏引，可能需要改进样本组织；样本在反向阶段装不下，则继续处理激活预算。两类问题分开，才不会为了省显存删掉真正想学习的部分。",
  "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-14b",
      "url": "https://huggingface.co/Qwen/Qwen3-14B/raw/main/README.md",
      "retrieved_at": "2026-11-25T10:43:11.065868+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"
    },
    {
      "id": "torch-checkpoint",
      "url": "https://docs.pytorch.org/docs/2.15/checkpoint.html",
      "retrieved_at": "2026-11-25T10:16:15.738480+00:00"
    },
    {
      "id": "llamafactory-data-args",
      "url": "https://raw.githubusercontent.com/hiyouga/LLaMA-Factory/main/src/llamafactory/hparams/data_args.py",
      "retrieved_at": "2026-11-25T11:04:14.292936+00:00"
    }
  ],
  "revision_note": "完善阅读结构；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-81a66a520d41/",
    "json": "https://gpuatlas.top/data/articles/T-81a66a520d41.json",
    "markdown": "https://gpuatlas.top/data/articles/T-81a66a520d41.md"
  }
}
