candle-mi 0.1.9

Mechanistic interpretability for language models in Rust, built on candle
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Activation, attention, and KV caching for efficient forward passes.
//!
//! - [`ActivationCache`] — per-layer last-token residual stream activations.
//! - [`AttentionCache`] — per-layer post-softmax attention patterns.
//! - [`FullActivationCache`] — all-position residual stream activations.
//! - [`KVCache`] — key/value cache for autoregressive generation.

mod activation;
mod attention;
mod kv;

pub use activation::{ActivationCache, FullActivationCache};
pub use attention::AttentionCache;
pub use kv::KVCache;