Skip to main content

fastembed-bio

Fast, lightweight biological sequence embeddings using ONNX. Built on FastEmbed.

Why fastembed-bio?

  1. Light: No GPU required. No PyTorch. Just ONNX Runtime. Perfect for serverless and resource-constrained environments.

  2. Fast: ONNX Runtime is faster than PyTorch inference. Batch processing and parallelism built-in.

  3. Simple: Same interface patterns as FastEmbed. If you've used FastEmbed for text, you already know how to use this.

Installation

pip install fastembed-bio

Quickstart

from fastembed.bio import ProteinEmbedding

sequences = [
    "MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGG",
    "GKGDPKKPRGKMSSYAFFVQTSREEHKKKHPDASVNFSEFSKKCSERWKTMSAKEKGKFEDMAK",
]

model = ProteinEmbedding("facebook/esm2_t12_35M_UR50D")
embeddings = list(model.embed(sequences))

# [
#   array([-0.0055, -0.0144,  0.0355, -0.0049, ...], dtype=float32),
#   array([ 0.0114,  0.0020, -0.0247,  0.0060, ...], dtype=float32)
# ]

Supported Models

Protein Embeddings

Model Parameters Dimensions Description
facebook/esm2_t12_35M_UR50D 35M 480 ESM-2 protein language model
from fastembed.bio import ProteinEmbedding

model = ProteinEmbedding("facebook/esm2_t12_35M_UR50D")
embeddings = list(model.embed(["MKTVRQERLKS", "GKGDPKKPRGK"]))

DNA Embeddings (Coming Soon)

DNABert and similar models for DNA sequence embeddings.

RNA Embeddings (Coming Soon)

RNA foundation models for RNA sequence embeddings.

GPU Support

from fastembed.bio import ProteinEmbedding

model = ProteinEmbedding(
    "facebook/esm2_t12_35M_UR50D",
    providers=["CUDAExecutionProvider"]
)

Requires onnxruntime-gpu instead of onnxruntime.

Relationship to FastEmbed

This project is a community-driven fork of FastEmbed focused on biological sequence embeddings. It uses the same core infrastructure (ONNX models, model management, etc.) but is specialized for proteins, DNA, and RNA.

The goal is to make biological embeddings as accessible and efficient as text embeddings.

Contributing

Contributions welcome! Areas of interest:

  • Additional ESM-2 model sizes
  • DNABert and other DNA models
  • RNA foundation models
  • Performance optimizations

License

Apache 2.0

Metadata

Release files for fastembed-bio 0.1.2

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

Source distribution (sdist)

Source distribution for fastembed-bio 0.1.2
File Size Uploaded
fastembed_bio-0.1.2.tar.gz 21.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastembed-bio 0.1.2
File Interpreter ABI Platform
fastembed_bio-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 46.6 kB

Release files / fastembed_bio-0.1.2.tar.gz

Download URL fastembed_bio-0.1.2.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ba55af6c74dd2017903addd23174df1537f3c1b5393d5221212bb685c2711910
BLAKE2b-256 checksum
How to use checksums
b27a462b7ca3c6524f0721e15fdb2704e707c846a90db7e0046a298eab417cf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 21, 2026.

Transparency log

Release files / fastembed_bio-0.1.2-py3-none-any.whl

Download URL fastembed_bio-0.1.2-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfeed3ba8627ee75ada289ac974ddd6c1ebbe2d6a291a4c539a2273042f1e952
BLAKE2b-256 checksum
How to use checksums
82eead55f2fb5102990609d0f164668bc82cff5c3ad1390856b4c851544c1fa9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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