{
  "schema_version": "1.0",
  "id": "T-c99db4ac8962",
  "url": "https://gpuatlas.top/articles/T-c99db4ac8962/",
  "title": "预训练一开始吞吐就很低，怎么分清是读数据还是 GPU 计算慢？",
  "summary": "预训练低吞吐需按数据、传输、计算和同步分段，代表性有效token对照才能定位瓶颈。",
  "language": "zh-Hans",
  "category": {
    "id": "c-21",
    "name": "从零训练与继续预训练",
    "url": "https://gpuatlas.top/categories/c-21/"
  },
  "topics": [
    {
      "id": "task-deb6021001",
      "name": "预训练",
      "kind": "task",
      "description": "调整模型的基础能力之前，先分清继续预训练与其他训练阶段，以及数据和计算资源的投入。",
      "url": "https://gpuatlas.top/topics/task-deb6021001/"
    },
    {
      "id": "task-796e01d5af",
      "name": "训练",
      "kind": "task",
      "description": "模型训练时的资源占用与推理不同。查看优化器、激活值、并行策略和中断恢复相关问题。",
      "url": "https://gpuatlas.top/topics/task-796e01d5af/"
    }
  ],
  "body_text": "预训练一开始吞吐低，先区分GPU等数据，还是已经持续执行。低利用率不足以判断分词、读盘、传输、调度或通信，应该观察完整步骤的时间线。\n\n把初始化、首次编译和预热单列，再统计稳定循环。用已准备好的代表性小数据与真实读取路径对照，保持结构、精度、长度和微批量一致，不能换短样本后把全部改善归成存储收益。\n\n若主要空档发生在数据到达前，检查预处理缓存、读取、CPU和主存；输入及时到达而前向、反向或更新慢，再看计算实现、精度和内核。保存或验证造成的周期停顿也要单独标注。\n\n多卡对齐各rank的时间，某个进程数据或计算较慢，会让其他设备在同步处等待。所有GPU看似闲着，不表示每张卡都有相同数据问题，最早变慢的阶段更有诊断价值。\n\n工作量按相同有效token比较，注明填充、打包和重复数据的口径，再每次只改一个因素，用原负载复查。数据到达前的空档就调读取与预处理，同步处等待则对齐各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": "transformers-causal-training",
      "url": "https://raw.githubusercontent.com/huggingface/transformers/main/docs/source/en/tasks/language_modeling.md",
      "retrieved_at": "2026-11-25T10:51:53.600205+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-distributed",
      "url": "https://docs.pytorch.org/docs/2.15/distributed.html",
      "retrieved_at": "2026-11-25T10:16:15.738480+00:00"
    }
  ],
  "revision_note": "完善阅读结构；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-c99db4ac8962/",
    "json": "https://gpuatlas.top/data/articles/T-c99db4ac8962.json",
    "markdown": "https://gpuatlas.top/data/articles/T-c99db4ac8962.md"
  }
}
