Your XGBoost model, now a 48KB C binary that serves in 2 µs
Timber AOT-compiles classical ML models to native C99, drops the Python runtime from inference entirely, and wraps them in an Ollama-compatible HTTP server.

What it does
Timber ingests trained models from XGBoost, LightGBM, scikit-learn, CatBoost, or ONNX and runs them through a multi-pass compiler that emits self-contained C99 code. No Python in the hot path, no runtime dependencies, no dynamic allocation. A built-in HTTP server exposes an Ollama-compatible API, so timber serve <model> gives you a localhost endpoint in one command. The README also claims support for URDF robot descriptions, which is… unexpected.
The interesting bit
The compiler does actual optimization work: dead-leaf elimination, threshold quantization, constant-feature folding, and branch sorting on a typed AST before emitting C. That’s not just format conversion with extra steps. The resulting artifacts are small enough (~48 KB cited) to ship to microcontrollers, and the timber accel backend targets everything from AVX-512 to Xilinx FPGA HLS to bare-metal Cortex-M.
Key highlights
- Single-sample inference in ~2 µs, ~336× faster than Python XGBoost (per README claims)
- Supports tree ensembles, linear models, SVMs, k-NN, Naive Bayes, Gaussian process regression, and Isolation Forest across six frameworks
timber serve https://...downloads, compiles, and serves from a URL with zero local setup- Safety-critical extras: WCET analysis, DO-178C/ISO-26262/IEC-62304 certification reports, Ed25519 signing, AES-256-GCM encryption
- ROS 2 nodes, PX4 autopilot modules, and gRPC C++ server generators bundled in the same pip install
Caveats
- The “advisory notice” in the README is truncated mid-sentence, so the exact limitations of the safety certification claims are unclear
- Several advanced backends (FPGA HLS, TPM hooks, PX4 modules) are listed but not demonstrated with examples in the provided source
- The 336× speedup and 2 µs latency figures lack reproducible benchmark methodology in the visible README text
Verdict
Worth a look if you serve classical ML in latency-sensitive paths, deploy to edge/embedded targets, or need auditable inference artifacts for regulated environments. Skip it if you’re deep in neural-network land — this is strictly for the gradient-boosting and tree-ensemble crowd.