Skip to main content

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)

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


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.0.8.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

multiscreen-0.0.8-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file multiscreen-0.0.8.tar.gz.

File metadata

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

File hashes

Hashes for multiscreen-0.0.8.tar.gz
Algorithm Hash digest
SHA256 48351c2d7d3fe884a2a7aedf740ac0842c3a9cec20ef8b9c5dd2e5084d1c7673
MD5 d8ed8648a027873699e0e1888481bd1e
BLAKE2b-256 be41193c519fb9c6b3f515e48b19d5538a15fcbc44fc9a3e046cd5d1ff1fa0b2

See more details on using hashes here.

File details

Details for the file multiscreen-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for multiscreen-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 28c9c1a6120fbb97e8e5ebfbc37572d1425250e17b70ac633150a44ca4144938
MD5 45b9d8d26131ef427a4851b322a22ce8
BLAKE2b-256 125948a4913932e88475e75685ef09f1a99b03ec7e5fc4125740c46612ba0e1c

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