transformer_nuggets
A grab-bag of experimental transformer kernels and utilities (mostly PyTorch + Triton).
What’s in here
transformer_nuggets/flash: Triton FlashAttention experiments + masking/bias utilities.transformer_nuggets/quant: NF4 tensor subclass + QLoRA building blocks (pure PyTorch).transformer_nuggets/fp8: FP8 casting / scaled-quantization kernels (Triton). Try helion :)transformer_nuggets/cute: CUTE DSL experiments and tooling (includes an intra-kernel profiler).transformer_nuggets/misc: Odds and ends (e.g. attention wrappers, utilities).transformer_nuggets/llama: LLaMA-ish model + training/finetune scripts (research-grade).
This repository is research code: APIs are not stable and may change.
Install
You’ll need a working PyTorch install first (CPU or CUDA). Follow the official PyTorch install instructions.
To install from PyPI:
pip install transformer_nuggets
To hack on the code locally:
git clone https://github.com/drisspg/transformer_nuggets.git
cd transformer_nuggets
pip install -e .
Optional extras:
pip install "transformer_nuggets[flash]" # triton
pip install "transformer_nuggets[qlora]" # bitsandbytes (optional comparisons)
pip install "transformer_nuggets[llama]" # llama training utilities
Quick examples
Use torchao :)
FlashAttention (requires CUDA + Triton; API is experimental):
Use flex-attention :)
CUTE intra-kernel profiling (writes a Perfetto trace):
python -m transformer_nuggets.cute.profiler.example
Repo layout
transformer_nuggets/: Python package.benchmarks/: Microbenchmarks and profiling scripts.examples/: Small runnable examples.scripts/: One-off utilities.test/: PyTest suite.
Development
pip install -e ".[dev]"
pre-commit install
pytest
Metadata
Release files for transformer-nuggets 0.0.4
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 |
|---|---|---|---|---|
| transformer_nuggets-0.0.4.tar.gz | 172.2 kB | With provenance | Details for transformer_nuggets-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| transformer_nuggets-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for transformer_nuggets-0.0.4-py3-none-any.whl |
Total release size: 322.9 kB
Release files / transformer_nuggets-0.0.4.tar.gz
| Download URL | transformer_nuggets-0.0.4.tar.gz |
|---|---|
| Size | 172.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fad327ea13723713f058cdf0f1e78f4e1f3b2e57745f879894a615605b93c19b
|
|
BLAKE2b-256 checksum How to use checksums |
2aef7518309dba625e0975ba88b98bb239edee25d0725feffc4085fee3782104
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.
Transparency logRelease files / transformer_nuggets-0.0.4-py3-none-any.whl
| Download URL | transformer_nuggets-0.0.4-py3-none-any.whl |
|---|---|
| Size | 150.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e6101014206ab4ae5eeeaa054681ce302032bd16ad989dd5dc95ed165971996
|
|
BLAKE2b-256 checksum How to use checksums |
7406049317711e2c7a9b72bc1f9e49a416a22dcb642d779c8025410d2fd2f66c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.
Transparency logSecurity for transformer-nuggets 0.0.4
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for transformer_nuggets-0.0.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 23, 2026.
Transparency logA 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.