timber-compiler

Convert XGBoost, LightGBM, scikit-learn, CatBoost, and ONNX models into C99 inference binaries.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/EchoMura/timber --skill timber-compiler
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: timber-compiler
Source: https://github.com/EchoMura/timber/tree/main
Command: npx skills add https://github.com/EchoMura/timber --skill timber-compiler

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gcc, clang, pip, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill converts ML models from various frameworks (XGBoost, LightGBM, scikit-learn, CatBoost, ONNX) into self-contained C99 inference binaries, enabling fast and efficient model deployment.

Core Features & Use Cases

  • Model Compilation: Converts ML models into C99 binaries for zero-overhead inference.
  • HTTP Server: Serves compiled models through a simple Ollama-compatible API.
  • Fast Inference: Achieves single-sample latencies of ~2 µs, outperforming Python inference by over 336×.
  • Zero Runtime Dependencies: Binaries are self-contained with no external dependencies.
  • Use Case: Ideal for fraud detection systems, edge devices, and IoT applications where fast, reliable inference is critical.

Quick Start

Install timber-compiler with pip install timber-compiler. Use timber serve https://your-model-url to start serving the model. Make an inference request to http://localhost:11434/api/predict with the desired input data.

Frequently Asked Questions about timber-compiler

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compile a scikit-learn or XGBoost model into C code for fast inference?▼

To compile ML models for fast inference, you can convert frameworks like scikit-learn, XGBoost, LightGBM, CatBoost, and ONNX into self-contained C99 inference binaries, achieving zero-overhead execution and eliminating Python runtime delays.

What is the best way to deploy ML models on edge devices with low latency?▼

The best way to deploy ML models on edge devices is compiling them into C99 binaries, which creates self-contained executables with zero runtime dependencies and single-sample latencies of roughly 2 microseconds for critical applications.

Can I serve compiled ML models through an HTTP API?▼

Yes, you can serve compiled ML models through an HTTP API by starting a local server with a simple command, exposing an Ollama-compatible endpoint to handle prediction requests efficiently.

Do I need gcc or clang to compile ML models into C99 binaries?▼

Yes, you need a C compiler like gcc or clang along with Python 3.10+ and pip to compile ML models into C99 binaries, ensuring the environment supports the required compilation and dependency installation.

Why should I use C inference binaries instead of Python for model serving?▼

You should use C inference binaries instead of Python for model serving to achieve significantly faster execution speeds, outperforming Python inference by over 336 times while providing zero-overhead, self-contained deployment without external dependencies.

Does timber-compiler work with ONNX models?▼

Yes, timber-compiler works with ONNX models, supporting conversion from ONNX alongside XGBoost, LightGBM, scikit-learn, and CatBoost into C99 inference binaries for efficient deployment.