{
  "schema_version": "1.0",
  "id": "T-40daa2e4c8b4",
  "url": "https://gpuatlas.top/articles/T-40daa2e4c8b4/",
  "title": "Llama 3.1 8B 想读长文档，上下文开多大才不容易爆显存？",
  "summary": "Llama 3.1 8B长文需把实际输入和回答共同计入预算，分别记录容量边界与证据使用问题。",
  "language": "zh-Hans",
  "category": {
    "id": "c-02",
    "name": "推理与上下文",
    "url": "https://gpuatlas.top/categories/c-02/"
  },
  "topics": [
    {
      "id": "model-c62822b7bd",
      "name": "Llama 3.1",
      "kind": "model",
      "description": "从 8B 等具体版本出发，检查不同显卡上的量化运行条件，随后再安排上下文与微调预算。",
      "url": "https://gpuatlas.top/topics/model-c62822b7bd/"
    }
  ],
  "body_text": "Llama 3.1 8B读长文，先统计应用真正送入的token，包括文档、模板、历史和计划回答。官方128K能力是模型范围，当前文件精度、缓存实现与活动请求数会影响设备实际可承载的长度。\n\n按8B名义参数，16bit原始权重约16GB、理想4bit约4GB，实际参数、元数据和缓冲另核。权重量化能够降低部分驻留，但不能自动消除长文缓存，也不能由文件大小直接推安全长度。\n\n准备常见、较长和最长允许材料三档，单请求运行，分别记录输入处理和生成峰值。输入阶段超出预算时，减少输出未必有效；生成后段才失败，再检查回答上限与活动状态。\n\n使用检索时，保存实际送入的片段与顺序。检索漏掉证据和模型读错证据需要不同调整，先检查输入是否包含答案，再讨论扩大上下文。每档用前中后的已知事实核对引用和遗漏。\n\n检索问答首先要确认数字及其适用条件确实在送入片段里。片段缺失就调整检索；片段齐全仍答错，再比较材料组织或精度，保留对应失败问题。对这类任务，增加原文只有在补齐证据时才有意义，不能因为模型列出128K就不断追加无关内容。",
  "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": "llama31-card",
      "url": "https://raw.githubusercontent.com/meta-llama/llama-models/main/models/llama3_1/MODEL_CARD.md",
      "retrieved_at": "2026-11-25T11:28:43.769677+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"
    },
    {
      "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-40daa2e4c8b4/",
    "json": "https://gpuatlas.top/data/articles/T-40daa2e4c8b4.json",
    "markdown": "https://gpuatlas.top/data/articles/T-40daa2e4c8b4.md"
  }
}
