← All projects
Project record1 mention
Originally shared on Hacker News

Petrify

Petrify is a machine learning model compiler for the JVM. It reads models from ONNX or other model formats, walks tree or linear models, and encodes them as equivalent JVM bytecode in a stateless class that can be invoked directly. Unlike interpreter-based ONNX runtimes, it compiles models to native bytecode, yielding a much simpler setup with zero dependencies.

Last shared
01 / The problem

What it addresses

Existing ONNX runtimes are essentially interpreters that are huge (90+ MB), JNI-based, and drag in gargantuan dependencies.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Petrify

    Petrify is a machine learning model compiler for the JVM. It reads models from ONNX or other model formats, walks tree or linear models, and encodes them as equivalent JVM bytecode in a stateless class that can be invoked directly. Unlike interpreter-based ONNX runtimes, it compiles models to native bytecode, yielding a much simpler setup with zero dependencies.

    Problem: Existing ONNX runtimes are essentially interpreters that are huge (90+ MB), JNI-based, and drag in gargantuan dependencies.

    Posted by @exabrial · Original source ↗

    Source text · @exabrial · · Source ↗

    Petrify is a machine learning model compiler for the the JVM. It reads your model from an ONNX or other model format, walks the Trees or Linear models, and encodes the model in equivalent JVM bytecode as a stateless class you can invoke.