/ Модель

Характеристики

Контекст
512 токенов
Параметры
116 млн
Лицензия
AGPL 3.0
Архитектура
dnabert · dense
Библиотека
multimolecule
Опубликована
31 мая 2026

dnabert-6mer

Заполнение пропусковТекст → текст

Предобученная на человеческом геноме BERT-модель с 6-мерной токенизацией для восстановления фрагментов ДНК и извлечения геномных признаков.

82скачиваний за 30 дней0лайковвеса обновлены31 мая 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

DNABERT-6mer — модель семейства BERT, представленная командой MultiMolecule как неофициальная реализация DNABERT авторов Yanrong Ji, Zhihan Zhou, Han Liu и Ramana V. Davuluri. Это предобученный на человеческом геноме чекпойнт с токенизацией последовательностей ДНК перекрывающимися 6-мерными фрагментами и задачей masked language modeling. Модель содержит 116,4 млн параметров, использует контекст до 512 токенов и распространяется в форматах PyTorch и Safetensors.

Модель предназначена для восстановления замаскированных фрагментов ДНК и извлечения признаков из геномных последовательностей. Её можно дообучить для классификации или регрессии на уровне последовательностей и нуклеотидов; сама модель не настроена на конкретные прикладные задачи. Для работы с 6-мерной токенизацией требуется библиотека multimolecule: стандартный pipeline Transformers её не поддерживает.

Обучение проводилось на последовательностях человеческого референсного генома GRCh38.p13, содержащих нуклеотиды A, T, C и G. Модель не предназначена для обычного текста или других видов биологических последовательностей без соответствующей адаптации. Лицензия — AGPL-3.0.

Сценарии применения

  • восстановление замаскированных 6-меров в последовательности ДНК
  • извлечение признаковых представлений геномной последовательности
  • подготовка основы для классификации последовательностей ДНК после дообучения
  • подготовка основы для нуклеотидной разметки после дообучения

Ограничения

Модель обучена на последовательностях человеческого генома с каноническими нуклеотидами A, T, C и G и не настроена для конкретной downstream-задачи. Стандартный pipeline Transformers не поддерживает её k-mer токенизацию; для использования требуется библиотека multimolecule.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

DNABERT

Pre-trained model on human genome using a masked language modeling (MLM) objective with k-mer tokenization.

Disclaimer

This is an UNOFFICIAL implementation of the DNABERT: pre-trained Bidirectional Encoder Representations from Transformers model for DNA-language in genome by Yanrong Ji, Zhihan Zhou, et al.

The OFFICIAL repository of DNABERT is at jerryji1993/DNABERT.

[!TIP] The MultiMolecule team has confirmed that the provided model and checkpoints are producing the same intermediate representations as the original implementation.

The team releasing DNABERT did not write this model card for this model so this model card has been written by the MultiMolecule team.

Model Details

DNABERT is a bert-style model pre-trained on the human genome with k-mer tokenization in a self-supervised fashion. This means that the model was trained on the raw nucleotides of DNA sequences only, with an automatic process to generate inputs and labels from those texts. Please refer to the Training Details section for more information on the training process.

Variants

Model Specification

Links

Usage

The model file depends on the multimolecule library. You can install it using pip:

pip install multimolecule

Direct Use

Masked Language Modeling

[!WARNING] Default transformers pipeline does not support K-mer tokenization.

You can use this model directly with a pipeline for masked language modeling:

import multimolecule  # you must import multimolecule to register models
from transformers import pipeline

predictor = pipeline("fill-mask", model="multimolecule/dnabert-6mer")
output = predictor("ATCG<mask>TGCA")

Downstream Use

Extract Features

Here is how to use this model to get the features of a given sequence in PyTorch:

from multimolecule import DnaBertModel
from transformers import AutoTokenizer


tokenizer = AutoTokenizer.from_pretrained("multimolecule/dnabert-6mer")
model = DnaBertModel.from_pretrained("multimolecule/dnabert-6mer")

text = "ATCGATCGATCGATCG"
input = tokenizer(text, return_tensors="pt")

output = model(**input)

Sequence Classification / Regression

[!NOTE] This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for sequence classification or regression.

Here is how to use this model as backbone to fine-tune for a sequence-level task in PyTorch:

import torch
from multimolecule import DnaBertForSequencePrediction
from transformers import AutoTokenizer


tokenizer = AutoTokenizer.from_pretrained("multimolecule/dnabert-6mer")
model = DnaBertForSequencePrediction.from_pretrained("multimolecule/dnabert-6mer")

text = "ATCGATCGATCGATCG"
input = tokenizer(text, return_tensors="pt")
label = torch.tensor([1])

output = model(**input, labels=label)

Token Classification / Regression

[!NOTE] This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for token classification or regression.

Here is how to use this model as backbone to fine-tune for a nucleotide-level task in PyTorch:

import torch
from multimolecule import DnaBertForTokenPrediction
from transformers import AutoTokenizer


tokenizer = AutoTokenizer.from_pretrained("multimolecule/dnabert-6mer")
model = DnaBertForTokenPrediction.from_pretrained("multimolecule/dnabert-6mer")

text = "ATCGATCGATCGATCG"
input = tokenizer(text, return_tensors="pt")
label = torch.randint(2, (len(text), ))

output = model(**input, labels=label)

Contact Classification / Regression

[!NOTE] This model is not fine-tuned for any specific task. You will need to fine-tune the model on a downstream task to use it for contact classification or regression.

Here is how to use this model as backbone to fine-tune for a contact-level task in PyTorch:

import torch
from multimolecule import DnaBertForContactPrediction
from transformers import AutoTokenizer


tokenizer = AutoTokenizer.from_pretrained("multimolecule/dnabert-6mer")
model = DnaBertForContactPrediction.from_pretrained("multimolecule/dnabert-6mer")

text = "ATCGATCGATCGATCG"
input = tokenizer(text, return_tensors="pt")
label = torch.randint(2, (len(text), len(text)))

output = model(**input, labels=label)

Training Details

DNABERT used Masked Language Modeling (MLM) as the pre-training objective: taking a sequence, the model randomly masks 15% of the tokens in the input then runs the entire masked sentence through the model and has to predict the masked tokens. This is comparable to the Cloze task in language modeling.

Training Data

The DNABERT model was pre-trained on the human genome. The training data consists of DNA sequences from the human reference genome (GRCh38.p13), with all sequences containing only the four canonical nucleotides (A, T, C, G).

Training Procedure

Preprocessing

DNABERT used masked language modeling (MLM) as the pre-training objective. The masking procedure is similar to the one used in BERT:

  • Mask rate: 15%, increased to 20% for the last 20,000 steps
  • Replacement: <mask> for 80% of masked tokens
  • Replacement: random token for 10% of masked tokens
  • Replacement: unchanged token for 10% of masked tokens

Since DNABERT used k-mer tokenizer, it masks the entire k-mer instead of individual nucleotides to avoid information leakage.

For example, if the k-mer is 3, the sequence "TAGCGTAT" will be tokenized as ["TAG", "AGC", "GCG", "CGT", "GTA", "TAT"]. If the nucleotide "C" is masked, the adjacent tokens will also be masked, resulting ["TAG", "<mask>", "<mask>", "<mask>", "GTA", "TAT"].

Pre-training

The model was trained on 8 NVIDIA RTX 2080Ti GPUs.

  • Batch size: 2,000
  • Steps: 120,000
  • Learning rate: 4e-4
  • Learning rate scheduler: Linear
  • Learning rate warm-up: 10,000 steps

Citation

@ARTICLE{Ji2021-cj,
  title     = "{DNABERT}: pre-trained Bidirectional Encoder Representations
               from Transformers model for {DNA-language} in genome",
  author    = "Ji, Yanrong and Zhou, Zhihan and Liu, Han and Davuluri, Ramana V",
  abstract  = "MOTIVATION: Deciphering the language of non-coding DNA is one of
               the fundamental problems in genome research. Gene regulatory
               code is highly complex due to the existence of polysemy and
               distant semantic relationship, which previous informatics
               methods often fail to capture especially in data-scarce
               scenarios. RESULTS: To address this challenge, we developed a
               novel pre-trained bidirectional encoder representation, named
               DNABERT, to capture global and transferrable understanding of
               genomic DNA sequences based on up and downstream nucleotide
               contexts. We compared DNABERT to the most widely used programs
               for genome-wide regulatory elements prediction and demonstrate
               its ease of use, accuracy and efficiency. We show that the
               single pre-trained transformers model can simultaneously achieve
               state-of-the-art performance on prediction of promoters, splice
               sites and transcription factor binding sites, after easy
               fine-tuning using small task-specific labeled data. Further,
               DNABERT enables direct visualization of nucleotide-level
               importance and semantic relationship within input sequences for
               better interpretability and accurate identification of conserved
               sequence motifs and functional genetic variant candidates.
               Finally, we demonstrate that pre-trained DNABERT with human
               genome can even be readily applied to other organisms with
               exceptional performance. We anticipate that the pre-trained
               DNABERT model can be fined tuned to many other sequence analyses
               tasks. AVAILABILITY AND IMPLEMENTATION: The source code,
               pretrained and finetuned model for DNABERT are available at
               GitHub (https://github.com/jerryji1993/DNABERT). SUPPLEMENTARY
               INFORMATION: Supplementary data are available at Bioinformatics
               online.",
  journal   = "Bioinformatics",
  publisher = "Oxford University Press (OUP)",
  volume    =  37,
  number    =  15,
  pages     = "2112--2120",
  month     =  aug,
  year      =  2021,
  copyright = "https://academic.oup.com/journals/pages/open\_access/funder\_policies/chorus/standard\_publication\_model",
  language  = "en"
}

[!NOTE] The artifacts distributed in this repository are part of the MultiMolecule project. If MultiMolecule supports your research, please cite the MultiMolecule project as follows:

@software{chen_2024_12638419,
  author    = {Chen, Zhiyuan and Zhu, Sophia Y.},
  title     = {MultiMolecule},
  doi       = {10.5281/zenodo.12638419},
  publisher = {Zenodo},
  url       = {https://doi.org/10.5281/zenodo.12638419},
  year      = 2024,
  month     = may,
  day       = 4
}

Contact

Please use GitHub issues of MultiMolecule for any questions or comments on the model card.

Please contact the authors of the DNABERT paper for questions or comments on the paper/model.

License

This model implementation is licensed under the GNU Affero General Public License.

For additional terms and clarifications, please refer to our License FAQ.

SPDX-License-Identifier: AGPL-3.0-or-later

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · multimolecule · fill-mask

Нельзя запустить

Архитектура dnabert неизвестна transformers в образе рантайма.

Класс архитектуры
DnaBertForMaskedLM
Ревизия весов
3ddf8a6

0 моделей