Edge-first AI inference for everyone. Pure C99 · No dependencies · Runs on any CPU · Built for Africa and the Global South.
Local Model computing
← Local Machine learning Models computation on your low-end edge device ➝ by custom research
---
---
ᯓ➤ 📨 Email Us ᯓ➤ 🌐. Visit ᯓ➤ [[in] lınkedln](
linkedin.com)
---
LMc is an AI inference engine written in pure C99. It runs machine learning models locally on **any device** — no cloud, no GPU required.
GGUF-native. Zero external dependencies. Runs on x86, ARM, Android, Windows.
LMc is designed for the reality of computing in Africa and the Global South: low-spec phones, aging laptops, shared computers, and limited bandwidth. Where llama.cpp is a toolkit, LMc is a standard — the **FFmpeg of AI inference**.
**Current status:** Proof of concept — GPT-2 124M working end-to-end. Architecture and extension points are production-ready. New models and hardware backends plug in cleanly.
---
```
./lmc --model models/gpt2-xl.gguf \
--prompt "The meaning of life is" \
--n-predict 128 --temp 0.7 --threads 4
```
---
## Features
- **GGUF-native** — reads models directly from the llama.cpp / HuggingFace GGUF format
- **All GPT-2 variants** — Small (124M), Medium (345M), Large (774M), XL (1.5B)
- **Rich quantisation support** — F32, F16, Q2_K, Q3_K, Q4_0, Q4_1, Q4_K, Q5_0, Q5_1, Q5_K, Q6_K, Q8_0, IQ3_XXS, IQ3_S, IQ4_XS
- **Optimised kernels** — 16-wide matmul unroll, head-major KV cache, fast GELU, OpenMP parallelism
- **Edge-friendly** — Raspberry Pi 4 at 8 t/s (GPT-2 Small Q4_K_M, 4 threads)
- **Portable** — Pure C99, no BLAS, no external libs beyond `-lm`
---
## Quick Start
### 1. Build
```bash
make # single-threaded
make omp # OpenMP multi-threaded (recommended)
make help # all targets
```
macOS requires `brew install libomp` for OpenMP.
Windows: use MSYS2/MinGW64 terminal.
### 2. Download a model (GGUF)
There are a lot of available source you can use to get the weight from, I find the following to be simple sources.
You will probably find a lot of models version (I me …