# Timber

Timber is an ahead-of-time compiler that turns trained classical ML models, such as XGBoost, LightGBM, scikit-learn, CatBoost and ONNX models, into self-contained C99 inference code with no runtime dependencies, and serves them over an Ollama-compatible HTTP API.

Timber compiles a trained classical machine-learning model, including tree ensembles, linear models, SVMs, k-NN, Naive Bayes, Gaussian process regression and isolation forests, as well as URDF robot descriptions, through a multi-pass optimizing compiler into a self-contained C99 inference artifact. A built-in HTTP server with an Ollama-compatible API can then serve any compiled model with one command, and a single command can also load a model directly from a URL and serve it.

An optional hardware-acceleration backend emits AVX2, AVX-512, NEON, SVE and RVV SIMD code, CUDA, Metal or OpenCL GPU code, Xilinx or Intel FPGA HLS code, and Cortex-M, ESP32 or STM32 embedded variants, along with WCET analysis, certification reports for standards such as DO-178C, ISO-26262 and IEC-62304, artifact signing and encryption, air-gapped deployment bundles, and ROS 2, PX4 and gRPC server generators.

It targets teams needing fast, predictable, portable inference outside Python, such as fraud and risk teams, edge and IoT deployments, and regulated industries.

Website: https://kossisoroyce.github.io/timber/
