{
  "schemaVersion": 1,
  "slug": "llama-cpp",
  "locale": "zh",
  "pageClass": "entity",
  "entityType": "SoftwareApplication",
  "field": "technology",
  "title": "llama.cpp",
  "subtitle": "由 ggml-org 维护的开源 C/C++ 推理引擎，可在 CPU 和 GPU 硬件上本地运行大型语言模型",
  "aliases": [
    "llama.cpp",
    "라마닷시피피"
  ],
  "lead": {
    "definition": "llama.cpp 是在 ggml-org 下开发的开源 C 和 C++ 推理引擎，用于在个人电脑、工作站和 GPU 上本地执行大型语言模型。它包含用于标准化吞吐量测量的 `llama-bench` 工具，并为通过 `llama-install.sh` 分发的预构建本地安装版本以及独立的 Llama 桌面应用提供支持。2026 年 11 月 26 日，ggml-org 在 Hugging Face 上推出了面向 AMD Ryzen 和 Radeon 的公开基准测试仪表板，分别跟踪不同模型、构建版本和量化方式下的提示处理（PP512）和 token 生成（TG128）吞吐量。",
    "answerSummary": "llama.cpp 是由 ggml-org 维护的开源 C/C++ 推理引擎，用于在消费级和工作站硬件上本地运行大型语言模型。2026 年 11 月 26 日，ggml-org 在 Hugging Face 上发布了 AMD Ryzen 和 Radeon 基准测试仪表板，从零上下文深度出发，分别测量不同模型、构建版本和量化方式下的 PP512 提示处理和 TG128 token 生成性能。",
    "keyFacts": [
      {
        "label": "维护者 / 代码仓库",
        "value": "ggml-org (github.com/ggml-org/llama.cpp)",
        "ref": "s3",
        "asOf": "2026-11-28"
      },
      {
        "label": "实现语言",
        "value": "C / C++",
        "ref": "s3",
        "asOf": "2026-11-28"
      },
      {
        "label": "AMD 基准测试仪表板发布",
        "value": "2026 年 11 月 26 日（Radeon 8060S gfx1151 和 Radeon AI Pro R9700S gfx1201）",
        "ref": "s1",
        "asOf": "2026-11-26"
      },
      {
        "label": "核心基准指标",
        "value": "PP512（512 个输入 token，无生成）和 TG128（128 个输出 token，深度为 0）",
        "ref": "s1",
        "asOf": "2026-11-26"
      }
    ]
  },
  "infobox": [
    {
      "label": "软件类型",
      "value": "开源本地 LLM 推理引擎",
      "ref": "s3"
    },
    {
      "label": "组织",
      "value": "ggml-org",
      "ref": "s3"
    },
    {
      "label": "编程语言",
      "value": "C 和 C++",
      "ref": "s3"
    },
    {
      "label": "基准测试工具",
      "value": "llama-bench",
      "ref": "s4"
    },
    {
      "label": "AMD 仪表板硬件（2026 年 11 月）",
      "value": "Radeon 8060S (gfx1151) 和 Radeon AI Pro R9700S (gfx1201)",
      "ref": "s1"
    },
    {
      "label": "相关桌面应用",
      "value": "Llama 应用（通过 llama-install.sh 分发）",
      "ref": "s6"
    }
  ],
  "sections": [
    {
      "id": "overview-and-ecosystem",
      "heading": "llama.cpp 架构与本地推理生态系统",
      "bodyMd": "llama.cpp 是托管在 `ggml-org` 下的开源 C/C++ 项目，无需依赖云端 API 即可在本地硬件上进行大型语言模型推理。[^s3] 除核心推理引擎外，该代码仓库还维护 `llama-bench`，用于在不同量化格式和硬件后端上进行可复现的命令行基准测试。[^s4] 预构建二进制文件通过 `llama-install.sh` 打包，该脚本同时也支撑了独立的 `llama.app` 本地桌面应用。[^s1][^s6]"
    },
    {
      "id": "pp512-vs-tg128-measurement",
      "heading": "PP512 提示处理与 TG128 token 生成的分别测量方式",
      "bodyMd": "2026 年 11 月 26 日，ggml-org 在 Hugging Face Spaces 上发布了 llama.cpp x AMD 基准测试仪表板（llama.cpp x AMD Benchmark），用于长期跟踪 AMD Ryzen 和 Radeon 硬件上的本地推理性能，首批包括 Radeon 8060S (`gfx1151`) 和 Radeon AI Pro R9700S (`gfx1201`)。[^s1][^s2] 该仪表板并未将性能合并为单一分数，而是以每秒 token 数（平均吞吐量，`avg_ts`）报告两种不同的工作负载，两者均从上下文深度零开始（`n_depth=0`）：[^s1]\n\n| 基准指标 | 测量的工作负载 | 起始上下文深度 | 含义 |\n|---|---|---|---|\n| PP512 | 处理 512 个输入 token，不生成文本 | 0（`n_depth=0`） | 提示摄入 / 预填充速度 |\n| TG128 | 在没有既有上下文的情况下生成 128 个输出 token | 0（`n_depth=0`） | 自回归解码速度 |\n| 上下文缩放标签页 | 上下文长度增加时的 token 生成吞吐量 | 逐步增长的上下文 | 较长上下文下的内存带宽影响 |\n\n用户可以按硬件、模型、llama.cpp 构建版本和量化格式筛选结果。[^s1][^s2]"
    },
    {
      "id": "public-reproducible-workflows",
      "heading": "公开的每周基准测试工作流",
      "bodyMd": "ggml-org 同时发布基准测试结果以及自动化的 GitHub Actions 工作流（例如 `llama-install.sh` 中的 `bench-gfx1151.yml`），这些工作流每周使用 `llama-bench` 针对预构建二进制文件运行。[^s1][^s5] 公开这些工作流使开发者能够验证内核、构建版本和模型更新如何随时间影响 AMD 本地推理吞吐量。[^s1]"
    },
    {
      "id": "unverified-status",
      "heading": "截至 2026 年 11 月的基准数据局限",
      "bodyMd": "截至 2026 年 11 月 28 日，AMD 仪表板上的吞吐量数据反映的是特定参考硬件上受控的零深度和上下文缩放测试配置，并不保证任何个人用户设备或实际应用环境中的速度。[^s1] 此外，每秒 token 吞吐量仅衡量执行速度，无法评估模型回答的准确性或质量。[^s1][^s4]"
    }
  ],
  "faqs": [
    {
      "q": "什么是 llama.cpp？",
      "a": "llama.cpp 是由 ggml-org 维护的开源 C/C++ 推理引擎，用于在消费级和工作站 CPU 及 GPU 上本地运行大型语言模型。",
      "refs": [
        "s3"
      ]
    },
    {
      "q": "提示处理和响应生成速度是如何分别测量的？",
      "a": "在 ggml-org 2026 年 11 月 26 日发布的 AMD 基准测试仪表板中，PP512 测量处理 512 个输入 token（不生成）的速度，TG128 测量在没有先前上下文的情况下生成 128 个输出 token 的速度。两者均从上下文深度零开始，并报告平均每秒 token 数，另有一个“上下文缩放”标签页跟踪上下文增长时的生成速度。",
      "refs": [
        "s1",
        "s2"
      ]
    },
    {
      "q": "仪表板发布时包含哪些 AMD GPU？",
      "a": "Hugging Face 仪表板的首批硬件为 AMD Radeon 8060S (gfx1151) 和 Radeon AI Pro R9700S (gfx1201)，通过公开的 GitHub 工作流每周测试。",
      "refs": [
        "s1",
        "s5"
      ]
    },
    {
      "q": "每秒 token 数越高是否意味着回答质量越好？",
      "a": "否。PP512 和 TG128 衡量的是特定硬件、构建版本和量化设置下的执行吞吐量；它们并不衡量模型的推理准确性或输出质量。",
      "refs": [
        "s1",
        "s4"
      ]
    }
  ],
  "claims": [
    {
      "text": "2026 年 11 月 26 日，ggml-org 在 Hugging Face 上推出了 llama.cpp x AMD 基准测试仪表板，涵盖 Radeon 8060S (gfx1151) 和 Radeon AI Pro R9700S (gfx1201)。",
      "refs": [
        "s1",
        "s2"
      ]
    },
    {
      "text": "AMD 基准测试仪表板区分了 PP512（处理 512 个输入 token，不生成）和 TG128（在没有先前上下文的情况下生成 128 个 token），两者均从上下文深度零开始。",
      "refs": [
        "s1"
      ]
    },
    {
      "text": "ggml-org 在通过 llama-install.sh 分发的预构建二进制文件上运行每周公开基准测试工作流，llama-install.sh 是 llama.app 背后的安装项目。",
      "refs": [
        "s1",
        "s5",
        "s6"
      ]
    },
    {
      "text": "llama.cpp 使用 C 和 C++ 在 ggml-org 下维护，并包含 llama-bench 基准测试工具。",
      "refs": [
        "s3",
        "s4"
      ]
    }
  ],
  "timeline": [
    {
      "date": "2026-11-26",
      "text": "ggml-org 在 Hugging Face 上为 AMD Ryzen 和 Radeon 硬件推出公开的 llama.cpp x AMD 基准测试仪表板。",
      "refs": [
        "s1",
        "s2"
      ]
    }
  ],
  "sources": [
    {
      "key": "s1",
      "url": "https://huggingface.co/blog/ggml-org/llamacpp-amd-bench",
      "tier": 2,
      "title": "Introducing the llama.cpp benchmark dashboard for AMD Ryzen and Radeon hardware",
      "publisher": "ggml-org (Hugging Face Blog)",
      "publishedAt": "2026-11-26",
      "accessedAt": "2026-11-28"
    },
    {
      "key": "s2",
      "url": "https://ggml-org-llamacpp-amd-bench.static.hf.space/index.html",
      "tier": 2,
      "title": "llama.cpp x AMD Performance Explorer",
      "publisher": "ggml-org (Hugging Face Spaces)",
      "accessedAt": "2026-11-28"
    },
    {
      "key": "s3",
      "url": "https://github.com/ggml-org/llama.cpp",
      "tier": 2,
      "title": "ggml-org/llama.cpp: LLM inference in C/C++",
      "publisher": "GitHub (ggml-org)",
      "accessedAt": "2026-11-28"
    },
    {
      "key": "s4",
      "url": "https://raw.githubusercontent.com/ggml-org/llama.cpp/master/tools/llama-bench/README.md",
      "tier": 2,
      "title": "llama-bench README",
      "publisher": "ggml-org (GitHub)",
      "accessedAt": "2026-11-28"
    },
    {
      "key": "s5",
      "url": "https://github.com/ggml-org/llama-install.sh/blob/master/.github/workflows/bench-gfx1151.yml",
      "tier": 2,
      "title": "bench-gfx1151.yml Benchmark Workflow",
      "publisher": "ggml-org (GitHub)",
      "accessedAt": "2026-11-28"
    },
    {
      "key": "s6",
      "url": "https://llama.app/",
      "tier": 3,
      "title": "Llama - Your AI, on your computer",
      "publisher": "ggml-org / Llama",
      "accessedAt": "2026-11-28"
    }
  ],
  "links": [],
  "sameAs": [
    "https://github.com/ggml-org/llama.cpp"
  ],
  "disclaimer": null,
  "status": {
    "review": "awaiting_review",
    "provenance": "prefill",
    "autoWritten": true
  },
  "dateCreated": "2026-11-28",
  "dateModified": "2026-11-28",
  "_meta": {
    "canonicalUrl": "https://mimirwiki.com/zh/wiki/llama-cpp",
    "revision": {
      "sha256": "c5067c4c08b67ef17205ecf1e2c1b37a1997ec3fdd73b9e7d7b53e1fa049f70e",
      "short": "c5067c4c",
      "hashedFields": "all fields except status and _meta, RFC 8785 canonical form"
    },
    "formats": {
      "md": "https://mimirwiki.com/zh/wiki/llama-cpp.md",
      "txt": "https://mimirwiki.com/zh/wiki/llama-cpp.txt",
      "json": "https://mimirwiki.com/zh/wiki/llama-cpp.json",
      "jsonld": "https://mimirwiki.com/zh/wiki/llama-cpp.jsonld"
    },
    "translations": {
      "en": "https://mimirwiki.com/wiki/llama-cpp",
      "ko": "https://mimirwiki.com/ko/wiki/llama-cpp",
      "ja": "https://mimirwiki.com/ja/wiki/llama-cpp",
      "zh": "https://mimirwiki.com/zh/wiki/llama-cpp",
      "es": "https://mimirwiki.com/es/wiki/llama-cpp",
      "de": "https://mimirwiki.com/de/wiki/llama-cpp",
      "fr": "https://mimirwiki.com/fr/wiki/llama-cpp",
      "pt": "https://mimirwiki.com/pt/wiki/llama-cpp",
      "ru": "https://mimirwiki.com/ru/wiki/llama-cpp",
      "it": "https://mimirwiki.com/it/wiki/llama-cpp",
      "hi": "https://mimirwiki.com/hi/wiki/llama-cpp",
      "ar": "https://mimirwiki.com/ar/wiki/llama-cpp"
    }
  }
}
