Expand description
Error Accumulation Analysis for Graph-Level Tensor Operations
This module provides tools for tracking and analyzing numerical errors that accumulate during graph-level tensor operations like orthogonalization and decomposition.
§Purpose
When performing operations like QR decomposition on weights across a graph, numerical errors can accumulate. This module helps:
- Track per-layer error contributions
- Generate statistical reports on error distributions
- Identify problematic layers with high error
§Example
use god_gragh::transformer::optimization::error_analysis::ErrorAccumulator;
let mut accumulator = ErrorAccumulator::new();
// Record errors from each layer
accumulator.record_error("layer_0/q_proj", 1.2e-14);
accumulator.record_error("layer_0/k_proj", 1.5e-14);
accumulator.record_error("layer_1/q_proj", 2.1e-14);
// Generate and print report
let report = accumulator.generate_report();
println!("{}", report);Structs§
- Error
Accumulator - Error accumulator for tracking numerical errors across graph operations
- Error
Report - Comprehensive error report
- Error
Statistics - Global error statistics
- Layer
Error Stats - Per-layer error statistics