Configuration Parsing Warning:In UNKNOWN_FILENAME: "auto_map.AutoTokenizer" must be a string

PlasmidLM-kmer6 (v2.0 Cluster-Disjoint Base)

A 19.3M-parameter decoder-only transformer for conditional plasmid DNA sequence generation, pretrained from scratch on a BLAST-certified sequence-cluster-disjoint Addgene split (cluster_v3) with random circular start rotation and capped inverse-square-root minority upweighting (<=4x).

Versioning note: main and tag v2.0 host the 100,000-step cluster_base_s42 checkpoint (cluster_v3 split). The original 65,000-step source-ID-disjoint release is preserved on branch v1 / tag v1.0. For best conditional fidelity and viability, use the RL post-trained companion model McClain/PlasmidLM-kmer6-GRPO-plannotate.

Revision Comparison (frozen_panel_v3, n=468 clusters, t=0.3, <=4,096 new tokens)

Revision / Checkpoint Pretraining Split Steps GC Content Viable Useful@0.5 BoK-4 Useful Intact AMRFinder Extra ORI/AMR
v2.0 (main, cluster_base_s42) cluster_v3 (zero >=90%/90% overlap) 100,000 50.4% 74.1% 47.7% 78.4% 55.2% 0.57
v1.0 (v1 branch, hf_base) Source-ID-disjoint (108K) 65,000 48.5% 65.9% 45.9% 72.0% 48.0% 0.55
  • Held-out cluster_v3 validation loss: 0.9867 (85.23% token accuracy) across zero-overlap circular sequence clusters.
  • model.safetensors SHA-256: c6499c7dbcc987500098036f61748cc7059d771ef659b92dc69243de3f6563de

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("McClain/PlasmidLM-kmer6", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("McClain/PlasmidLM-kmer6", trust_remote_code=True)

prompt = "<BOS><AMR_KANAMYCIN><ORI_COLE1><SEQ>"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
    **inputs,
    max_new_tokens=4096,
    temperature=0.3,
    top_p=0.95,
    do_sample=True,
    eos_token_id=tokenizer.eos_token_id,
    pad_token_id=tokenizer.pad_token_id,
)
print(tokenizer.decode(outputs[0].tolist(), skip_special_tokens=False))

To pin the original v1.0 checkpoint:

model = AutoModelForCausalLM.from_pretrained("McClain/PlasmidLM-kmer6", revision="v1.0", trust_remote_code=True)

Links & Artifacts

Limitations

  • Computational validation only (pLannotate + Prodigal + NCBI AMRFinderPlus); sequences are not wet-lab tested.
  • Under strict homologous backbone holdout, rare low-copy origins (<ORI_P15A>, <ORI_PSC101>) and soft copy-class tokens (<COPY_LOW>) remain hard without explicit constraints.

Citation

@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},
}
Downloads last month
295
Safetensors
Model size
19.3M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for McClain/PlasmidLM-kmer6

Finetunes
1 model

Dataset used to train McClain/PlasmidLM-kmer6

Space using McClain/PlasmidLM-kmer6 1

Collection including McClain/PlasmidLM-kmer6

Evaluation results

  • Useful-plasmid rate (T=0.5, single-shot) on frozen_panel_v3 (cluster-disjoint test panel, n=468 clusters)
    self-reported
    0.477
  • Viability rate (single-shot) on frozen_panel_v3 (cluster-disjoint test panel, n=468 clusters)
    self-reported
    0.742
  • Best-of-4 useful-plasmid rate on frozen_panel_v3 (cluster-disjoint test panel, n=468 clusters)
    self-reported
    0.784
  • NCBI AMRFinderPlus intact-ORF recall on frozen_panel_v3 (cluster-disjoint test panel, n=468 clusters)
    self-reported
    0.552