Associative Scan
Project description
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}
}
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
assoc_scan-0.0.4.tar.gz
(5.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file assoc_scan-0.0.4.tar.gz.
File metadata
- Download URL: assoc_scan-0.0.4.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d8093f6af36d2045da7d03eba0e84adeda9eb121f19f4a0cd10c97601dc06a3
|
|
| MD5 |
34a3f3e07fcedd9c788edd266aa20e2a
|
|
| BLAKE2b-256 |
ad33c8b375c8b5b6ff3b5f33845a7e02177780cbe89e3416be3440f80c0b9572
|
File details
Details for the file assoc_scan-0.0.4-py3-none-any.whl.
File metadata
- Download URL: assoc_scan-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11ba9958bb2eb1589d75667a6528043b894dfd579589090dcf3fcb139b458484
|
|
| MD5 |
734ff957fd88794c417b1bc7a61a7fa3
|
|
| BLAKE2b-256 |
b9abb1546cc79255104c7b3a66309cc665c50a63420873503598cb7bd156fe72
|