Downloads · 30 days
457
58% of all-time downloads
McClain/PlasmidLM
PlasmidLM is a text generation model from McClain. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A 17.7M parameter autoregressive language model for plasmid DNA sequence generation, trained on ~108K plasmid sequences from Addgene.
Downloads · 30 days
457
58% of all-time downloads
All-time downloads
789
Public
Parameters
17.7M
71 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors71 MB · 100%
From the Hugging Face model README
A 17.7M parameter autoregressive language model for plasmid DNA sequence generation, trained on ~108K plasmid sequences from Addgene.
| Property | Value |
|---|---|
| Parameters | 17.7M |
| Architecture | Transformer decoder (dense MLP), LLaMA-style |
| Hidden size | 384 |
| Layers | 10 |
| Attention heads | 8 |
| Intermediate size | 1,536 |
| Max sequence length | 16,384 tokens |
| Tokenizer | Character-level (single DNA bases) |
| Vocab size | 120 |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("McClain/PlasmidLM", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("McClain/PlasmidLM", trust_remote_code=True)
# Condition on antibiotic resistance + origin of replication
prompt = "<BOS><AMR_KANAMYCIN><ORI_COLE1><SEP>"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=4096, 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, promoters, reporters, etc.) provided as special tokens in the prompt.
<BOS><TOKEN1><TOKEN2>...<SEP>
The model generates DNA bases (A/T/C/G) after the <SEP> token until it produces <EOS> or hits the maximum length.
| Token | Purpose |
|---|---|
<BOS> | Beginning of sequence |
<EOS> | End of sequence |
<SEP> | 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>) |
<PROM_*> | Promoters (e.g., <PROM_CMV>, <PROM_T7>) |
<REP_*> | Reporters (e.g., <REP_EGFP>, <REP_MCHERRY>) |
@misc{thiel2026plasmidlm,
title={PlasmidLM: Language Models for Plasmid DNA Generation},
author={Thiel, McClain},
year={2026}
}