{
  "schema_version": "1.0",
  "id": "T-900f46637a53",
  "url": "https://gpuatlas.top/articles/T-900f46637a53/",
  "title": "RTX 3060 12G 跑 Gemma 3 4B，量化和上下文该怎么选？",
  "summary": "RTX 3060 12G可评估Gemma 3 4B较高精度短请求，再按混合缓存与图像峰值决定长度或量化。",
  "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-6bfe1186af",
      "name": "Gemma 3",
      "kind": "model",
      "description": "按 Gemma 3 的具体模型大小查显卡搭配，分清权重占用、上下文开销和额外运行空间。",
      "url": "https://gpuatlas.top/topics/model-6bfe1186af/"
    },
    {
      "id": "task-dce84928dd",
      "name": "量化",
      "kind": "task",
      "description": "权重变小以后，速度和效果会怎样变化？这里收录量化格式选择、运行支持及显存不足时的取舍。",
      "url": "https://gpuatlas.top/topics/task-dce84928dd/"
    }
  ],
  "body_text": "RTX 3060 12G运行Gemma 3 4B，先看主要是短聊天、长材料还是图片问答。按4B名义参数，16bit原始数据约8GB、理想4bit约2GB，实际参数、视觉组件和运行开销另核，这些值不是总显存。\n\n可以先评估较高精度短请求，确认引擎支持、文件配套和实际GPU驻留。完成短文本后逐档增加日常长度，模板、历史与输出共同统计，分别观察输入处理和生成峰值。\n\n官方4B实现混合局部滑窗与全局注意力，不能把所有层当完整历史KV。后端怎样预分配、是否回收局部状态也会改变占用，模型侧128K能力不是这套设备的默认范围。\n\n图片固定样本单独验收，核对文字、数字和目标细节，保存处理设置及完整时间，再与材料组合。图像预处理和文字长度共同影响负载，短聊天通过不能直接代表看图。\n\n短聊天、长材料与图片问答可分别选候选配置，不必让偶发的图文任务决定所有请求的精度。3060出现容量缺口时，再用原题比较兼容低位，检查文字与图片里的数字是否退步。选择依据是经常要完成的那类任务，而不是4B权重看起来占得少。",
  "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": "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": "gemma3-official",
      "url": "https://raw.githubusercontent.com/google-gemma/docs/main/docs/models/gemma-3/index.md",
      "retrieved_at": "2026-11-25T11:28:43.769677+00:00"
    },
    {
      "id": "gemma3-config-code",
      "url": "https://raw.githubusercontent.com/google/gemma_pytorch/main/gemma/config.py",
      "retrieved_at": "2026-11-25T11:31:21.126309+00:00"
    },
    {
      "id": "vllm-memory",
      "url": "https://raw.githubusercontent.com/vllm-project/vllm/main/docs/configuration/conserving_memory.md",
      "retrieved_at": "2026-11-25T09:52:45.997121+00:00"
    }
  ],
  "revision_note": "完善阅读结构；非硬件实测。",
  "representations": {
    "html": "https://gpuatlas.top/articles/T-900f46637a53/",
    "json": "https://gpuatlas.top/data/articles/T-900f46637a53.json",
    "markdown": "https://gpuatlas.top/data/articles/T-900f46637a53.md"
  }
}
