{
  "schema_version": "1.0",
  "id": "T-4441b27ef0e4",
  "url": "https://gpuatlas.top/articles/T-4441b27ef0e4/",
  "title": "Qwen2.5 Coder 7B 本地跑起来，显存、内存和硬盘分别要多少？",
  "summary": "Qwen2.5 Coder 7B资源应分清模型文件、工程数据、加载主存和真实代码请求缓存。",
  "language": "zh-Hans",
  "category": {
    "id": "c-14",
    "name": "模型运行需求",
    "url": "https://gpuatlas.top/categories/c-14/"
  },
  "topics": [
    {
      "id": "model-7973fc51ac",
      "name": "Qwen2.5 Coder",
      "kind": "model",
      "description": "代码模型除了能装下，还需要为输入代码和训练样本留空间。查看本地运行与长文本微调的配置取舍。",
      "url": "https://gpuatlas.top/topics/model-7973fc51ac/"
    }
  ],
  "body_text": "Qwen2.5-Coder-7B-Instruct本地运行，先把模型与代码助手应用的资源分开。模型实际约7.61B参数，统一16bit原始数据约15.22GB、理想4bit约3.805GB，这只是权重算术，不能直接作为硬盘、主存和显存的统一要求。\n\n磁盘按具体格式的完整清单准备，配置、分词器、转换中间结果和多版本缓存另算。工程索引、向量库或工作副本属于应用数据，应另列，避免把它们误认成模型越来越大。\n\n主存取决于加载、内存映射和CPU卸载。GPU完整驻留也要观察启动峰值；CPU混合运行则记录主存、换页与完整等待，不能只看稳定生成时的显存。\n\n该模型常规单序列16bit KV在8K约0.4375GiB、32K约1.75GiB，分页与缓冲未计。代码请求还可能附加相关文件、工具结果和历史，用户只问一句也可能对应较长提示。\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": "qwen25-coder-7b",
      "url": "https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct/raw/main/README.md",
      "retrieved_at": "2026-11-25T11:18:40.540160+00:00"
    },
    {
      "id": "qwen25-coder-7b-config",
      "url": "https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct/resolve/main/config.json",
      "retrieved_at": "2026-11-25T11:18:40.540160+00:00"
    },
    {
      "id": "hf-download",
      "url": "https://raw.githubusercontent.com/huggingface/huggingface_hub/main/docs/source/en/guides/download.md",
      "retrieved_at": "2026-11-25T10:24:21.873697+00:00"
    },
    {
      "id": "llamacpp-server",
      "url": "https://raw.githubusercontent.com/ggml-org/llama.cpp/master/tools/server/README.md",
      "retrieved_at": "2026-11-25T09:52:45.997121+00:00"
    }
  ],
  "revision_note": "完善阅读结构；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-4441b27ef0e4/",
    "json": "https://gpuatlas.top/data/articles/T-4441b27ef0e4.json",
    "markdown": "https://gpuatlas.top/data/articles/T-4441b27ef0e4.md"
  }
}
