zsfm_nn/lib.rs
1//! Shared candle tensor primitives duplicated (byte-for-byte, or modulo a
2//! hardcoded-vs-parameterized constant) across the per-model `infer/mod.rs`
3//! files in `crates/models/*`. Extracted so the arithmetic lives in one
4//! place; every call site keeps producing bit-identical results to its
5//! former private copy.
6
7mod ffn;
8mod gguf;
9mod linear;
10mod mask;
11mod norm;
12
13pub use ffn::swiglu_ffn;
14pub use gguf::{load_tensor, load_vec, load_weight, try_load_tensor};
15pub use linear::{linear, linear_bias, linear_nobias};
16pub use mask::make_causal_mask;
17pub use norm::{layer_norm, rms_norm};