Projects/ESA/Documentation

[ ESA / MLBRICKS KIT 1.0.0B1 ]

ESA API Reference

The current public layer, model, recurrent-generation and lifecycle interfaces.

DISTRIBUTIONmlbricks-kitDOCS VERSION1.0.0b1

ESA LAYER

Primary constructor.

PYTHON
ESA(
    embd,
    head=4,
    batch=None,
    block=None,
    backend="auto",
    precision="fp16",
    *,
    compass="auto",
    dropout=0.0,
    device="auto",
    auto_compile=False,
)

esais the lowercase constructor alias.

LAYER METHODS

layer(x)Full-sequence forward.
prefill(x, state=None, ...)Process a prompt/sequence and return output plus recurrent state.
decode_step(x, state)Advance one recurrent step.
set_backend(...)Set the public backend policy.
resolved_backend()Inspect the currently resolved route.
compile(mode="default")Compile the supported ESA path.

ESA MODEL

PYTHON
ESAModel(config=None, *, device="cuda", **kwargs)

ESAModelConfigcovers vocabulary size, context block, layer count, heads, embedding width, backend/precision settings, FFN/residual choices and training/generation options.

MODEL METHODS

model(input_ids, targets=None)Return logits and optional loss.
backend_report()/execution_plan()Inspect model routing.
prepare_execution(...)Prepare model execution routing.
prepare_generation(...)Prepare generation-oriented execution.
prefill(...)Run the model prefill path.
generate(...)Autoregressive generation helper.
model_info()Return model metadata.

LIFECYCLE

Use package-levelmlbricks.save,load,inspect,predict,generate,compileandquantize.ESAModel.save()andESAModel.load()are not public lifecycle APIs in 1.0.0b1.