Upload README.md
Browse files17 unmodified lines181920212221222324258 unmodified lines343536373738394014 unmodified lines555657585958596061624 unmodified lines6768697071707172737410 unmodified lines85868788898889909192283 unmodified lines3763773783793793803813821 unmodified line3843853863873873883893904 unmodified lines3953963973983983994004013 unmodified lines4054064074084084094104119 unmodified lines4214224234244244254264272 unmodified lines4304314324334344334344354364374 unmodified lines44244344444544544644744817 unmodified lines<!-- Typographic wordmark, accepted as-is. Swap in a design asset here if one is ever produced. -->
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/codonfm-wordmark-dark.svg">
<img src="assets/codonfm-wordmark.svg" width="300" alt="CodonFM">
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-wordmark-dark.svg">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-wordmark.svg" width="300" alt="CodonFM">
</picture>
</p>
8 unmodified lines</p>
<p align="center">
<img src="assets/codonfm-hero.svg" width="1060" alt="Three mRNA strands encoding the same protein, differing only at one leucine codon: CUU, CUC and CUA, highlighted in yellow, tan and blue. Each passes through stylised model layers and emerges as a protein structure tinted to match its codon, showing that synonymous choices change the outcome.">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-hero.svg" width="1060" alt="Three mRNA strands encoding the same protein, differing only at one leucine codon: CUU, CUC and CUA, highlighted in yellow, tan and blue. Each passes through stylised model layers and emerges as a protein structure tinted to match its codon, showing that synonymous choices change the outcome.">
</p>
# CodonFM-5B14 unmodified lines[the two training objectives](#the-two-training-objectives) below.
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/codonfm-overview-dark.svg">
<img src="assets/codonfm-overview.svg" width="1060" alt="A coding sequence tokenised two ways. Amino-acid models collapse the synonymous codons GAA and GAG into a single token E, losing the distinction. CodonFM keeps each codon as its own token, which feeds codon optimization, variant effect prediction and sequence embeddings.">
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-overview-dark.svg">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-overview.svg" width="1060" alt="A coding sequence tokenised two ways. Amino-acid models collapse the synonymous codons GAA and GAG into a single token E, losing the distinction. CodonFM keeps each codon as its own token, which feeds codon optimization, variant effect prediction and sequence embeddings.">
</picture>
## Why codon resolution matters4 unmodified linesribosome moves along it, and whether the finished protein folds correctly.
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/codonfm-consequences-dark.svg">
<img src="assets/codonfm-consequences.svg" width="1060" alt="A synonymous change from CTA to CTG keeps the same amino acid but triggers three downstream consequences: mRNA structure instability shortens mRNA half-life, affecting how much protein is made; altered translational kinetics disrupt folding rhythm, affecting how fast it is made; protein misfolding and aggregation cause loss of function or toxicity, affecting whether it works at all.">
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-consequences-dark.svg">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-consequences.svg" width="1060" alt="A synonymous change from CTA to CTG keeps the same amino acid but triggers three downstream consequences: mRNA structure instability shortens mRNA half-life, affecting how much protein is made; altered translational kinetics disrupt folding rhythm, affecting how fast it is made; protein misfolding and aggregation cause loss of function or toxicity, affecting whether it works at all.">
</picture>
A model that tokenises to amino acids cannot represent the left-hand side of that picture, so it10 unmodified lines## What makes CodonFM work
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/codonfm-pillars-dark.svg">
<img src="assets/codonfm-pillars.svg" width="1060" alt="Three ingredients make CodonFM work: evolutionary data from over 130 million coding sequences across more than 22,000 species; a codon-level model that captures synonymous codon usage; and downstream validation on protein expression, translation efficiency and variant effect.">
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-pillars-dark.svg">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-pillars.svg" width="1060" alt="Three ingredients make CodonFM work: evolutionary data from over 130 million coding sequences across more than 22,000 species; a codon-level model that captures synonymous codon usage; and downstream validation on protein expression, translation efficiency and variant effect.">
</picture>
## At a glance283 unmodified linesValidation loss keeps falling with model size, and the 5B models separate clearly from the rest
of the family rather than converging with them.
<img src="assets/fig1-validation-loss.png" width="1060" alt="Validation loss against training samples seen, for EnCodon 80M, 600M, 1B, 1B CDWT, 5B and 5B CDWT. Every model's loss falls as training continues, and the 5B models sit lowest throughout, reaching about 1.95 against roughly 2.25 for 1B and 2.9 for 80M.">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/fig1-validation-loss.png" width="1060" alt="Validation loss against training samples seen, for EnCodon 80M, 600M, 1B, 1B CDWT, 5B and 5B CDWT. Every model's loss falls as training continues, and the 5B models sit lowest throughout, reaching about 1.95 against roughly 2.25 for 1B and 2.9 for 80M.">
*Figure 1. Larger EnCodon models achieve lower validation loss as training continues.*
1 unmodified linemispredicts one synonymous codon for another, falls steadily with scale across almost every
amino acid.
<img src="assets/fig2-codon-confusion.png" width="1060" alt="Heatmap of synonymous codon confusion by amino acid for each EnCodon model size. Darker green means less confusion. Rows grow darker from EnCodon 80M at the top through to 5B and 5B CDWT at the bottom.">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/fig2-codon-confusion.png" width="1060" alt="Heatmap of synonymous codon confusion by amino acid for each EnCodon model size. Darker green means less confusion. Rows grow darker from EnCodon 80M at the top through to 5B and 5B CDWT at the bottom.">
*Figure 2. Synonymous codon confusion across model scales. Darker green is a lower confusion
score, so larger models show a firmer grip on codon usage.*4 unmodified linesseparating pathogenic from benign, and **5B-CDWT leads**, so the rare-codon weighting earns its
place on this germline task.
<img src="assets/fig3-clinvar-auroc.png" width="1060" alt="Box plot of AUROC for distinguishing pathogenic from benign matched synonymous variants. EnCodon 5B CDWT is highest at about 0.67, followed by 5B, then 1B CDWT and 1B near 0.62, with SOTA-Best-1 at about 0.61 and EnCodon 80M lowest at about 0.51.">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/fig3-clinvar-auroc.png" width="1060" alt="Box plot of AUROC for distinguishing pathogenic from benign matched synonymous variants. EnCodon 5B CDWT is highest at about 0.67, followed by 5B, then 1B CDWT and 1B near 0.62, with SOTA-Best-1 at about 0.61 and EnCodon 80M lowest at about 0.51.">
*Figure 3. CodonFM 5B CDWT and 5B achieve the highest AUROC for separating pathogenic from
benign synonymous variants in ClinVar.*3 unmodified linespublished model on this benchmark. CodonFM also recovers known loss-of-function synonymous
mutations in *KRAS*.
<img src="assets/fig4-cosmic-cancer.png" width="1060" alt="Two box plots comparing COSMIC synonymous mutations against matched gnomAD common variants. On the Mann-Whitney U test the 5B models reach about 10 on the negative log-10 p scale against roughly 6 for 1B, 2 for PhyloP and 1.5 for SOTA-Best-2. The AUROC panel shows the same ordering.">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/fig4-cosmic-cancer.png" width="1060" alt="Two box plots comparing COSMIC synonymous mutations against matched gnomAD common variants. On the Mann-Whitney U test the 5B models reach about 10 on the negative log-10 p scale against roughly 6 for 1B, 2 for PhyloP and 1.5 for SOTA-Best-2. The AUROC panel shows the same ordering.">
*Figure 4. Across 1,471 curated cancer-observed synonymous variants, larger EnCodon models
outperform the PhyloP conservation score and the best state-of-the-art model on this test.*9 unmodified linesdatasets) and protein expression (1,459 synonymous CDS variants with an *E. coli* readout), with
no fine-tuning.
<img src="assets/fig5-te-expression.png" width="1060" alt="Two bar charts of Spearman correlation. On mRNA translation efficiency, EnCodon 5B CDWT and 5B lead at about 0.72, ahead of SOTA-Best-1 at roughly 0.69 and SOTA-Best-3 at 0.52. On mRFP expression, EnCodon 5B and 5B CDWT lead at about 0.73, ahead of SOTA-Best-3 at 0.68 and SOTA-Best-1 at 0.55.">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/fig5-te-expression.png" width="1060" alt="Two bar charts of Spearman correlation. On mRNA translation efficiency, EnCodon 5B CDWT and 5B lead at about 0.72, ahead of SOTA-Best-1 at roughly 0.69 and SOTA-Best-3 at 0.52. On mRFP expression, EnCodon 5B and 5B CDWT lead at about 0.73, ahead of SOTA-Best-3 at 0.68 and SOTA-Best-1 at 0.55.">
*Figure 5. Random forest performance on frozen zero-shot embeddings, for translation efficiency
(RiboNN Spearman ρ) and mRFP protein expression (Spearman ρ on a held-out test set). The 5B models2 unmodified lines### Where it gets used
<picture>
<source media="(prefers-color-scheme: dark)" srcset="assets/codonfm-applications-dark.svg">
<img src="assets/codonfm-applications.svg" width="1060" alt="Optimized coding sequences from CodonFM feed CAR-T immunotherapy, tumour profiling, vaccine efficacy and peptide manufacturing.">
<source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-applications-dark.svg">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/codonfm-applications.svg" width="1060" alt="Optimized coding sequences from CodonFM feed CAR-T immunotherapy, tumour profiling, vaccine efficacy and peptide manufacturing.">
</picture>
### In the lab4 unmodified linescodon usage alone, leaving both proteins untouched. Two targets rather than one is the point: it
is the difference between a method that transfers and a single lucky sequence.
<img src="assets/fig6-arc-gfp.png" width="1060" alt="Two bar charts of protein expression in A549 cells relative to wild type. For luciferase, wild type sits at 1.0, SOTA-A at about 0.4, SOTA-B at about 1.3 and the CodonFM design at about 1.95, marked significant with p equal to 6.3e-05. For GFP, wild type sits at 1.0, SOTA-A at about 0.4, SOTA-B at about 1.15 and the CodonFM design at about 3.95, with p equal to 7.8e-05.">
<img src="https://huggingface.co/nvidia/CodonFM-Encodon-5B-v1/resolve/main/assets/fig6-arc-gfp.png" width="1060" alt="Two bar charts of protein expression in A549 cells relative to wild type. For luciferase, wild type sits at 1.0, SOTA-A at about 0.4, SOTA-B at about 1.3 and the CodonFM design at about 1.95, marked significant with p equal to 6.3e-05. For GFP, wild type sits at 1.0, SOTA-A at about 0.4, SOTA-B at about 1.15 and the CodonFM design at about 3.95, with p equal to 7.8e-05.">
*Figure 6. Protein expression in A549 human epithelial cells, relative to wild type.
CodonFM-designed sequences reach roughly 2× for luciferase (p = 6.3 × 10⁻⁵) and 4× for GFPREADME.md+17-17