Instructions to use multimolecule/dnabert2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MultiMolecule
How to use multimolecule/dnabert2 with MultiMolecule:
pip install multimolecule
from multimolecule import AutoModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("multimolecule/dnabert2") model = AutoModel.from_pretrained("multimolecule/dnabert2") inputs = tokenizer("ACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATGG", return_tensors="pt") outputs = model(**inputs) embeddings = outputs.last_hidden_stateimport multimolecule from transformers import pipeline predictor = pipeline("fill-mask", model="multimolecule/dnabert2") output = predictor("ACTCCCCTGCCCTC<mask>ACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATGG") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from multimolecule/dnabert2: direct link, hf CLI and curl.
- Browser
- Download file 249 Bytes
-
https://huggingface.co/multimolecule/dnabert2/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://multimolecule/dnabert2/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/multimolecule/dnabert2/resolve/main/tokenizer_config.json
249 Bytes
| { | |
| "backend": "tokenizers", | |
| "cls_token": "<cls>", | |
| "eos_token": "<eos>", | |
| "mask_token": "<mask>", | |
| "model_max_length": 1000000000000000019884624838656, | |
| "pad_token": "<pad>", | |
| "tokenizer_class": "TokenizersBackend", | |
| "unk_token": "<unk>" | |
| } | |