Instructions to use multimolecule/calm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MultiMolecule
How to use multimolecule/calm with MultiMolecule:
pip install multimolecule
from multimolecule import AutoModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("multimolecule/calm") model = AutoModel.from_pretrained("multimolecule/calm") inputs = tokenizer("ACTCCCCTGCCCTCAAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATG", return_tensors="pt") outputs = model(**inputs) embeddings = outputs.last_hidden_stateimport multimolecule from transformers import pipeline predictor = pipeline("fill-mask", model="multimolecule/calm") output = predictor("ACTCCCCTGCCCTCA<mask>AGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATG") - Notebooks
- Google Colab
- Kaggle
| { | |
| "add_cross_attention": false, | |
| "architectures": [ | |
| "CaLmForPreTraining" | |
| ], | |
| "attention_dropout": 0.1, | |
| "bos_token_id": 1, | |
| "codon": true, | |
| "dtype": "float32", | |
| "emb_layer_norm_before": false, | |
| "eos_token_id": 2, | |
| "head": null, | |
| "hidden_act": "gelu", | |
| "hidden_dropout": 0.1, | |
| "hidden_size": 768, | |
| "id2label": null, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "is_decoder": false, | |
| "label2id": null, | |
| "layer_norm_eps": 1e-05, | |
| "lm_head": { | |
| "act": null, | |
| "bias": true, | |
| "dropout": 0.0, | |
| "hidden_size": null, | |
| "layer_norm_eps": 1e-05, | |
| "loss_weight": null, | |
| "num_labels": 131, | |
| "output_name": null, | |
| "transform": "nonlinear", | |
| "transform_act": "gelu" | |
| }, | |
| "mask_token_id": 4, | |
| "max_position_embeddings": 1026, | |
| "model_type": "calm", | |
| "null_token_id": 5, | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "num_labels": 1, | |
| "pad_token_id": 0, | |
| "position_embedding_type": "rotary", | |
| "tie_word_embeddings": true, | |
| "token_dropout": false, | |
| "transformers_version": "5.9.0", | |
| "unk_token_id": 3, | |
| "use_cache": true, | |
| "vocab_size": 131 | |
| } | |