Skip to main content

Module modules

Module modules 

Source
Expand description

Family-generic composition (Layer/Layers/networks/bidi/caches) plus the shared neural modules (activations, norms, losses, tensor helpers).

Re-exports§

pub use activation::log_sigmoid::log_sigmoid;
pub use activation::silu::Silu;
pub use activation::softplus::softplus;
pub use misc::gqa::gqa_expand_to_heads;
pub use misc::rope::apply_rope;
pub use misc::rope::apply_rope_partial;
pub use misc::rope::wrap_angle;
pub use misc::sanity::sanity;
pub use misc::segsum::segsum;
pub use misc::split::split_into;
pub use norm::rms_norm::RmsNorm;
pub use norm::rms_norm::RmsNormConfig;
pub use norm::rms_norm_gated::RmsNormGated;
pub use norm::rms_norm_gated::RmsNormGatedConfig;
pub use bidi::MambaBidiLayers;
pub use bidi::MambaBidiLayersConfig;
pub use cache::CacheStack;
pub use cache::MambaCaches;
pub use layer::Layer;
pub use layers::Layers;
pub use layers::LayersBuilder;
pub use multi_gate::MultiGate;
pub use multi_gate::MultiGateResidual;
pub use multi_gate::MultiGateResidualConfig;
pub use multi_gate::Residuals;
pub use multi_gate::ResidualsConfig;
pub use network::MambaLatentNet;
pub use network::MambaLatentNetConfig;
pub use network::MambaVocabNet;
pub use network::MambaVocabNetConfig;

Modules§

activation
Custom activations (fp16-stable silu / softplus / log_sigmoid).
bidi
Bidirectional layer stacks (straight + reversed passes, merged per pair).
cache
The per-network cache collection trait (CacheStack) + MambaCaches.
layer
A single Pre-LN residual layer wrapping one SSM block (Layer).
layers
The (virtual-)layer stack over real weight sets (Layers).
loss
Loss functions (binary cross-entropy, cross-entropy, mean squared error). Loss functions used by the examples and tests.
misc
Tensor helpers: segsum, gqa, typed split, and sanity guards.
multi_gate
Multi-Gate Residuals: multi-stream gated depth-wise residuals (Residuals). Multi-Gate Residuals (MGR) — a depth-wise residual scheme replacing the plain additive skip of a Layers stack.
network
Family-generic networks (MambaLatentNet / MambaVocabNet).
norm
RMS norms (RmsNorm QK-norm + RmsNormGated), fp16-safe.

Enums§

MambaSsdPath
An explicit, family-tagged SSD-path selector for the unified API.

Traits§

MambaBlock
Per-family block interface the generic Layer/Layers delegate to.
MambaBlockConfig
A block config that knows its d_model and how to build its MambaBlock. Lets the generic builders construct Layers<M> without knowing the family.