Realm
API

Machine learning

Models, autograd, losses, optimizers, metrics, and reinforcement learning.

Generated from rustdocNative Rust surface146 functions320 types33 enums98 constants & variables
This inventory is generated from public rustdoc declarations. Modules, structs, enums, traits, aliases, signatures, source comments, and source links follow the native Rust API.

Examples

Functions

Load a native OA .oam checkpoint into existing matching owners. The complete file, section hashes, tensor metadata, module paths, shapes, dtypes, and optimizer payload are validated before any live handle changes. engine remains the sole owner of newly uploaded storage. Errors Returns crate::ErrorKind::CheckpointCorrupt for malformed, truncated, or integrity-invalid .oam data. Returns another error for a valid file that does not match the destination model/optimizer, or for allocation/runtime and filesystem failures.

Save a module and its complete optimizer state in the native OA .oam format. Registration-derived parameter paths become the Weights index. Persistent module buffers become the State index; non-persistent buffers are excluded. This is an explicit host-observation boundary. The completed file is durably written to a sibling temporary path and atomically renamed. Errors Returns an error for ambiguous module ownership, optimizer/model mismatch, unsupported Matrix metadata, readback failure, arithmetic overflow, or a filesystem failure.

Types

3 members
0 members

Policy logits and scalar critic value produced from one observation batch.

Source
13 members
13 members

Decoupled-weight-decay Adam optimizer over stable Parameter handles.

Source
3 members
15 members

Deterministic byte-pair encoder compatible with OA’s oa_bpe_v1 files.

Source
22 members

Default two-tower categorical actor/critic MLP. Policy and value paths are independent Linear -> ReLU -> Linear -> ReLU -> Linear towers, matching OA C++.

Construct the checked default categorical actor/critic. Errors Returns an error for zero observation/hidden width, fewer than two actions, initializer overflow, allocation failure, or invalid child registration.

static
Source
3 members
12 members

Stateful checkpoint selection and bounded incremental-retention policy.

Source
3 members
0 members

Optimizer with a complete native .oam save-and-restore contract. This capability is sealed because persistence must remain synchronized with OA’s versioned model-file codec. Custom optimizers can implement Optimizer for eager training without claiming wire compatibility.

Source
8 members
0 members

One bounded continuous action and its differentiable policy statistics.

Source
0 members
String
Vec<usize>
Vec<u8>
Source
15 members

Checked shape, dtype, and range contract for one environment field. shape excludes the leading environment-batch dimension. An empty shape therefore represents one scalar per environment.

Source
11 members

Complete single-agent environment schema shared by native and adapter paths.

Source
6 members
5 members

Thread-affine reverse-mode recording scope. Constructing a tape selects it for operations on the current thread. GradientTape::backward closes the recording scope and records the corresponding backward operations into the originating engine’s eager batch.

Source
1 members

Registers an explicitly included MCP view over an existing training session. The server borrows session through its handlers and must be closed or destroyed first. oa/ml deliberately does not opt applications into the network control surface. Rebuild and preview remain absent until their checkpoint and completion contracts are admitted. Donor: oa::McpTraining.

Source
3 members
15 members
3 members
0 members

Private architecture metadata carried by an optimizer-free module artifact.

Source
7 members
13 members

Muon optimizer with Nesterov momentum and rank-two NS5 orthogonalization. Rank-two parameters use the donor Muon matrix pipeline. Other ranks use its fused momentum update; OA never silently delegates them to AdamW.

Source
3 members
2 members
2 members

Owned dotted path and host scalar that participates in module persistence. Scalar state is intended for small algorithmic counters and flags whose value affects the next device operation but does not belong in a Matrix buffer. It is traversed and checkpointed with the same deterministic module tree as parameters and buffers.

Source
10 members
6 members

Common behavior exposed by an OA optimizer to training policy. This contract deliberately excludes captured-program and persistence internals. Those capabilities depend on optimizer-specific state and are admitted separately only when their complete implementation exists.

Source
7 members
0 members

One categorical action and its differentiable policy statistics.

Source
4 members

A GPU-resident weight stored in OA’s native Q4 or Q8 block encoding. Constructed by quantize; the packed payload and scale planes are private implementation detail and never exposed as public matrix values.

Source
7 members
10 members
3 members
8 members
11 members
11 members
3 members
4 members
4 members
3 members
10 members
5 members
1 members

Bounded evaluation mode that restores the complete module tree on drop.

Source
12 members

Enums

Structural domain of one reinforcement-learning environment field.

Box · Discrete · Binary

OA native block quantization selector. Both formats share one 32-value block layout and one Float32 scale per block. Q4 stores a biased 4-bit index per value (16 bytes per block); Q8 stores one signed byte per value (32 bytes per block).

Q4 · Q8

Spatial interpolation mode for NCHW upsampling.

Nearest · Bilinear

Functions

Compute generalized advantage estimates over a fixed rollout. Termination disables value bootstrap. Termination and truncation both stop the reverse trace, while truncation deliberately retains one-step bootstrap. Errors Returns an error unless all inputs share one engine and one nonempty [time, environments] shape, values are F32, boundary masks are U8, both discounts are finite in [0, 1], and GPU recording succeeds.

Record generalized advantage estimation into caller-owned output storage. This is the allocation-free form used by fixed-capacity rollout storage. It has the same semantic identity and numerical contract as gae. Errors Returns the errors from gae, and rejects output matrices that do not match the rollout’s engine, F32 dtype, and shape or alias any input/each other.

Standardize a nonempty FP32 advantage tensor over all elements. The result is (advantage - mean) / sqrt(variance + epsilon). The operation remains device-resident and differentiable, and records one semantic identity over its composite Matrix lowering. Errors Returns an error when advantage is empty or not FP32, epsilon is not positive and finite, a size exceeds the admitted shader ABI, allocation fails, or composite lowering fails.

Types

Functions

Greedily decode one byte from each FP32 logit row. This is an explicit submission, completion, and compact host-read boundary. Errors Returns an error unless logits are rank-one [256] or rank-two [N, 256] FP32, or execution/readback fails.

Greedily decode logits and require exact UTF-8 output. Errors Returns the errors from decode or crate::ErrorKind::DataLoss when the decoded byte stream is not UTF-8.

Upload raw bytes as a rank-one U8 Matrix on this thread’s default engine. Errors Returns an error when the default engine cannot be initialized or when allocation or upload fails.

Upload raw bytes as one batched U8 sequence [1, S] on this thread’s default engine. Errors Returns an error when the default engine cannot be initialized or when allocation or upload fails.

Upload raw bytes as one batched U8 sequence [1, S] on a particular engine. Errors Returns an error when allocation or upload fails.

Upload raw bytes as a rank-one U8 Matrix on a particular engine. Errors Returns an error when allocation or upload fails.

Upload UTF-8 text without tokenization or normalization on this thread’s default engine. Errors Returns an error when the default engine cannot be initialized or when allocation or upload fails.

Upload UTF-8 text without tokenization or normalization on a particular engine. Errors Returns an error when allocation or upload fails.

Sample one byte from each FP32 logit row. Errors Returns an error for an invalid 256-class logit contract, sampling contract, execution, or readback failure.

Constants & Variables

Functions

Clip FP32 rewards to an inclusive finite range. Errors Returns an error for an empty/non-FP32 input, unordered/non-finite bounds, or Matrix/composite lowering failure.

Normalize and symmetrically clip FP32 observations. Computes clamp((observation - mean) / (stddev + epsilon), -clip, clip) through differentiable Core Matrix operations under one Environment semantic identity. Errors Returns an error for empty/non-FP32 inputs, invalid epsilon/clip, incompatible broadcasting or ownership, or composite lowering failure.

Types

8 members
20 members

Stateful native vector-environment behavior. Implementations own semantic environment state and embed exactly one EnvironmentExecution. Public default methods own transaction state, validation boundaries, submission, and rollback; implementations only author reset/step/reset-completed commands and transactional host metadata.

Source
5 members

Private command transaction and exact completion state for one environment. Native environments embed this value and expose it through Environment. It borrows the canonical Engine recorder for each active transaction; it does not own another queue, allocator, scheduler, or execution graph.

Source
15 members

Checked shape, dtype, and range contract for one environment field. shape excludes the leading environment-batch dimension. An empty shape therefore represents one scalar per environment.

Source
11 members

Complete single-agent environment schema shared by native and adapter paths.

Source
6 members
2 members
4 members
30 members

Device-resident trading dynamics over one Engine and the canonical lifecycle. Observations append signed exposure, equity/capital, peak/capital, drawdown, remaining horizon, unrealized PnL/capital, position age/horizon and peak unrealized position PnL/capital.

Source
5 members
3 members
2 members
4 members

Versioned complete analytical lane state, bound to source tables/config. Snapshot only at exact completion; consumers persist this alongside model, optimizer, PPO action cursor and their own source-receipt identity.

Source

Enums

Structural domain of one reinforcement-learning environment field.

Box · Discrete · Binary

Constants & Variables

Functions

Deterministically evaluate a categorical policy and return compact telemetry. The complete horizon is recorded and submitted once, followed by one exact wait and three compact rollout readbacks. Greedy action selection uses the donor temperature-zero route. The environment remains open and idle. Errors Returns an error for zero horizon/lanes, a non-discrete environment, model ownership mismatch, environment/model/policy/rollout recording failure, submission/wait failure, readback failure, or counter overflow.

Types

Functions

Advance one explicit Euler step: state + velocity * delta_time. Errors Returns an error unless state and velocity are matching nonempty same-engine F32 matrices, delta_time is finite, and recording succeeds.

Construct x(t) = clean + t * (noise - clean) and v = noise - clean. A rank-one time vector matching the batch dimension expands across every non-batch axis. Scalars and ordinarily broadcastable time shapes are also accepted. Errors Returns an error unless every input is same-engine F32, clean and noise are matching and nonempty, time broadcasts to them, and recording succeeds.

Compute mean squared error over broadcast-selected valid elements. The mask contributes its values to the denominator. An all-zero mask returns exact zero by clamping the denominator to one. Target and mask are detached; reverse mode differentiates only prediction. Errors Returns an error unless prediction and target are matching nonempty same-engine F32 matrices, mask is same-engine F32 and broadcastable to prediction, and recording succeeds.

Types

0 members

Linear flow state and its constant path velocity.

Source

Functions

Compute mean binary cross entropy over matching FP32 probability matrices. Predictions use the donor’s [1e-7, 1 - 1e-7] numerical clamp. Targets are treated as detached; reverse mode differentiates only the prediction. Errors Returns an error for empty, mismatched, non-FP32, or cross-engine inputs, or when allocation or runtime recording fails.

Compute mean cross-entropy over rank-two FP32 logits and U32 or I32 class targets. logits has shape [N, C], targets has shape [N], and the returned matrix is an FP32 scalar. I32 targets must be non-negative; any negative or out-of-range target produces NaN without an out-of-bounds access. Errors Returns an error when ranks, shapes, dtypes, ownership, allocation, or runtime recording are invalid.

Compute mean cross-entropy over the rows selected by a floating FP32 mask. logits has shape [N, C]; targets and mask have shape [N]. A zero mask value excludes its row and produces an exact-zero logits adjoint. valid_count is the caller-provided normalization denominator and must be in 1..=N; it is not read back or recomputed from device storage. Reverse mode differentiates only logits. Errors Returns an error when ranks, shapes, dtypes, ownership, valid_count, allocation, or runtime recording are invalid.

Compose the donor DQN selected-action and detached Bellman-target loss. Termination suppresses next-state bootstrap. Truncation deliberately keeps bootstrap because it ends only the current trace, not the underlying task. Reverse mode therefore connects loss and selected_q only to q. Errors Returns an error unless Q and next-Q are same-engine nonempty F32 [B,A] matrices with A > 1, action is I32 [B], reward is F32 [B], boundary masks are U8 [B], all fields share one engine, extents fit the shader ABI, and discount is finite in [0, 1].

Compute mean absolute error for matching FP32 matrices. The target is treated as detached; reverse mode differentiates only the prediction. Equal prediction and target values use the zero subgradient. Errors Returns an error for empty, mismatched, non-FP32, or cross-engine inputs, or when allocation or runtime recording fails.

Compute mean squared error for matching FP32 matrices. The target is treated as detached; reverse mode differentiates only the prediction. Errors Returns an error for empty, mismatched, non-FP32, or cross-engine inputs, or when allocation or runtime recording fails.

Compose PPO policy, value, entropy, and total losses. All four outputs are FP32 scalars under one semantic PPO operation. Old log probability, advantage, and target return remain detached by their child operation contracts. Errors Returns an error unless all rollout fields are matching nonempty same-engine FP32 matrices and every coefficient is valid.

Compute the donor entropy-regularized SAC actor objective. The scalar result is mean(alpha * log_probability - min(q1, q2)) and is differentiable through all three inputs. Errors Returns an error unless inputs are matching nonempty same-engine F32 vectors, entropy coefficient is finite and non-negative, and lowering succeeds.

Compose the donor twin-critic SAC objective. The target is reward + discount * (min(next_q1, next_q2) - alpha * next_log_probability) outside terminal states. Truncation retains that bootstrap. All next-state target fields are detached from reverse mode. Errors Returns an error unless all numerical fields are matching nonempty same-engine F32 vectors, both boundary masks are matching U8 vectors, discount is finite in [0, 1], entropy coefficient is non-negative and finite, the batch fits the shader ABI, and lowering succeeds.

Compute mean unit-beta Smooth L1 loss for matching FP32 matrices. The target is treated as detached; reverse mode differentiates only the prediction. Errors Returns an error for empty, mismatched, non-FP32, or cross-engine inputs, or when allocation or runtime recording fails.

Types

4 members
0 members

Selected action values, detached targets, and scalar DQN loss.

Source
4 members
0 members

PPO loss components retained for metrics and reverse mode.

Source
0 members

Detached target and twin-critic SAC loss components.

Source
4 members

Functions

Adaptively average-pool an NCHW Matrix to an exact spatial extent. Each output bin independently uses floor/ceiling boundaries along height and width. This supports rectangular and non-divisible geometry without approximating the operation as a square fixed-window pool. Errors Returns an error unless the input is nonempty rank-four F32, both output extents are nonzero, all geometry fits the shader ABI, or recording fails.

Apply two-dimensional average pooling to an NCHW Matrix. Padding positions do not contribute to either the sum or divisor. The output spatial extent is floor((input + 2 * padding - kernel_size) / stride) + 1, matching the OA C++ operation. Errors Returns an error unless input is a nonempty rank-four F32 Matrix, kernel_size and stride are nonzero, the kernel fits the padded input, every shader extent is representable, or runtime recording fails.

Normalize an NCHW Matrix using statistics computed from the current batch. Errors Returns an error unless input is nonempty rank-four F32, weight and bias are same-engine F32 channel vectors, epsilon is finite and positive, or runtime recording fails.

Normalize an NCHW Matrix using explicit per-channel statistics. This is the stateless inference form used by crate::ml::nn::BatchNorm2d in evaluation mode. Errors Returns an error unless every value is same-engine F32, the channel-vector shapes match the input, epsilon is finite and positive, or runtime recording fails.

Multiply corresponding matrices in rank-three batches. Computes [N, M, K] @ [N, K, P] -> [N, M, P]. Errors Returns an error unless inputs are compatible nonempty same-engine F32 matrices, shape arithmetic fits the shader ABI, or runtime recording fails.

Multiply rank-three batches with right-transposed storage. Computes [N, M, K] @ [N, P, K]^T -> [N, M, P]. Errors Returns an error unless inputs are compatible nonempty same-engine F32 matrices, shape arithmetic fits the shader ABI, or runtime recording fails.

Multiply rank-three batches with left-transposed storage. Computes [N, K, M]^T @ [N, K, P] -> [N, M, P]. Errors Returns an error unless inputs are compatible nonempty same-engine F32 matrices, shape arithmetic fits the shader ABI, or runtime recording fails.

Causal kernel-trick attention on raw Q/K/V [BH,S,Dh]. Uses phi(x) = x+1 for nonnegative x and exp(x) otherwise, with max(dot(phi(Q), prefix_sum(phi(K))), epsilon) normalization. Values are not feature-mapped. The fused provider admits 1 <= Dh <= 64; sequence length has no provider cap. It saves Q/K/V, context and one denominator per row for deterministic prefix/suffix reverse mode, never a KV prefix history. Errors Returns an error for unequal/empty shapes, non-F32 or mixed-engine values, head dimension above 64, nonpositive/nonfinite epsilon, shader ABI overflow, allocation or recording failure.

Normalize the channel axis of a nonempty FP32 [B, C, T] Matrix. Errors Returns an error unless the affine vectors match C, all values belong to one Engine, epsilon is finite and positive, C <= 1024, or recording fails.

Normalize the channel axis of [B, C, T] and fuse the following ReLU. Errors Returns an error under the same conditions as channel_norm, or when runtime recording fails.

Apply one-dimensional convolution to an NCL Matrix through im2col and GEMM. weight uses [output_channels, input_channels, kernel] layout and bias uses [output_channels]. Dilation applies within each kernel window. Errors Returns an error unless all inputs are nonempty same-engine F32 matrices, shapes agree, stride and dilation are nonzero, the effective kernel fits the padded input, every extent fits the shader ABI, or recording fails.

Apply grouped two-dimensional convolution to an NCHW Matrix. weight uses [output_channels, input_channels / groups, kernel, kernel] layout and bias uses [output_channels]. The output spatial extent is floor((input + 2 * padding - kernel) / stride) + 1. Errors Returns an error unless all inputs are same-engine F32 matrices, shapes and group divisibility agree, the square kernel fits the padded input, every extent fits the shader ABI, or runtime recording fails.

Apply bias-free one-dimensional transposed convolution to an NCL Matrix. weight uses [input_channels, output_channels, kernel] layout. The output length is (input_length - 1) * stride - 2 * padding + effective_kernel. Errors Returns an error unless both inputs are nonempty same-engine F32 matrices, channel geometry agrees, stride and dilation are nonzero, the output extent is positive and fits the shader ABI, or runtime recording fails.

Apply two-dimensional transposed convolution to an NCHW Matrix. weight uses [input_channels, output_channels, kernel, kernel] layout and bias uses [output_channels]. Each output spatial extent is (input_extent - 1) * stride - 2 * padding + kernel. Errors Returns an error unless all inputs are nonempty same-engine F32 matrices, channel and square-kernel geometry agree, stride is nonzero, output extents are positive and fit the shader ABI, or runtime recording fails.

Materialize a Float32 matrix with the logical shape retained by input. Errors Returns an error for an empty weight, oversized element counts, or allocation/recording failure.

Return a zero-copy stop-gradient view. The returned Matrix shares storage and forward values with input, but owns a fresh semantic identity with no reverse-mode edge to input. Errors Returns an error only if the input’s existing shape metadata is invalid.

Apply the exponential linear unit elementwise. Errors Returns an error unless input is F32 or runtime recording fails.

Apply the explicit causal Flash provider to [BH,S,Dh] values. This compatibility entry point retains the same semantic scaled-dot-product attention identity as scaled_dot_product_attention. It materializes only the output and one FP32 log-sum-exp value per query row. Errors Returns an error unless Q, K, and V are equal nonempty same-engine F32 matrices, the sequence length is at most 1024, or runtime recording fails.

Apply the tanh-approximate Gaussian error linear unit elementwise. Errors Returns an error unless input is F32 or runtime recording fails.

Apply one bias-free projection per expert to expert-major packed rows. input is F32 [R, K], weight is F32 [E, N, K], and offsets is the U32 [E+1] boundary output from crate::matrix::moe_expert_plan. The result is F32 [R, N]. Errors Returns an error for incompatible shapes, dtypes, engine ownership, shader ABI overflow, allocation failure, or runtime recording failure.

Apply one affine projection per expert to expert-major packed rows. input is F32 [R, K], weight is F32 [E, N, K], bias is F32 [E, N], and offsets is the U32 [E+1] boundary output from crate::matrix::moe_expert_plan. The result is F32 [R, N]. Errors Returns an error for incompatible shapes, dtypes, engine ownership, shader ABI overflow, allocation failure, or runtime recording failure.

Apply one GRU cell update to a caller-supplied hidden state. gates_i has shape [batch, 3 * hidden], hidden has [batch, hidden], weight_hh has [3 * hidden, hidden], and an optional recurrent bias has [3 * hidden]. Errors Returns an error unless all values are nonempty same-engine F32 matrices, shapes agree, hidden size is at most 1024, or runtime recording fails.

Run a whole-sequence GRU recurrence from a zero hidden state. gates_i has shape [batch, sequence, 3 * hidden], weight_hh has [3 * hidden, hidden], and an optional bias_hh has [3 * hidden]. Gate order is reset, update, candidate. Errors Returns an error unless all values are nonempty same-engine F32 matrices, shapes agree, hidden size is at most 1024, or runtime recording fails.

Apply Leaky ReLU elementwise with the requested negative slope. Errors Returns an error unless input is F32 or runtime recording fails.

Run the shared-state Mamba-3 MIMO selective scan. C/B use [B,L,R*G,N]; the three MIMO projections use [H,R,P]; the output-normalization weight always uses [H,P] and is consumed only when config.has_output_norm is true. The remaining layouts match mamba3_siso. Errors Returns an error for mismatched geometry, rank outside 1..=8, unsupported dimensions, shape overflow, or failed runtime recording.

Split and transform one packed Mamba-3 input projection. projected has shape [rows, projected_width], where `projected_width = 2inner_size + 2num_groupsmimo_rankstate_size 3*num_heads + num_rope_angles. dt_bias` has one element per head. The operation records one semantic node and one physical dispatch. Errors Returns an error for invalid configuration, incompatible shape, dtype or Engine ownership, arithmetic overflow, or failed runtime recording.

Compute the packed projection and dt-bias adjoints for Mamba-3 preprocess. output_gradients follows the exact eight shapes returned by mamba3_preprocess. Its dt-bias reduction is ordered by increasing row. Errors Returns an error for invalid configuration, incompatible gradients, shape, dtype or Engine ownership, arithmetic overflow, or failed runtime recording.

Run the Mamba-3 SISO selective-state recurrence. Operand layouts are C/B [B,L,G,N], x/z/output [B,L,H,P], A-times-dt/dt/trap [B,L,H], angle [B,L,A], C/B bias [H,N], and D [H]. All operands are same-engine F32 matrices. Errors Returns an error for mismatched geometry, unsupported dimensions, shape overflow, or failed runtime recording.

Advance one Mamba-3 SISO token and update four explicit recurrent states. Operand layouts are the length-one forms accepted by mamba3_siso. State layouts are SSM [B,H,P,N], cumulative angle [B,H,A], previous key [B,H,N], and previous value [B,H,P]. The states are mutated only after the complete operation has been validated and recorded. Errors Returns an error unless config.sequence_length == 1, every operand and state has the configured same-engine F32 shape, or recording fails.

Multiply [..., K] Float32 activations by a quantized [N, K] weight without materializing a Float32 weight matrix. The result shape is [..., N]. Errors Returns an error unless the weight has rank 2, the input has rank at least 2 with a matching last dimension, all planes are contiguous base storage on one engine, the flattened dimensions fit the u32 kernel ABI, or allocation/recording fails.

Apply two-dimensional max pooling to an NCHW Matrix. Equal maxima select the first valid input in row-major window order. The returned U32 argmax indices are explicit because they are part of the donor operation contract and make the deterministic adjoint reusable. Errors Returns an error under the same geometry and runtime conditions as avg_pool_2d.

Invert split_heads into contiguous [B*S, H*(D/H)] storage. The one-head case is a zero-copy differentiable view. Errors Returns an error unless input is nonempty F32 [B*H, S, D/H] with the supplied nonzero dimensions, or runtime recording fails.

Apply Mish elementwise. Errors Returns an error unless input is F32 or runtime recording fails.

Combine expert-major packed rows into token-major output using route gates. packed is F32 [T*K, D], route_gate is F32 [T, K], and the U32 maps come from crate::matrix::moe_expert_plan. Errors Returns an error for incompatible shapes, dtypes, engine ownership, shader ABI overflow, allocation failure, or runtime recording failure.

Pack token rows into stable expert-major route order. input is F32 [T, D]; packed_token and inverse are the U32 [T*K] maps produced by crate::matrix::moe_expert_plan. inverse is retained for the deterministic reverse pass and is not read by the forward kernel. Errors Returns an error for incompatible shapes, dtypes, engine ownership, shader ABI overflow, allocation failure, or runtime recording failure.

Normalize probabilities over the selected experts for each token. probabilities is F32 [T, E]; expert_indices is I32 [T, K] with 1 <= K <= E. The routing decision is detached from reverse mode, while gradients propagate to the selected probability entries. Errors Returns an error for incompatible shapes, dtypes, engine ownership, shader ABI overflow, allocation failure, or runtime recording failure.

Quantize Float32 storage into one native OA Q4 or Q8 weight value. The returned value retains the source shape; its physical planes remain private. Errors Returns an error unless the input is a non-empty Float32 matrix whose element byte offsets fit the u32 kernel ABI, or allocation/recording fails.

Apply the rectified linear unit elementwise. Errors Returns an error unless input is F32 or runtime recording fails.

Apply weighted root-mean-square normalization over the final dimension. Errors Returns an error unless input is a nonempty F32 Matrix, weight is a same-engine F32 vector matching its final dimension, epsilon is finite and positive, or runtime recording fails.

Apply per-row RMS normalization, a cyclic broadcast affine, and a SiLU gate. Normalization is over the final input dimension. The affine value may have one or more leading groups; those groups repeat over the flattened input rows. An optional bias must exactly match weight. Errors Returns an error for incompatible shape, dtype, Engine ownership or epsilon, or when runtime recording fails.

Apply one Elman RNN cell update to a caller-supplied hidden state. gates_i and hidden have shape [batch, hidden], weight_hh has [hidden, hidden], and an optional recurrent bias has [hidden]. Errors Returns an error unless all values are nonempty same-engine F32 matrices, shapes agree, hidden size is at most 1024, or runtime recording fails.

Run a whole-sequence Elman recurrence from a zero hidden state. gates_i has shape [batch, sequence, hidden], weight_hh has [hidden, hidden], and an optional recurrent bias has [hidden]. Errors Returns an error unless all values are nonempty same-engine F32 matrices, shapes agree, hidden size is at most 1024, or runtime recording fails.

Apply split-half rotary position embeddings to [tokens, heads * head_dim]. position_offset selects the first absolute position, making the same operation usable for full sequences and future KV-cache extension. Errors Returns an error unless the input is nonempty F32, head_dim is even, the final width matches num_heads * head_dim, and theta_base is finite and positive.

Apply standard scaled dot-product attention to [B*H, S, D/H] values. additive_mask, when present, is detached F32 [B*H*S, S] storage. Causal visibility is applied without materializing another mask. Errors Returns an error unless Q, K, and V are equal nonempty same-engine F32 rank-three matrices, the optional mask matches their flattened score rows, or runtime recording fails.

Apply multi-head causal scaled dot-product attention to packed [B*S, D] values. Errors Returns an error unless Q, K, and V are equal nonempty same-engine F32 matrices, their row count is divisible by sequence_length, their width is divisible by num_heads, or runtime recording fails.

Apply the logistic sigmoid elementwise. Errors Returns an error unless input is F32 or runtime recording fails.

Apply the sigmoid linear unit elementwise. Errors Returns an error unless input is F32 or runtime recording fails.

Apply SiLU(gate) * up to concatenated halves of the final input axis. Errors Returns an error unless input is F32 with final extent exactly twice the nonzero intermediate_size, or runtime recording fails.

Compute softmax(scores * scale + mask) over the final axis. The additive mask is detached from reverse mode. Errors Returns an error unless both values are equal-shape, nonempty, same-engine F32 matrices, or runtime recording fails.

Apply the overflow-safe Softplus formulation elementwise. Errors Returns an error unless input is F32 or runtime recording fails.

Permute contiguous [B*S, D] storage into [B*H, S, D/H] heads. The one-head case is a zero-copy differentiable view. Errors Returns an error unless input is nonempty F32 [B*S, D], all dimensions are nonzero, D is divisible by num_heads, or runtime recording fails.

Apply SiLU(gate) * up elementwise. Errors Returns an error unless both inputs are equal-shape F32 on the same engine, or runtime recording fails.

Apply hyperbolic tangent elementwise. Errors Returns an error unless input is F32 or runtime recording fails.

Upsample an FP32 NCHW Matrix by a positive integer scale factor. Errors Returns an error unless the input is nonempty rank-four F32, the scale factor is positive, all output geometry is representable, or runtime recording fails.

Assign every FP32 latent row to its nearest FP32 codebook row. Squared L2 distance is used and equal-distance ties select the lower code index, matching OA C++. The hard assignment is detached from reverse mode. Errors Returns an error unless inputs are nonempty same-engine FP32 [N,D] and [K,D] matrices or recording/allocation fails.

Produce the next VQ EMA state without mutating input Matrix values. This preserves the donor update equations, optional unit-RMS codebook normalization, and exact dead-code revival hash. The owning module installs the returned values into its stable persistent buffer handles. Errors Returns an error for incompatible shapes, dtypes, engines, invalid numerical options, ABI overflow, allocation failure, or runtime recording failure.

Gather codebook rows selected by I32 token indices. Invalid indices yield zero rows without an out-of-bounds read. This pure decode operation is detached from reverse mode because EMA owns codebook learning. Errors Returns an error unless the codebook is FP32 [K,D], indices are I32 [N], both belong to one engine, or recording/allocation fails.

Types

0 members
0 members

Complete adjoints of channel-axis normalization over BCT storage.

Source
0 members

The fifteen explicit adjoints of mamba3_mimo.

Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Source
0 members

Input adjoints produced by the fused Mamba-3 projection preprocess.

Source
3 members
1 members
0 members
4 members

A GPU-resident weight stored in OA’s native Q4 or Q8 block encoding. Constructed by quantize; the packed payload and scale planes are private implementation detail and never exposed as public matrix values.

Source
0 members

Complete adjoints of broadcast-affine gated RMS normalization.

Option<Matrix>
Matrix
Source
0 members

The eleven explicit adjoints of mamba3_siso.

Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Source
3 members
0 members

Nearest-code indices and gathered code vectors.

Source
0 members

Functionally updated persistent EMA state.

Source

Enums

OA native block quantization selector. Both formats share one 32-value block layout and one Float32 scale per block. Q4 stores a biased 4-bit index per value (16 bytes per block); Q8 stores one signed byte per value (32 bytes per block).

Q4 · Q8

Spatial interpolation mode for NCHW upsampling.

Nearest · Bilinear

Types

Functions

Compute last-axis categorical accuracy as a fraction in [0, 1]. Argmax and counting execute on the owning device. Only the resulting U32 scalar crosses the host boundary; this function then waits for that scalar. Equal maximum logits select the first class, matching the OA C++ contract. Errors Returns an error when matrix::categorical_accuracy_count rejects the logits or labels, or submission, completion, or scalar readback fails.

Read one scalar FP32 loss value. This is an explicit host-observation boundary: pending work is submitted and the producing event is awaited before the value is returned. Errors Returns an error unless loss contains exactly one F32 value, or submission, completion, or readback fails.

Types

20 members

Parameterless adaptive average-pooling module for NCHW matrices.

Source
3 members

Caller-owned incremental-decode key/value cache for MultiHeadAttention. Each MultiHeadAttention::step call appends one [B*H, 1, D/H] key/value pair and attends over every cached position. The cache binds to the constructing module instance; presenting it to another attention module fails closed.

Source
21 members

Parameterless two-dimensional average-pooling module for NCHW matrices.

Source
29 members

Trainable FP32 BatchNorm over channels of NCHW matrices.

Construct BatchNorm2d with epsilon 1e-5 and momentum 0.1. Errors Returns an error when num_features is zero or state allocation fails.

static

Construct BatchNorm2d with epsilon 1e-5 and momentum 0.1. Errors Returns an error when num_features is zero or state allocation fails.

static
Source
21 members

Fixed 256-row trainable embedding for packed U8 or U32 byte IDs.

Construct a deterministically initialized byte embedding. Errors Returns an error when embedding_dim is zero or initialization fails.

static
Source
21 members

Trainable affine output head from hidden rows to 256 byte logits.

Construct a deterministically initialized byte head. Errors Returns an error when input_features is zero or initialization fails.

static
Source
29 members

Multi-head linear attention over packed [B*S, D] values. Uses the Katharopoulos (2020) ELU+1 kernel rather than softmax. Causal heads up to 64 use fused forward and recomputed prefix/suffix adjoints. Saved projections/context scale as O(BHSd), with bounded O(d²) scan state per head. Larger heads retain the compositional path, whose training tape saves O(BHSd²) prefixes. Bidirectional mode uses the global KV composition. Standard attention stores S² probabilities; Flash recomputes them and does not store a global S² score matrix. Parameter layout Four biased projections (q_proj, k_proj, v_proj, out_proj) with the same names and seed stride as MultiHeadAttention, so checkpoints are transferable between the two modules.

Construct four biased projections with causal visibility. Errors Returns an error unless dimensions are positive, model_width is divisible by num_heads, or child construction/registration fails.

static

Construct four biased projections with causal visibility. Errors Returns an error unless dimensions are positive, model_width is divisible by num_heads, or child construction/registration fails.

static

Construct four biased projections with causal visibility. Errors Returns an error unless dimensions are positive, model_width is divisible by num_heads, or child construction/registration fails.

static

Construct four biased projections with causal visibility. Errors Returns an error unless dimensions are positive, model_width is divisible by num_heads, or child construction/registration fails.

method

Construct four biased projections with causal visibility. Errors Returns an error unless dimensions are positive, model_width is divisible by num_heads, or child construction/registration fails.

method

Construct four biased projections with causal visibility. Errors Returns an error unless dimensions are positive, model_width is divisible by num_heads, or child construction/registration fails.

method
Source
28 members

Trainable FP32 one-dimensional convolution over NCL matrices.

Construct a deterministically initialized Conv1d layer. Forward preserves OA’s im2col plus tiled-GEMM route. Weight uses a fan-in-scaled symmetric uniform initializer and bias starts at zero. Errors Returns an error when dimensions, stride, or dilation are zero, shape arithmetic overflows, or allocation/upload fails.

static
Source
28 members

Trainable grouped FP32 two-dimensional convolution over NCHW matrices.

Construct a deterministically initialized grouped Conv2d layer. The weight initializer is symmetric uniform with bound 1 / sqrt((input_channels / groups) * kernel_size²); bias starts at zero. Errors Returns an error when dimensions are zero, channels are not divisible by groups, shape arithmetic overflows, or allocation/upload fails.

static
Source
26 members

Trainable bias-free FP32 one-dimensional transposed convolution over NCL matrices.

Construct a deterministically initialized ConvTranspose1d layer. Weight uses the donor [input_channels, output_channels, kernel] layout, a fan-in-scaled symmetric uniform initializer, and no bias parameter. Errors Returns an error when channels, kernel size, or stride are zero, shape arithmetic overflows, or parameter allocation/upload fails.

static
Source
27 members

Trainable FP32 two-dimensional transposed convolution over NCHW matrices.

Construct a deterministically initialized ConvTranspose2d layer. Weight uses [input_channels, output_channels, kernel, kernel] layout, a fan-in-scaled symmetric uniform initializer, and zero channel bias. Errors Returns an error when channels, kernel size, or stride are zero, shape arithmetic overflows, or parameter allocation/upload fails.

static
Source
19 members

Inverted Dropout with explicit train/eval behavior.

Source
23 members

Trainable FP32 lookup table indexed by an arbitrary-shape U8, U32, or I32 matrix.

Construct a deterministically initialized embedding table. Errors Returns an error when either dimension is zero, shape arithmetic overflows, or allocation/upload fails.

static

Construct a deterministically initialized embedding table. Errors Returns an error when either dimension is zero, shape arithmetic overflows, or allocation/upload fails.

method

Construct a deterministically initialized embedding table. Errors Returns an error when either dimension is zero, shape arithmetic overflows, or allocation/upload fails.

method

Construct a deterministically initialized embedding table. Errors Returns an error when either dimension is zero, shape arithmetic overflows, or allocation/upload fails.

method

Construct a deterministically initialized embedding table. Errors Returns an error when either dimension is zero, shape arithmetic overflows, or allocation/upload fails.

method
Source
24 members

OA’s embedding-plus-hybrid-Mamba core with one canonical Rust execution path. The stack interleaves Mamba-3 blocks with evenly spaced causal self-attention blocks (Nemotron-style), each followed by a dense or routed-expert feed-forward tail. Whole-sequence forward runs through the module graph; single-token decode threads caller-owned EmpyrealmState through step/step_embedded.

Construct a deterministic token embedding and hybrid mixer stack. Errors Returns an error for invalid schedule/width/routing configuration or when a child module cannot be constructed or registered.

static
Source
4 members

Layer schedule and widths for the hybrid Empyrealm stack. attention_every interleaves one causal self-attention block after every attention_every - 1 Mamba-3 blocks, at positions k * attention_every - 1; zero produces a pure Mamba-3 stack. Every block owns a pre-normalized residual mixer plus a dense or routed-expert feed- forward tail, and the stack ends in a final RMSNorm.

Source
2 members

Caller-owned per-block decode state for Empyrealm. Entries mirror the block schedule one to one: Mamba-3 blocks own a Mamba3State and attention blocks own an AttentionCache. Obtaining it through Empyrealm::new_state binds it to that module instance and keeps every child owner check intact.

Source
21 members

Pre-normalized SwiGLU feed-forward network with a residual connection. The module preserves the OA donor structure: RMSNorm -> (gate, up) -> SwiGLU -> down -> residual add.

Construct a deterministically initialized donor-compatible FFN. Errors Returns an error for invalid dimensions or epsilon, or when child construction or registration fails.

static
Source
20 members

Flatten an inclusive range of Matrix dimensions into one dimension. Negative dimensions are resolved from the end at call time. The donor default (1, -1) preserves a leading batch dimension.

Source
24 members

Trainable flow/diffusion denoiser with optional condition features and CFG.

Construct a deterministic dense or MoE denoiser. Errors Returns an error for invalid model/time/dropout geometry or failed child, parameter, and buffer construction.

static

Construct a deterministic dense or MoE denoiser. Errors Returns an error for invalid model/time/dropout geometry or failed child, parameter, and buffer construction.

method

Construct a deterministic dense or MoE denoiser. Errors Returns an error for invalid model/time/dropout geometry or failed child, parameter, and buffer construction.

method

Construct a deterministic dense or MoE denoiser. Errors Returns an error for invalid model/time/dropout geometry or failed child, parameter, and buffer construction.

method

Construct a deterministic dense or MoE denoiser. Errors Returns an error for invalid model/time/dropout geometry or failed child, parameter, and buffer construction.

method
Source
4 members
21 members

GPU sinusoidal embedding for normalized continuous flow time.

Construct the donor sinusoidal time embedding. Errors Returns an error unless embedding_dim is positive and even, max_period is finite and greater than one, and time_scale is finite and positive.

static
Source
25 members

Reusable bidirectional Transformer backbone for flow/diffusion denoisers.

Construct a deterministic dense or dropless-MoE flow Transformer. Errors Returns an error for invalid geometry, expert routing, epsilon, or failed child construction and registration.

static

Construct a deterministic dense or dropless-MoE flow Transformer. Errors Returns an error for invalid geometry, expert routing, epsilon, or failed child construction and registration.

method

Construct a deterministic dense or dropless-MoE flow Transformer. Errors Returns an error for invalid geometry, expert routing, epsilon, or failed child construction and registration.

method

Construct a deterministic dense or dropless-MoE flow Transformer. Errors Returns an error for invalid geometry, expert routing, epsilon, or failed child construction and registration.

method

Construct a deterministic dense or dropless-MoE flow Transformer. Errors Returns an error for invalid geometry, expert routing, epsilon, or failed child construction and registration.

method
Source
4 members
18 members

Gaussian error linear unit module using OA’s tanh approximation.

Source
26 members

Stacked batch-first gated recurrent unit using whole-sequence GPU scans. Input uses [batch, sequence, input]; output uses [batch, sequence, hidden]. Every layer starts from a zero hidden state.

Construct a deterministically initialized stacked GRU. Errors Returns an error when a dimension or layer count is zero, hidden size exceeds the 1024-element scan limit, arithmetic overflows, or parameter allocation and registration fail.

static
Source
25 members

One gated recurrent unit cell with an explicit caller-owned hidden state.

Construct a deterministically initialized GRU cell. Errors Returns an error when dimensions are zero, hidden size exceeds 1024, arithmetic overflows, or parameter allocation fails.

static
Source
18 members

Return the input value unchanged.

Source
26 members

Trainable FP32 LayerNorm over the final input dimension.

Construct a LayerNorm with unit weight and zero bias. Errors Returns an error when normalized_shape is zero, epsilon is not finite and positive, or parameter allocation/upload fails.

static
Source
28 members

Trainable FP32 affine projection using [output, input] weight layout.

Construct a deterministically initialized linear layer. seed controls an independent SplitMix64 Xavier-uniform initializer. Errors Returns an error when either feature count is zero, shape arithmetic overflows, or parameter allocation/upload fails.

static

Construct a deterministically initialized linear layer. seed controls an independent SplitMix64 Xavier-uniform initializer. Errors Returns an error when either feature count is zero, shape arithmetic overflows, or parameter allocation/upload fails.

static
Source
19 members

Parameterless axis-aware LogSoftmax module.

Source
25 members

Parameter-owning Mamba-3 selective state-space block.

Construct a deterministically initialized Mamba-3 block. The module preserves the donor parameter layout and complete projection → preprocess → SISO scan → optional gated per-head RMSNorm → output-projection path. seed owns an independent deterministic initializer stream. Errors Returns an error for invalid or overflowing geometry, invalid numerical bounds, or failed allocation/registration.

static
Source
4 members
1 members

Explicit recurrent cache for one Mamba3 module and batch size. The cache owns the selective state, cumulative rotary angle, previous key, and previous value buffers. It is deliberately separate from the module so independent decoding streams never share hidden mutable state.

Source
21 members

Parameterless two-dimensional max-pooling module for NCHW matrices.

Source
45 members

Sparse top-k mixture-of-experts feed-forward module. The implementation preserves OA’s expert-major route plan and stacked parameter layout. Routing decisions remain detached while gradients flow through selected gate magnitudes, expert projections, RMSNorm, and the residual input.

Construct a deterministically initialized sparse MoE. experts_per_token is clamped to 1..=num_experts, matching OA C++. The current GPU route planner admits at most 256 experts. Errors Returns an error for zero dimensions, more than 256 experts, invalid epsilon, shape overflow, allocation failure, or registration failure.

static

Construct a deterministically initialized sparse MoE. experts_per_token is clamped to 1..=num_experts, matching OA C++. The current GPU route planner admits at most 256 experts. Errors Returns an error for zero dimensions, more than 256 experts, invalid epsilon, shape overflow, allocation failure, or registration failure.

static
Source
8 members
36 members

Multi-head self-attention over packed [B*S, D] values.

Construct four biased projections with causal visibility and automatic backend policy. Errors Returns an error unless dimensions are positive and model_width is divisible by num_heads, or child construction/registration fails.

static

Construct four biased projections with causal visibility and automatic backend policy. Errors Returns an error unless dimensions are positive and model_width is divisible by num_heads, or child construction/registration fails.

static

Construct four biased projections with causal visibility and automatic backend policy. Errors Returns an error unless dimensions are positive and model_width is divisible by num_heads, or child construction/registration fails.

method

Construct four biased projections with causal visibility and automatic backend policy. Errors Returns an error unless dimensions are positive and model_width is divisible by num_heads, or child construction/registration fails.

method

Construct four biased projections with causal visibility and automatic backend policy. Errors Returns an error unless dimensions are positive and model_width is divisible by num_heads, or child construction/registration fails.

method
Source
18 members

Rectified linear unit module.

Source
25 members

Stack of independently EMA-trained residual vector quantizers.

Construct num_levels deterministically initialized quantizers. Errors Returns an error when the level count or configuration is invalid, child state allocation fails, or module registration fails.

static

Construct num_levels deterministically initialized quantizers. Errors Returns an error when the level count or configuration is invalid, child state allocation fails, or module registration fails.

static
Source
0 members

Multi-level residual vector-quantization result.

Source
23 members

Trainable FP32 RMSNorm over the final input dimension.

Construct RMSNorm with unit weight. Errors Returns an error when dimension is zero, epsilon is not finite and positive, or parameter allocation/upload fails.

static
Source
28 members

Stacked batch-first Elman recurrent network using whole-sequence GPU scans. Input uses [batch, sequence, input]; output uses [batch, sequence, hidden]. Every layer starts from a zero hidden state.

Construct a deterministically initialized stacked RNN with biases. Errors Returns an error when a dimension or layer count is zero, hidden size exceeds the 1024-element scan limit, arithmetic overflows, or parameter allocation and registration fail.

static

Construct a deterministically initialized stacked RNN with biases. Errors Returns an error when a dimension or layer count is zero, hidden size exceeds the 1024-element scan limit, arithmetic overflows, or parameter allocation and registration fail.

static
Source
25 members

One Elman recurrent cell with an explicit caller-owned hidden state.

Construct a deterministically initialized RNN cell. Errors Returns an error when dimensions are zero, hidden size exceeds 1024, arithmetic overflows, or parameter allocation fails.

static
Source
20 members

Llama-style split-half rotary position embedding module.

Source
22 members

Apply registered child modules in insertion order.

Source
18 members

Sigmoid linear unit module.

Source
19 members

Parameterless axis-aware Softmax module.

Source
21 members

Donor-compatible SwiGLU MLP with optional projection biases.

Construct gate, up, and down projections with deterministic Xavier weights. Errors Returns an error when dimensions are zero, shape arithmetic overflows, or parameter allocation and registration fail.

static
Source
28 members

Ready-to-train causal Transformer language model. This is the idiomatic Rust spelling of donor oa::NnTransformer: token and position embeddings, registered Transformer blocks, final normalization, and a vocabulary projection.

Construct a deterministic causal language model. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.

method

Construct a deterministic causal language model. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.

method

Construct a deterministic causal language model. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.

method

Construct a deterministic causal language model. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.

method

Construct a deterministic causal language model. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.

method

Construct a deterministic causal language model. Errors Returns an error unless all dimensions are positive, the model width is divisible by the head count, positions fit U32, and every child can be constructed and registered.

method
Source
38 members

One pre-normalized causal Transformer block.

Construct the canonical pre-norm attention and GELU feed-forward block. Errors Returns an error for invalid dimensions or failed child construction.

method

Construct the canonical pre-norm attention and GELU feed-forward block. Errors Returns an error for invalid dimensions or failed child construction.

method

Construct the canonical pre-norm attention and GELU feed-forward block. Errors Returns an error for invalid dimensions or failed child construction.

method

Construct the canonical pre-norm attention and GELU feed-forward block. Errors Returns an error for invalid dimensions or failed child construction.

method
Source
20 members

Parameterless spatial upsampling module for FP32 NCHW matrices.

Source
26 members

EMA-trained vector quantizer with persistent, non-gradient codebook state.

Construct a deterministically initialized quantizer. Errors Returns an error for an invalid configuration, shape overflow, or failed state allocation/upload.

static

Construct a deterministically initialized quantizer. Errors Returns an error for an invalid configuration, shape overflow, or failed state allocation/upload.

static
Source
4 members
0 members

Straight-through vector-quantization result.

Source

Enums

Execution policy for scaled dot-product attention. Auto selects only a route proven by device-specific performance evidence. It currently preserves the compositional AttentionBackend::Standard provider on every device.

Auto · Standard · Flash · Linear

Token-visibility contract for self-attention.

Causal · Bidirectional

Token-visibility contract for linear attention.

Causal · Bidirectional

Spatial interpolation mode for NCHW upsampling.

Nearest · Bilinear

Functions

Clip the combined L2 norm of nonempty FP32 gradients in place. The operation records one GPU reduction followed by one GPU scaling pass. It does not read gradients back to the CPU or wait for completion. Empty matrices are ignored; at most sixteen nonempty gradients are admitted. Errors Returns an error when max_norm is negative or non-finite, more than sixteen nonempty gradients are supplied, gradients do not share one engine, a gradient is not FP32, storage is duplicated, a size exceeds the shader ABI, or allocation and runtime recording fail.

Types

13 members
13 members

Decoupled-weight-decay Adam optimizer over stable Parameter handles.

Source
0 members
0 members

Optimizer with a complete native .oam save-and-restore contract. This capability is sealed because persistence must remain synchronized with OA’s versioned model-file codec. Custom optimizers can implement Optimizer for eager training without claiming wire compatibility.

Source
13 members

Muon optimizer with Nesterov momentum and rank-two NS5 orthogonalization. Rank-two parameters use the donor Muon matrix pipeline. Other ranks use its fused momentum update; OA never silently delegates them to AdamW.

Source
10 members
6 members

Common behavior exposed by an OA optimizer to training policy. This contract deliberately excludes captured-program and persistence internals. Those capabilities depend on optimizer-specific state and are admitted separately only when their complete implementation exists.

Source
0 members
0 members
12 members

Functions

Differentiably evaluate stored categorical actions. Gradients flow through logits, log_probability, and entropy; action indices remain discrete. action and value are zero-copy semantic output aliases, matching OA C++. Errors Returns an error when logits are not FP32 [E,A] with E > 0 and A > 1, actions are not I32 [E], values are not FP32 [E], inputs do not share one engine, or composite lowering fails.

Differentiably evaluate a stored pre-tanh normal action. Log standard deviation is clamped to [-20, 2]. Actions are mapped from [-1, 1] into [minimum, maximum]; log probability includes the donor tanh Jacobian correction, while entropy is the unsquashed diagonal-normal value. raw_action and value are zero-copy semantic output aliases. Errors Returns an error when mean, log-standard-deviation, and raw-action are not matching nonempty FP32 [E,A] matrices, value is not FP32 [E], inputs do not share one engine, bounds/epsilon are invalid, a size exceeds the shader ABI, or composite lowering fails.

Sample and evaluate one categorical action per environment. A nonzero seed is deterministic. Seed zero follows the process-local OA RNG convention. The action is sampled from the same logits used for returned log probabilities and entropy. Errors Returns an error when logits are not FP32 [E,A] with E > 0 and A > 1, values are not FP32 [E] on the same engine, or composite lowering fails.

Sample a reparameterized tanh-normal policy. The returned raw action is mean + exp(clamped_log_stddev) * noise, so gradients flow through both distribution parameters while Philox noise stays detached. A nonzero seed is deterministic; seed zero follows OA’s process-local RNG convention. Errors Returns an error when mean/log-standard-deviation are not matching nonempty FP32 [E,A] matrices, value is not FP32 [E] on the same engine, bounds/epsilon are invalid, a size exceeds the shader ABI, or composite lowering fails.

Types

0 members

One bounded continuous action and its differentiable policy statistics.

Source
0 members

One categorical action and its differentiable policy statistics.

Source

Types

7 members
10 members
3 members
8 members

Types

11 members
11 members
3 members
10 members

Types

3 members
15 members

Deterministic byte-pair encoder compatible with OA’s oa_bpe_v1 files.

Source

Types

0 members

OA C++ compatibility spelling for Checkpoint.

Source
0 members

OA C++ compatibility spelling for CsvLogger.

Source
0 members

OA C++ compatibility spelling for EarlyStopping.

Source
0 members

OA C++ compatibility spelling for LearningRateScheduler.

Source
0 members

OA C++ compatibility spelling for PhaseSchedule.

Source
0 members

OA C++ compatibility spelling for ProgressBar.

Source
0 members

OA C++ compatibility spelling for TrainingSummary.

Source
0 members

OA C++ compatibility spelling for Validation.

Source
11 members

Epoch, interval, best-model, and restore-best checkpoint policy.

Source
3 members
6 members
2 members
3 members
7 members
3 members
10 members

Stateful DQN training coordinator over caller-owned components. The online module, target module, optimizer, replay storage, and engine remain caller-owned and must outlive this coordinator. Dropping the trainer does not submit, wait, synchronize targets, or fire terminal callbacks; use DqnTrainer::finish for the explicit terminal boundary.

Source
4 members
4 members
12 members

Cooperative epoch-boundary early stopping.

Source
4 members
14 members

Coordinator for alternating fixed-capacity collection and optimizer phases.

Source
4 members
26 members

Exact eager or captured training-step lifecycle. The loop borrows the engine, optimizer, metrics, and callbacks. Call ItTraining::begin_step before authoring each body, then finish it with ItTraining::complete_step or ItTraining::complete_program_step. ItTraining::finish is the explicit fallible terminal boundary.

Construct a training lifecycle around one engine and optimizer. Errors Returns an error when source-unit accounting is non-finite or overflows, or the variable epoch schedule overflows.

method

Construct a training lifecycle around one engine and optimizer. Errors Returns an error when source-unit accounting is non-finite or overflows, or the variable epoch schedule overflows.

method

Construct a training lifecycle around one engine and optimizer. Errors Returns an error when source-unit accounting is non-finite or overflows, or the variable epoch schedule overflows.

method

Construct a training lifecycle around one engine and optimizer. Errors Returns an error when source-unit accounting is non-finite or overflows, or the variable epoch schedule overflows.

method

Construct a training lifecycle around one engine and optimizer. Errors Returns an error when source-unit accounting is non-finite or overflows, or the variable epoch schedule overflows.

method

Construct a training lifecycle around one engine and optimizer. Errors Returns an error when source-unit accounting is non-finite or overflows, or the variable epoch schedule overflows.

method

Construct a training lifecycle around one engine and optimizer. Errors Returns an error when source-unit accounting is non-finite or overflows, or the variable epoch schedule overflows.

method
Source
3 members
6 members
2 members
9 members
1 members
3 members
14 members

Consecutive phase policy over one super::super::ItTraining lifecycle. The phase schedule does not own another iterator. Its epoch/step totals must exactly match the iterator configuration, and its optional transition hook receives restricted mutable access to the iterator’s existing optimizer.

Source
24 members

Complete caller-driven categorical PPO lifecycle. The Engine, model, and optimizer remain caller-owned. The trainer owns only its fixed-capacity rollout and lifecycle state. Drop performs no submission, waiting, or terminal callbacks; call PpoTrainer::finish explicitly.

Source
4 members
4 members
5 members

Reusable fixed-geometry PPO backward and AdamW programs. Retain this value across trainers when checkpointing between rollouts. Each minibatch reuses one bounded tape’s storage, accumulating sample-weighted gradients before exactly one AdamW step per epoch. Tail shapes compile once. Drop never submits or waits. Different models/configurations are rejected.

Source
9 members

Throttled Keras/tqdm-style wall-throughput progress display.

Source
4 members
10 members

Stateful fixed-temperature SAC coordinator over caller-owned components.

Source
4 members
4 members
2 members
3 members

Fixed-geometry trading reset, policy/step/append and GAE replay programs. Retain alongside the same environment and PpoUpdateProgram across rollouts. Seven cursor words are uploaded once per chunk and advance on device; tables refresh at explicit completed rollout boundaries. Drop never executes or waits.

Source
5 members
5 members
3 members
5 members
3 members
7 members
0 members

Compatibility alias for the pre-ItTraining Rust prototype spelling.

Source
0 members
4 members
3 members
3 members
7 members
18 members

Fixed-shape forward, backward, and AdamW program captured for Vulkan replay. The first capture records semantic work without executing it. Replays use one cached command buffer and graph-resident optimizer state; no forward, autograd, or optimizer graph is rebuilt on the host.

Source
20 members

Cloneable, thread-safe command and observation handle for one training loop. Attach it to exactly one super::ItTraining instance. Clones may enqueue commands and read bounded evidence from UI, viewer, or service threads.

Source
3 members
4 members
3 members
28 members

Immutable state supplied to metrics and callbacks.

method
method

Return completed samples per wall-clock second.

method
method
method
method
method
method
method
Source
9 members

Final loss, wall-time, device-time, throughput, and run summary.

Source
9 members

Runs application-owned inference validation at completed lifecycle boundaries. Epoch-based training evaluates once at every epoch end. Step-only training evaluates at each non-zero configured interval and once at train end when the final step was not already evaluated. Evaluation wall time is excluded from training throughput and the callback never submits work on its own.

Source
4 members

Cloneable observation handle for the latest completed validation loss. Clones share one thread-affine value so checkpoint, summary, and early-stop callbacks can observe the result without owning or rerunning validation.

Source
4 members
3 members

Enums

Amplitude policy for CyclicScheduler.

Triangular · Triangular2 · ExpRange

Improvement direction for EarlyStopping.

Min · Max

Aggregation policy for LossMetric.

Mean · Last

Improvement direction for ReduceOnPlateauScheduler.

Min · Max

Current phase of one synchronous on-policy schedule.

Collect · Update · Complete

Whether a processed command changed the training lifecycle.

Applied · Rejected

Kind of command applied at a training safe point.

Pause · Resume · Stop · Checkpoint · Evaluate · SetParameter · RequestRecapture · RequestRebuild

Ordered compilation stage for a captured training program.

SemanticValidation · ReplaySafety · Decomposition · Fusion · Placement · Precision · KernelSelection · LoweringValidation · MemoryPlanning · SynchronizationPlanning · CommandRecording

Outcome of one training-program compilation stage.

NotRun · Inherited · Analyzed · Applied · Failed

Explicit callback decision at a lifecycle boundary.

Continue · Stop

Safe-point class of a live training parameter.

Hot · Recapture · Rebuild · Immutable

Live state of an attached training lifecycle.

Running · Paused · Stopping · Completed · Failed

Typed value carried by a command or exposed parameter.

Empty · Boolean(bool) · Integer(i64) · Float(f64) · String(String)

Discriminant of a TrainingValue.

Empty · Boolean · Integer · Float · String

Types

43 members

Complete Animation Language Model ownership and persistence boundary. The tokenizer and prior remain independently trainable children, while this module gives checkpoints one unambiguous tokenizer.* / prior.* tree and exposes their composed tokenization and generation paths.

Construct the complete ALM with deterministic child seeds. Errors Returns an error unless the tokenizer and prior vocabulary contracts agree, or when either child or the ownership tree cannot be constructed.

static

Construct the complete ALM with deterministic child seeds. Errors Returns an error unless the tokenizer and prior vocabulary contracts agree, or when either child or the ownership tree cannot be constructed.

static

Construct the complete ALM with deterministic child seeds. Errors Returns an error unless the tokenizer and prior vocabulary contracts agree, or when either child or the ownership tree cannot be constructed.

static
Source
4 members
3 members
30 members

Decoder-only ALM motion-token prior. The permanent backbone is causal attention. Its feed-forward policy may be dense, MoE, or hybrid without changing tokenization, conditioning, generation, or the registered persistence tree.

Construct a deterministic ALM prior. Errors Returns an error for inconsistent vocabulary, dimensions, routing policy, generation policy, failed allocation, or child registration.

static

Construct a deterministic ALM prior. Errors Returns an error for inconsistent vocabulary, dimensions, routing policy, generation policy, failed allocation, or child registration.

static
Source
6 members
29 members

Temporal Conv1d VQ-VAE used by ALM to map motion frames to discrete tokens. The model accepts [batch, frames, input_dim], downsamples time by 2^downsample_stages, performs one level of normalized EMA vector quantization, and reconstructs the original rank-three shape.

Construct the tokenizer with the donor’s deterministic 0xC0FFEE continuous Glorot stream. Errors Returns an error for invalid geometry or quantizer policy, arithmetic overflow, failed allocation/upload, or module-registration failure.

static

Construct the tokenizer with the donor’s deterministic 0xC0FFEE continuous Glorot stream. Errors Returns an error for invalid geometry or quantizer policy, arithmetic overflow, failed allocation/upload, or module-registration failure.

static
Source
4 members
3 members
27 members

Exact frozen CLIP text-with-projection tower used by conditioned ALM.

Translate the published CLIP ViT-L/14 SafeTensors image into native .oam. The translator admits every and only text-tower FP32 tensor, validates exact shapes, ignores unrelated vision/logit-scale tensors, and rejects unknown names below the text namespaces. No Vulkan Engine is needed for this host conversion. Errors Returns an error for malformed SafeTensors data, a missing/unexpected text tensor, dtype or shape mismatch, arithmetic overflow, or output failure.

static

Translate the published CLIP ViT-L/14 SafeTensors image into native .oam. The translator admits every and only text-tower FP32 tensor, validates exact shapes, ignores unrelated vision/logit-scale tensors, and rejects unknown names below the text namespaces. No Vulkan Engine is needed for this host conversion. Errors Returns an error for malformed SafeTensors data, a missing/unexpected text tensor, dtype or shape mismatch, arithmetic overflow, or output failure.

static

Translate the published CLIP ViT-L/14 SafeTensors image into native .oam. The translator admits every and only text-tower FP32 tensor, validates exact shapes, ignores unrelated vision/logit-scale tensors, and rejects unknown names below the text namespaces. No Vulkan Engine is needed for this host conversion. Errors Returns an error for malformed SafeTensors data, a missing/unexpected text tensor, dtype or shape mismatch, arithmetic overflow, or output failure.

static

Translate the published CLIP ViT-L/14 SafeTensors image into native .oam. The translator admits every and only text-tower FP32 tensor, validates exact shapes, ignores unrelated vision/logit-scale tensors, and rejects unknown names below the text namespaces. No Vulkan Engine is needed for this host conversion. Errors Returns an error for malformed SafeTensors data, a missing/unexpected text tensor, dtype or shape mismatch, arithmetic overflow, or output failure.

static

Translate the published CLIP ViT-L/14 SafeTensors image into native .oam. The translator admits every and only text-tower FP32 tensor, validates exact shapes, ignores unrelated vision/logit-scale tensors, and rejects unknown names below the text namespaces. No Vulkan Engine is needed for this host conversion. Errors Returns an error for malformed SafeTensors data, a missing/unexpected text tensor, dtype or shape mismatch, arithmetic overflow, or output failure.

static

Translate the published CLIP ViT-L/14 SafeTensors image into native .oam. The translator admits every and only text-tower FP32 tensor, validates exact shapes, ignores unrelated vision/logit-scale tensors, and rejects unknown names below the text namespaces. No Vulkan Engine is needed for this host conversion. Errors Returns an error for malformed SafeTensors data, a missing/unexpected text tensor, dtype or shape mismatch, arithmetic overflow, or output failure.

method
Source
4 members
3 members
9 members

Enums

Feed-forward policy used by ALM Transformer layers.

Dense · Moe · Hybrid

Functions

Build true-boundary next-token windows for every motion-token sequence. A short sequence produces one padded window. A long sequence produces one full window for every valid start position and never fabricates SOM or EOM at an interior boundary. Errors Returns an error when window_len is zero, sequence length arithmetic overflows, or the inventory exceeds addressable host memory.

Build the donor tokenizer windows: 50% overlap and one exact tail window. Clips shorter than sequence_len do not produce a window. The returned order is stable: clip order, then ascending frame offset. Shuffling remains an explicit training-policy concern. Errors Returns an error when sequence_len is zero or the number of windows overflows addressable host memory.

Evaluate an ALM prior over true-boundary held-out token windows. Conditioned validation uses the first cached caption feature for each sequence, matching the donor rather than the epoch-rotating training rule. Errors Returns an error for incompatible model, sequence, conditioning, or batch geometry, empty validation data, allocation, inference, synchronization, or compact metric readback failure.

Evaluate a tokenizer over one standardized HumanML3D validation split. Errors Returns an error for incompatible model/dataset geometry, empty validation inventory, invalid batching, allocation, inference, synchronization, readback, denormalization, or HumanML3D diagnostic failure.

Tokenize every eligible normalized dataset clip with one trained tokenizer. Clips shorter than one downsample interval are rejected because silently dropping a dataset row would break caption/conditioning alignment. Errors Returns an error for feature-width mismatch, a short/malformed clip, allocation, tokenizer execution, synchronization, or readback failure.

Train tokenizer and prior stages over one HumanML3D dataset, then compose the independently trainable children into one product-level ALM model. A prior with text_feature_dim == 0 is unconditional. A conditioned prior requires the dataset’s validated oa_clip_text_v1 rows and preserves the manifest model identity in the resulting bundle. Errors Returns an error from either stage, token-corpus construction, cached text contract validation, product ownership composition, or count overflow.

Train both ALM stages with native frozen CLIP caption features and embed the text tower plus exact BPE merge asset in the resulting product bundle. Caption features are baked in memory in deterministic dataset/caption order, so this route does not require a pre-existing text_feats cache. Optional held-out data uses the identical frozen encoder and tokenizer asset. Errors Returns the same errors as train_alm_with_validation, plus CLIP model, merge-table, caption tokenization/encoding, projection-width, or native product-composition failures.

Train both ALM stages while evaluating a held-out HumanML3D split at every completed stage epoch. Tokenizer validation observes motion reconstruction directly. After that stage is complete, the same frozen tokenizer creates both train and held-out token corpora so prior validation cannot drift to a different vocabulary. Errors Returns the same errors as train_alm, plus held-out split, tokenization, conditioning, evaluation, or callback failures.

Train an ALM prior with true-boundary token windows and the shared OA iterator/callback lifecycle. This path deliberately uses the eager iterator mode because a padded batch’s valid_count is a host scalar that can change between steps. Replaying a fixed captured push constant would silently apply the wrong normalization. Once dynamic executable-graph scalars are admitted, this restriction can be removed without changing the public training contract. Errors Returns an error for invalid configuration, token or conditioning data, model/configuration mismatch, allocation, autograd, optimizer, runtime, timing, metric, or callback failure. A non-finite completed loss is rejected.

Train the temporal ALM VQ-VAE over normalized row-major motion clips. The optimized objective combines reconstruction Smooth L1, velocity Smooth L1, and the configured VQ commitment loss. The iterator’s primary loss remains reconstruction, matching the donor trainalm progress/checkpoint contract. Codebook updates use EMA and are not AdamW parameters. Errors Returns an error for invalid configuration/corpus geometry, allocation, model, autograd, EMA, optimizer, runtime, timing, metric, or callback failure. A non-finite completed reconstruction loss is rejected.

Types

4 members
0 members

Evidence and resulting product model from one complete ALM run.

TokenizerTrainingReport
PriorTrainingReport
Source
1 members

Borrowed held-out dataset and per-stage evaluation policy.

&'data HumanMl3dDataset
TokenizerValidationConfig
PriorValidationConfig
Source
3 members
2 members

Frozen text features associated with each motion-token sequence. Each entry of by_sequence is a row-major collection of one or more feature_dim caption embeddings. Training selects captions with the donor’s deterministic (seed + epoch + sequence) % caption_count rule.

Source
4 members
4 members
3 members
1 members

Borrowed held-out corpus evaluated at every completed prior epoch.

&'data [Vec<i32>]
Option<PriorConditioning<'data>>
PriorValidationConfig
Source
3 members
5 members
3 members
4 members
4 members
3 members
1 members

Borrowed held-out split evaluated at every completed tokenizer epoch.

&'data HumanMl3dDataset
TokenizerValidationConfig
Source
3 members
5 members
3 members

Functions

Fraction of correct predictions over [N, classes] logits and [N] U32/I32 targets. Errors Returns an error from the underlying accuracy operation or readback.

TF-tutorial-mirrored command classifier. Conv2d(1→8, 3×3) → ReLU → MaxPool → Conv2d(8→16, 3×3) → ReLU → MaxPool → Flatten → Linear(→64) → ReLU → Dropout(0.25) → Linear(→classes), returned as a Sequential so parameter registration and train/eval propagation are uniform with every other nn workload. mel_bands/mel_frames are the unpooled feature extents; two stride-2 pools quarter each spatial axis before the flatten. Errors Returns an error when dimensions are zero or a layer fails to build.

Mean and reciprocal standard deviation over a host feature batch. Returns (mean, 1/(std + 1e-6)); callers apply the pair to both training and evaluation features — the host-side equivalent of the TF tutorial’s Normalization layer.

Types

2 members
6 members

Ordered speech-commands dataset backed by <dir>/<label>/*.wav files.

Vec<SpeechCommandsClip>

Load and decode every clip under <dir>/<label>/. Clips are sorted per label for deterministic ordering, decoded to mono, resampled to CLIP_SAMPLE_RATE when needed, and zero-padded or trimmed to SAMPLES_PER_CLIP. Errors Returns an error when a label directory is missing, a clip fails to decode, or the dataset is empty.

static

Load and decode every clip under <dir>/<label>/. Clips are sorted per label for deterministic ordering, decoded to mono, resampled to CLIP_SAMPLE_RATE when needed, and zero-padded or trimmed to SAMPLES_PER_CLIP. Errors Returns an error when a label directory is missing, a clip fails to decode, or the dataset is empty.

method

Load and decode every clip under <dir>/<label>/. Clips are sorted per label for deterministic ordering, decoded to mono, resampled to CLIP_SAMPLE_RATE when needed, and zero-padded or trimmed to SAMPLES_PER_CLIP. Errors Returns an error when a label directory is missing, a clip fails to decode, or the dataset is empty.

method
Source

Constants & Variables

Functions

Compute all-position argmax accuracy as a fraction in [0, 1]. This is an explicit host-observation boundary. Errors Returns an error unless logits are F32 [N, C], targets contain N U32 values, or readback fails.

Decode one canonical character token. Invalid values decode to space.

Greedily generate BPE tokens until byte_count decoded source bytes. The decoded result is truncated to prompt.len() + byte_count, matching the donor when the last learned token crosses the requested byte boundary. Errors Returns an error for an empty prompt, invalid model output/token IDs, byte accounting overflow, or failed execution/readback.

Greedily generate exact bytes with the canonical left-filled/sliding window. Errors Returns an error for an empty prompt, invalid model output, or failed execution/readback.

Greedily generate characters with the canonical left-filled/sliding window. Errors Returns an error for an empty prompt, when model execution/readback fails, or if the model violates its declared output shape.

Types

18 members

Canonical BPE language model: Embedding → GRU → Linear.

Construct the deterministic donor-shaped 49,856-parameter model. Errors Returns an error when parameter allocation or registration fails.

static
Source
18 members

Canonical BPE Mamba-3 language model with a flat residual head.

Construct the donor 32/state=32/expand=2/head=16 BPE recipe. Errors Returns an error when parameter construction or registration fails.

static
Source
18 members

Canonical BPE Transformer with four sparse top-two experts.

Construct the donor one-block, one-head BPE MoE recipe. Errors Returns an error when parameter construction or registration fails.

static
Source
18 members

Canonical BPE language model: Embedding → Elman RNN → Linear.

Construct the deterministic donor-shaped 37,312-parameter model. Errors Returns an error when parameter allocation or registration fails.

static
Source
7 members
18 members

Canonical BPE Transformer language model over the shared NN owner.

Construct the deterministic donor one-block, one-head BPE model. Errors Returns an error when parameter construction or registration fails.

static
Source
18 members

Canonical byte language model using the hybrid Empyrealm ownership tree.

Construct the deterministic hybrid fidelity model. Errors Returns an error when parameter construction or registration fails.

static
Source
18 members

Canonical byte language model: ByteEmbedding → GRU → ByteHead.

Construct the deterministic donor-shaped 43,648-parameter model. Errors Returns an error when parameter allocation or registration fails.

static
Source
18 members

Canonical raw-byte Mamba-3 language model with a flat residual head.

Construct the donor 32/state=32/expand=2/head=16 byte recipe. Errors Returns an error when parameter construction or registration fails.

static
Source
18 members

Canonical byte Transformer with four sparse top-two experts.

Construct the donor one-block, one-head byte MoE recipe. Errors Returns an error when parameter construction or registration fails.

static
Source
18 members

Canonical byte language model: ByteEmbedding → Elman RNN → ByteHead.

Construct the deterministic donor-shaped 31,104-parameter model. Errors Returns an error when parameter allocation or registration fails.

static
Source
4 members
18 members

Canonical byte Transformer language model over the shared NN owner.

Construct the deterministic donor one-block, one-head byte model. Errors Returns an error when parameter construction or registration fails.

static
Source
18 members

Canonical character language model: Embedding → GRU → Linear.

Construct the deterministic donor-shaped 21,435-parameter model. Errors Returns an error when parameter allocation or registration fails.

static
Source
19 members

Canonical character Mamba-3 language model with a flat residual head.

Construct the donor 32/state=32/expand=2/head=16 SISO recipe. Errors Returns an error when parameter construction or registration fails.

static
Source
19 members

Canonical character Transformer with four sparse top-two experts.

Construct the donor one-block, one-head MoE Transformer recipe. Errors Returns an error when parameter construction or registration fails.

static
Source
18 members

Canonical character language model: Embedding → Elman RNN → Linear.

Construct the canonical deterministic 8,891-parameter model. Errors Returns an error when parameter allocation or registration fails.

static
Source
4 members
18 members

Canonical 10,875-parameter character Transformer language model.

Construct the exact one-block, one-head OA C++ tutorial architecture. Errors Returns an error when parameter construction or registration fails.

static
Source

Constants & Variables

pub const BPE_GRU_REFERENCE_GENERATION: &[u8] = b"to bee arms against a sea of troubles and by opposing end them to be or not to be tha";Source
pub const BPE_MAMBA3_REFERENCE_GENERATION: &[u8] = b"to beion wher tis nobler in the mind to suffer the slings and arrows of outrageous fo";Source
pub const BPE_MERGES: usize = _; // 64usizeSource
pub const BPE_MOE_REFERENCE_GENERATION: &[u8] = b"to bee or not to be that is the question whether tis nobler in the mind to suffer the";Source
pub const BPE_RNN_REFERENCE_GENERATION: &[u8] = b"to be not to be that is the question whether tis nobler in the mind to suffer the sli";Source
pub const BPE_TRANSFORMER_REFERENCE_GENERATION: &[u8] = b"to be end them to be or not to be that is the question whether tis nobler in the mind";Source
pub const BYTE_EMPYREALM_REFERENCE_GENERATION: &[u8] = b"to be that is the question whether tis nobler in the mind to suffer the slings and ar";Source
pub const BYTE_GRU_REFERENCE_GENERATION: &[u8] = b"to be that is the question whether tis nobler in the mind to suffer the slings and ar";Source
pub const BYTE_MAMBA3_REFERENCE_GENERATION: &[u8] = b"to be that is the question whether tis nobler in the mind to suffer the slings and ar";Source
pub const BYTE_MOE_REFERENCE_GENERATION: &[u8] = b"to be that is the question whether tis nobler in the mind to suffer the slings and ar";Source
pub const BYTE_RNN_REFERENCE_GENERATION: &[u8] = b"to be that is the question whether tis nobler in the mind to suffer the slings and ar";Source
pub const BYTE_TRANSFORMER_REFERENCE_GENERATION: &[u8] = b"to be that is the question whether tis nobler in the mind to suffer the slings and ar";Source
pub const CHAR_GRU_REFERENCE_GENERATION: &str = "to be or not to be that is the question whether tis nobler in the mind to suffer the ";Source
pub const CHAR_MAMBA3_REFERENCE_GENERATION: &str = "to be that is the question whether tis nobler in the mind to suffer the slings and ar";Source
pub const CHAR_MOE_TRANSFORMER_REFERENCE_GENERATION: &str = "to be that is the question whether tis nobler in the mind to suffer the slings and ar";Source
pub const CHAR_RNN_REFERENCE_GENERATION: &str = "to be that is the question whether tis nobler in the mind to suffer the slings and ar";Source
pub const CHAR_TRANSFORMER_REFERENCE_GENERATION: &str = "to be or not to be that is the question whether tis nobler in the mind to suffer the ";Source
pub const CORPUS: &str = "to be or not to be that is the question whether tis nobler in the mind to suffer the slings and arrows of outrageous fortune or to take arms against a sea of troubles and by opposing end them to be or not to be that is the question whether tis nobler in the mind to suffer the slings and arrows of outrageous fortune or to take arms against a sea of troubles and by opposing end them to be or not to be that is the question whether tis nobler in the mind to suffer the slings and arrows of outrageous fortune or to take arms against a sea of troubles and by opposing end them ";Source
pub const RNG_SEED: u64 = 20_260_714;Source

Functions

Record, submit, and wait for one complete Lunar PPO rollout. Errors Returns an error from environment reset/recording/submission or PPO collection. A rejected recording rewinds both owners transactionally.

Evaluate episode zero of a fresh flat vector environment with greedy TopK. Completed lanes are not reset. Bounded rollout chunks retain action, value, reward, and boundary history without a per-step host synchronization. Errors Returns an error for invalid dimensions, ownership/model/environment/runtime failure, malformed device results, or inconsistent final telemetry.

Pretrain only the categorical policy tower from the scripted scalar oracle. The temporary optimizer has independent moment state. A caller-created PPO optimizer therefore remains at step zero for a clean critic warm-up. Errors Returns an error for an invalid curriculum, teacher/evaluator seed overlap, scalar simulation failure, upload/model/loss/autograd failure, or incomplete optimizer accounting.

Types

33 members

Vectorized GPU CartPole workload over the reusable Environment lifecycle.

Source
5 members
5 members
21 members

Complete reproducibility identity for one vector-environment episode.

Source
4 members
4 members
6 members

Versioned scalar dynamics, contact, observation, and reward contract.

LunarTerrainConfig
[LunarSupportSphere; 3]
[LunarSupportSphere; 4]
Source
4 members
5 members
34 members

Native vectorized flat-terrain Lunar Lander workload.

Source
4 members
1 members
4 members
6 members
14 members

Deterministic scalar reference environment used to qualify vector kernels.

Construct an environment with level terrain and reset it deterministically.

method

Construct an environment with level terrain and reset it deterministically.

method

Construct an environment with level terrain and reset it deterministically.

method

Construct an environment with level terrain and reset it deterministically.

method

Construct an environment with level terrain and reset it deterministically.

method
Source
4 members
4 members
4 members
16 members

Immutable checked Lunar Lander height field.

Source
5 members
4 members
4 members

Enums

Discrete control selected for one simulation step.

Coast = 0 · MainEngine = 1 · PitchPositive = 2 · PitchNegative = 3 · RollPositive = 4 · RollNegative = 5 · YawPositive = 6 · YawNegative = 7

Terminal or truncation cause for one episode.

None = 0 · SafeLanding = 1 · BodyImpact = 2 · HardFootImpact = 3 · OutOfBounds = 4 · NumericalFailure = 5 · TimeLimit = 6 · ExternalStop = 7 · InvalidAction = 8

Independent deterministic random domain within one episode.

Terrain = 6_072_350_185_815_100_977 · Spawn = 6_003_370_146_514_612_273 · Domain = 4_922_237_860_537_315_377

Triangle selected by the fixed v00 -> v11 cell diagonal.

LowerRight · UpperLeft

Constants & Variables

Functions

Record, submit, and wait for one complete Lunar PPO rollout. Errors Returns an error from environment reset/recording/submission or PPO collection. A rejected recording rewinds both owners transactionally.

Evaluate episode zero of a fresh flat vector environment with greedy TopK. Completed lanes are not reset. Bounded rollout chunks retain action, value, reward, and boundary history without a per-step host synchronization. Errors Returns an error for invalid dimensions, ownership/model/environment/runtime failure, malformed device results, or inconsistent final telemetry.

Advance one scalar state with the donor’s fixed-order semi-implicit solver. Errors Returns an error for invalid configuration, mismatched terrain, invalid input state, or non-finite integration/contact output. The state may have been partially advanced when a numerical output failure is reported.

Pretrain only the categorical policy tower from the scripted scalar oracle. The temporary optimizer has independent moment state. A caller-created PPO optimizer therefore remains at step zero for a clean critic warm-up. Errors Returns an error for an invalid curriculum, teacher/evaluator seed overlap, scalar simulation failure, upload/model/loss/autograd failure, or incomplete optimizer accounting.

Types

5 members
21 members

Complete reproducibility identity for one vector-environment episode.

Source
4 members
4 members
6 members

Versioned scalar dynamics, contact, observation, and reward contract.

LunarTerrainConfig
[LunarSupportSphere; 3]
[LunarSupportSphere; 4]
Source
4 members
5 members
34 members

Native vectorized flat-terrain Lunar Lander workload.

Source
4 members
1 members
4 members
6 members
14 members

Deterministic scalar reference environment used to qualify vector kernels.

Construct an environment with level terrain and reset it deterministically.

method

Construct an environment with level terrain and reset it deterministically.

method

Construct an environment with level terrain and reset it deterministically.

method

Construct an environment with level terrain and reset it deterministically.

method

Construct an environment with level terrain and reset it deterministically.

method
Source
4 members
4 members
4 members
16 members

Immutable checked Lunar Lander height field.

Source
5 members
4 members
4 members

Enums

Discrete control selected for one simulation step.

Coast = 0 · MainEngine = 1 · PitchPositive = 2 · PitchNegative = 3 · RollPositive = 4 · RollNegative = 5 · YawPositive = 6 · YawNegative = 7

Terminal or truncation cause for one episode.

None = 0 · SafeLanding = 1 · BodyImpact = 2 · HardFootImpact = 3 · OutOfBounds = 4 · NumericalFailure = 5 · TimeLimit = 6 · ExternalStop = 7 · InvalidAction = 8

Independent deterministic random domain within one episode.

Terrain = 6_072_350_185_815_100_977 · Spawn = 6_003_370_146_514_612_273 · Domain = 4_922_237_860_537_315_377

Triangle selected by the fixed v00 -> v11 cell diagonal.

LowerRight · UpperLeft

Constants & Variables