All models

ZymCTRL

A causal transformer language model that generates sequences conditioned on a leading control code.

Language · 1,597 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (79 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
ctrl
Parameters
710.3M
Operations
1,597
Framework
PyTorch
Recurrent
No
Published
2019
Cited by
1,753 (as of 29 November 2026)
Authors
Nitish Shirish Keskar, Bryan McCann, Lav R. Varshney and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m12997
Graph hash
5f3611c84ce0da88f6df844038dfb05878a870234fffe695e9ce3491e5fcb065
Skeleton hash
9e6feb638d34bbe09149f740375acc7ede60ed575659e3e3f2cc3663ec43a09d
Architecture hash
909d2790e2e50289098cd0f07eb8733f8da9cb3432f4d7fc9e16a541cf273ef2
Diagram SHA-256
97c73f5bf1c5bf47abbe754a1abd69105d79601ea76288c760ffde0a4919b6ac
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModelForCausalLM.from_config()

What it is

This model is ZymCTRL, a conditional language model for generating artificial enzymes from an Enzyme Commission number. Its card says it is based on the CTRL Transformer architecture, and it is built here from a GPT-2 configuration with 36 layers, 20 heads and a 458-token vocabulary.

About this model's family

CTRL is a language model whose output can be steered by a control code placed at the start of the text. The codes govern style, content and task-specific behavior, and they come from structure that already accompanies raw text, so the training stays unsupervised. In training, each sequence has its domain control code prepended as the first token. Because of the codes, the model can also predict which parts of the training data are most likely given a sequence, which the paper proposes as a method of source attribution.

The network is a Transformer with causal masking, and positions are added as sinusoidal embeddings. The paper gives a model dimension of 1280, an inner dimension of 8192, 48 layers and 16 heads per layer, and reports 1.63 billion parameters. Token embeddings are tied with the final output embedding layer. Training used 140 GB of text from a wide variety of domains.

ZymCTRL carries the same conditioning idea to proteins. Its card describes it as based on the CTRL Transformer architecture, with 36 layers and a model dimensionality of 1280. It was pre-trained on raw enzyme sequences with the Enzyme Commission (EC) classes prepended to each sequence. Given an EC number, it generates protein sequences meant to carry out that catalytic reaction.

Key idea. The paper released CTRL, a 1.63 billion-parameter transformer language model trained to condition on control codes that govern style, content and task-specific behavior.

  • CTRL
  • Conditional Transformer Language Model
  • controllable generation
  • control codes
  • conditional language model
  • text generation
  • ZymCTRL
  • enzyme generation
  • protein language model
  • Salesforce CTRL

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{keskar2019ctrlconditionaltransformerlanguage,
      title={CTRL: A Conditional Transformer Language Model for Controllable Generation}, 
      author={Nitish Shirish Keskar and Bryan McCann and Lav R. Varshney and Caiming Xiong and Richard Socher},
      year={2019},
      eprint={1909.05858},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/1909.05858}, 
}