Skip to main content

Transformers from scratch

Project description

Rawformer

This library implements transformer architectures from pure PyTorch. It's not production ready, more so for my personal use and understanding.

Supported architectures:

  • ViT

Supported positional encodings:

  • Learned
  • RoPE (1D and 2D)

This library uses runtime checks to validate itself and throw better error messages early. NOTE: Beartype is incompatible with torch.compile.

  • Turn off runtime type checking with env var: BEARTYPE=0
  • Turn off python interpreter's assert statements with env var: PYTHONOPTIMIZE=1

Developer install

uv sync --extra cpu
uv sync --extra cuda

pre-commit install
pre-commit run --all-files

uv pip install -e .

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

rawformer-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

rawformer-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file rawformer-0.1.0.tar.gz.

File metadata

  • Download URL: rawformer-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rawformer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d07b2dc5de86c511c05719f7f1dccc58c17a0ccdde08138d717ab06166f3c51f
MD5 897975e4fa0058cf1a50cf7bfc05b5ad
BLAKE2b-256 19b325356e0a67c46b8cd142c25ac88b8d6fc32453c524176a9adfef1f0c9b51

See more details on using hashes here.

File details

Details for the file rawformer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rawformer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rawformer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72005f8de079ea89d018f1e7e2afec16e239e9262999f249fae84c01554aed1a
MD5 742ca7cb5f8f244d1dc031195747383e
BLAKE2b-256 73c406c302a573eee57ba1550a023b0e8d9f7f6b4c67e4e6ffd49d31031f7471

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