god-graph 0.6.0-alpha

A graph-based LLM white-box optimization toolbox: topology validation, Lie group orthogonalization, tensor ring compression
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Graph-structured Transformer core module
//!
//! This module leverages god-gragh's graph structure to explicitly represent
//! the Transformer computation graph, enabling:
//! - Dynamic attention pruning (skip weak attention edges)
//! - Visualization of computation flow
//! - Dynamic graph modification (experimental)

pub mod nodes;
pub mod edges;
pub mod execution;

pub use nodes::{GraphNode, GraphNodeType, TokenEmbeddingNode, HiddenStateNode, AttentionOutputNode, FFNOutputNode};
pub use edges::{GraphEdge, GraphEdgeType, SelfAttentionEdge, DataFlowEdge, ResidualEdge, SkipType};
pub use execution::{GraphExecutor, GraphTransformer};