Skip to main content

Module model

Module model 

Source
Expand description

bb::Model — Contract trait for ML models.

Each method takes the engine’s &mut RuntimeResourceRef<'_> ctx plus a CompletionHandle AND returns ContractResponse. See crate::contracts::index for the sync (Now) vs async (Later) semantics.

§Associated type: Tensor

One associated type covers input tensors, output tensors, parameter vectors, gradients, and deltas. Mixed-precision (e.g. f32 input + f16 weights + f32 output) is handled by wiring Codec nodes around the model in the Module body — not by multiplying associated types per port.

Traits§

Model
User-facing Contract trait for an ML model.