ggml
github.com
Dependency-free C/C++ tensor library behind llama.cpp, with 2 to 8-bit quantization and CPU/GPU/NPU/browser backends.
- Pricing
- Open source
- Published
- Nov 16, 2026
Next steps
- llmfit
Both tools are listed under Large Language Models (LLMs), AI Developer Tools, llama-cpp, and gguf.
- RigCheck
Both tools are listed under Large Language Models (LLMs), AI Developer Tools, and llama-cpp.
- NVIDIA Model Optimizer
Both tools are listed under Large Language Models (LLMs), AI Developer Tools, and quantization.
- CodeGraph
- Diagram Design
- Agent Skills (Addy Osmani)
What it does
ggml is a simple, portable and efficient tensor library for machine learning, MIT licensed and maintained in the ggml-org organization alongside llama.cpp. It is plain C/C++ with no dependencies, runs on x86, ARM, RISC-V, LoongArch, PowerPC, s390x and WebAssembly with SIMD-optimized kernels, and supports CPU, GPU, NPU and browser backends. It offers 2- to 8-bit integer quantization plus MXFP4 and NVFP4 microscaling formats, makes zero memory allocations at runtime, and defines the GGUF file format used by many local LLM tools.
Use cases
- Run quantized models on CPU, GPU, NPU or in the browser with a dependency-free C/C++ library
- Learn how llama.cpp-style inference works from the minimal commented matrix-multiplication example
- Package model weights in the GGUF format for local inference tools
Frequently asked questions
- What is ggml?
- ggml is an MIT-licensed tensor library for machine learning written in plain C/C++ without dependencies. It is the tensor library behind llama.cpp in the ggml-org organization.
- Which hardware does it support?
- x86, ARM, RISC-V, LoongArch, PowerPC, s390x and WebAssembly, with CPU, GPU, NPU and browser backends and SIMD-optimized kernels.
- What quantization formats are available?
- 2- to 8-bit integer quantization plus the MXFP4 and NVFP4 microscaling formats.
- Where do I contribute?
- Changes to the core ggml library should be opened as pull requests in the llama.cpp repository.