{
  "schema_version": "1.0",
  "id": "T-92b9541cf49e",
  "url": "https://gpuatlas.top/articles/T-92b9541cf49e/",
  "title": "RTX 3060 12G 跑 Qwen2.5 Coder 7B，量化和上下文该怎么选？",
  "summary": "RTX 3060 12G运行Qwen2.5 Coder 7B按短函数与多文件任务比较位宽，真实代码上下文需留缓存余量。",
  "language": "zh-Hans",
  "category": {
    "id": "c-10",
    "name": "显卡与模型组合",
    "url": "https://gpuatlas.top/categories/c-10/"
  },
  "topics": [
    {
      "id": "gpu-7a5ed6cb06",
      "name": "RTX 3060",
      "kind": "gpu",
      "description": "已有 RTX 3060 12G，先用对应模型的量化和上下文配置判断可行范围，再考虑是否需要升级。",
      "url": "https://gpuatlas.top/topics/gpu-7a5ed6cb06/"
    },
    {
      "id": "model-7973fc51ac",
      "name": "Qwen2.5 Coder",
      "kind": "model",
      "description": "代码模型除了能装下，还需要为输入代码和训练样本留空间。查看本地运行与长文本微调的配置取舍。",
      "url": "https://gpuatlas.top/topics/model-7973fc51ac/"
    },
    {
      "id": "task-dce84928dd",
      "name": "量化",
      "kind": "task",
      "description": "权重变小以后，速度和效果会怎样变化？这里收录量化格式选择、运行支持及显存不足时的取舍。",
      "url": "https://gpuatlas.top/topics/task-dce84928dd/"
    }
  ],
  "body_text": "RTX 3060 12G运行Qwen2.5-Coder-7B-Instruct，短函数可先比较兼容较高位宽，多文件则更关注缓存余量。实际约7.61B参数，理想8bit原始数据约7.61GB、4bit约3.805GB，元数据和运行开销另核。\n\n模型28层、4个KV头、头维128，常规单序列16bit KV在16K约0.875GiB、32K约1.75GiB。不能因同为7B就复制其他结构的表，权重位宽也不自动改变缓存。\n\n准备有明确错误的代码与复现输入，固定模板、提示和输出预算，比较精度是否解决原问题。再增加直接调用文件，检查遗漏条件、修改无关部分和输出截断，代码流畅不能代替行为通过。\n\n记录应用实际发送的文件、文档、工具结果与历史，按token统计长度。关键定义若被截断先调整输入，不能直接归为量化质量差。默认长度与更长扩展、后端支持分别核对。\n\n在3060上选定量化前，把生成补丁放回原来的复现输入中检查：原错误解决了吗，边界行为有没有改变？再加入直接调用文件，看答案是否遗漏条件或截断。输入处理与生成分开观察，这份修复基线成立后，才有理由增加精度或活动请求。",
  "published_at": null,
  "modified_at": "2026-11-26T15:00:32.276655+00:00",
  "evidence": {
    "type": "documentation_and_conditional_estimates",
    "hardware_tested": false,
    "note": "资料解释与条件估算，非硬件实测。"
  },
  "sources": [
    {
      "id": "nvidia-geforce-specs",
      "url": "https://www.nvidia.com/en-us/geforce/graphics-cards/compare/",
      "retrieved_at": "2026-11-25T10:34:57.629275+00:00"
    },
    {
      "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": "vllm-quantization",
      "url": "https://raw.githubusercontent.com/vllm-project/vllm/main/docs/features/quantization/README.md",
      "retrieved_at": "2026-11-25T10:11:32.915597+00:00"
    }
  ],
  "revision_note": "更新使用说明与操作示例；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-92b9541cf49e/",
    "json": "https://gpuatlas.top/data/articles/T-92b9541cf49e.json",
    "markdown": "https://gpuatlas.top/data/articles/T-92b9541cf49e.md"
  }
}
