Skip to main content

A lightweight, transparent alternative to PyTorch/TensorFlow built on NumPy.

Project description

leanpass

A minimal, transparent NumPy-based autograd library for small models.

Features

  • Tensor with reverse-mode autodiff
  • Operators: +, -, *, /, **, @
  • Activations: relu, sigmoid, softmax
  • Linear and MLP modules
  • SGD and Adam optimizers
  • Graph visualization via Tensor.visualize_dot()

Install

pip install .

Quick start

from leanpass import Tensor, nn, optim

x = Tensor([[1.0, 2.0]], requires_grad=False)
model = nn.MLP([2, 16, 3])
logits = model(x)

Run demo

python demo.py

Publish to PyPI

  1. Update version in pyproject.toml.
  2. Install build tools:
python -m pip install --upgrade build twine
  1. Build distribution files:
python -m build
  1. Upload to PyPI:
python -m twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leanpass-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

leanpass-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file leanpass-0.1.0.tar.gz.

File metadata

  • Download URL: leanpass-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for leanpass-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7203741dbfaef300c361bfce3f186930fc108ee5b1b62c300ad65db6e192536
MD5 f96b2824143aed5dff8f9e44d7d5856f
BLAKE2b-256 6102ea569bbc988ad6cd330482b75ac53fa70610b5d7703ed592e11a90b22371

See more details on using hashes here.

File details

Details for the file leanpass-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: leanpass-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for leanpass-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c67e9dbb6a7b50c988138c5c87da51b9c501675e69ee71494fc71b900871148
MD5 d49dc631eafd00c0029b12308edcfc4e
BLAKE2b-256 de4abf87a37cd439a6231bf7d2b95b2778fa7eb9ccf4fc9ba1b77b8f69c157c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page