
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 other Automatic Differentiation tools
- Deep integration with MAX and (custom) Mojo kernels
For tutorials and API reference, visit: [nablaml.com](https://nablaml.com/index.html)
## Installation
**Now available on PyPI!**
```bash
pip install nabla-ml
```
## Quick Start
```python
import nabla as nb
# Example function using Nabla's array operations
def foo(input):
return nb.sum(input * input, axes=0)
# Vectorize, differentiate, accelerate
foo_grads = nb.jit(nb.vmap(nb.grad(foo)))
gradients = foo_grads(nb.randn((10, 5)))
```
## Development Setup and Reproducibility
This guide is for contributors or for reproducing the validation and benchmark results.
### 1. Initial Setup
First, clone the repository and set up a virtual environment with all necessary dependencies.
```bash
# Clone the repository
git clone https://github.com/nabla-ml/nabla.git
cd nabla
# Create and activate a virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
# Install all core and development dependencies
pip install -r requirements-dev.txt
pip install -e ".[dev]"
```
### 2. Run the Correctness Validation Suite
This runs the full test suite to verify Nabla's correctness against JAX.
```bash
# Navigate to the unit test directory from the project root
cd nabla/tests/unit
# Execute the unified test script
python unified.py all -all-configs
```
### 3. Run the Performance Benchmarks
This script reproduces the performance benchmarks for Nabla, JAX, and PyTorch.
```bash
# Navigate to the benchmark directory
cd nabla/tests/benchmarks
# Run the benchmark script
python benchmark1.py
```
## Repository Structure

```text
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
└── experimental/ # Core (pure) Mojo library (WIP!)
```
## 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](https://github.com/nabla-ml/nabla/blob/main/LICENSE).
---
*Thank you for checking out Nabla!*
[](https://github.com/nabla-ml/nabla)
[](https://badge.fury.io/py/nabla-ml)
[](https://www.python.org/downloads/)
[](https://www.apache.org/licenses/LICENSE-2.0)
Raw data
{
"_id": null,
"home_page": null,
"name": "nabla-ml",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "deep learning, machine learning, jax, autodiff, nabla, mojo, max, gpu, vmap, grad",
"author": null,
"author_email": "TilliFe <tillmann.fehrenbach@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d1/82/fac8b05dbd62b875852ce877d1bdb36819f7bc50738582ed9308729e267b/nabla_ml-25.8061229.tar.gz",
"platform": null,
"description": "\n\nNabla is a Python library that provides three key features:\n\n- Multidimensional Array computation (like NumPy) with strong GPU acceleration\n- Composable Function Transformations: `vmap`, `grad`, `jit`, and other Automatic Differentiation tools\n- Deep integration with MAX and (custom) Mojo kernels\n\nFor tutorials and API reference, visit: [nablaml.com](https://nablaml.com/index.html)\n\n## Installation\n\n**Now available on PyPI!**\n\n```bash\npip install nabla-ml\n```\n\n## Quick Start\n\n```python\nimport nabla as nb\n\n# Example function using Nabla's array operations\ndef foo(input):\n return nb.sum(input * input, axes=0)\n\n# Vectorize, differentiate, accelerate\nfoo_grads = nb.jit(nb.vmap(nb.grad(foo)))\ngradients = foo_grads(nb.randn((10, 5)))\n```\n\n## Development Setup and Reproducibility\n\nThis guide is for contributors or for reproducing the validation and benchmark results.\n\n### 1. Initial Setup\n\nFirst, clone the repository and set up a virtual environment with all necessary dependencies.\n\n```bash\n# Clone the repository\ngit clone https://github.com/nabla-ml/nabla.git\ncd nabla\n\n# Create and activate a virtual environment (recommended)\npython3 -m venv venv\nsource venv/bin/activate\n\n# Install all core and development dependencies\npip install -r requirements-dev.txt\npip install -e \".[dev]\"\n```\n\n### 2. Run the Correctness Validation Suite\n\nThis runs the full test suite to verify Nabla's correctness against JAX.\n\n```bash\n# Navigate to the unit test directory from the project root\ncd nabla/tests/unit\n\n# Execute the unified test script\npython unified.py all -all-configs\n```\n\n### 3. Run the Performance Benchmarks\n\nThis script reproduces the performance benchmarks for Nabla, JAX, and PyTorch.\n\n```bash\n# Navigate to the benchmark directory\ncd nabla/tests/benchmarks\n\n# Run the benchmark script\npython benchmark1.py\n```\n\n## Repository Structure\n\n\n\n```text\nnabla/\n\u251c\u2500\u2500 nabla/ # Core Python library\n\u2502 \u251c\u2500\u2500 core/ # Array class and MAX compiler integration\n\u2502 \u251c\u2500\u2500 nn/ # Neural network modules and models\n\u2502 \u251c\u2500\u2500 ops/ # Mathematical operations (binary, unary, linalg, etc.)\n\u2502 \u251c\u2500\u2500 transforms/ # Function transformations (vmap, grad, jit, etc.)\n\u2502 \u2514\u2500\u2500 utils/ # Utilities (formatting, types, MAX-interop, etc.)\n\u251c\u2500\u2500 tests/ # Comprehensive test suite\n\u251c\u2500\u2500 tutorials/ # Notebooks on Nabla usage for ML tasks\n\u251c\u2500\u2500 examples/ # Example scripts for common use cases\n\u2514\u2500\u2500 experimental/ # Core (pure) Mojo library (WIP!)\n```\n\n## Contributing\n\nContributions welcome! Discuss significant changes in Issues first. Submit PRs for bugs, docs, and smaller features.\n\n## License\n\nNabla is licensed under the [Apache-2.0 license](https://github.com/nabla-ml/nabla/blob/main/LICENSE).\n\n---\n\n*Thank you for checking out Nabla!*\n\n[](https://github.com/nabla-ml/nabla)\n[](https://badge.fury.io/py/nabla-ml)\n[](https://www.python.org/downloads/)\n[](https://www.apache.org/licenses/LICENSE-2.0)\n",
"bugtrack_url": null,
"license": null,
"summary": "Dynamic neural networks and function transformations in Python + Mojo",
"version": "25.8061229",
"project_urls": {
"Bug Tracker": "https://github.com/nabla-ml/nabla/issues",
"Homepage": "https://github.com/nabla-ml/nabla",
"Repository": "https://github.com/nabla-ml/nabla"
},
"split_keywords": [
"deep learning",
" machine learning",
" jax",
" autodiff",
" nabla",
" mojo",
" max",
" gpu",
" vmap",
" grad"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5c4bc46fb62349a504baaee24096f22aebe7e476404e08506621f9b5bebef9fb",
"md5": "d46d1de0a97224d853bf990c1c810b7d",
"sha256": "7f8753f7a81ce3a0d71a1821558521ec2232b8beaf1ddc7eb03b8b1eb1b44ba9"
},
"downloads": -1,
"filename": "nabla_ml-25.8061229-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d46d1de0a97224d853bf990c1c810b7d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 266306,
"upload_time": "2025-08-06T10:29:55",
"upload_time_iso_8601": "2025-08-06T10:29:55.889011Z",
"url": "https://files.pythonhosted.org/packages/5c/4b/c46fb62349a504baaee24096f22aebe7e476404e08506621f9b5bebef9fb/nabla_ml-25.8061229-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d182fac8b05dbd62b875852ce877d1bdb36819f7bc50738582ed9308729e267b",
"md5": "90bb3cd333d01d65cd37d4c994bd3e0b",
"sha256": "79bf818eb2b1951419770a5b7d61e338c1a5bb991be307662e6c2b46fe00b518"
},
"downloads": -1,
"filename": "nabla_ml-25.8061229.tar.gz",
"has_sig": false,
"md5_digest": "90bb3cd333d01d65cd37d4c994bd3e0b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 195303,
"upload_time": "2025-08-06T10:29:57",
"upload_time_iso_8601": "2025-08-06T10:29:57.831276Z",
"url": "https://files.pythonhosted.org/packages/d1/82/fac8b05dbd62b875852ce877d1bdb36819f7bc50738582ed9308729e267b/nabla_ml-25.8061229.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-06 10:29:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nabla-ml",
"github_project": "nabla",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": [
[
">=",
"1.22"
],
[
"<",
"2.0.0"
]
]
},
{
"name": "modular",
"specs": [
[
">=",
"25.0.0"
]
]
}
],
"lcname": "nabla-ml"
}