# salesforce/ctrl

Conditional Transformer Language Model for Controllable Generation

Repository: https://github.com/salesforce/ctrl
Canonical: https://ross.abutalabs.com/products/ctrl
Homepage: https://arxiv.org/abs/1909.05858
Language: Python
License: BSD-3-Clause
License Family: permissive
Archived: true
Last push: 2025-05-01T17:28:54+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 19, release rhythm 35, longevity 100
- inputs: {"age_days": 2561, "days_push": 489, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1879, forks 199 (observed 2026-08-28T04:05:48.446795+00:00)

## What it is
CTRL is a 1.63 billion-parameter conditional Transformer language model from Salesforce that generates text controllable via control codes governing style, content, and task behavior. The repository provides TensorFlow/PyTorch inference code, fine-tuning utilities, and pretrained checkpoints, with the model also integrated into HuggingFace Transformers.

## Use cases
- generate text with controllable style and content
- condition language model output on control codes
- fine-tune a large language model on a custom dataset
- convert a TensorFlow checkpoint to HuggingFace PyTorch format
- attribute generated text to training data sources
- run text generation on a GPU

## When to choose
- you need explicit control over generated text style or task via control codes
- you want a research-grade conditional language model with pretrained checkpoints
- you want to use CTRL through HuggingFace Transformers

## When to avoid
- you need a modern, actively developed LLM with state-of-the-art quality
- you want instruction-tuned or chat-style generation
- you lack GPU resources for a 1.63B-parameter model

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, nlp, llm-inference
- domain: large-language-models, deep-learning
- platform: python
- tags: conditional-generation, transformer, text-generation, control-codes, pretrained-model, research, natural-language-processing, gpu

## Member repositories
- salesforce/ctrl (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:48.446795+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:14:38.143551+00:00, confidence not recorded.
  - readme: https://github.com/salesforce/ctrl (fetched 2026-08-28T04:05:48.446795+00:00, sha d768b0bb7050)
  - homepage: https://arxiv.org/abs/1909.05858 (fetched 2026-08-29T10:53:26.250085+00:00, sha 03c4ed6ee7ac)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T10:53:26.259266+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T10:53:26.262553+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T10:53:26.264326+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T10:53:26.260998+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
