ggml
开发工具 活跃维护

ggml

ggml-org/ggml

纯C编写的张量计算库,提供多维数组、常用算子与图执行接口,内置多种整数量化格式压缩权重,可在CPU及GPU后端运行,编译无重依赖,方便嵌入C/C++程序做本地模型推理。

16,021
Stars 标星
2,059
Forks 分支
16,021
Watchers 关注
387
Open Issues
C++
主要语言
MIT
开源协议
33.9 MB
仓库大小
22 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:ggml-org/ggml
git clone https://github.com/ggml-org/ggml.git
git clone git@github.com:ggml-org/ggml.git
README.md master

🔥 本项收录自 GitHub 日榜 · 全球 第 8 名(43 stars today),榜单来源:rebang.today

ggml

ggml logo Tensor library for machine learning [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Release](https://img.shields.io/github/v/release/ggml-org/ggml?filter=v*)](https://github.com/ggml-org/ggml/releases) [![CI](https://github.com/ggml-org/ggml/actions/workflows/build-cpu.yml/badge.svg)](https://github.com/ggml-org/ggml/actions/workflows/build-cpu.yml)

Quick start

Build from source:

git clone https://github.com/ggml-org/ggml
cd ggml

mkdir build && cd build
cmake ..
cmake --build . --config Release -j 8

For a minimal, fully commented example (matrix multiplication), see examples/simple.

Description

The main goal of ggml is to be a simple, portable, and efficient tensor library for machine learning with minimal setup.

  • Plain C/C++ implementation without any dependencies
  • Cross-platform - x86, ARM, RISC-V, LoongArch, PowerPC, s390x, and WebAssembly
  • SIMD-optimized kernels for x86, ARM, and RISC-V
  • Broad backend support - CPU, GPU, NPU, and browser
  • 2- to 8-bit integer quantization, plus MXFP4 and NVFP4 microscaling formats
  • Zero memory allocations during runtime

Documentation

Contributing

  • For changes to the core ggml library (including to the CMake build system), please open a PR in llama.cpp - doing so will make your PR more visible, better tested, and more likely to be reviewed