zhihan1996/DNABERT-2-117M

transformerstransformerspytorchbiologymedicalgenomicscustom_code
220.7K

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

DEPLOY IN 60 SECONDS

Run DNABERT-2-117M on Runcrate

Deploy on H100, A100, or RTX GPUs. Pay only for what you use. No setup required.