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.

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.

For non-Docker setup, please follow instructions below.

1. Pip install (easiest)

The simplest way to install Vortex is from PyPi. This requires you to have CUDA already installed.

pip install vtx

or you can install Vortex after cloning the repository:

pip install .

Note this will take a few minutes to compile the necessary

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. Building a custom development environment

Using conda, venv or uv

To run e2e installation in a uv environment, use the following command:

make setup-full

Note that the setup-full step will compile various CUDA kernels, which usually takes at most several minutes. It may be necessary to customize CUDA header and library paths in Makefile.

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.1.tar.gz (26.4 MB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for vtx-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4b44a13fe462b2e49372280e50ce187d2550654fd578fa2cf1328d02ef6af905
MD5 fb40ff1a7d964ab30a0276c4946d2dba
BLAKE2b-256 f75483bf194abc3d8a384caf1b10ca25789412176e9460555b531b48d2ac7fa5

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