Three commands. Native speed.
Timber compiles your trained model to optimized C99, caches the shared library locally, and serves it over an Ollama-compatible REST API. Python never touches the inference hot path.
# Install
pip install timber-compiler
# Load & compile a model
timber load model.json --name fraud-detector
# Serve it
timber serve fraud-detector
# Query it
curl http://localhost:11434/api/predict \
-d '{"model": "fraud-detector", "inputs": [[1.0, 2.0, ...]]}'
Why Timber?
5 Framework Parsers
XGBoost, LightGBM, scikit-learn, CatBoost, and ONNX. Auto-detected from file extension and content.
6 Optimizer Passes
Dead leaf elimination, constant folding, threshold quantization, branch sorting, pipeline fusion, vectorization analysis.
3 Code Backends
C99 for servers & embedded, WebAssembly for browsers & edge, MISRA-C for safety-critical (automotive, medical).
Ollama-Style Serving
timber load → timber serve. REST API on port 11434. Same developer experience as Ollama, but for classical ML.
Zero Dependencies
Generated code needs only a C99 compiler. No runtime libraries, no dynamic allocation, no recursion. Thread-safe by design.
Audit Trails
Every compilation produces a deterministic JSON audit report with SHA-256 hashes, pass logs, and timing. Built for regulated industries.
How It Works
Timber treats your trained model as a program specification and compiles it through a classical compiler pipeline.