Run Gemma 2 or Gemma 3 language models locally on a laptop or desktop without a GPU or internet connection
Study the C++ source code to understand exactly how transformer inference works at a low level
Call a local Gemma model from a Python script using the included Python bindings
Experiment with training small Gemma models on a CPU without cloud infrastructure
| google/gemma.cpp | feiyangqingyun/qwidgetdemo | serial-studio/serial-studio | |
|---|---|---|---|
| Stars | 6,898 | 6,890 | 6,885 |
| Language | C++ | C++ | C++ |
| Setup difficulty | hard | moderate | easy |
| Complexity | 4/5 | 3/5 | 3/5 |
| Audience | researcher | developer | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires CMake build tools and downloading model weights from Kaggle before the program runs.
gemma.cpp is a C++ program that runs Google's Gemma family of AI language models directly on a computer's processor, without needing a graphics card or cloud service. It is designed to be small and easy to understand, with a core implementation of around two thousand lines of code. The project targets researchers and developers who want to study or modify how a language model works at a low level. Most AI toolkits hide the computation behind layers of abstraction. gemma.cpp keeps things direct so that someone can read the code and see exactly what happens when the model generates text. It is not the recommended path for shipping a product, for that, Google points people toward standard Python-based tools. Supported models include Gemma 2, Gemma 3, and PaliGemma 2, covering sizes from 2 billion to 27 billion parameters. The program runs on Linux, Windows, and macOS, and works on any modern CPU. It achieves reasonable speed through a technique called SIMD, which lets the processor work on multiple numbers at once, adapting automatically to whatever hardware it finds. To use it, you download model weights from Kaggle (a data science platform), build the project with CMake (a common build tool), and run the resulting executable with a path to the weights file. A basic command-line interface lets you type prompts and read responses. There are also Python bindings so the engine can be called from Python code. The repository includes support for training as well as running models, which is less common in tools of this type. Contributions from the community are welcome, with active development happening on a separate branch from the stable release.
A lightweight C++ program that runs Google's Gemma AI language models directly on your CPU with no GPU or cloud required, written to be small enough that researchers can read and modify how the model works.
Mainly C++. The stack also includes C++, CMake, Python.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.