All models

Literature · adibvafa

CodonTransformer

A neural network that converts protein sequences into organism-specific optimised DNA sequences.

What CodonTransformer is

CodonTransformer is a computational biology model designed to automate codon optimisation. Developed by researchers at the Vector Institute, the University of Toronto Scarborough, and Université Paris Cité (INSERM), it translates amino acid sequences into coding DNA sequences tailored to specific host organisms.

Because different species exhibit distinct preferences for synonymous codons, heterologous protein expression often requires altering the nucleotide sequence without changing the resulting protein. CodonTransformer applies context-aware neural networks to handle multispecies codon selection, assisting researchers in synthetic biology and genetic engineering.

How it works

The system is built on the BigBird transformer architecture, configured as a masked language model. The input protein sequence is combined with the designated target organism and converted into sequence tokens where codon assignments are masked.

Using sequence-wide attention, the model predicts the most appropriate synonymous codons across the sequence to generate the final DNA sequence. Predictions can be executed deterministically or probabilistically on CPU or CUDA-capable GPU hardware.

Key facts

Architecture
BigBird (BigBirdForMaskedLM)
Primary task
Codon optimisation (protein-to-DNA reverse translation)
Input format
Amino acid sequence and target organism name
Output format
Optimised nucleotide coding sequence
GPU memory
16 GB
Implementation library
Hugging Face Transformers

What you can use it for

Recombinant expression design
Translating target protein sequences into optimised DNA coding sequences specifically adapted for expression hosts such as Escherichia coli.
Synthetic gene construction
Generating host-adapted DNA constructs from amino acid specifications for synthetic biology workflows.
Multispecies comparative design
Generating and comparing alternative codon allocations across different target host organisms.

Run it here

No installation and no GPU of your own: fill in the inputs and it runs on our servers. Results stay in your browser unless you sign in.

Runs on On-demand GPU

Runs on our servers with on-demand compute. A first run needs time to load the model; active capacity can be reused and scales down when idle.

Run this model

CodonTransformer

Entities are labelled token by token.

Needs text

Strengths and limits

Good at

  • Enables multispecies codon design within a single neural framework by incorporating host organism identity.
  • Employs the BigBird transformer architecture to take broader sequence context into account during codon selection.
  • Supports deterministic sequence generation for reproducible research protocols.

Watch out for

  • Depends on the availability of recognised target organism classifications within the model.
  • Carries relatively high hardware demands for local deployment, specifying 16 GB of GPU memory.

Inputs and outputs

You provide

  • Text

    Entities are labelled token by token.

You get back

  • Labels with confidence scores, highest first.

CodonTransformer API

The same run, from your own code: one HTTP request with an API key, billed in the same credits as the Run button. A fast run answers with its outputs; a longer one answers with a poll_url to read.

bash
curl https://corollary-labs.com/api/v1/models/adibvafa-codontransformer/runs \
  -H "Authorization: Bearer $COROLLARY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "text": "<Text>"
  }
}'

Make an API key, then read the models reference.

Licence

Commercial use permitted · apache-2.0

apache-2.0, as the repository declares it. Read by the catalogue intake on 2026-11-28.

Questions

Can I use CodonTransformer commercially?

Commercial use permitted. apache-2.0, as the repository declares it. Read by the catalogue intake on 2026-11-28.

How do I run CodonTransformer without installing anything?

Use the form under “Run it here” on this page: fill in the inputs and press Run model. It runs on our servers on CPU only, typically in 3.4s, and a run costs about 28 credits. Visitors without an account get 1,000 credits a month.

What inputs does the model require?

It requires a single-letter amino acid sequence representing the desired protein and a text string specifying the target expression organism, such as 'Escherichia coli general'.

What neural network architecture does CodonTransformer use?

It uses the BigBird transformer architecture implemented as a masked language model.

Can the model output deterministic results?

Yes, sequence prediction can be executed with deterministic settings enabled to yield consistent, repeatable DNA outputs.

How to cite it

Fallahpour, Adibvafa, Vincent Gureghian, Guillaume J. Filion, Ariel B. Lindner, and Amir Pandi. 'CodonTransformer: a multispecies codon optimizer using context-aware neural networks.' Nature Communications 16, no. 1 (2025): 3205. DOI: 10.1038/s41467-025-58588-7.

Written from CodonTransformer's own documentation (model card). Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.