Implementation of MultiScreen
Project description
MultiScreen
Implementation of Multiscreen proposed by Ken Nakanishi for Screening is Enough
Basically it is a non-softmax attention with ReLU squared activation, content similarity thresholding, and aggressive normalization of the values.
Install
$ pip install multiscreen
Usage
import torch
from multiscreen import MultiScreen
multi_screen = MultiScreen(
num_tokens = 256,
dim = 512,
depth = 6,
heads = 8,
dim_keys = 16, # paper says 16 or 32
dim_values = 64 # paper says 64 or 128
)
token_ids = torch.randint(0, 256, (1, 1024))
logits = multi_screen(token_ids)
assert logits.shape == (1, 1024, 256)
Enwik8
$ uv run train.py
Citations
@misc{nakanishi2026screening,
title = {Screening Is Enough},
author = {Ken M. Nakanishi},
year = {2026},
eprint = {2604.01178},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2604.01178},
}
@misc{zhang2021sparse,
title = {Sparse Attention with Linear Units},
author = {Biao Zhang and Ivan Titov and Rico Sennrich},
year = {2021},
eprint = {2104.07012},
archivePrefix = {arXiv},
primaryClass = {cs.CL}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
multiscreen-0.1.1.tar.gz
(7.8 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 multiscreen-0.1.1.tar.gz.
File metadata
- Download URL: multiscreen-0.1.1.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc9ce50aa3ac66ee83dd20ac4dc2ee5b70490704e2589e9776e0715b74f7604b
|
|
| MD5 |
4b8a2540768249b6ee7a55f5987f6609
|
|
| BLAKE2b-256 |
9f4d214e52daac63f3163f36db8bc02f8f65d1b2e75569db772b17f182c0cccd
|
File details
Details for the file multiscreen-0.1.1-py3-none-any.whl.
File metadata
- Download URL: multiscreen-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06f6bef6a9acf746f2790f3d76f2eeb110d889b7a3e63e8374ca0ff10314367d
|
|
| MD5 |
0ed7911639200ddf7e8ad2c76b893b80
|
|
| BLAKE2b-256 |
c4ff7eacfb35e352e5b35a336da667c3a1deeb18b976f0d481122f30a556d22d
|