{"id":24034661,"url":"https://github.com/MarioSieg/magnetron","last_synced_at":"2025-09-15T05:31:21.092Z","repository":{"id":270863842,"uuid":"911371111","full_name":"MarioSieg/magnetron","owner":"MarioSieg","description":"(WIP) A small but powerful, homemade PyTorch from scratch.","archived":false,"fork":false,"pushed_at":"2025-09-09T09:29:07.000Z","size":27858,"stargazers_count":638,"open_issues_count":0,"forks_count":30,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-09-09T12:43:49.734Z","etag":null,"topics":["artificial-intelligence","cpp","cuda","high-performance-computing","machine-learning","neuronal-network","python","pytorch","research-project","tensorflow","tiny"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarioSieg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"MarioSieg"}},"created_at":"2025-01-02T21:25:56.000Z","updated_at":"2025-09-06T23:34:55.000Z","dependencies_parsed_at":"2025-01-18T17:20:40.152Z","dependency_job_id":"fed0b5de-6b3c-4351-af5e-7da011c832ae","html_url":"https://github.com/MarioSieg/magnetron","commit_stats":null,"previous_names":["mariosieg/magnetron"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/MarioSieg/magnetron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioSieg%2Fmagnetron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioSieg%2Fmagnetron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioSieg%2Fmagnetron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioSieg%2Fmagnetron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarioSieg","download_url":"https://codeload.github.com/MarioSieg/magnetron/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioSieg%2Fmagnetron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275208524,"owners_count":25424042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","cpp","cuda","high-performance-computing","machine-learning","neuronal-network","python","pytorch","research-project","tensorflow","tiny"],"created_at":"2025-01-08T19:00:48.370Z","updated_at":"2025-09-15T05:31:21.080Z","avatar_url":"https://github.com/MarioSieg.png","language":"C","funding_links":["https://github.com/sponsors/MarioSieg"],"categories":["Frameworks"],"sub_categories":[],"readme":"[![Stargazers][stars-shield]][stars-url]\n[![Forks][forks-shield]][forks-url]\n[![Issues][issues-shield]][issues-url]\n![GitHub Actions Workflow Status][ci-shield]\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/MarioSieg/magnetron\"\u003e\n    \u003cimg src=\"media/magnetron-logo.svg\" alt=\"Logo\" width=\"200\" height=\"200\"\u003e\n  \u003c/a\u003e\n\n\u003ch3 align=\"center\"\u003emagnetron\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    Super minimalistic machine-learning framework.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/MarioSieg/magnetron/tree/master/docs\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/MarioSieg/magnetron/blob/master/examples/gpt2/gpt2.py\"\u003eView GPT-2 Example\u003c/a\u003e\n    |\n    \u003ca href=\"https://github.com/MarioSieg/magnetron/issues/new?labels=bug\u0026template=bug-report---.md\"\u003eReport Bug\u003c/a\u003e\n    |\n    \u003ca href=\"https://github.com/MarioSieg/magnetron/issues/new?labels=enhancement\u0026template=feature-request---.md\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## 📖 About\n\nMagnetron is a minimalistic, PyTorch-inspired machine-learning framework designed for IoT and other resource-limited environments.\u003cbr\u003e\nThe tiny C core - wrapped in a modern Python API - gives you dynamic graphs, automatic differentiation and network building blocks without the bloat.\u003cbr\u003e\nA CUDA backend is also WIP.\u003cbr\u003e\n\n### Key features\n* **PyTorch-close** Python API  \n  - Seamless switch for PyTorch users with familiar syntax and behavior \n* **Automatic differentiation** on dynamic computation graphs  \n  - Supports flexible model construction and training workflows  \n* High-level **neural-net building blocks**  \n  - Includes `nn.Module`, `Linear`, `Sequential`, and more out of the box\n* **Highly optimized CPU kernels**\n  - Runtime CPU detection, multithreading, and SIMD acceleration (SSE, AVX2, AVX512, NEON)\n* Multiple **datatypes**: **float32**, **float16**, **int32**, and **boolean**  \n  - Flexibility for both training and quantized inference  \n* Custom **compressed tensor file formats**  \n  - Fast serialization \u0026 model loading\n* Clear **validation** and **error messages**  \n  - Easier debugging and better developer experience\n* No external **C or Python dependencies** (except **CFFI** for the Python wrapper)  \n  - Lightweight and portable - great for embedded or restricted environments\n\n\n## 📦 Installation\n\nMake sure you are inside a **Python virtual environment** before installing.\n\n**With pip**\n```bash\npip install magnetron\n```\n\n**With uv**\n```bash\nuv pip install magnetron\n```\n\u003e ⚠️ Currently, prebuilt wheels are available for **macOS (Apple Silicon)** and **Linux x86-64**.  \n\u003e On other platforms, the package must be built from source.\n\n## 🧪 Examples\n\n### GPT-2 inference\n\n### Training a simple feedforward network\n\n## 🤝 Contributing\nContributions are welcome!  \nPlease open issues for ideas, or submit pull requests for new **features**.  \nPRs that only fix typos or minor formatting will not be accepted.\n\n## 📜 License\n(c) 2025 Mario Sieg. mario.sieg.64@gmail.com\u003cbr\u003e\nDistributed under the Apache 2 License.\nSee `LICENSE` for more information.\n\n## 🧩 Similar Projects\n\n* [GGML](https://github.com/ggerganov/ggml)\n* [TINYGRAD](https://github.com/tinygrad/tinygrad)\n* [MICROGRAD](https://github.com/karpathy/micrograd)\n\n[contributors-shield]: https://img.shields.io/github/contributors/MarioSieg/magnetron.svg?style=for-the-badge\n[contributors-url]: https://github.com/MarioSieg/magnetron/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/MarioSieg/magnetron.svg?style=for-the-badge\n[forks-url]: https://github.com/MarioSieg/magnetron/network/members\n[stars-shield]: https://img.shields.io/github/stars/MarioSieg/magnetron.svg?style=for-the-badge\n[stars-url]: https://github.com/MarioSieg/magnetron/stargazers\n[issues-shield]: https://img.shields.io/github/issues/MarioSieg/magnetron.svg?style=for-the-badge\n[issues-url]: https://github.com/MarioSieg/magnetron/issues\n[license-shield]: https://img.shields.io/github/license/MarioSieg/magnetron.svg?style=for-the-badge\n[license-url]: https://github.com/MarioSieg/magnetron/blob/master/LICENSE.txt\n[ci-shield]: https://img.shields.io/github/actions/workflow/status/MarioSieg/magnetron/cmake-python-multi-platform.yml?style=for-the-badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarioSieg%2Fmagnetron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMarioSieg%2Fmagnetron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarioSieg%2Fmagnetron/lists"}