Instructions to use multimolecule/dnabert-4mer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MultiMolecule
How to use multimolecule/dnabert-4mer with MultiMolecule:
pip install multimolecule
from multimolecule import AutoModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("multimolecule/dnabert-4mer") model = AutoModel.from_pretrained("multimolecule/dnabert-4mer") inputs = tokenizer("ACTCCCCTGCCCTCAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATGG", return_tensors="pt") outputs = model(**inputs) embeddings = outputs.last_hidden_stateimport multimolecule from transformers import pipeline predictor = pipeline("fill-mask", model="multimolecule/dnabert-4mer") output = predictor("ACTCCCCTGCCCTC<mask>AGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATGG") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from multimolecule/dnabert-4mer: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/multimolecule/dnabert-4mer/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://multimolecule/dnabert-4mer/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/multimolecule/dnabert-4mer/resolve/main/tokenizer_config.json
1.44 kB
| { | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<cls>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "<eos>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "4": { | |
| "content": "<mask>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "5": { | |
| "content": "<null>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| } | |
| }, | |
| "backend": "custom", | |
| "bos_token": "<cls>", | |
| "clean_up_tokenization_spaces": true, | |
| "cls_token": "<cls>", | |
| "codon": false, | |
| "eos_token": "<eos>", | |
| "extra_special_tokens": [ | |
| "<null>" | |
| ], | |
| "mask_token": "<mask>", | |
| "model_max_length": 512, | |
| "nmers": 4, | |
| "pad_token": "<pad>", | |
| "replace_U_with_T": true, | |
| "sep_token": "<eos>", | |
| "tokenizer_class": "DnaTokenizer", | |
| "unk_token": "<unk>" | |
| } | |