Instructions to use lamm-mit/ProteinForceGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lamm-mit/ProteinForceGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lamm-mit/ProteinForceGPT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lamm-mit/ProteinForceGPT") model = AutoModelForCausalLM.from_pretrained("lamm-mit/ProteinForceGPT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lamm-mit/ProteinForceGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lamm-mit/ProteinForceGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lamm-mit/ProteinForceGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lamm-mit/ProteinForceGPT
- SGLang
How to use lamm-mit/ProteinForceGPT 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 "lamm-mit/ProteinForceGPT" \ --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": "lamm-mit/ProteinForceGPT", "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 "lamm-mit/ProteinForceGPT" \ --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": "lamm-mit/ProteinForceGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lamm-mit/ProteinForceGPT with Docker Model Runner:
docker model run hf.co/lamm-mit/ProteinForceGPT
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
| 4 |
-
---
|
| 5 |
-
license: apache-2.0
|
| 6 |
-
---
|
| 7 |
# ProteinForceGPT: Generative strategies for modeling, design and analysis of protein mechanics
|
| 8 |
|
| 9 |
|
|
@@ -51,6 +48,8 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 51 |
model.config.use_cache = False
|
| 52 |
```
|
| 53 |
|
|
|
|
|
|
|
| 54 |
Sample inference using the "Sequence<...>" task, where here, the model will simply autocomplete the sequence starting with "AIIAA":
|
| 55 |
|
| 56 |
```python
|
|
@@ -113,6 +112,7 @@ To cite this work:
|
|
| 113 |
|
| 114 |
The dataset used to fine-tune the model is available at:
|
| 115 |
|
|
|
|
| 116 |
@article{GhafarollahiBuehler_2024,
|
| 117 |
title = {ForceGen: End-to-end de novo protein generation based on nonlinear mechanical unfolding responses using a protein language diffusion model},
|
| 118 |
author = {B. Ni, D.L. Kaplan, M.J. Buehler},
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
| 4 |
# ProteinForceGPT: Generative strategies for modeling, design and analysis of protein mechanics
|
| 5 |
|
| 6 |
|
|
|
|
| 48 |
model.config.use_cache = False
|
| 49 |
```
|
| 50 |
|
| 51 |
+
### Inference
|
| 52 |
+
|
| 53 |
Sample inference using the "Sequence<...>" task, where here, the model will simply autocomplete the sequence starting with "AIIAA":
|
| 54 |
|
| 55 |
```python
|
|
|
|
| 112 |
|
| 113 |
The dataset used to fine-tune the model is available at:
|
| 114 |
|
| 115 |
+
```
|
| 116 |
@article{GhafarollahiBuehler_2024,
|
| 117 |
title = {ForceGen: End-to-end de novo protein generation based on nonlinear mechanical unfolding responses using a protein language diffusion model},
|
| 118 |
author = {B. Ni, D.L. Kaplan, M.J. Buehler},
|