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}
}
Metadata
Release files for assoc-scan 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| assoc_scan-0.0.6.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| assoc_scan-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / assoc_scan-0.0.6.tar.gz
| Download URL | assoc_scan-0.0.6.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a9431db5dcf329f2aacc09ff82809ad4409473a1d97d9506e60d2824f9e1bf9
|
|
BLAKE2b-256 checksum How to use checksums |
6cd1667afad0bb3867634d36b54451817d1651fa4747f121f33c8969641b92a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Release files / assoc_scan-0.0.6-py3-none-any.whl
| Download URL | assoc_scan-0.0.6-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1b62f56cd68c38118257d7acb839b9b41ef870a4e24c0eeeae85a80ddffd900
|
|
BLAKE2b-256 checksum How to use checksums |
5570bd6c2d472225858560c30c9693622f679c6a26b6ec3a01149269f1f7777b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|