← Back to Leaderboard
Gggml-org

ggml-org/ggml

Embeddable C/C++ tensor runtime for quantized inference across hardware backends

AI FrameworkQuickstart ↓
Engineering Health (Methodology)
A+ · 97/100
Maintenance Activity
● Updated today
Latest Release
v1.2.0
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption22/25
Release Cadence20/20
License Clarity20/20
GPU
Total Stars
★ 16,326
24h Growth
+14
7d Growth
+97
Forks
2,051

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

ggml-org/ggml Star History (2022-09-18 - 2026-12-04) ALL-TIME STAR HISTORY (2022-09 – 2026-12) +16.3k in 1538d · avg +11/day 17.2k 8.6k 0 2022-09-18: ★ 12022-12-24: ★ 1212023-04-01: ★ 1,0712023-07-08: ★ 5,1292023-10-14: ★ 7,0032024-01-20: ★ 8,2872024-04-27: ★ 9,3842024-08-03: ★ 10,1992024-11-09: ★ 10,8952025-02-15: ★ 11,6032025-05-24: ★ 12,3602025-08-30: ★ 12,8842025-12-06: ★ 13,4982026-03-14: ★ 14,0802026-06-20: ★ 14,7532026-09-26: ★ 15,3692026-12-04: ★ 16,326 ★ 16.3k 2022-09 2024-10 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

ggml is a native C/C++ tensor execution library, not a model server. An embedding application builds a graph from tensor operations and uses the scheduler and selected backends to execute it. Scratch reservation and ordered asynchronous host input copies in v1.1.0 expose two practical controls at that boundary: planning temporary workspace and managing input transfer order. The library is designed to avoid allocations during execution; the caller still has to provision tensor storage and workspace.

The repository separates interface and implementation into include/ and src/, with a minimal matmul integration example in examples/simple. The native core has no third-party dependencies. The Python packages in requirements.txt, including NumPy, PyTorch, Transformers, and gguf, are a separate dependency set and are not required to link the core. Backends provide hardware-specific execution, and the meta/TP backend can place an entire tensor on one device as of v1.2.0; that is a placement option, not automatic sharding for every graph.

Key Capabilities & Differentiators

ggml supports 2- to 8-bit integer quantization and MXFP4 and NVFP4 microscaling formats. In v1.2.0, extended matmul APIs add scale support for FP8 and NVFP4, and the FlashAttention sinks/bias API is revised. GGUF is a documented file format, not a guarantee that ggml can execute any model packaged in it: the host still needs to map the model to a compatible graph and select a backend with the required kernels.

Execution targets span CPU, GPU, NPU, and browser environments. CPU platforms include x86, ARM, RISC-V, LoongArch, PowerPC, and s390x, with SIMD kernels for x86, ARM, and RISC-V; WebAssembly is also a target. Backend development is hardware-specific: v1.1.1 adds Hexagon INT-HMX W8A8 matmul, revises CUDA FlashAttention data loading, and tunes small-K matrix-vector operations on Metal. Check operator and dtype coverage on the actual target rather than assuming a performance change on one backend applies to the others.

Trade-offs & Limitations

Choose ggml over a model-level runtime such as llama.cpp when the tensor graph, backend choice, or memory plan is part of what your product needs to control. If the job is to run a supported LLM with a standard application interface, the higher-level runtime avoids writing that integration yourself. Compared with a managed inference API, embedding ggml enables local execution and control over where model data is processed, but shifts deployment, upgrades, and hardware qualification to your team.

Quantization gives you a way to trade weight storage against numerical fidelity, but a format on the support list does not establish throughput or quality for your model. Benchmark the intended graph and quantization on each target, and size RAM or VRAM for resident tensors, workspace, and transfer buffers rather than weight size alone. For an LLM, also account for model state that grows with context and concurrency. MIT licensing eases redistribution of the library; it does not cover model weights or third-party accelerator components.

Hardware & Deployment Guide

The minimal path is a local source build with a C/C++ toolchain and CMake: run cmake -S . -B build, then cmake --build build --config Release -j 8 from the repository root. With a single-config generator, set -DCMAKE_BUILD_TYPE=Release when configuring. Use examples/simple as a CPU integration smoke test before enabling an accelerator. The Python manifest is not a native runtime prerequisite. Accelerator builds need a matching toolchain and driver where applicable; verify the selected backend's requirements rather than treating GPU as mandatory.

Ship the library with the host application and make model assets available locally if offline execution is required. Validate representative graphs, dtype combinations, and peak memory on each target you intend to support. The release sequence makes those checks especially useful: v1.1.0 adds scheduler controls, v1.1.1 changes several backend kernels, and v1.2.0 revises the FlashAttention API and introduces the experimental HRX backend. Pin a tested version and rerun integration checks when upgrading.

Integration: Native C/C++ library built with CMake; examples/simple demonstrates matrix multiplication.
CPU portability: Targets x86, ARM, RISC-V, LoongArch, PowerPC, s390x, and WebAssembly; SIMD kernels for x86, ARM, and RISC-V.
Quantization: 2- to 8-bit integer types plus MXFP4 and NVFP4; v1.2.0 adds FP8 and NVFP4 scale support to extended matmul APIs.
Scheduling: v1.1.0 adds scratch reservation and ordered asynchronous host input copies.
Tensor placement: v1.2.0 allows the meta/TP backend to place a whole tensor on one device.
Model tooling: docs/gguf.md covers GGUF; requirements.txt includes gguf, SentencePiece, and PyTorch for Python-side workflows, not the native core.
Best For

Teams embedding quantized inference in native applications that need control over tensor graphs, workspace, and hardware backends.

Skip If

You need a turnkey LLM server, a managed API, or ready-made model integration rather than a tensor execution library.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

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

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

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
ggml ★16.3k+97C++MITEmbeddable C/C++ tensor runtime for quantized inference across hardware backends
tensorflow201.7k+4C++Apache-2.0C++-backed ML framework for building models and embedding inference
transformers169.6k+337PythonApache-2.0A PyTorch model-definition SDK for unified inference and training across modalit
xgboost29.1k+43C++Apache-2.0A C++ gradient-boosted tree library for local and distributed tabular learning

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/ggml-org/ggml.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

ggml-org/ggml Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about ggml

Where should I start when embedding ggml in a native application?

Start with examples/simple to see how ggml represents and executes a matrix multiplication. Then map your model to tensor operations, validate the graph on your chosen backend, and integrate model loading and the application-facing interface separately. GGUF is documented in docs/gguf.md.

Is a GPU required, and how should I estimate VRAM?

No. The CPU backend is a valid starting point. For GPU sizing, measure resident tensors, execution scratch space, and any host/device buffers with your actual model and backend. Context length and concurrency can add to that footprint for LLM workloads. Quantized weights reduce weight storage, but their bit width alone does not determine peak VRAM.

Can I ship ggml in a commercial, self-hosted product?

Yes. The MIT license permits commercial use and redistribution, subject to retaining the required copyright and license notices in redistributed copies or substantial portions. The native library can run locally; review model weights, conversion tools, and any accelerator SDKs you bundle under their own terms.

When should I choose ggml over llama.cpp or a managed inference API?

Choose ggml when you need to embed tensor execution and control model integration, backend selection, or memory planning. Choose a model-level runtime such as llama.cpp when you primarily need to run a supported LLM. If you need a managed endpoint, ggml is a component you could build on, not a replacement for the service.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining ggml-org/ggml? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature ggml-org/ggml on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare