Skip to main content

Reference implementation of operators for deep signal processing architectures

Project description

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 recommends python 3.12 and has these system requirements.

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

pip install torch==2.7.1+cu128 --index-url https://download.pytorch.org/whl/test/cu128 #use appropriate version for your system
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 .

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.

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

vtx-1.0.7.tar.gz (26.4 MB view details)

Uploaded Source

Built Distribution

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

vtx-1.0.7-py3-none-any.whl (30.1 MB view details)

Uploaded Python 3

File details

Details for the file vtx-1.0.7.tar.gz.

File metadata

  • Download URL: vtx-1.0.7.tar.gz
  • Upload date:
  • Size: 26.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for vtx-1.0.7.tar.gz
Algorithm Hash digest
SHA256 9822eec7c1d3bd72eda6f5d807896c4d7b032814cb10e3bf87d3c42a2c6db581
MD5 8fae3e84816042e07cacf0ccf9bce5b3
BLAKE2b-256 cadcef63435df0847ae42309b279609584429eba450568d1af1b5bf9ca421ae5

See more details on using hashes here.

File details

Details for the file vtx-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: vtx-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 30.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for vtx-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6c04f604e8c459b4a5d067bd0572f5a4aed3b623e9abdf025c2f7ff6c7a9e07f
MD5 d6e4187e7b7142c4833bfe1a94e572f9
BLAKE2b-256 12eba156e93aecdbbd0258bdacf196679303e274eac693c4fe109b4fa0a201eb

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