Native Elixir runtime for the Laya System-1 decision models.

Laya uses a fine-tuned ModernBERT encoder and a custom decision head. This package loads the encoder through Bumblebee and executes the published head with Nx, so no Python process is involved at inference time.

Summary

Functions

Downloads (on first use) and prepares a Laya checkpoint.

Runs all supplied typed questions in a single Laya batch.

Types

model()

@opaque model()

Functions

load(opts \\ [])

@spec load(keyword()) :: {:ok, model()} | {:error, Exception.t()}

Downloads (on first use) and prepares a Laya checkpoint.

:checkpoint is one of :english, :multilingual, or :typed_decisions. The English checkpoint is the default.

predict(model, state, questions)

@spec predict(model(), String.t() | map() | list(), map()) :: map()

Runs all supplied typed questions in a single Laya batch.