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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simplified_transormer_torch-0.0.1.tar.gz | 4.2 kB | Without provenance | Details for simplified_transormer_torch-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simplified_transormer_torch-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for simplified_transormer_torch-0.0.1-py3-none-any.whl |
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
|
Security for simplified-transormer-torch 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.