A causal LLM embeds language generators in a causal DAG, making each conditional text distribution correspond to a causal mechanism rather than only a predictive association. Parent outputs are concatenated as inputs to downstream models. section 13.3.2
A practical construction uses separate models for each variable:
- Fine-tune a GPT-2 causal language model to generate the King variable. section 13.3.2
- Fine-tune BART sequence-to-sequence models for Prince given King and Kingdom given King plus Prince. section 13.3.2
- Wrap generation and log-probability computation in a Torch distribution, then connect the distributions with Pyro sample sites. section 13.3.2
Generated story
A generated King declares war, a Prince abdicates, and the Kingdom falls into poverty. Observational and interventional distributions can then be compared to test the causal model. section 13.3.2
Figure 13.5 GPT-2 is fine-tuned to represent the distribution of King’s action vignettes.
Use the architecture figure to distinguish the pretrained language model from the causal-variable scaffold. section 13.3.2
