NABLA
Nabla is a Python library that provides three key features:
- Multidimensional Array computation (like NumPy) with strong GPU acceleration
- Composable Function Transformations:
vmap,grad,jit, and more - Deep integration with (custom) Mojo kernels
Installation
📦 Now available on PyPI!
pip install nabla-ml
Quick Start
import nabla as nb
# Example function using Nabla's array operations
def foo(input):
return nb.sum(input ** 2, axis=0)
# Vectorize, differentiate, accelerate
foo_grads = nb.jit(nb.grad(nb.vmap(foo)))
gradients = foo_grads([nb.randn((10, 5))])
Roadmap
- ✅ Function Transformations:
vmap,jit,vjp,jvp,grad - ✅ Mojo Kernel Integration: CPU/GPU acceleration working
- 👷 Extended Operations: Comprehensive math operations
- 💡 Enhanced Mojo API: When Mojo/MAX ecosystem stabilizes
Development Setup
For contributors and advanced users:
# Clone and install in development mode
git clone https://github.com/nabla-ml/nb.git
cd nabla
pip install -e ".[dev]"
# Run tests
pytest
# Format and lint code
ruff format nabla/
ruff check nabla/ --fix
Repository Structure
nabla/
├── nabla/ # Core Python library
│ ├── core/ # Function transformations and array operations
│ ├── ops/ # Mathematical operations (binary, unary, linalg)
│ ├── kernels/ # Internal CPU/GPU Mojo kernels (not the built-in MAX kernels)
│ ├── nn/ # Neural network layers and utilities
│ └── utils/ # Utilities (broadcasting, formatting, types)
├── tests/ # Comprehensive test suite
├── examples/ # MLP training and other examples
└── experimental/ # Pure Mojo API
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!
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nabla_ml-25.6021607.tar.gz
(32.9 kB
view details)
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.6021607.tar.gz.
File metadata
- Download URL: nabla_ml-25.6021607.tar.gz
- Upload date:
- Size: 32.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cb95a5419cdb902bbc9a265242b68eba3cff16dfdb0c60c701fcf9eade0ff0f
|
|
| MD5 |
c7c9bba26cd680e398fb4557bbe33a1e
|
|
| BLAKE2b-256 |
a95181fc6c155656e1da3d85d2e8b0d8266c9e7e53afcd3acee3139408429e4f
|
File details
Details for the file nabla_ml-25.6021607-py3-none-any.whl.
File metadata
- Download URL: nabla_ml-25.6021607-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ba19b441878bf2b1cdbe0b682e350ba485361897e40900598b96c617b83803f
|
|
| MD5 |
358a7881a92b7f6578d891553b88c623
|
|
| BLAKE2b-256 |
91c2103cf0adbf9a1b5b9d35c4ff69dccd4e81907a2cf3ca5663344cec6836f7
|