Skip to main content

assoc-scan

A minimal Pytorch implementation of an associative scan, with support for accelerated backends.

Install

$ pip install assoc-scan

Usage

import torch
from assoc_scan import AssocScan

scan = AssocScan()

gates = torch.randn(1, 1024, 512).sigmoid()
inputs = torch.randn(1, 1024, 512)

out = scan(gates, inputs) # (1, 1024, 512)

To use the accelerated version, simply pass use_accelerated = True and ensure accelerated-scan is installed.

scan = AssocScan(use_accelerated = True)

out = scan(gates, inputs)

Citations

@software{Kyrylov_Accelerated_Scan_2024,
    author    = {Kyrylov, Volodymyr},
    doi       = {10.5281/zenodo.10600962},
    month     = {jan},
    title     = {{Accelerated Scan}},
    version   = {0.1.2},
    year      = {2024}
}

Download files

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

Source Distribution

assoc_scan-0.0.5.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

assoc_scan-0.0.5-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file assoc_scan-0.0.5.tar.gz.

File metadata

  • Download URL: assoc_scan-0.0.5.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for assoc_scan-0.0.5.tar.gz
Algorithm Hash digest
SHA256 84b45d282f0c23dafaf61053f04096a7299020566be8b1178aa5dbb1514c1936
MD5 61b8e24445bbef8172162fbbc6bfdd20
BLAKE2b-256 996c66cbeb822e06390c56aefca7f1064a6f9a7b38ef68a252325f367e0e9d5f

See more details on using hashes here.

File details

Details for the file assoc_scan-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: assoc_scan-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for assoc_scan-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 48af250daed2c093f4d9ff5d0d28196a9df9756a65f0e6077463f10d72613364
MD5 eccd1f0d6bb21c56b8c284b698ae03b8
BLAKE2b-256 440a2236f75e84942fff3dba404797f61f7aa935153d568c7ae77af7f21e1b72

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

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