ctrl

Model type

ctrl

Class

CTRLCausalLMModel

Task

text-generation

Source

models/ctrl.py

Description

CTRL causal language model.

Extends GPT2CausalLMModel with CTRL-specific weight renaming and sinusoidal position embedding injection. CTRL uses biases in all attention projections and MLP layers, including a separate lm_head bias (not tied to the embedding weight).

Replicates HuggingFace’s CTRLLMHeadModel.

Usage

mobius build --model <MODEL_ID> output_dir/
from mobius import build

model = build("<MODEL_ID>")