Skip to main content

Crate cortex_hybrid

Crate cortex_hybrid 

Source
Expand description

§cortex-hybrid

Backend-neutral ANN stage layer plus a deterministic Vec<f32> reference backend for hybrid ANN/SNN research. Checkpoint parsing stays in engram-parser. Placement and session orchestration stay in hybrid-fusion. External ML engines are optional adapters, not core types.

§Modules

ModuleRole
stageBackend-neutral ANN stage contracts; stage::ReferenceExecutor is the reference backend
adapterExternal-adapter capability contract, plus optional Candle AnnExecutor
tensorReference-backend Tensor, fallible construction, core ops
transformerReference-backend transformer blocks
moeReference-backend MoE routing; checkpoints come from engram-parser 0.3.0
snnSNN execution contract + optional crate-backed adapters
typesShared types used by moe
errorCortexError unified error type

Panic-style constructors and ops (Tensor::from_vec, ops::matmul, …) remain as pre-1.0 compatibility wrappers. New code should use Tensor::try_from_vec and the try_* functions in crate::tensor::ops.

Re-exports§

pub use error::CortexError;
pub use error::HybridError;
pub use error::Result;
pub use stage::AnnExecutor;
pub use stage::AnnStage;
pub use stage::AnnTopology;
pub use stage::ReferenceExecutor;
pub use stage::StageId;
pub use stage::StageKind;
pub use tensor::Tensor;

Modules§

adapter
External Rust ML adapter contract.
error
moe
Public MoE router API. Checkpoint bytes come from engram-parser 0.3.0.
reference_json
Bounded loading for untrusted reference-backend JSON fixtures.
snn
Backend-neutral SNN execution contract for ANN/SNN hybrid stages.
stage
Backend-neutral stage-execution contracts for ANN inference.
tensor
transformer
types
Minimal shared types used by the moe module.