OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Dnabert

Dnabert is an open-source Python implementation of a transformer model pretrained on DNA-language sequences. Its repository includes model code, pretrained and fine-tuned weights, usage examples, and a visualization tool for genome-related modeling workflows.

Independent OpenViST project profile, based on linked sources.

Dnabert — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use DNABERT when you want repository-level code and pretrained weights for DNA-sequence modeling, and can prepare data in the specified k-mer format and meet the documented Python, Linux, CUDA, and GPU requirements.

Who it is for

  • Genomics researchers preparing DNA-sequence modeling workflows.
  • Python practitioners fine-tuning transformer models on task-specific genomic data.
  • Teams exploring k-mer-based pretraining or sequence analysis with GPU-backed Linux environments.

Documented uses

  • Convert DNA sequences into k-mer representation with the provided seq2kmer function.
  • Fine-tune a pretrained DNABERT model on task-specific sequence data.
  • Pretrain a model using sequence data formatted to the repository’s examples.
  • Use the repository’s examples and visualization tool when working with its models.
Before you choose

Requirements & limits

The repository is public and identifies its license as Apache-2.0. The README directs users to Hugging Face for DNABERT-3 through DNABERT-6 weights because the original download links expired.

  • The README specifies Python 3.6, Linux x86_64, an NVIDIA GPU, driver version 410.48 or later, and CUDA 10.0 for its setup instructions.
  • The repository’s data workflow expects k-mer-formatted sequences and provides a conversion function.
  • GPU memory can affect batch-size choices; the README recommends adjusting batch size for different hardware.
  • Apex is optional and is specified for mixed-precision training.
  • DNABERT-2 is a distinct second-generation project, linked by the repository as a separate option.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up the DNABERT environment

Install DNABERT and its required Python packages in a Linux environment.

Before you start

  • Anaconda/Conda
  • Linux x86_64
  • At least one NVIDIA GPU
  • NVIDIA driver version 410.48 or later, compatible with CUDA 10.0

Steps

  1. Create and activate a Python 3.6 environment with conda create -n dnabert python=3.6 and conda activate dnabert.

  2. Install PyTorch, torchvision, and CUDA Toolkit 10.0 with conda install pytorch torchvision cudatoolkit=10.0 -c pytorch.

  3. Clone the DNABERT repository, enter its directory, and install it in editable mode with the command below.

    Documented command
    python3 -m pip install --editable .
  4. Enter examples and install its requirements with the command below.

    Documented command
    python3 -m pip install -r requirements.txt

Expected outcome

The DNABERT package and example requirements are installed in the `dnabert` Conda environment.

Guide limitations

  • The repository is described as under development.
  • The documented setup targets Python 3.6 and CUDA Toolkit 10.0.
  • Training batch sizes may need adjustment for GPUs with different specifications or memory.
  • Installing NVIDIA Apex is optional and is documented for fp16 training.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
jerryji1993/DNABERT · Official homepage title · retained in its source language

Related options

DNABERT-2 — A separately published second-generation project that the DNABERT repository recommends for users interested in its newer package and benchmark.