Skip to main content

Vortex

This repository contains implementations of computational primitives for convolutional multi-hybrid models and layers: Hyena-[SE, MR, LI], StripedHyena 2, Evo 2.

For training, please refer to the savanna project.

Interface

There are two main ways to interface with vortex:

  1. Use vortex as the inference engine for pre-trained multi-hybrids such as Evo 2 40B. In this case, we recommend installing vortex in a new environment (see below).
  2. Import from vortex specific classes, kernels or utilities to work with custom convolutional multi-hybrids. For example,sourcing utilities from hyena_ops.interface.

1. Pip install

The simplest way to install vortex is from PyPi or github.

Requirements

Vortex requires PyTorch and Transformer Engine, and it is strongly recommended to also use Flash Attention. For detailed instructions and compatibility information, please refer to their respective GitHub repositories. Note TransformerEngine requires python 3.12 and has these additional system requirements.

Example of installing prerequisites. We recommended using conda for easy installation of Transformer Engine:

conda install -c nvidia cuda-nvcc cuda-cudart-dev
conda install -c conda-forge transformer-engine-torch==2.3.0
pip install flash-attn==2.8.0.post2

Installing vortex

After installing the requirements, you can install vortex:

pip install vtx

or you can install vortex after cloning the repository:

pip install .

Installing without Transformer Engine (Evo 2 7b only)

If your environment cannot build Transformer Engine (e.g., incompatible CUDA/Python version), you can skip it. The Evo 2 7b models (8k, 262k, 1m context) work without TE in pure bfloat16:

pip install vtx

Note: Evo 2 40b, 20b, and 1b models require Transformer Engine for FP8 support and will not load without it.

2. Quick install for vortex ops

make setup-vortex-ops

Note that this does not install all dependencies required to run autoregressive inference with larger pre-trained models.

3. Running in a Docker environment

Docker is one of the easiest ways to get started with Vortex (and Evo 2). The Docker environment does not depend on the currently installed CUDA version and ensures that major dependencies (such as PyTorch and Transformer Engine) are pinned to specific versions, which is beneficial for reproducibility.

To run Evo 2 40B generation sample, simply run ./run.

To run Evo 2 7B generation sample: sz=7 ./run.

To run tests: ./run ./run_tests.

To interactively execute commands in docker environment: ./run bash.

Generation quickstart

python3 generate.py \
    --config_path <PATH_TO_CONFIG> \
    --checkpoint_path <PATH_TO_CHECKPOINT> \
    --input_file <PATH_TO_INPUT_FILE> \
    --cached_generation

--cached_generation activates KV-caching and custom caching for different variants of Hyena layers, reducing peak memory usage and latency.

Acknowledgements

Vortex was developed by Michael Poli (Zymrael) and Garyk Brixi (garykbrixi). Vortex maintainers include Michael Poli (Zymrael), Garyk Brixi (garykbrixi), Anton Vorontsov (antonvnv) with contributions from Amy Lu (amyxlu), Jerome Ku (jeromeku).

Cite

If you find this project useful, consider citing the following references.

Metadata

Release files for vtx 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vtx 1.1.0
File Size Uploaded
vtx-1.1.0.tar.gz 3.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for vtx 1.1.0
File Interpreter ABI Platform
vtx-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 MB

Release files / vtx-1.1.0.tar.gz

Download URL vtx-1.1.0.tar.gz
Size 3.3 MB
Tags Source
SHA-256 checksum
How to use checksums
0d54516d8a76aeec6839539b17273fa763349041266b6be7a1ae85c59f6d2404
BLAKE2b-256 checksum
How to use checksums
45f738fd51db739d11d22d4231bb096769a98d1972447f9c39ee483da362e773
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / vtx-1.1.0-py3-none-any.whl

Download URL vtx-1.1.0-py3-none-any.whl
Size 6.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0ff9f1db2f9e81e288150b60fd4fe4832b8b992ac2c6c947271b2036ffeb8299
BLAKE2b-256 checksum
How to use checksums
e2ed9dab64893b6b78f832e4d18522bbd6696350a415c20e0af6bcea1b0f8152
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.8

1 release file

1.0.7

2 release files

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page