This repo contains the code our paper: The Translation Trap Hypothesis: Multilingual Generation with Large Language Models Suffers from Implicit Translation Failure (arXiv coming soon!)
See:
scripts/get_intermediate_generations.py: Generating full sequences from intermediate layers with logit lens and greedy decoding.scripts/characterizing_intermediate_generations.py: Extracting relevant information such as accuracy and language of generations at various layers.scripts/analysis/overview_analysis.py: Calculating TLP and other quantities of interest.experiments: Example shell scripts for generation and analysis with two models.
If you use our code, please cite:
TODO