Crate micro_cartan_attn

Crate micro_cartan_attn 

Source
Expand description

Micro Cartan Attention - Mathematical Cartan matrix system

This crate provides complete Cartan matrix-based attention mechanisms with proper Lie algebra structures, root systems, and mathematical constraints.

§Mathematical Background

Cartan matrices encode the geometric structure of Lie algebras through their root systems. This implementation supports:

  • Classical Cartan matrix types: A_n, B_n, C_n, D_n
  • Exceptional types: E_6, E_7, E_8, F_4, G_2 (partial)
  • Killing form calculations
  • Root system computations
  • Orthogonalization with Cartan constraints
  • Regularization: L = λ‖C_actual - C_target‖²

Re-exports§

pub use cartan::*;
pub use orthogonalization::*;
pub use regularization::*;
pub use attention::*;
pub use real_attention::*;

Modules§

attention
Cartan matrix-based attention mechanisms
cartan
Complete Cartan matrix implementation with proper Lie algebra structures
orthogonalization
Orthogonalization methods with Cartan matrix constraints
real_attention
Real scaled dot-product attention implementation
regularization
Complete Cartan regularization system with mathematical correctness

Structs§

RootVector
Simple 32D vector type for root vectors

Enums§

Error
Error types for the Cartan system

Constants§

ROOT_DIM
32-dimensional root space constant
VERSION
Version information

Functions§

exp_f32
max_f32
powf_f32
sqrt_f32

Type Aliases§

Result
Result type for Cartan operations