Skip to main content

Paper - Pytorch

Project description

Multi-Modality

SimplifiedTransformers

The author presents an implementation for Simplifying Transformer Blocks. The standard transformer blocks are complex and can lead to architecture instability. In this work, the author investigates how the standard transformer block can be simplified. Through signal propagation theory and empirical observations, the author proposes modifications that remove several components without sacrificing training speed or performance. The simplified transformers achieve the same training speed and performance as standard transformers, while being 15% faster in training throughput and using 15% fewer parameters.

Install




Usage

import torch
from simplified_transformers.main import SimplifiedTransformers

model = SimplifiedTransformers(
    dim=4096,
    depth=6,
    heads=8,
    num_tokens=20000,
)

x = torch.randint(0, 20000, (1, 4096))

out = model(x)
print(out.shape)

License

MIT

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

simplified_transormer_torch-0.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

simplified_transormer_torch-0.0.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file simplified_transormer_torch-0.0.1.tar.gz.

File metadata

  • Download URL: simplified_transormer_torch-0.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for simplified_transormer_torch-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e77a019596081c1abec20c3227fd96822d631be8d444c7da8c9e6f6c494cca5c
MD5 e659534b31995485168218637f95134e
BLAKE2b-256 893c4be7eb175a4d44d1b2882b591b7edd3bb740a0fe4cdd8388fe653ef11988

See more details on using hashes here.

File details

Details for the file simplified_transormer_torch-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for simplified_transormer_torch-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fca383ba1ad4ff9bf5484f234b71b5cc10ab940a8ced618aa5cd826985c52661
MD5 2e0cc7816743c8db3b4c5ba42758e960
BLAKE2b-256 2f8c5dbb5ea310a1d01252d4580d2f7191c800e7278818f796a9473e9e666909

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