Instructions to use McClain/PlasmidGPT-RL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use McClain/PlasmidGPT-RL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="McClain/PlasmidGPT-RL")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("McClain/PlasmidGPT-RL") model = AutoModelForCausalLM.from_pretrained("McClain/PlasmidGPT-RL", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use McClain/PlasmidGPT-RL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "McClain/PlasmidGPT-RL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "McClain/PlasmidGPT-RL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/McClain/PlasmidGPT-RL
- SGLang
How to use McClain/PlasmidGPT-RL 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 "McClain/PlasmidGPT-RL" \ --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": "McClain/PlasmidGPT-RL", "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 "McClain/PlasmidGPT-RL" \ --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": "McClain/PlasmidGPT-RL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use McClain/PlasmidGPT-RL with Docker Model Runner:
docker model run hf.co/McClain/PlasmidGPT-RL
PlasmidGPT-RL
Camera-ready ICML 2026 checkpoint available: This is an early step-800 development checkpoint. For the final camera-ready model (
71.6%strict QC pass rate across 4,000 sequences vs.4.3%base) and QC evaluation pipeline from our ICML 2026 paper, useUCL-CSSB/PlasmidGPT-GRPOandUCL-CSSB/PlasmidRL.
This model is a fine-tuned version of UCL-CSSB/PlasmidGPT-SFT using Group Relative Policy Optimization (GRPO).
Model Description
PlasmidGPT-RL is trained to generate functional plasmid DNA sequences. It was fine-tuned using reinforcement learning with a reward model that evaluates:
- Presence of valid origins of replication (OriV)
- Presence of antibiotic resistance genes (ARGs)
- Absence of problematic repeat sequences
Training
This model was trained with GRPO using the TRL library.
Code & Evaluation Pipeline: UCL-CSSB/PlasmidRL
Training run: Weights & Biases
Training Details
- Base model: UCL-CSSB/PlasmidGPT-SFT
- Method: GRPO (Group Relative Policy Optimization)
- Checkpoint: 800 steps
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("McClain/PlasmidGPT-RL")
model = AutoModelForCausalLM.from_pretrained("McClain/PlasmidGPT-RL")
# Generate a plasmid sequence
prompt = "ATG"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
inputs.input_ids,
max_new_tokens=256,
do_sample=True,
temperature=0.95,
top_p=0.9
)
sequence = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(sequence)
Framework Versions
- TRL: 0.23.1
- Transformers: 4.57.0
- PyTorch: 2.8.0
Citation
If you use this model, please cite our ICML 2026 paper (and the GRPO optimization algorithm from DeepSeekMath, Shao et al., 2024):
@inproceedings{thiel2026plasmidrl,
title = {Effects of Structural Reward Shaping on Biophysical Properties in {RL}-Trained Plasmid Generators},
author = {Thiel, McClain and Cunningham, Angus G. and Barnes, Chris P.},
booktitle = {Proceedings of the 43rd International Conference on Machine Learning (ICML)},
series = {Proceedings of Machine Learning Research},
volume = {306},
year = {2026},
publisher = {PMLR},
url = {https://openreview.net/forum?id=uiMxVE16m3},
}
- Downloads last month
- 814