A Machine Learning framework from scratch in Mojo 🔥
Task | Dataset | Forward | Backward | Training |
---|---|---|---|---|
REGRESSION | ✅ | ✅ | ✅ | ✅ |
MNIST | ✅ | ❌ | ❌ | ❌ |
Regression example:
Running a regression example
mojo run -I . examples/housing.mojo
Compare to a alternative PyTorch implementation:
Install the requirements in python-requirements.txt
python examples/housing.py
❌: Not implemented
✅: Working (but might require changes because of not implemented dependencies)
WIP: Work in progress
Task | Status |
---|---|
NODE | ✅ |
GRAPH | ✅ |
Task | Status |
---|---|
ADD | ✅ |
SUB | ✅ |
MUL | ✅ |
DIV | ✅ |
DOT | ✅ |
EXP | ✅ |
LOG | ✅ |
POW | ✅ |
SUM | ✅* |
TRANSPOSE | ✅ |
FLATTEN | ✅ |
RESHAPE | ✅ |
CONV2D | ✅ |
CONV3D | ❌ |
MAXPOOL2D | ❌ |
MAXPOOL3D | ❌ |
Task | Status |
---|---|
MSE | ✅ |
CE | ❌ |
BCE | ❌ |
SoftmaxCE | ❌ |
Task | Status |
---|---|
RELU | ❌ |
SIGMOID | ❌ |
TANH | ❌ |
SOFTMAX | ❌ |
LEAKYRELU | ❌ |
Task | Status |
---|---|
ADAM | ✅ |
Task | Status |
---|---|
SEQUENTIAL | ❌ |
LINEAR | ✅ |
DROPOUT | ❌ |
CONV2D | ✅ |
CONV3D | ❌ |
MAXPOOL2D | ❌ |
MAXPOOL3D | ❌ |
Task | Status |
---|---|
Model abstractions (eval/save/load/...) | ❌ |
Datasets (MNIST/Boston Housing) | ✅ |
Dataloader | ✅ |
Tensorutils | ✅ |
Checkpoints | ❌ |
Task | Original | Included Kaggle CSV |
---|---|---|
Bosten Housing Dataset | names, data | kaggle |
MNIST DataSet | training images, training labels, test images, test labels |
(subset of) kaggle |
Policy WIP.
This project is in active development, and we welcome contributions:
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix.
- Commit your changes with clear, descriptive commit messages.
- Push your branch to GitHub and submit a pull request.
We appreciate any and all contributions, whether they're for bug fixes, new features, or documentation improvements.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
A huge thanks to pranftw for the inspiration and support! This project is inspired by neograd.