Skip to main content

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

Metadata

Release files for simplified-transormer-torch 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simplified-transormer-torch 0.0.1
File Size Uploaded
simplified_transormer_torch-0.0.1.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for simplified-transormer-torch 0.0.1
File Interpreter ABI Platform
simplified_transormer_torch-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / simplified_transormer_torch-0.0.1.tar.gz

Download URL simplified_transormer_torch-0.0.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e77a019596081c1abec20c3227fd96822d631be8d444c7da8c9e6f6c494cca5c
BLAKE2b-256 checksum
How to use checksums
893c4be7eb175a4d44d1b2882b591b7edd3bb740a0fe4cdd8388fe653ef11988
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

Release files / simplified_transormer_torch-0.0.1-py3-none-any.whl

Download URL simplified_transormer_torch-0.0.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fca383ba1ad4ff9bf5484f234b71b5cc10ab940a8ced618aa5cd826985c52661
BLAKE2b-256 checksum
How to use checksums
2f8c5dbb5ea310a1d01252d4580d2f7191c800e7278818f796a9473e9e666909
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page