Instructions to use hkqiu/PolymerGenerationPretrainedModel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hkqiu/PolymerGenerationPretrainedModel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hkqiu/PolymerGenerationPretrainedModel")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("hkqiu/PolymerGenerationPretrainedModel") model = AutoModelForSeq2SeqLM.from_pretrained("hkqiu/PolymerGenerationPretrainedModel") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use hkqiu/PolymerGenerationPretrainedModel with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hkqiu/PolymerGenerationPretrainedModel" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hkqiu/PolymerGenerationPretrainedModel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hkqiu/PolymerGenerationPretrainedModel
- SGLang
How to use hkqiu/PolymerGenerationPretrainedModel 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 "hkqiu/PolymerGenerationPretrainedModel" \ --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": "hkqiu/PolymerGenerationPretrainedModel", "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 "hkqiu/PolymerGenerationPretrainedModel" \ --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": "hkqiu/PolymerGenerationPretrainedModel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hkqiu/PolymerGenerationPretrainedModel with Docker Model Runner:
docker model run hf.co/hkqiu/PolymerGenerationPretrainedModel
Update README.md
Browse files
README.md
CHANGED
|
@@ -29,4 +29,22 @@ RingCount
|
|
| 29 |
|
| 30 |
Once one supplied these prompts, PolyTAO can generate polymers based on these characteristics.
|
| 31 |
|
| 32 |
-
__Try it, such as: "264,19,0,4,1,0,1,0,0,0,4,0,6,5,1"!__
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
Once one supplied these prompts, PolyTAO can generate polymers based on these characteristics.
|
| 31 |
|
| 32 |
+
__Try it, such as: "264,19,0,4,1,0,1,0,0,0,4,0,6,5,1"!__
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
If you find this work helpful, please kindly cite this work :):
|
| 37 |
+
```
|
| 38 |
+
@article{qiuOndemandReverseDesign2024,
|
| 39 |
+
title = {On-Demand Reverse Design of Polymers with {{PolyTAO}}},
|
| 40 |
+
author = {Qiu, Haoke and Sun, Zhao-Yan},
|
| 41 |
+
year = {2024},
|
| 42 |
+
month = nov,
|
| 43 |
+
journal = {npj Computational Materials},
|
| 44 |
+
volume = {10},
|
| 45 |
+
number = {1},
|
| 46 |
+
pages = {273},
|
| 47 |
+
issn = {2057-3960},
|
| 48 |
+
doi = {10.1038/s41524-024-01466-5}
|
| 49 |
+
}
|
| 50 |
+
```
|