GGML

Dependency-free C tensor library underneath llama.cpp and whisper.cpp, with many hardware backends.

Open SourceSelf HostedOffline Capable
0.0 (0)

About

Much of the local LLM world, including llama.cpp, whisper.cpp and the apps built on them, does its math through ggml, a compact C and C++ tensor library started by Georgi Gerganov and now under the ggml-org umbrella. You describe a graph of tensor operations, let ggml work out the memory it needs before anything runs, and hand the graph to a backend: hand-tuned vector code for the common CPU families, or offload to CUDA, HIP, Metal, Vulkan, SYCL, OpenCL, WebGPU, CANN, MUSA, OpenVINO and more. It also defines the GGUF model file format and a family of quantized weight types, integer formats spanning roughly 1.5 to 8 bits per weight plus the 4-bit floating point MXFP4 and NVFP4 layouts, so large models fit in consumer RAM. It builds with plain CMake and no external libraries, and the examples folder covers GPT-2, GPT-J, MNIST, YOLO and Segment Anything. Core work happens in the llama.cpp repository and syncs here, with regular tagged releases. MIT licensing makes commercial embedding easy. It is a building block for systems programmers writing inference engines; to simply run a model, use llama.cpp or a front end on top of it.

Should you use GGML?

Pick it when

Use GGML directly only if you are writing a new C or C++ inference engine, porting an unusual model architecture, or embedding quantized tensor operations in a native app where Python and large runtimes are not an option.

Look elsewhere when

Most people should skip it: active development has moved into llama.cpp and whisper.cpp, which wrap GGML with model loading, GGUF support, and servers. To run local models, use those or Ollama instead of the raw tensor library.

Alternatives to GGML

  • llama.cpp

    Where most GGML development happens now, with GGUF loading, quantization, and an OpenAI-compatible server built in, so you write no tensor code.

  • Whisper.cpp

    A ready GGML-based speech recognition engine in C and C++, the right pick when your goal is transcription rather than building an engine.

  • ONNX Runtime

    Runs models exported from PyTorch or TensorFlow on CPU, CUDA, DirectML, and mobile, a broader production runtime with less focus on LLM quantization.

  • tinygrad

    A hackable Python framework with lazy kernel fusion and several GPU backends, easier to read and modify than C, but not built around GGUF.

Reviews (0)

Leave a Review

No reviews yet. Be the first to review!

Details

Price
Free
Platform
Local/Desktop
Difficulty
Expert (5/5)
License
MIT
Added
Jan 29, 2026

Tags