zhihan1996 / DNABERT-2-117M

huggingface.co
Total runs: 969.2K
24-hour runs: -26.3K
7-day runs: -216.5K
30-day runs: -130.1K
Model's Last Updated: July 01 2025

Introduction of DNABERT-2-117M

Model Details of DNABERT-2-117M

This is the official pre-trained model introduced in DNABERT-2: Efficient Foundation Model and Benchmark For Multi-Species Genome .

We sincerely appreciate the MosaicML team for the MosaicBERT implementation, which serves as the base of DNABERT-2 development.

DNABERT-2 is a transformer-based genome foundation model trained on multi-species genome.

To load the model from huggingface:

import torch
from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("zhihan1996/DNABERT-2-117M", trust_remote_code=True)
model = AutoModel.from_pretrained("zhihan1996/DNABERT-2-117M", trust_remote_code=True)

To calculate the embedding of a dna sequence

dna = "ACGTAGCATCGGATCTATCTATCGACACTTGGTTATCGATCTACGAGCATCTCGTTAGC"
inputs = tokenizer(dna, return_tensors = 'pt')["input_ids"]
hidden_states = model(inputs)[0] # [1, sequence_length, 768]

# embedding with mean pooling
embedding_mean = torch.mean(hidden_states[0], dim=0)
print(embedding_mean.shape) # expect to be 768

# embedding with max pooling
embedding_max = torch.max(hidden_states[0], dim=0)[0]
print(embedding_max.shape) # expect to be 768

Runs of zhihan1996 DNABERT-2-117M on huggingface.co

969.2K
Total runs
-26.3K
24-hour runs
-69.0K
3-day runs
-216.5K
7-day runs
-130.1K
30-day runs

More Information About DNABERT-2-117M huggingface.co Model

DNABERT-2-117M huggingface.co

DNABERT-2-117M huggingface.co is an AI model on huggingface.co that provides DNABERT-2-117M's model effect (), which can be used instantly with this zhihan1996 DNABERT-2-117M model. huggingface.co supports a free trial of the DNABERT-2-117M model, and also provides paid use of the DNABERT-2-117M. Support call DNABERT-2-117M model through api, including Node.js, Python, http.

zhihan1996 DNABERT-2-117M online free

DNABERT-2-117M huggingface.co is an online trial and call api platform, which integrates DNABERT-2-117M's modeling effects, including api services, and provides a free online trial of DNABERT-2-117M, you can try DNABERT-2-117M online for free by clicking the link below.

zhihan1996 DNABERT-2-117M online free url in huggingface.co:

https://huggingface.co/zhihan1996/DNABERT-2-117M

DNABERT-2-117M install

DNABERT-2-117M is an open source model from GitHub that offers a free installation service, and any user can find DNABERT-2-117M on GitHub to install. At the same time, huggingface.co provides the effect of DNABERT-2-117M install, users can directly use DNABERT-2-117M installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

DNABERT-2-117M install url in huggingface.co:

https://huggingface.co/zhihan1996/DNABERT-2-117M

Url of DNABERT-2-117M

DNABERT-2-117M huggingface.co Url

Provider of DNABERT-2-117M huggingface.co

zhihan1996
ORGANIZATIONS

Other API from zhihan1996

huggingface.co

Total runs: 5.2K
Run Growth: -2.9K
Growth Rate: -51.48%
Updated:July 01 2025
huggingface.co

Total runs: 4.9K
Run Growth: 1.4K
Growth Rate: 29.33%
Updated:July 01 2025