Skip to main content

alt text

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

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 * 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.

# 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.

# 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.

# Navigate to the benchmark directory
cd nabla/tests/benchmarks

# Run the benchmark script
python benchmark1.py

Repository Structure

alt 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.


Thank you for checking out Nabla!

Development Status PyPI version Python 3.12+ License: Apache 2.0

Metadata

Release files for nabla-ml 25.8061229

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nabla-ml 25.8061229
File Size Uploaded Provenance Actions
nabla_ml-25.8061229.tar.gz 195.3 kB Without provenance Details for nabla_ml-25.8061229.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nabla-ml 25.8061229
File Interpreter ABI Platform Actions
nabla_ml-25.8061229-py3-none-any.whl Python 3 none any Details for nabla_ml-25.8061229-py3-none-any.whl

Total release size: 461.6 kB

Release files / nabla_ml-25.8061229.tar.gz

Download URL nabla_ml-25.8061229.tar.gz
Size 195.3 kB
Tags Source
SHA-256 checksum
How to use checksums
79bf818eb2b1951419770a5b7d61e338c1a5bb991be307662e6c2b46fe00b518
BLAKE2b-256 checksum
How to use checksums
d182fac8b05dbd62b875852ce877d1bdb36819f7bc50738582ed9308729e267b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / nabla_ml-25.8061229-py3-none-any.whl

Download URL nabla_ml-25.8061229-py3-none-any.whl
Size 266.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f8753f7a81ce3a0d71a1821558521ec2232b8beaf1ddc7eb03b8b1eb1b44ba9
BLAKE2b-256 checksum
How to use checksums
5c4bc46fb62349a504baaee24096f22aebe7e476404e08506621f9b5bebef9fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for nabla-ml 25.8061229

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page