fnnx.ai

Open source · MIT licensed

An open ecosystem for machine learning.

Independent open-source libraries, each doing one thing well — train models, wield LLMs, ship them anywhere.

Explore on GitHub
01 / 04Open spec

FNNX

An open format for shipping any model — the thread through this ecosystem.

View on GitHub

Inside the artifact

A model is more than its weights.

model.fnnx

tar -tf model.fnnx

  • model.fnnx
  • ├── ops_artifacts/
  • │ └── classifier/
  • ├── variant_artifacts/

pick a member

model.fnnx/manifest.json

json

The contract — the variant and I/O every runtime honors.

{
    "variant": "pyfunc",
    "name": "sentiment-classifier",
    "version": "1.4.0",
    "inputs": [
        { "name": "text", "content_type": "NDJSON",
          "dtype": "Array[string]", "shape": [-1] }
    ],
    "outputs": [
        { "name": "label", "content_type": "NDJSON",
          "dtype": "Array[int64]", "shape": [-1] }
    ]
}
~
~
~
~
~
~

schema valid

  • 01

    Agnostic by design

    Independent of framework, platform, and language.

  • 02

    Strict to flexible

    pipeline for strict, portable graphs; pyfunc for flexible Python.

  • 03

    Open spec & SDKs

    A JSON-schema specification · SDKs for Python and JavaScript.

python

from fnnx.runtime import Runtime

Runtime("model.fnnx").compute(inputs, {})
  • serverpy · js
  • browserjs sdk
  • notebookpy sdk
  • edgeself-contained env
Read the spec

Join in

The format is open. So is the room.