{"id":{"repo_id":"colo-mines","oai_identifier":"oai:repository.mines.edu:11124/181185"},"canonical_url":"https://search.dev.ndltd.org/etd/colo-mines/oai:repository.mines.edu:11124/181185","repository":{"repo_id":"colo-mines","name":"Colorado School of Mines","base_url":"https://repository.mines.edu/server/oai/request"},"display":{"title":"Table manners at scale: introducing Lora Lens for efficient analysis & detoxification of language models","abstract":"Transformer-based language models have achieved significant advancements across numerous natural language processing (NLP) tasks. However, as these models grow in scale and complexity, ensuring interpretability and mitigating toxic outputs become increasingly critical challenges. This thesis addresses these issues by first analyzing the role attention heads play in propagating toxicity within models, leveraging a recently proposed interpretability tool known as Attention Lens. By decoding attention head outputs into human-interpretable tokens, we identify specific attention heads contributing disproportionately to toxic content generation and demonstrate that targeted interventions at the head level significantly reduce toxicity without requiring complete model retraining. Despite its effectiveness, Attention Lens faces severe limitations in scalability and computational efficiency. To overcome these limitations, we propose and implement the Lora Lens, an innovative adaptation of Attention Lens employing Low-Rank Adaptation (LoRA) to drastically reduce memory footprint and computational cost. Specifically designed for compatibility with large-scale models such as Llama 3 8B, Lora Lens integrates seamlessly with HuggingFace's transformers library and Microsoft's DeepSpeed framework, enabling efficient distributed training. Our results demonstrate that Lora Lens maintains the interpretative capabilities of Attention Lens while significantly enhancing its efficiency and scalability, allowing practical deployment on models with billions of parameters. Ultimately, this work contributes a practical, scalable interpretability technique, enabling researchers and practitioners to better understand, evaluate, and safely deploy large transformer models.","abstract_html":"Transformer-based language models have achieved significant advancements across numerous natural language processing (NLP) tasks. However, as these models grow in scale and complexity, ensuring interpretability and mitigating toxic outputs become increasingly critical challenges. This thesis addresses these issues by first analyzing the role attention heads play in propagating toxicity within models, leveraging a recently proposed interpretability tool known as Attention Lens. By decoding attention head outputs into human-interpretable tokens, we identify specific attention heads contributing disproportionately to toxic content generation and demonstrate that targeted interventions at the head level significantly reduce toxicity without requiring complete model retraining. Despite its effectiveness, Attention Lens faces severe limitations in scalability and computational efficiency. To overcome these limitations, we propose and implement the Lora Lens, an innovative adaptation of Attention Lens employing Low-Rank Adaptation (LoRA) to drastically reduce memory footprint and computational cost. Specifically designed for compatibility with large-scale models such as Llama 3 8B, Lora Lens integrates seamlessly with HuggingFace&#x27;s transformers library and Microsoft&#x27;s DeepSpeed framework, enabling efficient distributed training. Our results demonstrate that Lora Lens maintains the interpretative capabilities of Attention Lens while significantly enhancing its efficiency and scalability, allowing practical deployment on models with billions of parameters. Ultimately, this work contributes a practical, scalable interpretability technique, enabling researchers and practitioners to better understand, evaluate, and safely deploy large transformer models.","abstract_has_math":false,"creators":["Pettyjohn, Jordan"],"institution":"Colorado School of Mines. Arthur Lakes Library","degree_name":"Master of Science (M.S.)","degree_level":"Masters","degree_discipline":"Applied Mathematics and Statistics","degree_department":null,"school":null,"contributors":[],"advisors":["McKenzie, Daniel"],"committee_chairs":[],"committee_members":["Wu Fung, Samy","Chard, Kyle","Hudson, Nathaniel"],"year":2025,"date_issued":"2025","date_published":"2025","updated_at":"2026-07-24T01:43:19Z","subjects":["AI safety","alignment","interpretability","language model","transformer"],"languages":["eng","English"],"rights":["Copyright of the original work is retained by the author."],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier","label":"Identifier","values":["T 9991"],"render_values":[{"text":"T 9991","href":null,"code":true}]}]},"links":{"outbound_url":"https://hdl.handle.net/11124/181185","outbound_label":"Handle","outbound_source":"dc:identifier.uri"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["McKenzie, Daniel"]},{"key":"dc:contributor.committeemember","label":"Committee Member","values":["Wu Fung, Samy","Chard, Kyle","Hudson, Nathaniel"]},{"key":"dc:creator","label":"Author","values":["Pettyjohn, Jordan"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2025-12-04T22:15:24Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2025-12-04T22:15:24Z"]},{"key":"dc:date.issued","label":"Date","values":["2025"]},{"key":"dc:publisher","label":"Institution","values":["Colorado School of Mines. Arthur Lakes Library"]},{"key":"dc:type","label":"Dc Type","values":["Text"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Applied Mathematics and Statistics"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science (M.S.)"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Colorado School of Mines"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["AI safety","alignment","interpretability","language model","transformer"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["English"]},{"key":"dc:language.iso","label":"Language (ISO)","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["Copyright of the original work is retained by the author."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["Pettyjohn_mines_0052N_13100.pdf","T 9991"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/11124/181185"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Includes bibliographical references.","2025 Spring."]},{"key":"dc:description.abstract","label":"Abstract","values":["Transformer-based language models have achieved significant advancements across numerous natural language processing (NLP) tasks. However, as these models grow in scale and complexity, ensuring interpretability and mitigating toxic outputs become increasingly critical challenges. This thesis addresses these issues by first analyzing the role attention heads play in propagating toxicity within models, leveraging a recently proposed interpretability tool known as Attention Lens. By decoding attention head outputs into human-interpretable tokens, we identify specific attention heads contributing disproportionately to toxic content generation and demonstrate that targeted interventions at the head level significantly reduce toxicity without requiring complete model retraining. Despite its effectiveness, Attention Lens faces severe limitations in scalability and computational efficiency. To overcome these limitations, we propose and implement the Lora Lens, an innovative adaptation of Attention Lens employing Low-Rank Adaptation (LoRA) to drastically reduce memory footprint and computational cost. Specifically designed for compatibility with large-scale models such as Llama 3 8B, Lora Lens integrates seamlessly with HuggingFace's transformers library and Microsoft's DeepSpeed framework, enabling efficient distributed training. Our results demonstrate that Lora Lens maintains the interpretative capabilities of Attention Lens while significantly enhancing its efficiency and scalability, allowing practical deployment on models with billions of parameters. Ultimately, this work contributes a practical, scalable interpretability technique, enabling researchers and practitioners to better understand, evaluate, and safely deploy large transformer models."]},{"key":"dc:format.medium","label":"Dc Format Medium","values":["born digital","masters theses"]},{"key":"dc:title","label":"Title","values":["Table manners at scale: introducing Lora Lens for efficient analysis & detoxification of language models"]}]}],"canonical_facts":{"dc:contributor.advisor":["McKenzie, Daniel"],"dc:contributor.committeemember":["Wu Fung, Samy","Chard, Kyle","Hudson, Nathaniel"],"dc:creator":["Pettyjohn, Jordan"],"dc:date.accessioned":["2025-12-04T22:15:24Z"],"dc:date.available":["2025-12-04T22:15:24Z"],"dc:date.issued":["2025"],"dc:description":["Includes bibliographical references.","2025 Spring."],"dc:description.abstract":["Transformer-based language models have achieved significant advancements across numerous natural language processing (NLP) tasks. However, as these models grow in scale and complexity, ensuring interpretability and mitigating toxic outputs become increasingly critical challenges. This thesis addresses these issues by first analyzing the role attention heads play in propagating toxicity within models, leveraging a recently proposed interpretability tool known as Attention Lens. By decoding attention head outputs into human-interpretable tokens, we identify specific attention heads contributing disproportionately to toxic content generation and demonstrate that targeted interventions at the head level significantly reduce toxicity without requiring complete model retraining. Despite its effectiveness, Attention Lens faces severe limitations in scalability and computational efficiency. To overcome these limitations, we propose and implement the Lora Lens, an innovative adaptation of Attention Lens employing Low-Rank Adaptation (LoRA) to drastically reduce memory footprint and computational cost. Specifically designed for compatibility with large-scale models such as Llama 3 8B, Lora Lens integrates seamlessly with HuggingFace's transformers library and Microsoft's DeepSpeed framework, enabling efficient distributed training. Our results demonstrate that Lora Lens maintains the interpretative capabilities of Attention Lens while significantly enhancing its efficiency and scalability, allowing practical deployment on models with billions of parameters. Ultimately, this work contributes a practical, scalable interpretability technique, enabling researchers and practitioners to better understand, evaluate, and safely deploy large transformer models."],"dc:format.medium":["born digital","masters theses"],"dc:identifier":["Pettyjohn_mines_0052N_13100.pdf","T 9991"],"dc:identifier.uri":["https://hdl.handle.net/11124/181185"],"dc:language":["English"],"dc:language.iso":["eng"],"dc:publisher":["Colorado School of Mines. Arthur Lakes Library"],"dc:rights":["Copyright of the original work is retained by the author."],"dc:subject":["AI safety","alignment","interpretability","language model","transformer"],"dc:title":["Table manners at scale: introducing Lora Lens for efficient analysis & detoxification of language models"],"dc:type":["Text"],"thesis:degree_discipline":["Applied Mathematics and Statistics"],"thesis:degree_level":["Masters"],"thesis:degree_name":["Master of Science (M.S.)"],"thesis:institution_name":["Colorado School of Mines"]},"updated_at":"2026-07-24T01:43:19Z"}