Instructions to use NingLab/GeLLMO-P4-Mistral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NingLab/GeLLMO-P4-Mistral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NingLab/GeLLMO-P4-Mistral")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("NingLab/GeLLMO-P4-Mistral", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NingLab/GeLLMO-P4-Mistral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NingLab/GeLLMO-P4-Mistral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NingLab/GeLLMO-P4-Mistral", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NingLab/GeLLMO-P4-Mistral
- SGLang
How to use NingLab/GeLLMO-P4-Mistral 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 "NingLab/GeLLMO-P4-Mistral" \ --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": "NingLab/GeLLMO-P4-Mistral", "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 "NingLab/GeLLMO-P4-Mistral" \ --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": "NingLab/GeLLMO-P4-Mistral", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NingLab/GeLLMO-P4-Mistral with Docker Model Runner:
docker model run hf.co/NingLab/GeLLMO-P4-Mistral
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-nc-4.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
datasets:
|
| 4 |
+
- NingLab/MuMOInstruct
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
base_model:
|
| 8 |
+
- mistralai/Mistral-7B-Instruct-v0.3
|
| 9 |
+
pipeline_tag: text-classification
|
| 10 |
+
tags:
|
| 11 |
+
- chemistry
|
| 12 |
+
- molecule optimization
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
### Model Sources
|
| 16 |
+
|
| 17 |
+
<!-- Provide the basic links for the model. -->
|
| 18 |
+
|
| 19 |
+
- **Repository:** https://github.com/ninglab/GeLLMO
|
| 20 |
+
- **Paper:** https://arxiv.org/abs/2502.13398
|
| 21 |
+
|
| 22 |
+
## Usage
|
| 23 |
+
|
| 24 |
+
For instructions to run the model, please refer to our repository.
|
| 25 |
+
|
| 26 |
+
## Bias, Risks, and Limitations
|
| 27 |
+
While our models are designed for research and drug discovery applications,
|
| 28 |
+
they come with ethical and safety considerations:
|
| 29 |
+
|
| 30 |
+
1. **Potential for Misuse:** Although the model is not explicitly designed to generate toxic,
|
| 31 |
+
controlled, or harmful compounds, adversarial prompts or unintended biases in the pretrained model
|
| 32 |
+
may lead to the generation of undesirable molecules.
|
| 33 |
+
2. **Unintended Harmful Outputs:** The model does not inherently filter out molecules with high toxicity,
|
| 34 |
+
abuse potential, or environmental hazards. Users must implement additional safeguards to prevent misuse.
|
| 35 |
+
3. **Absence of Built-in Safety Mechanisms:** The model does not incorporate explicit regulatory or
|
| 36 |
+
safety filters (e.g., toxicity or compliance checks).
|
| 37 |
+
It is the responsibility of users to validate generated molecules for safety and ethical considerations.
|
| 38 |
+
|
| 39 |
+
We urge users to adopt best practices, including toxicity prediction pipelines,
|
| 40 |
+
ethical oversight, and responsible AI usage policies, to prevent harmful applications of this model.
|
| 41 |
+
|
| 42 |
+
## Citation
|
| 43 |
+
```
|
| 44 |
+
@misc{dey2025gellmo,
|
| 45 |
+
title={$\mathtt{GeLLM^3O}$: Generalizing Large Language Models for Multi-property Molecule Optimization},
|
| 46 |
+
author={Vishal Dey and Xiao Hu and Xia Ning},
|
| 47 |
+
year={2025},
|
| 48 |
+
eprint={2502.13398},
|
| 49 |
+
archivePrefix={arXiv},
|
| 50 |
+
primaryClass={cs.LG},
|
| 51 |
+
url={https://arxiv.org/abs/2502.13398},
|
| 52 |
+
}
|
| 53 |
+
```
|