Papers › CTRL: A Conditional Transformer Language Model for Controllable Generation

CTRL: A Conditional Transformer Language Model for Controllable Generation

11 Sep 2019Preprint 2019 9arXiv:1909.05858archive 2025-07-28

Nitish Shirish Keskar, Bryan McCann, Lav R. Varshney, Caiming Xiong, Richard Socher

Large-scale language models show promising text generation capabilities, but users cannot easily control particular aspects of the generated text. We release CTRL, a 1.63 billion-parameter conditional transformer language model, trained to condition on control codes that govern style, content, and task-specific behavior. Control codes were derived from structure that naturally co-occurs with raw text, preserving the advantages of unsupervised learning while providing more explicit control over text generation. These codes also allow CTRL to predict which parts of the training data are most likely given a sequence. This provides a potential method for analyzing large amounts of data via model-based source attribution. We have released multiple full-sized, pretrained versions of CTRL at https://github.com/salesforce/ctrl.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1909.05858")

Code

Syntology Ran 13 of 14 code samples harvested from 3 repositories linked to this paper; 1 has no recorded run. Of those that ran: 3 ran · honoured contract; 1 ran · violated contract; 3 ran · our draft was wrong; 6 ran with no contract checked.

By repository: community (archive-listed): 8 samples from 2 repositories, 7 ran; found in paper text by Syntology: 6 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

NohTow/PPL-MCTS mentioned on GitHubpytorch report
dig-team/hanna-benchmark-asg mentioned on GitHubpytorchMIT report
lashoun/hanna-benchmark-asg mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 13 ran; 3 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
1ran · violated contract
3ran · our draft was wrong
6ran
1unverified

Licence: 0 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Encoder UKPLab/controlled-argument-generation/transformer.py community (archive-listed) ran BSD-3-Clause (permissive) · df1758dac76c4f1b · report
EncoderLayer UKPLab/controlled-argument-generation/transformer.py community (archive-listed) ran BSD-3-Clause (permissive) · 0569a605ab9ceff1 · report
MultiHeadAttention UKPLab/controlled-argument-generation/transformer.py community (archive-listed) ran fingerprinted BSD-3-Clause (permissive) · 28afe17f8e7f671f · report
angle_defn UKPLab/controlled-argument-generation/transformer.py community (archive-listed) ran · honoured contract fingerprinted BSD-3-Clause (permissive) · 9eb3e1d90aca3c2d · report
point_wise_feed_forward_network UKPLab/controlled-argument-generation/transformer.py community (archive-listed) ran · our draft was wrong BSD-3-Clause (permissive) · f599625f24576b30 · report
positional_encoding UKPLab/controlled-argument-generation/transformer.py community (archive-listed) ran · honoured contract BSD-3-Clause (permissive) · 73f58f87df49bccb · report
scaled_dot_product_attention UKPLab/controlled-argument-generation/transformer.py community (archive-listed) ran · violated contract fingerprinted BSD-3-Clause (permissive) · c37ff914e4e7a62e · report
false_discovery_control2 dig-team/hanna-benchmark-asg/fdr.py community (archive-listed) unverified MIT (permissive) · f0e2d39fe65c917d · report
Encoder salesforce/ctrl/pytorch_transformer.py found in paper text by Syntology ran BSD-3-Clause (permissive) · ffb87c8bfc0934fc · report
EncoderLayer salesforce/ctrl/pytorch_transformer.py found in paper text by Syntology ran fingerprinted BSD-3-Clause (permissive) · 0e66a2125c9ac5ae · report
MultiHeadAttention salesforce/ctrl/pytorch_transformer.py found in paper text by Syntology ran fingerprinted BSD-3-Clause (permissive) · 6a0d83e892c993b0 · report
point_wise_feed_forward_network salesforce/ctrl/pytorch_transformer.py found in paper text by Syntology ran · our draft was wrong BSD-3-Clause (permissive) · e3590890c2be1aba · report
positional_encoding salesforce/ctrl/pytorch_transformer.py found in paper text by Syntology ran · honoured contract fingerprinted BSD-3-Clause (permissive) · 217eb8ea438145ad · report
scaled_dot_product_attention salesforce/ctrl/pytorch_transformer.py found in paper text by Syntology ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · 6da14d7cf9778239 · report

Tasks

Language ModelingLanguage ModellingText Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdaGradAttentionBPECTRLDense ConnectionsDropoutGradient ClippingLayer NormalizationLinear LayerLinear WarmupMulti-Head AttentionReLUResidual ConnectionSoftmax

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections