Skip to content

About

Composable PyTorch transformers for vision, spatial, and sequence research.

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Stackformers

CI PyPI License: MIT

Composable PyTorch transformers for research.

Build vision, spatial, and sequence models with interchangeable attention, positional encodings, normalization, and feedforward components. Start with a preset, then replace individual components as your experiments evolve.

  • Experiment with architecture: explicit, serializable configurations and structural protocols let you supply your own components.
  • Work with variable-length data: run the same encoder weights on padded or packed token batches, with explicit token coordinates.
  • Connect research and deployment: examples cover image patches, point clouds, causal modeling, custom components, and cached ONNX Runtime decoding.

Install

Install from PyPI with pip:

pip install --upgrade stackformers

Or add it to your uv project:

uv add stackformers

Try the latest prerelease

Use --pre to include newer prereleases when upgrading:

pip install --upgrade --pre stackformers

With uv:

uv add --upgrade --prerelease allow stackformers

For an existing virtual environment, uv pip install --upgrade --pre stackformers is also supported. These commands select the newest compatible published version, including prereleases. Pin the version you validate for an experiment; see the research guide.

Run your first encoder