← index

tinycml

by tinyrlabs

Minimal pure C11 machine learning library with zero external dependencies.

Overview

tinycml is a minimal, pure C11 machine learning library with zero external dependencies. Neural networks, grid search, preprocessing β€” all under 12K LOC.

Designed for resource-constrained environments where pulling in Python or C++ dependencies isn’t an option.

Features

Architecture

tinycml/
β”œβ”€β”€ cml_matrix.h      β€” Matrix operations (transpose, multiply, inverse)
β”œβ”€β”€ cml_nn.h          β€” Neural network (forward, backprop, train, predict)
β”œβ”€β”€ cml_preprocess.h  β€” Normalization, standardization, splitting
β”œβ”€β”€ cml_metrics.h     β€” Classification metrics
β”œβ”€β”€ cml_grid.h        β€” Grid search with k-fold CV
β”œβ”€β”€ cml.h             β€” Umbrella include header
└── examples/         β€” Usage examples

Status

Active development. Phase 1 (core API, NN, grid search) is complete. Phase 2 (tests + CI) and Phase 3 (performance optimizations) are in progress.