magnetron  by MarioSieg

Minimalist PyTorch alternative for research/production

created 7 months ago
554 stars

Top 58.7% on sourcepulse

GitHubView on GitHub
Project Summary

Magnetron is a minimalistic, C99 and Python-based deep learning framework designed for learning and research, offering a PyTorch-like API with automatic differentiation and multithreaded CPU compute. It targets developers and researchers seeking a transparent and modifiable alternative to larger frameworks.

How It Works

Magnetron leverages a C99 core for performance-critical operations, including SIMD-optimized tensor computations (SSE4, AVX2, AVX512, ARM NEON), and provides a modern Python API for ease of use. Its design emphasizes a dynamic computation graph for eager evaluation and includes features like broadcasting, in-place operations, and high-level neural network building blocks.

Quick Start & Requirements

  • Install: Clone the repo, cd magnetron/python, pip install -r requirements.txt (for examples), then cd magnetron_framework && bash install_wheel_local.sh.
  • Prerequisites: Linux, macOS, or Windows; C99 compiler (gcc, clang, msvc); Python 3.6+.
  • Dependencies: CFFI (for Python bindings). Matplotlib and NumPy are optional for examples.
  • Demo: python examples/simple/xor.py
  • Docs: Explore the docs »

Highlighted Details

  • Multithreaded CPU backend with dynamic scaling and thread pooling.
  • SIMD optimized operators (SSE4, AVX2, AVX512, ARM NEON).
  • Modern Python API with broadcasting and in-place variants.
  • Dynamic computation graph (eager evaluation).

Maintenance & Community

Developed by a single person in their free time; currently a Work in Progress (WIP). No community links (Discord/Slack) or roadmap details are provided in the README.

Licensing & Compatibility

Distributed under the Apache 2 License. Permissive for commercial use and closed-source linking.

Limitations & Caveats

The project is in its early stages (WIP) with many features missing and is not yet fully optimized. GPU compute (CUDA), low-precision datatypes, and distributed training are planned but not yet implemented.

Health Check
Last commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
7 stars in the last 90 days

Explore Similar Projects

Starred by Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake) and Travis Fischer Travis Fischer(Founder of Agentic).

lingua by facebookresearch

0.1%
5k
LLM research codebase for training and inference
created 9 months ago
updated 2 weeks ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Nathan Lambert Nathan Lambert(AI Researcher at AI2), and
1 more.

tianshou by thu-ml

0.1%
9k
PyTorch RL library for algorithm development and application
created 7 years ago
updated 1 day ago
Starred by Peter Norvig Peter Norvig(Author of Artificial Intelligence: A Modern Approach; Research Director at Google), Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), and
45 more.

tensorflow by tensorflow

0.1%
191k
Open-source ML framework
created 9 years ago
updated 23 hours ago
Feedback? Help us improve.