A place to store reusable transformer components found around the interwebs
Project description
transformer_nuggets
A place to store reusable transformer components of my own creation or found on the interwebs
Getting Started
Clone the repository:
git clone https://github.com/drisspg/transformer_nuggets.git
Install Package
pip install -e .
Dev Tool Chain
pip install -e ".[dev]"
pre-commit is used to make sure that I don't forget to format stuff, I am going to see if I like this or not. This should be installed when installing the dev tools.
Project Structure
-
benchmarks: Contains scripts and data related to benchmarking the transformer components.
- data: Benchmark data files.
flash.py: Benchmarking script for Flash.llama.py: Benchmarking script for Llama.qlora.py: Benchmarking script for Qlora.fp8_sat_cast.py: Benchmarks for comparing FP8 saturated casting kernel to eager and compile code.
-
transformer_nuggets: The main directory containing all transformer components/modules.
- flash: Components related to the FlashAttention.
- quant: Implementation of NF4 Tensor and QLora in pure Pytorch
- sdpa: Prototype for updated SDPA interface in Pytorch.
- fp8: Components related interacting with PyTorch FP8 tensors.
- llama: Contains a model def for llama2 models as well as a pretraining script.
- utils: General utility functions and scripts.
benchmark.py: Benchmark-related utility functions.tracing.py: Tracing utilities for transformers.
-
test: Contains test scripts for various transformer components.
test_flash.py: Tests for Flash.test_qlora.py: Tests for Qlora.test_sdpa.py: Tests for SDPA.test_fp8.py: Tests for FP8.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file transformer_nuggets-0.0.2.tar.gz.
File metadata
- Download URL: transformer_nuggets-0.0.2.tar.gz
- Upload date:
- Size: 66.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
033a2aabdcfae5edf2d31485d61cbe3897dc94a5fbe1d9dd6c91eb34e4ad3cb5
|
|
| MD5 |
e2057924cec8d92929494f740f41364f
|
|
| BLAKE2b-256 |
cfdcd4d2eccb05d51eaa9d328e4150b26c2bfd0ebe674ec13c76852e674f53e5
|
Provenance
The following attestation bundles were made for transformer_nuggets-0.0.2.tar.gz:
Publisher:
publish-to-pypi.yml on drisspg/transformer_nuggets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transformer_nuggets-0.0.2.tar.gz -
Subject digest:
033a2aabdcfae5edf2d31485d61cbe3897dc94a5fbe1d9dd6c91eb34e4ad3cb5 - Sigstore transparency entry: 271971941
- Sigstore integration time:
-
Permalink:
drisspg/transformer_nuggets@0c82bef6b06bb6ebdeff6f092549291caffe5fc1 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/drisspg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@0c82bef6b06bb6ebdeff6f092549291caffe5fc1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file transformer_nuggets-0.0.2-py3-none-any.whl.
File metadata
- Download URL: transformer_nuggets-0.0.2-py3-none-any.whl
- Upload date:
- Size: 58.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0a835d5a8784da4461a05919057d0c3abe7f3b2bfb1d875adc439045364953a
|
|
| MD5 |
308e00237c58631c64daf8a29b2d98f4
|
|
| BLAKE2b-256 |
cee676320e812c384779d00afab1d04fec552b69a833e6523aeed735c8190155
|
Provenance
The following attestation bundles were made for transformer_nuggets-0.0.2-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on drisspg/transformer_nuggets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
transformer_nuggets-0.0.2-py3-none-any.whl -
Subject digest:
d0a835d5a8784da4461a05919057d0c3abe7f3b2bfb1d875adc439045364953a - Sigstore transparency entry: 271971950
- Sigstore integration time:
-
Permalink:
drisspg/transformer_nuggets@0c82bef6b06bb6ebdeff6f092549291caffe5fc1 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/drisspg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@0c82bef6b06bb6ebdeff6f092549291caffe5fc1 -
Trigger Event:
push
-
Statement type: