专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题轩辕镜像免费版
其他
关于我们网站地图
热门搜索:
ghcr.io/ggml-org/llama.cpp

ghcr.io/ggml-org/llama.cpp:light-intel

ghcr.iolinux/amd64light-intel大小: 未知更新于 2026年5月23日

llama.cpp

C/C++实现的LLM推理

近期API变更

  • https://github.com/ggml-org/llama.cpp/issues/9289
  • https://github.com/ggml-org/llama.cpp/issues/9291

热门话题

  • Hugging Face 缓存迁移:使用 -hf 下载的模型现在存储在标准 Hugging Face 缓存目录中,可与其他 HF 工具共享。
  • https://github.com/ggml-org/llama.cpp/discussions/***
  • https://github.com/ggml-org/llama.cpp/discussions/***
  • https://github.com/ggml-org/llama.cpp/discussions/***
  • llama-server 现已支持多模态:https://github.com/ggml-org/llama.cpp/pull/*** | 文档
  • 用于 FIM 补全的 VS Code 扩展:https://github.com/ggml-org/llama.vscode
  • 用于 FIM 补全的 Vim/Neovim 插件:https://github.com/ggml-org/llama.vim
  • Hugging Face GGUF 编辑器:https://github.com/ggml-org/llama.cpp/discussions/9268 | 工具
  • 浏览器中现已支持 WebGPU,查看介绍博客/演示 https://reeselevine.github.io/llamas-on-the-web/%E3%80%82

快速开始

llama.cpp 的入门非常简单。以下是在您的机器上安装它的几种方法:

  • 使用 brew、nix 或 winget 安装 llama.cpp
  • 使用 Docker 运行 - 参见我们的 Docker 文档
  • 从 https://github.com/ggml-org/llama.cpp/releases 下载预构建二进制文件
  • 通过克隆此仓库从源代码构建 - 查看 我们的构建指南

安装完成后,您需要一个模型才能使用。请前往获取和量化模型部分了解更多信息。

示例命令:

# 使用本地模型文件
llama-cli -m my_model.gguf

# 或直接从 Hugging Face 下载并运行模型
llama-cli -hf ggml-org/gemma-3-1b-it-GGUF

# 启动兼容 OpenAI 的 API 服务器
llama-server -hf ggml-org/gemma-3-1b-it-GGUF

描述

llama.cpp 的主要目标是在各种硬件上(本地和云端)以最少的设置实现最先进的 LLM 推理性能。

  • 纯 C/C++ 实现,无任何依赖
  • Apple silicon 是一等公民——通过 ARM NEON、Accelerate 和 Metal 框架进行优化
  • x86 架构支持 AVX、AVX2、AVX512 和 AMX
  • RISC-V 架构支持 RVV、ZVFH、ZFH、ZICBOP 和 ZIHINTPAUSE
  • 1.5 位、2 位、3 位、4 位、5 位、6 位和 8 位整数量化,可实现更快的推理并减少内存使用
  • 用于在 NVIDIA GPU 上运行 LLM 的自定义 CUDA 内核(通过 HIP 支持 AMD GPU,通过 MUSA 支持摩尔线程 GPU)
  • Vulkan 和 SYCL 后端支持
  • CPU+GPU 混合推理,可部分加速大于总 VRAM 容量的模型

llama.cpp 项目是为 https://github.com/ggml-org/ggml 库开发新功能的主要实验场。

模型

通常也支持基于以下基础模型的微调模型。

添加新模型支持的说明:HOWTO-add-model.md

纯文本

  • LLaMA 🦙
  • LLaMA 2 🦙🦙
  • LLaMA 3 🦙🦙🦙
  • Mistral 7B
  • Mixtral MoE
  • DBRX
  • Jamba
  • Falcon
  • https://github.com/ymcui/Chinese-LLaMA-Alpaca 和 https://github.com/ymcui/Chinese-LLaMA-Alpaca-2
  • https://github.com/bofenghuang/vigogne
  • https://github.com/ggml-org/llama.cpp/pull/5423
  • Koala
  • Baichuan 1 & 2 + 衍生模型
  • Aquila 1 & 2
  • https://github.com/ggml-org/llama.cpp/pull/3187
  • Refact
  • https://github.com/ggml-org/llama.cpp/pull/3417
  • https://github.com/ggml-org/llama.cpp/pull/3553
  • Yi 模型
  • StableLM 模型
  • Deepseek 模型
  • Qwen 模型
  • https://github.com/ggml-org/llama.cpp/pull/3557
  • Phi 模型
  • https://github.com/ggml-org/llama.cpp/pull/***
  • GPT-2
  • https://github.com/ggml-org/llama.cpp/pull/5118
  • InternLM2
  • https://github.com/WisdomShell/codeshell
  • Gemma
  • https://github.com/state-spaces/mamba
  • Grok-1
  • Xverse
  • Command-R 模型
  • SEA-LION
  • GritLM-7B + GritLM-8x7B
  • OLMo
  • OLMo 2
  • OLMoE
  • Granite 模型
  • https://github.com/EleutherAI/gpt-neox + https://github.com/EleutherAI/pythia
  • ***-Arctic MoE
  • Smaug
  • Poro 34B
  • Bitnet b1.58 模型
  • Flan T5
  • Open Elm 模型
  • GLM-4-0414
  • SmolLM
  • EXAONE-3.0-7.8B-Instruct
  • FalconMamba 模型
  • Jais
  • Bielik-11B-v2.3
  • RWKV-7
  • https://github.com/BlinkDL/RWKV-LM
  • QRWKV-6
  • GigaChat-20B-A3B
  • Trillion-7B-preview
  • Ling 模型
  • LFM2 模型
  • Hunyuan 模型
  • BailingMoeV2(Ring/Ling 2.0)模型

多模态

  • LLaVA 1.5 模型、LLaVA 1.6 模型

  • BakLLaVA

  • Obsidian

  • ShareGPT4V

  • MobileVLM 1.7B/3B 模型

  • Yi-VL

  • Mini CPM

  • Moondream

  • https://github.com/BAAI-DCAI/Bunny

  • GLM-EDGE

  • Qwen2-VL

  • LFM2-VL

  • Python: https://github.com/ddh0/easy-llama

  • Python: https://github.com/abetlen/llama-cpp-python

  • Go: https://github.com/go-skynet/go-llama.cpp

  • Node.js: https://github.com/withcatai/node-llama-cpp

  • JS/TS(llama.cpp 服务器客户端): lgrammel/modelfusion

  • JS/TS(可编程提示引擎 CLI): https://github.com/offline-ai/cli

  • JavaScript/Wasm(可在浏览器中运行): https://github.com/tangledgroup/llama-cpp-wasm

  • Typescript/Wasm(更友好的 API,可在 npm 上获取): https://github.com/ngxson/wllama

  • Ruby: https://github.com/yoshoku/llama_cpp.rb

  • Ruby: https://github.com/docusealco/rllama

  • Rust(功能更丰富): https://github.com/edgenai/llama_cpp-rs

  • Rust(更友好的 API): https://github.com/mdrokz/rust-llama.cpp

  • Rust(更直接的绑定): https://github.com/utilityai/llama-cpp-rs

  • Rust(可从 crates.io 自动构建): https://github.com/ShelbyJenkins/llm_client

  • C#/.NET: https://github.com/SciSharp/LLamaSharp

  • C#/VB.NET(功能更丰富 - 社区许可证): LM-Kit.NET

  • Scala 3: https://github.com/donderom/llm4s

  • Clojure: https://github.com/phronmophobic/llama.clj

  • React Native: https://github.com/mybigday/llama.rn

  • Java: https://github.com/kherud/java-llama.cpp

  • Java: https://github.com/QuasarByte/llama-cpp-jna

  • Zig: https://github.com/Deins/llama.cpp.zig

  • Flutter/Dart: https://github.com/netdur/llama_cpp_dart

  • Flutter: https://github.com/xuegao-tzx/Fllama

  • PHP(基于 llama.cpp 构建的 API 绑定和功能): https://github.com/distantmagic/resonance https://github.com/ggml-org/llama.cpp/pull/6326

  • Guile Scheme: guile_llama_cpp

  • Swift: https://github.com/srgtuszy/llama-cpp-swift

  • Swift: https://github.com/ShenghaiWang/SwiftLlama

  • Delphi: https://github.com/Embarcadero/llama-cpp-delphi

  • Go(无需 CGo): https://github.com/hybridgroup/yzma

  • Android: llama.android

用户界面

(要在此处列出项目,该项目应明确说明其依赖于 llama.cpp)

  • https://github.com/yaroslavyaroslav/OpenAI-sublime-text%EF%BC%88MIT%EF%BC%89
  • BonzAI 应用(专有)
  • https://github.com/cztomsik/ava%EF%BC%88MIT%EF%BC%89
  • https://github.com/alexpinel/Dot%EF%BC%88GPL%EF%BC%89
  • https://github.com/ylsdamxssjxxdd/eva%EF%BC%88MIT%EF%BC%89
  • https://github.com/iohub/coLLaMA%EF%BC%88Apache-2.0%EF%BC%89
  • https://github.com/janhq/jan%EF%BC%88AGPL%EF%BC%89
  • https://github.com/johnbean393/Sidekick%EF%BC%88MIT%EF%BC%89
  • https://github.com/zhouwg/kantv?tab=readme-ov-file%EF%BC%88Apache-2.0%EF%BC%89
  • https://github.com/firatkiral/kodibot%EF%BC%88GPL%EF%BC%89
  • https://github.com/ggml-org/llama.vim%EF%BC%88MIT%EF%BC%89
  • https://github.com/abgulati/LARS%EF%BC%88AGPL%EF%BC%89
  • https://github.com/vietanhdev/llama-assistant%EF%BC%88GPL%EF%BC%89
  • https://github.com/undreamai/LlamaLib%EF%BC%88Apache-2.0%EF%BC%89
  • https://github.com/guinmoon/LLMFarm?tab=readme-ov-file%EF%BC%88MIT%EF%BC%89
  • https://github.com/undreamai/LLMUnity%EF%BC%88MIT%EF%BC%89
  • LMStudio(专有)
  • https://github.com/mudler/LocalAI%EF%BC%88MIT%EF%BC%89
  • https://github.com/LostRuins/koboldcpp%EF%BC%88AGPL%EF%BC%89
  • MindMac(专有)
  • https://github.com/MindWorkAI/AI-Studio%EF%BC%88FSL-1.1-MIT%EF%BC%89
  • https://github.com/Mobile-Artificial-Intelligence/maid%EF%BC%88MIT%EF%BC%89
  • https://github.com/Mozilla-Ocho/llamafile%EF%BC%88Apache-2.0%EF%BC%89
  • https://github.com/nat/openplayground%EF%BC%88MIT%EF%BC%89
  • https://github.com/nomic-ai/gpt4all%EF%BC%88MIT%EF%BC%89
  • https://github.com/ollama/ollama%EF%BC%88MIT%EF%BC%89
  • https://github.com/oobabooga/text-generation-webui%EF%BC%88AGPL%EF%BC%89
  • https://github.com/a-ghorbani/pocketpal-ai%EF%BC%88MIT%EF%BC%89
  • https://github.com/psugihara/FreeChat%EF%BC%88MIT%EF%BC%89
  • https://github.com/ptsochantaris/emeltal%EF%BC%88MIT%EF%BC%89
  • https://github.com/pythops/tenere%EF%BC%88AGPL%EF%BC%89
  • https://github.com/containers/ramalama%EF%BC%88MIT%EF%BC%89
  • https://github.com/semperai/amica%EF%BC%88MIT%EF%BC%89
  • https://github.com/withcatai/catai%EF%BC%88MIT%EF%BC%89
  • https://github.com/***89/autopen%EF%BC%88GPL%EF%BC%89

工具

  • https://github.com/akx/ggify – 从 Hugging Face Hub 下载 PyTorch 模型并将其转换为 GGML 格式
  • https://github.com/akx/ollama-dl – 从 Ollama 库下载模型以直接用于 llama.cpp
  • https://github.com/crashr/gppm – 启动 llama.cpp 实例,利用 NVIDIA Tesla P40 或 P100 GPU 降低空闲功耗
  • https://github.com/gpustack/gguf-parser-go/tree/main/cmd/gguf-parser - 查看/检查 GGUF 文件并估算内存使用情况
  • Styled Lines(专有许可,Unity3d 游戏开发推理部分的异步包装器,带有预构建的移动和 Web 平台包装器及模型示例)
  • https://github.com/unslothai/unsloth – 🦥 将微调及训练后的模型导出/保存为 GGUF 格式(Apache-2.0)

基础设施

  • https://github.com/intentee/paddler - 用于在自有基础设施中托管和扩展 AI 的开源 LLMOps 平台
  • https://github.com/gpustack/gpustack - 管理用于运行 LLM 的 GPU 集群
  • https://github.com/onicai/llama_cpp_canister - 在 Internet Computer 上作为智能合约的 llama.cpp,使用 WebAssembly
  • https://github.com/mostlygeek/llama-swap - 透明代理,通过 llama-server 添加自动模型切换功能
  • https://github.com/kalavai-net/kalavai-client - 众包端到端 LLM 部署,支持任意规模
  • https://github.com/InftyAI/llmaz - ☸️ 在 Kubernetes 上运行大型语言模型的简单、高级推理平台
  • https://github.com/defilantech/llmkube - 用于 llama.cpp 的 Kubernetes 算子,支持多 GPU 和 Apple Silicon Metal

llama-cli

一个用于访问和试验 llama.cpp 大部分功能的 CLI 工具。

以对话模式运行

具有内置聊天模板的模型会自动激活对话模式。如果未自动激活,可通过添加 -cnv 并使用 --chat-template NAME 指定合适的聊天模板来手动启用。

llama-cli -m model.gguf

#
> hi, who are you?
# Hi there! I'm your helpful assistant! I'm an AI-powered chatbot designed to assist and provide information to users like you. I'm here to help answer your questions, provide guidance, and offer support on a wide range of topics. I'm a friendly and knowledgeable AI, and I'm always happy to help with anything you need. What's on your mind, and how can I assist you today?
#
#
> what is 1+1?
# Easy peasy! The answer to 1+1 is... 2!

使用自定义聊天模板运行对话模式

# 使用 "chatml" 模板(使用 -h 查看支持的模板列表)
llama-cli -m model.gguf -cnv --chat-template chatml

# 使用自定义模板
llama-cli -m model.gguf -cnv --in-prefix 'User: ' --reverse-prompt 'User:'

使用自定义语法约束输出

llama-cli -m model.gguf -n 256 --grammar-file grammars/json.gbnf -p 'Request: schedule a call at 8pm; Command:'

# {"appointmentTime": "8pm", "appointmentDetails": "schedule a a call"}

grammars/ 文件夹包含一些示例语法。要编写自己的语法,请查看 GBNF 指南。

如需编写更复杂的 JSON 语法,请访问 [***]

llama-server

一个轻量级、与 https://github.com/openai/openai-openapi 兼容的 HTTP 服务器,用于部署 LLM。

使用默认配置在 8080 端口启动本地 HTTP 服务器

llama-server -m model.gguf --port 8080

# 可通过浏览器访问基本 Web UI:http://localhost:8080
# 聊天补全端点:http://localhost:8080/v1/chat/completions

支持多用户和并行解码

# 最多 4 个并发请求,每个请求最大上下文为 4096
llama-server -m model.gguf -c 16384 -np 4

启用推测解码

# draft.gguf 模型应为目标 model.gguf 的小型变体
llama-server -m model.gguf -md draft.gguf

部署嵌入模型

# 使用 /embedding 端点
llama-server -m model.gguf --embedding --pooling cls -ub 8192

部署重排序模型

# 使用 /reranking 端点
llama-server -m model.gguf --reranking

使用语法约束所有输出

# 自定义语法
llama-server -m model.gguf --grammar-file grammar.gbnf

# JSON
llama-server -m model.gguf --grammar-file grammars/json.gbnf

XCFramework

XCFramework 是适用于 iOS、visionOS、tvOS 和 macOS 的预编译库版本。它可用于 Swift 项目,无需从源代码编译库。例如:

// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "MyLlamaPackage",
targets: [
.executableTarget(
name: "MyLlamaPackage",
dependencies: [
"LlamaFramework"
]),
.binaryTarget(
name: "LlamaFramework",
url: "https://github.com/ggml-org/llama.cpp/releases/download/b5046/llama-b5046-xcframework.zip",
checksum: "c19be78b5f00d8d29a25da41042cb7afa094cbf6280a225abe614b03b20029ab"
)
]
)

上述示例使用的是库的中间构建版本 b5046。可以通过更改 URL 和校验和来修改为使用不同版本。

命令补全

部分环境支持命令行补全。

Bash 补全

$ build/bin/llama-cli --completion-bash
> ~/.llama-completion.bash
$ source ~/.llama-completion.bash

也可以选择将其添加到 .bashrc 或 .bash_profile 中以自动加载。例如:

$ echo "source ~/.llama-completion.bash"
>> ~/.bashrc

依赖项

  • https://github.com/yhirose/cpp-httplib - 单头文件 HTTP 服务器,供 llama-server 使用 - MIT license
  • https://github.com/nothings/stb - 单头文件图像格式解码器,供多模态子系统使用 - Public domain
  • https://github.com/nlohmann/json - 单头文件 JSON 库,供各种工具/示例使用 - MIT License
  • https://github.com/mackron/miniaudio - 单头文件音频格式解码器,供多模态子系统使用 - Public domain
  • https://github.com/sheredom/subprocess.h - 用于 C 和 C++ 的单头文件进程启动解决方案 - Public domain

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

Harbor 镜像源配置

Harbor Proxy Repository 对接专属域名

Portainer 镜像源配置

Portainer Registries 加速拉取

Nexus 镜像源配置

Nexus3 Docker Proxy 内网缓存

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

配置了专属域名后,docker search 为什么会报错?

docker search 限制

Docker Hub 上有的镜像,为什么在轩辕镜像网站搜不到?

站内搜不到镜像

机器不能直连外网时,怎么用 docker save / load 迁镜像?

离线 save/load

docker pull 拉插件报错(plugin v1+json)怎么办?

插件要用 plugin install

WSL 里 Docker 拉镜像特别慢,怎么排查和优化?

WSL 拉取慢

轩辕镜像安全吗?如何用 digest 校验镜像没被篡改?

安全与 digest

第一次用轩辕镜像拉 Docker 镜像,要怎么登录和配置?

新手拉取配置

轩辕镜像合规吗?轩辕镜像的合规是怎么做的?

镜像合规机制

轩辕镜像支持 docker push 上传本地镜像吗?

不支持 push

错误码与失败问题

docker pull 提示 manifest unknown 怎么办?

manifest unknown

docker pull 提示 no matching manifest 怎么办?

no matching manifest(架构)

镜像已拉取完成,却提示 invalid tar header 或 failed to register layer 怎么办?

invalid tar header(解压)

Docker pull 时 HTTPS / TLS 证书验证失败怎么办?

TLS 证书失败

Docker pull 时 DNS 解析超时或连不上仓库怎么办?

DNS 超时

docker 无法连接轩辕镜像域名怎么办?

域名连通性排查

Docker 拉取出现 410 Gone 怎么办?

410 Gone 排查

出现 402 或「流量用尽」提示怎么办?

402 与流量用尽

Docker 拉取提示 UNAUTHORIZED(401)怎么办?

401 认证失败

遇到 429 Too Many Requests(请求太频繁)怎么办?

429 限流

docker login 提示 Cannot autolaunch D-Bus,还算登录成功吗?

D-Bus 凭证提示

为什么会出现「单层超过 20GB」或 413,无法加速拉取?

413 与超大单层

账号 / 计费 / 权限

轩辕镜像免费版和专业版有什么区别?

免费版与专业版区别

轩辕镜像支持哪些 Docker 镜像仓库?

支持的镜像仓库

镜像拉取失败还会不会扣流量?

失败是否计费

麒麟 V10 / 统信 UOS 提示 KYSEC 权限不够怎么办?

KYSEC 拦截脚本

如何在轩辕镜像申请开具发票?

申请开票

怎么修改轩辕镜像的网站登录和仓库登录密码?

修改登录密码

如何注销轩辕镜像账户?要注意什么?

注销账户

配置与原理类

写了 registry-mirrors,为什么还是走官方或仍然报错?

mirrors 不生效

怎么用 docker tag 去掉镜像名里的轩辕域名前缀?

去掉域名前缀

如何拉取指定 CPU 架构的镜像(如 ARM64、AMD64)?

指定架构拉取

用轩辕镜像拉镜像时快时慢,常见原因有哪些?

拉取速度原因

为什么拉取镜像的 :latest 标签,拿到的往往不是「最新」镜像?

latest 与「最新」

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
ghcr.io/ggml-org/llama.cpp
博客Docker 镜像公告与技术博客
热门查看热门 Docker 镜像推荐
安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单。官方公众号:源码跳动。官方技术交流群:51517718。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单。官方公众号:源码跳动。官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.