- Introduction
- Getting Started
- 1. Installation
- 2. Quick Start
- 3. First Training Loop
- 4. Core Concepts
- Architecture
- 5. Overview
- 6. Design Philosophy
- 7. Module Organization
- 8. Type System
- 9. Memory Management
- Autograd Engine
- 10. What is Automatic Differentiation?
- 11. Tape-Based Computation Graphs
- 12. Tensor Operations
- 12.1. Matrix Multiplication
- 12.2. Activations (ReLU, GELU, Swish)
- 12.3. Layer Normalization
- 12.4. Attention Mechanism
- 13. Backward Pass
- 14. Gradient Computation
- 15. Finite Difference Validation
- Optimizers
- 16. Overview
- 17. Stochastic Gradient Descent (SGD)
- 18. Adam Optimizer
- 19. AdamW (Decoupled Weight Decay)
- 20. Learning Rate Schedulers
- 20.1. Cosine Annealing
- 20.2. Step Decay
- 20.3. Exponential Decay
- 21. Gradient Clipping
- 22. SIMD-Accelerated Updates
- 23. Optimizer Theory
- LoRA (Low-Rank Adaptation)
- 24. What is LoRA?
- 25. Parameter-Efficient Fine-Tuning
- 26. LoRA Layer Architecture
- 26.1. Low-Rank Matrices A and B
- 26.2. Scaling Factor (alpha/rank)
- 26.3. Merge and Unmerge
- 27. Target Module Selection
- 28. Gradient Flow Isolation
- 29. Adapter Persistence
- 29.1. Saving Adapters
- 29.2. Loading Adapters
- 29.3. Sharing Adapters
- QLoRA (Quantized LoRA)
- 30. Memory-Efficient Fine-Tuning
- 31. 4-bit Quantization
- 31.1. Block-Wise Quantization
- 31.2. Scale Factors
- 31.3. Quantization/Dequantization
- 32. QLoRA Layer
- 33. On-the-Fly Dequantization
- 34. Memory Benchmarks
- 34.1. LoRA vs QLoRA Comparison
- 34.2. Transformer Model Benchmarks
- 34.3. Compression Ratios
- 35. Trade-offs and Best Practices
- Model Merging
- 36. Overview
- 37. TIES Algorithm
- 38. DARE Algorithm
- 39. SLERP Algorithm
- 40. Multi-Model Ensembles
- 41. Merge Best Practices
- Knowledge Distillation
- 42. What is Distillation?
- 43. Temperature-Scaled KL Divergence
- 44. Multi-Teacher Ensemble
- 45. Progressive Layer-Wise
- 46. Distillation Loss Functions
- 47. Student-Teacher Architecture
- Training Loops
- 48. Trainer API
- 49. Callback System
- 50. Train Config
- 51. Basic Training Loop
- 52. Batching and Data Loading
- 53. Loss Functions
- 54. Validation and Testing
- 55. Checkpointing
- 56. Early Stopping
- 57. Curriculum Learning
- 58. Explainability
- Real-Time Monitoring
- 59. Overview
- 60. Metrics Collection
- 61. Terminal Dashboard
- 62. Drift Detection
- 63. Andon Alerting (Jidoka)
- 64. Model Lineage
- 65. Export Formats
- 66. Hansei Reports
- Model I/O
- 67. Overview
- 68. Save Models
- 69. Load Models
- 70. Model Metadata
- 71. Supported Formats
- 71.1. SafeTensors Format
- 71.2. JSON Format
- 71.3. YAML Format
- 71.4. GGUF Format
- Command-Line Interface
- 72. CLI Reference
- Declarative Training
- 73. Overview
- 74. YAML Configuration
- 75. train_from_yaml Function
- 76. Configuration Schema
- 77. Optimizer Builders
- 78. Model Builders
- API Reference
- 79. Tensor API
- 80. Autograd Operations
- 81. Optimizer API
- 82. LoRA API
- 83. QLoRA API
- 84. Configuration System
- 85. Error Handling
- Examples
- 86. Linear Regression with Autograd
- 87. Training a Simple MLP
- 88. Fine-Tuning with LoRA
- 89. Memory-Efficient QLoRA
- 90. Custom Loss Functions
- 91. Learning Rate Scheduling
- 92. Gradient Clipping
- 93. Adapter Sharing
- Development Guide
- 94. Contributing
- 95. EXTREME TDD Methodology
- 96. Testing Strategy
- 96.1. Unit Tests
- 96.2. Property-Based Tests
- 96.3. Gradient Checking Tests
- 96.4. Mutation Testing
- 97. Quality Gates
- 97.1. Pre-Commit Hooks
- 97.2. Continuous Integration
- 97.3. Code Coverage
- 97.4. Clippy Linting
- 98. Benchmarking
- 99. PMAT Toyota Workflow
- Best Practices
- 100. Optimizer Selection
- 101. Learning Rate Tuning
- 102. LoRA Configuration
- 103. Memory Optimization
- 104. Gradient Stability
- 105. Debugging Training Issues
- 106. Performance Profiling
- Advanced Topics
- 107. Custom Backward Passes
- 108. Implementing New Optimizers
- 109. Custom LoRA Variants
- 110. Advanced Quantization
- 111. Distributed Training
- 112. Model Parallelism
- 113. Compiler-in-the-Loop (CITL)
- Specifications
- 114. Autograd Specification
- 115. Optimizer Specification
- 116. LoRA Specification
- 117. Quantization Specification
- 118. Academic Foundations
- Appendix
- 119. Glossary
- 120. Mathematical Notation
- 121. References
- 122. FAQ
- 123. Changelog
- 124. Migration Guide
- 125. Benchmarking Results