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, typedsplit, andsanityguards. - 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 aLayersstack. - network
- Family-generic networks (
MambaLatentNet/MambaVocabNet). - norm
- RMS norms (
RmsNormQK-norm +RmsNormGated), fp16-safe.
Enums§
- Mamba
SsdPath - An explicit, family-tagged SSD-path selector for the unified API.
Traits§
- Mamba
Block - Per-family block interface the generic
Layer/Layersdelegate to. - Mamba
Block Config - A block config that knows its
d_modeland how to build itsMambaBlock. Lets the generic builders constructLayers<M>without knowing the family.