EasyEvo2
A Python toolkit for easily using Evo2 models in bioinformatics workflows, particularly in HPC environments.
Description
EasyEvo2 provides a simplified interface to Evo2 foundation models for sequence embedding. It enables biologists and bioinformaticians to efficiently extract embeddings from DNA, RNA, or protein sequences without extensive deep learning expertise. It's specially designed to work well in High-Performance Computing (HPC) environments.
Installation
# Install from PyPI
pip install easyevo2
# Or install from source
git clone https://github.com/ylab-hi/EasyEvo2.git
cd EasyEvo2
pip install .
Usage
Basic Usage
# Embed sequences from a FASTA/FASTQ file using the default model (evo2_7b)
easyevo2 embed input.fa
# Specify a different model and specific layer
easyevo2 embed input.fa --model-type evo2_40b --layer-name blocks.28.mlp.l3
# Specify a different model and multiple layers
easyevo2 embed input.fa --model-type evo2_40b --layer-name blocks.28.mlp.l3 blocks.28.mlp.l2
# Save to a specific output file
easyevo2 embed input.fa --output my_embeddings
The output will be a safetensor file containing the embeddings for each sequence in the input file.
We can load the embeddings using the load_tensor function:
from easyevo2.io import load_tensor
embeddings = load_tensor("my_embeddings.mode.layer.safetensors")
print(embeddings)
# Output: {
# "seq1": torch.tensor([...]),
# "seq2": torch.tensor([...]),
# }
Evo2 Memory Estimates
| Model | GPU Memory Usage | Embedding Dimension | Batch Size |
|---|---|---|---|
| Evo2 1B Base | 1.5 GB | 2048 | 1 |
| Evo2 7B | 15 GB | 4096 | 1 |
| Evo2 40B Base | >80 GB* | -- | 1 |
| Evo2 40B | >80 GB* | -- | 1 |
* Estimated based on scaling from other models
Notes:
- Longer sequences require proportionally more memory
- H100 GPUs (80GB) can accommodate the 7B model with batch size 1 but may struggle with the 40B model
Development
This project uses a Makefile to automate common development tasks:
# Show available commands
make help
# Run tests
make test
# Lint code
make lint
# Format code
make format
# Build package
make build
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for easyevo2 0.2.0
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 |
|---|---|---|---|---|
| easyevo2-0.2.0.tar.gz | 86.1 kB | Without provenance | Details for easyevo2-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| easyevo2-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for easyevo2-0.2.0-py3-none-any.whl |
Total release size: 107.4 kB
Release files / easyevo2-0.2.0.tar.gz
| Download URL | easyevo2-0.2.0.tar.gz |
|---|---|
| Size | 86.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6992074050e3b2d3f55fac9837b020f244bc756aedd74fcfcc15e095cbf811ac
|
|
BLAKE2b-256 checksum How to use checksums |
34aa0aee515e84de81120e7531ca3cadebb84622d5ae2a2ec2cbe3939a3c605a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Release files / easyevo2-0.2.0-py3-none-any.whl
| Download URL | easyevo2-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c4065a3b9ae2edf1fe07df329ae2281b6652957c7f1123666b49c9f08e6202d
|
|
BLAKE2b-256 checksum How to use checksums |
208a8e77382210a2701af2eb96b66446a9c78f3f088f8712c5edd9968744f4b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.22
|
Security for easyevo2 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.