Recommended
v2.0release: For the latest cluster-disjoint (cluster_v3) checkpoint with verifiable-reward GRPO post-training (58.0% ± 0.7%single-shot /85.5% ± 0.8%Best-of-4 useful plasmids), useMcClain/PlasmidLM-kmer6-GRPO-plannotateorMcClain/PlasmidLM-kmer6, or test prompts live onMcClain/PlasmidSpace.
A 78.3M total parameter (31.1M active) Mixture-of-Experts autoregressive language model for plasmid DNA sequence generation, trained on ~100K plasmid sequences from Addgene.
| Property | Value |
|---|---|
| Total parameters | 78.3M |
| Active parameters | 31.1M |
| Architecture | Transformer decoder with MoE MLP |
| Hidden size | 384 |
| Layers | 10 |
| Attention heads | 8 |
| Experts | 6 (top-2 routing) |
| Expert intermediate size | 1,536 |
| Max sequence length | 16,384 tokens |
| Tokenizer | k-mer (k=6, stride=3) |
| Vocab size | 4,208 |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("McClain/PlasmidLM-kmer6-MoE", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("McClain/PlasmidLM-kmer6-MoE", trust_remote_code=True)
# Condition on antibiotic resistance + origin of replication
prompt = "<BOS><AMR_KANAMYCIN><ORI_COLE1><SEQ>"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.8, do_sample=True, top_p=0.95)
print(tokenizer.decode(outputs[0].tolist()))
The model generates plasmid DNA sequences conditioned on functional annotations (antibiotic resistance markers, origins of replication) provided as special tokens in the prompt.
Each transformer layer replaces the standard dense MLP with a Mixture-of-Experts layer containing 6 expert MLPs. A learned router selects the top-2 experts per token, so only 31.1M of the 78.3M total parameters are active for any given token. This provides greater model capacity while maintaining efficient inference.
| Token | Purpose |
|---|---|
<BOS> |
Beginning of sequence |
<EOS> |
End of sequence |
<SEQ> |
Separator between prompt annotations and DNA sequence |
<PAD> |
Padding |
<AMR_*> |
Antibiotic resistance markers (e.g., <AMR_KANAMYCIN>, <AMR_AMPICILLIN>) |
<ORI_*> |
Origins of replication (e.g., <ORI_COLE1>, <ORI_P15A>) |
If you use this model, please cite:
@article{thiel2026plasmidlm,
title = {{PlasmidLM}: A Promptable {DNA} Language Model via Verifiable-Reward Post-Training},
author = {Thiel, McClain and Barnes, Chris P.},
journal = {bioRxiv},
year = {2026},
doi = {10.64898/2026.05.19.725242},
url = {https://doi.org/10.64898/2026.05.19.725242},
}