Text Generation
Transformers
PyTorch
molexar
chemistry
molecule-generation
drug-discovery
fragment-selfies
molecular-foundation-model
Instructions to use fairydance/molexar-10m-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fairydance/molexar-10m-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fairydance/molexar-10m-base")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("fairydance/molexar-10m-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use fairydance/molexar-10m-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fairydance/molexar-10m-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fairydance/molexar-10m-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/fairydance/molexar-10m-base
- SGLang
How to use fairydance/molexar-10m-base with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "fairydance/molexar-10m-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fairydance/molexar-10m-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "fairydance/molexar-10m-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fairydance/molexar-10m-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use fairydance/molexar-10m-base with Docker Model Runner:
docker model run hf.co/fairydance/molexar-10m-base
| { | |
| "transformers_version": "5.8.0", | |
| "architectures": [ | |
| "MolexarForCausalLM" | |
| ], | |
| "output_hidden_states": false, | |
| "return_dict": true, | |
| "dtype": null, | |
| "chunk_size_feed_forward": 0, | |
| "is_encoder_decoder": false, | |
| "id2label": { | |
| "0": "LABEL_0", | |
| "1": "LABEL_1" | |
| }, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1 | |
| }, | |
| "problem_type": null, | |
| "vocab_size": 127, | |
| "hidden_size": 256, | |
| "intermediate_size": 640, | |
| "num_hidden_layers": 16, | |
| "num_attention_heads": 4, | |
| "num_key_value_heads": 1, | |
| "head_dim": 64, | |
| "hidden_activation": "gelu_pytorch_tanh", | |
| "max_position_embeddings": 256, | |
| "initializer_range": 0.02, | |
| "rms_norm_eps": 1e-06, | |
| "use_cache": false, | |
| "pad_token_id": 0, | |
| "eos_token_id": 2, | |
| "bos_token_id": 1, | |
| "tie_word_embeddings": true, | |
| "rope_parameters": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| }, | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "query_pre_attn_scalar": 64, | |
| "sliding_window": 128, | |
| "layer_types": [ | |
| "full_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention" | |
| ], | |
| "final_logit_softcapping": 30.0, | |
| "attn_logit_softcapping": 50.0, | |
| "use_bidirectional_attention": null, | |
| "_name_or_path": "", | |
| "condition_settings": { | |
| "mol_hac": { | |
| "method": "onehot", | |
| "allowable_set": [ | |
| 2, | |
| 3, | |
| 4, | |
| 5, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10, | |
| 11, | |
| 12, | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 17, | |
| 18, | |
| 19, | |
| 20, | |
| 21, | |
| 22, | |
| 23, | |
| 24, | |
| 25, | |
| 26, | |
| 27, | |
| 28, | |
| 29, | |
| 30, | |
| 31, | |
| 32, | |
| 33, | |
| 34, | |
| 35, | |
| 36, | |
| 37, | |
| 38, | |
| 39, | |
| 40, | |
| 41, | |
| 42, | |
| 43, | |
| 44, | |
| 45, | |
| 46, | |
| 47, | |
| 48, | |
| 49, | |
| 50 | |
| ], | |
| "with_unknown": false | |
| }, | |
| "mol_hbdc": { | |
| "method": "onehot", | |
| "allowable_set": [ | |
| 0, | |
| 1, | |
| 2, | |
| 3, | |
| 4, | |
| 5, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10 | |
| ], | |
| "with_unknown": false | |
| }, | |
| "mol_hbac": { | |
| "method": "onehot", | |
| "allowable_set": [ | |
| 0, | |
| 1, | |
| 2, | |
| 3, | |
| 4, | |
| 5, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10, | |
| 11, | |
| 12, | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 17, | |
| 18, | |
| 19, | |
| 20, | |
| 21, | |
| 22 | |
| ], | |
| "with_unknown": false | |
| }, | |
| "mol_rotbc": { | |
| "method": "onehot", | |
| "allowable_set": [ | |
| 0, | |
| 1, | |
| 2, | |
| 3, | |
| 4, | |
| 5, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10, | |
| 11, | |
| 12, | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 17, | |
| 18, | |
| 19, | |
| 20 | |
| ], | |
| "with_unknown": false | |
| }, | |
| "mol_wt": { | |
| "method": "rbf", | |
| "min": 30.0, | |
| "max": 750.0, | |
| "steps": 128 | |
| }, | |
| "mol_logp": { | |
| "method": "rbf", | |
| "min": -6.0, | |
| "max": 12.0, | |
| "steps": 96 | |
| }, | |
| "mol_tpsa": { | |
| "method": "rbf", | |
| "min": 0.0, | |
| "max": 200.0, | |
| "steps": 96 | |
| }, | |
| "mol_qed": { | |
| "method": "rbf", | |
| "min": 0.3, | |
| "max": 1.0, | |
| "steps": 64 | |
| }, | |
| "mol_sas": { | |
| "method": "rbf", | |
| "min": 1.0, | |
| "max": 5.0, | |
| "steps": 64 | |
| }, | |
| "mol_pharma_fp": { | |
| "method": "direct", | |
| "dim": 1032 | |
| }, | |
| "prot_seq_esm_emb": { | |
| "method": "direct", | |
| "dim": 1152 | |
| }, | |
| "prot_poc_gvp_emb": { | |
| "method": "direct", | |
| "dim": 256 | |
| } | |
| }, | |
| "gvp_node_in_dim": [ | |
| 11, | |
| 3 | |
| ], | |
| "gvp_edge_in_dim": [ | |
| 32, | |
| 1 | |
| ], | |
| "gvp_node_h_dim": [ | |
| 256, | |
| 16 | |
| ], | |
| "gvp_edge_h_dim": [ | |
| 32, | |
| 1 | |
| ], | |
| "gvp_n_layers": 3, | |
| "gvp_drop_rate": 0.1, | |
| "prot_poc_gvp_emb_dim": 256, | |
| "condition_projector_layers": 2, | |
| "model_type": "molexar", | |
| "output_attentions": false | |
| } |