llama.cpp 刚刚为 DeepSeek V4 Flash 添加了 MTP / DSpark 支持

Reddit r/LocalLLaMA 工具

摘要

llama.cpp 已为 DeepSeek V4 Flash 添加 MTP/DSpark 支持,从而通过流行的 C/C++ LLM 运行时实现本地推理。

暂无内容
查看原文
查看缓存全文

缓存时间: 2026/08/03 01:32

ggml-org/llama.cpp

来源:https://github.com/ggml-org/llama.cpp

llama.cpp

llama LLM 推理(C/C++ 实现)
许可证:MIT (https://opensource.org/licenses/MIT)
发布 (https://github.com/ggml-org/llama.cpp/releases) / 服务器 (https://github.com/ggml-org/llama.cpp/actions/workflows/server.yml) / Docker (https://github.com/ggml-org/llama.cpp/actions/workflows/docker.yml) / Winget (https://github.com/ggml-org/llama.cpp/actions/workflows/winget.yml) / 宣言 (https://github.com/ggml-org/llama.cpp/discussions/205) / ggml (https://github.com/ggml-org/ggml) / ops (https://github.com/ggml-org/llama.cpp/blob/master/docs/ops.md) / 维护者 PR (https://github.com/ggml-org/llama.cpp/issues?q=is%3Apr%20is%3Aopen%20draft%3AFalse%20(author%3Argerganov%20OR%20author%3AKitaitiMakoto%20OR%20author%3Adanbev%20OR%20author%3Aaldehir%20OR%20author%3Amax-krasnyansky%20OR%20author%3ACISC%20OR%20author%3Aggerganov%20OR%20author%3Aam17an%20OR%20author%3Abartowski1182%20OR%20author%3Ahipudding%20OR%20author%3AServeurpersoCom%20OR%20author%3Apwilkin%20OR%20author%3Areeselevine%20OR%20author%3Angxson%20OR%20author%3Ajeffbolznv%20OR%20author%3A0cc4m%20OR%20author%3Aangt%20OR%20author%3AIMbackK%20OR%20author%3Aarthw%20OR%20author%3AJohannesGaessler%20OR%20author%3AORippler%20OR%20author%3Aruixiang63%20OR%20author%3Axctan%20OR%20author%3Aallozaur%20OR%20author%3Ayomaytk%20OR%20author%3Aaendk%20OR%20author%3Agaugarg-nv%20OR%20author%3Ataronaeo%20OR%20author%3Aforforever73%20OR%20author%3Alhez%20OR%20author%3Anetrunnereve%20OR%20author%3Afairydreaming)%20sort%3Aupdated-desc) / 开发分支 (https://github.com/ggml-org/llama.cpp-dev/blob/master/README-features.md) / 编译时间 (https://github.com/ggml-org/llama.cpp-dev/blob/master/README-compile-times.md) / lib llama API (https://github.com/ggml-org/llama.cpp/issues/9289) / llama-server REST API (https://github.com/ggml-org/llama.cpp/issues/9291)

快速开始

有几种方式可以在你的机器上安装 llama.cpp:

  • 访问 https://llama.app 并按照说明操作
  • 使用 Docker 运行 — 查看我们的 Docker 文档
  • 从发布页面下载预构建的二进制文件 (https://github.com/ggml-org/llama.cpp/releases)
  • 通过克隆此仓库从源码构建 — 查看 我们的构建指南

安装完成后:

``sh

Download and run a model directly from Hugging Face

llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF

Launch OpenAI-compatible API server

llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF ``

使用 llama cli 进行 VLM 会话
针对 llama serve 的内置 Web UI

描述

llama.cpp 的主要目标是让 LLM(以及 VLM)推理在广泛的硬件上以最少的设置和顶尖的性能运行——无论是在本地还是在云端。

  • 纯 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 混合推理,可部分加速超过总显存容量的模型

llama.cpp 项目基于 ggml (https://github.com/ggml-org/ggml) 库构建。

支持的后端

后端目标设备
BLAS全部
BLIS全部
CANN昇腾 NPU
CUDANvidia GPU
HIPAMD GPU
Hexagon [进行中]骁龙
IBM zDNNIBM Z 和 LinuxONE
MUSA摩尔线程 GPU
MetalApple Silicon
OpenCLAdreno GPU
OpenVINO [进行中]Intel CPU、GPU 和 NPU
RPC (https://github.com/ggml-org/llama.cpp/tree/master/tools/rpc)全部
SYCLIntel GPU
VirtGPUVirtGPU APIR
VulkanGPU
WebGPU全部
ZenDNNAMD CPU

文档

工具

开发

贡献

  • 贡献者可以提交 PR
  • 基于贡献情况将邀请协作者
  • 维护者可以推送到 llama.cpp 仓库中的分支,并将 PR 合并到 master 分支
  • 非常欢迎任何在管理 issue、PR 和项目方面的帮助!
  • 阅读 CONTRIBUTING.md 了解更多信息

致谢

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

相似文章

DeepSeek V4.1 Flash 1017 对 ds4 的支持 · PR #1225 · antirez/ds4

Reddit r/LocalLLaMA

antirez 的 DwarfStar(ds4)项目在 PR #1225 中新增了对 DeepSeek V4.1 Flash 的支持,进一步扩展了其专用原生推理引擎的能力,可在消费级硬件上跨 Metal、CUDA 和 ROCm 运行 DeepSeek、GLM 和 Qwen 等开放权重模型。