Buckets:
835 MB
10,492 files
Updated 4 months ago
Ctrl+K
| Name | Size | Uploaded | Xet hash |
|---|---|---|---|
| __pycache__ | 2 items | ||
| config | 2 items | ||
| data | 2 items | ||
| demos | 1 items | ||
| docs | 6 items | ||
| notebooks | 9 items | ||
| results | 2 items | ||
| scripts | 9 items | ||
| simple_memory_results | 2 items | ||
| src | 19 items | ||
| tests | 1 items | ||
| visualizations | 12 items | ||
| README.md | 6 kB xet | 5e2033ac | |
| requirements.txt | 1.35 kB xet | 506150b2 |
CA23_memory_efficient_networks
๐ Project Structure
CA23_memory_efficient_networks/
โโโ README.md
โโโ requirements.txt
โโโ config/
โ โโโ config.json
โ โโโ requirements_basic.txt
โโโ data/
โ โโโ COMPREHENSIVE_ANALYSIS_REPORT.md
โ โโโ summary_statistics.json
โ โโโ logs/
โ โโโ results/
โ โโโ visualizations/
โโโ demos/
โ โโโ simple_demo.py
โโโ docs/
โ โโโ ADVANCED_PROJECT_REPORT.md
โ โโโ FINAL_SUMMARY.md
โ โโโ PROJECT_COMPLETION_REPORT.md
โ โโโ README_COMPLETE.md
โ โโโ README.md
โโโ integrations/
โโโ models/
โโโ notebooks/
โ โโโ 01_modern_hopfield_networks.ipynb
โ โโโ 02_spectral_domain_cnns.ipynb
โ โโโ 03_differentiable_neural_computers.ipynb
โ โโโ 04_reversible_cnns.ipynb
โ โโโ 05_activation_compressed_training.ipynb
โ โโโ 06_comprehensive_benchmarking.ipynb
โ โโโ 07_spiking_neural_networks.ipynb
โ โโโ 08_hardnet.ipynb
โ โโโ CA23.ipynb
โโโ scripts/
โ โโโ analyze_results_simple.py
โ โโโ analyze_results.py
โ โโโ project_summary.py
โ โโโ quick_test.sh
โ โโโ run_memory_optimization_pipeline.sh
โ โโโ run_simple_demo.sh
โ โโโ run_simple_no_pytorch.sh
โ โโโ run.sh
โ โโโ setup.py
โโโ simple_memory_results/
โโโ src/
โ โโโ __init__.py
โ โโโ core/
โ โโโ experimental/
โโโ test_results/
โโโ tests/
โโโ test_pipeline.py
๐ Quick Start
Installation
# Navigate to project directory
cd CAs/CA23_memory_efficient_networks
# Install dependencies
pip install -r requirements.txt
Running Notebooks
# Start Jupyter
jupyter notebook notebooks/
# Or use JupyterLab
jupyter lab notebooks/
Running Scripts
cd scripts/
./run.sh
Quick Example
from src.core.memory_efficient_networks import MemoryOptimizedCNN
# Create memory-efficient model
model = MemoryOptimizedCNN(
num_classes=10,
use_depthwise=True,
use_checkpointing=True
)
# Get memory statistics
stats = model.get_memory_stats()
print(f"Memory usage: {stats['memory_mb']:.2f} MB")
print(f"Efficiency score: {stats['memory_efficiency_score']:.2f}")
๐ง Setup
- Clone the repository
- Install dependencies:
pip install -r requirements.txt - Configure environment variables if needed
- Run the project:
cd scripts && ./run.sh
๐ Documentation
Comprehensive Guides
- Advanced Techniques Guide - Detailed overview of all techniques
- Notebooks - Interactive tutorials with working code examples
- API Documentation - Complete API reference in source code
Key Concepts Covered
- Memory hierarchy optimization in deep learning
- Gradient checkpointing and reversible architectures
- Activation compression techniques
- Sparse neural networks and pruning
- Spectral domain operations
- External memory architectures
- Spiking neural networks
- Benchmarking and profiling
๐งช Testing
Run tests from the tests/ directory:
cd tests/
python test_*.py
๐ฎ Demos
Interactive demos are available in the demos/ folder.
๐ Results & Benchmarks
Performance Comparison
| Technique | Memory Savings | Speed | Accuracy | Best Use Case |
|---|---|---|---|---|
| Modern Hopfield | 40% | Medium | 95% | Associative memory |
| SpecNet | 25-35% | Fast | 90% | Large kernels |
| DNCs | Variable | Slow | 92% | Reasoning tasks |
| Reversible CNNs | 50-70% | Medium | 93% | Large models |
| ActNN | 80-90% | Fast | 88% | Memory-constrained |
| Sparse SNNs | 40-60% | Very Fast | 85% | Edge devices |
Visualization & Analysis
Results, visualizations, and detailed analysis are stored in the data/ and test_results/ folders.
๐ฌ Research Applications
This project implements techniques from cutting-edge research papers:
- Modern Hopfield Networks (Ramsauer et al., 2021)
- ActNN (Chen et al., 2021)
- Reversible Residual Networks (Gomez et al., 2017)
- Differentiable Neural Computers (Graves et al., 2016)
- Spiking Neural Networks (Maass, 1997)
๐ Learning Objectives
After completing this project, you will understand:
- Memory hierarchy and its impact on deep learning
- Advanced gradient checkpointing techniques
- Activation compression and quantization
- Reversible neural network architectures
- External memory systems for neural networks
- Spiking neural networks and neuromorphic computing
- Spectral domain operations in deep learning
- Memory profiling and optimization strategies
๐ค Contributing
Contributions are welcome! This project demonstrates best practices in:
- Memory-efficient neural network design
- PyTorch optimization techniques
- Comprehensive documentation
- Benchmarking and profiling
๐ Citation
If you use this code in your research, please cite:
@misc{ca23_memory_efficient_networks,
title={CA23: Advanced Memory-Efficient Neural Networks},
author={System2 in AI Course},
year={2024},
howpublished={\url{https://github.com/your-repo/Sysmem2_in_AI}}
}
๐ License
This project is part of the System2_in_AI CA collection.
๐ Related Projects
- CA18_memory_systems - General memory systems in AI
- CA19_gpu_memory_optimization - GPU-specific optimizations
- CA20_distributed_memory_systems - Distributed memory architectures
Status: โ Complete and fully functional
Last Updated: 2024 | Part of the System2_in_AI CA collection
- Total size
- 835 MB
- Files
- 10,492
- Last updated
- Jun 17
- Pre-warmed CDN
- US EU US EU