LLM-MRI Python module: a brain scanner for LLMs
LLMs (Large Language Models) have demonstrated human-level language and knowledge acquisition skills in several tasks. However, despite the recent success and broad use, understanding how these skills are learned and encoded inside the underlying neural network is still challenging. The goal of the LLM-MRI package is to simplify the study of activation patterns in any transformer-based LLM, similarly to how MRI (magnetic resonance imaging) simplifies with biological brains. The package, written for the Python language, allows the mapping of neural regions using a parameterized reduction of the model's dimensionality. Neural regions can be visualized according to the forward-pass activations stimulated by a set of documents. Similarly, the package enables the creation of graph models representing the interlayer network of connections stimulated by a set of documents. These features allow for qualitative and quantitative assessments of the underlying structure of activations, depending on the type of documents that the LLM model is exposed to.
Authors
- Luiz Gomes-Jr (ORCID: https://orcid.org/0000-0002-1534-9032)
- André Santanchè (ORCID: https://orcid.org/0000-0002-1756-4852)
- Mateus R. Figênio
- Luiz Pereira da Costa (ORCID: https://orcid.org/0009-0000-3412-5061)
Institutions
- Universidade Tecnológica Federal do Paraná (BR)
- Universidade Estadual de Campinas (UNICAMP) (BR)
Publication Details
- Published
- 2024-10-14
- DOI
- https://doi.org/10.5753/sbbd_estendido.2024.243136
- Citations
- 2
- Primary Topic
- Medical Imaging Techniques and Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.81