Dynamic neural networks and function transformations in Python + Mojo
Project description
Nabla is a scientific computing library in Python, featuring:
- Multidimensional array computation with strong GPU acceleration
- JAX-like composable function transformations:
grad,vmap,jit, and other automatic differentiation tools - Deep integration with the MAX compiler and custom Mojo 🔥 kernels
For tutorials and API reference, visit: nablaml.com
Installation
pip install nabla-ml
Quick Start
import nabla as nb
# Example function using Nabla's array operations
def foo(input):
return nb.sum(input * input, axes=-1)
# Differentiate, vectorize, accelerate
foo_grads = nb.jit(nb.vmap(nb.grad(foo)))
gradients = foo_grads(nb.randn((10, 5)).to(nb.accelerator()))
For Developers
- Clone the repository
- Create a virtual environment (recommended)
- Install dependencies
git clone https://github.com/nabla-ml/nabla.git
cd nabla
python3 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
pip install -e ".[dev]"
Repository Structure
nabla/
├── nabla/ # Core Python library
│ ├── core/ # Array class and MAX compiler integration
│ ├── nn/ # Neural network modules and models
│ ├── ops/ # Mathematical operations (binary, unary, linalg, etc.)
│ ├── transforms/ # Function transformations (vmap, grad, jit, etc.)
│ └── utils/ # Utilities (formatting, types, MAX-interop, etc.)
├── tests/ # Comprehensive test suite
├── tutorials/ # Notebooks on Nabla usage for ML tasks
└── examples/ # Example scripts for common use cases
Contributing
Contributions welcome! Discuss significant changes in Issues first. Submit PRs for bugs, docs, and smaller features.
License
Nabla is licensed under the Apache-2.0 license.
Thank you for checking out Nabla!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nabla_ml-25.8081506.tar.gz.
File metadata
- Download URL: nabla_ml-25.8081506.tar.gz
- Upload date:
- Size: 96.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3220e90db1fc81dab6aad85fc7c9270a49ec1560e8722b39e2be357cb5cae1c
|
|
| MD5 |
4d4fd7cbbd58fad4c935e16d40e74c25
|
|
| BLAKE2b-256 |
bea3dfe9ccef3ee77c2d0c75a9e58180dd280c0c49d857012848519d7cb9c514
|
File details
Details for the file nabla_ml-25.8081506-py3-none-any.whl.
File metadata
- Download URL: nabla_ml-25.8081506-py3-none-any.whl
- Upload date:
- Size: 129.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be1d6987711ef9e6bda7c6baed6baa1a8f90b2423f523ffc7db832529346b942
|
|
| MD5 |
144762b7b55742b99982cb828aa8f9e6
|
|
| BLAKE2b-256 |
7a2cec9dbc9a11d8d598be0f8bff6d205fbac08108890468fbf7c30a9504bda1
|