{"id":7609858,"url":"https://github.com/basalt-org/basalt","last_synced_at":"2025-07-12T06:31:06.034Z","repository":{"id":202886186,"uuid":"708101330","full_name":"basalt-org/basalt","owner":"basalt-org","description":"A Machine Learning framework from scratch in Pure Mojo 🔥","archived":false,"fork":false,"pushed_at":"2024-04-13T21:44:12.000Z","size":12813,"stargazers_count":156,"open_issues_count":3,"forks_count":12,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-04-13T21:55:26.639Z","etag":null,"topics":["ai","autograd","deep-learning","deep-neural-networks","machine-learning","ml","mojo","neural-network","tensor"],"latest_commit_sha":null,"homepage":"","language":"Mojo","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/basalt-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-10-21T14:29:25.000Z","updated_at":"2024-04-15T08:04:08.562Z","dependencies_parsed_at":"2024-01-17T01:24:45.806Z","dependency_job_id":"2638b84d-c83c-458a-b69a-fbe4a0ba98d5","html_url":"https://github.com/basalt-org/basalt","commit_stats":null,"previous_names":["dainemo/dainemo","basaltai/basalt","basalt-org/basalt"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basalt-org%2Fbasalt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basalt-org%2Fbasalt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basalt-org%2Fbasalt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basalt-org%2Fbasalt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basalt-org","download_url":"https://codeload.github.com/basalt-org/basalt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225799795,"owners_count":17526104,"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","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":["ai","autograd","deep-learning","deep-neural-networks","machine-learning","ml","mojo","neural-network","tensor"],"created_at":"2024-04-08T19:03:07.603Z","updated_at":"2024-11-21T20:30:57.581Z","avatar_url":"https://github.com/basalt-org.png","language":"Mojo","readme":"\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Basalt-Org/Basalt\"\u003e\n    \u003cimg src=\"https://github.com/basalt-org/basalt/assets/46826967/4873806c-ff61-4903-bf3d-874d6acba3e8\" alt=\"Logo\" width=\"200\" height=\"200\"\u003e\n  \u003c/a\u003e\n\n  \u003ch1 align=\"center\"\u003eBasalt\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    A Machine Learning framework from scratch in pure Mojo 🔥\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/contributors/Basalt-Org/Basalt?color=dark-green\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues/Basalt-Org/Basalt?color=dark-green\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/Basalt-Org/Basalt?color=dark-green\" /\u003e\n\u003c/div\u003e\n\n\n## About The Project\n\nBasalt is a stand-alone machine learning framework that leverages the power of Mojo.\n\nAs [discussed](https://docs.modular.com/mojo/why-mojo) by Modular, Mojo is a language for the future of AI development. Built on top of MLIR technology, rather than existing GCC and LLVM approaches, Mojo looks and feels like Python code, yet performs much closer to languages like Rust or C++. Parametric functions and compile time parameters allow for the graph to statically compiled. Having the static graph allows for much harder performance optimizations.\n\nBasalt, while still in its infancy, is able to achieve speeds comparable to well established frameworks like Pytorch. Below a snapshot of the current benchmarks. But keep posted, there is much more room for improvement and we are upgrading the project on a daily basis.\n\n![basalt_benchmark](https://github.com/basalt-org/basalt/assets/46826967/83037770-a9e3-440d-bdca-f51af0aebee0)\n\n\n## Quick Start\n\nTry out the benchmarks yourself:\n\n```\nmojo -I . examples/housing.mojo\n```\n```\nmojo -I . examples/sin_estimate.mojo\n```\n```\nmojo -I . examples/mnist.mojo\n```\n\nCompare to the alternative PyTorch implementation:  \nMake sure to install the requirements in `python-requirements.txt` in your python environment.\n\n```\npython examples/housing.py\npython examples/sin_estimate.py\npython examples/mnist.py\n```\n\n## Roadmap\n\n### v0.1.0 ✅\n- [x] Improve matrix multiplication and convolution kernels\n- [x] Switch to custom Tensor and TensorShape implementations\n- [x] Improve benchmarks and overall model execution performance\n- [x] Add profiling and additional performance tests\n\n### v0.2.0 (WIP)\n- [ ] Add additional operators: Slice, (Un)Squeeze, Concat, Clip, Gather, Split, FMA ...\n- [ ] Better layer support and more activation functions\n- [ ] Graph submodules \u0026 graph concatenation\n- [ ] Computer vision benchmark. \n\n### Long-Term\n- [ ] Better parallelization\n- [ ] GPU support\n- [ ] Reworked Dataloader\n- [ ] Autotuning and related features\n- [ ] Graph compilation optimizations\n- [ ] Operator fusion\n- [ ] ONNX / Max compatibility\n\n## Contributing\n\nBasalt is built by community efforts and relies on your expertise and enthousiasm!  \nSmall fixes and improvements are much appreciated. If you are considering larger contributions, feel free to contact us for a smoother communication channel on Discord. If you find a bug or have an idea for a feature, please use our issue tracker. Before creating a new issue, please:\n* Check if the issue already exists. If an issue is already reported, you can contribute by commenting on the existing issue.\n* If not, create a new issue and include all the necessary details to understand/recreate the problem or feature request.\n\n### Creating A Pull Request\n\n1. Fork the Project\n2. Create your Feature Branch\n3. Commit your Changes\n4. Push to the Branch\n5. Open a Pull Request\n\u003e Once your changes are pushed, navigate to your fork on GitHub. And create a pull request against the original basalt-org/basalt repository.\n\u003e - Before creating a PR make sure it doesn't break any of the unit-tests. (e.g. `mojo run -I . test/test_ops.mojo`)\n\u003e - Introducing new big features requires a new test!\n\u003e - In the pull request, provide a detailed description of the changes and why they're needed. Link any relevant issues.\n\u003e - If there are any specific instructions for testing or validating your changes, include those as well.\n\n## License\n\nDistributed under the Apache 2.0 License with LLVM Exceptions. See [LICENSE](https://github.com/Basalt-Org/Basalt/blob/main/LICENSE) and the LLVM [License](https://llvm.org/LICENSE.txt) for more information.\n\n## Acknowledgements\n\n* Built with [Mojo](https://github.com/modularml/mojo) created by [Modular](https://github.com/modularml)\n","funding_links":[],"categories":["Machine Learning","🗂️ Libraries\u003ca id='libraries'\u003e\u003c/a\u003e"],"sub_categories":["AI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasalt-org%2Fbasalt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasalt-org%2Fbasalt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasalt-org%2Fbasalt/lists"}