{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/flexmodel-a-framework-for-interpretability-of","title":"FlexModel: A Framework for Interpretability of Distributed Large Language Models","arxiv_id":"2312.03140","date":"2023-12-05","proceeding":null,"authors":["Matthew Choi","Muhammad Adil Asif","John Willes","David Emerson"],"abstract":"With the growth of large language models, now incorporating billions of parameters, the hardware prerequisites for their training and deployment have seen a corresponding increase. Although existing tools facilitate model parallelization and distributed training, deeper model interactions, crucial for interpretability and responsible AI techniques, still demand thorough knowledge of distributed computing. This often hinders contributions from researchers with machine learning expertise but limited distributed computing background. Addressing this challenge, we present FlexModel, a software package providing a streamlined interface for engaging with models distributed across multi-GPU and multi-node configurations. The library is compatible with existing model distribution libraries and encapsulates PyTorch models. It exposes user-registerable HookFunctions to facilitate straightforward interaction with distributed model internals, bridging the gap between distributed and single-device model paradigms. Primarily, FlexModel enhances accessibility by democratizing model interactions and promotes more inclusive research in the domain of large-scale neural networks. The package is found at https://github.com/VectorInstitute/flex_model.","url_abs":"https://arxiv.org/abs/2312.03140v1","url_pdf":"https://arxiv.org/pdf/2312.03140v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"flexmodel-a-framework-for-interpretability-of","repo_url":"https://github.com/vectorinstitute/flex_model","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"distributed-computing","task_name":"Distributed Computing"},{"task_slug":null,"task_name":"GPU"}],"methods":[{"method_slug":null,"method_name":"Library"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2312.03140","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.03140"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/VectorInstitute/flex_model","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vectorinstitute/flex_model","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"unverified":2},"by_repo_kind":{"official":{"samples":8,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"40542584b263a1da","entry":"default_editing_function","repo":"VectorInstitute/flex_model","repo_kind":"official","path":"flex_model/core/hook_function.py","file_url":"https://github.com/VectorInstitute/flex_model/blob/HEAD/flex_model/core/hook_function.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"40542584b263a1da"}},{"code_sha256_prefix":"54084cd3249575b2","entry":"fsdp_config","repo":"VectorInstitute/flex_model","repo_kind":"official","path":"demos/induction_heads_multigpu.py","file_url":"https://github.com/VectorInstitute/flex_model/blob/HEAD/demos/induction_heads_multigpu.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"54084cd3249575b2"}},{"code_sha256_prefix":"5fd7f383d759e3c4","entry":"get_module_names","repo":"VectorInstitute/flex_model","repo_kind":"official","path":"demos/induction_heads_multigpu.py","file_url":"https://github.com/VectorInstitute/flex_model/blob/HEAD/demos/induction_heads_multigpu.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5fd7f383d759e3c4"}},{"code_sha256_prefix":"a603a99ef55a4b64","entry":"hook_function_identity","repo":"VectorInstitute/flex_model","repo_kind":"official","path":"profiling/utils.py","file_url":"https://github.com/VectorInstitute/flex_model/blob/HEAD/profiling/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a603a99ef55a4b64"}},{"code_sha256_prefix":"d00e16db14b58dd5","entry":"register_leaf_node_type","repo":"VectorInstitute/flex_model","repo_kind":"official","path":"flex_model/traverse/nodes.py","file_url":"https://github.com/VectorInstitute/flex_model/blob/HEAD/flex_model/traverse/nodes.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d00e16db14b58dd5"}},{"code_sha256_prefix":"b8ac7d2d09d54a42","entry":"validate_args","repo":"VectorInstitute/flex_model","repo_kind":"official","path":"profiling/profile_hooks.py","file_url":"https://github.com/VectorInstitute/flex_model/blob/HEAD/profiling/profile_hooks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b8ac7d2d09d54a42"}},{"code_sha256_prefix":"eb799e48282e2db5","entry":"initialize_distributed_state","repo":"VectorInstitute/flex_model","repo_kind":"official","path":"flex_model/distributed/distributed_state.py","file_url":"https://github.com/VectorInstitute/flex_model/blob/HEAD/flex_model/distributed/distributed_state.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eb799e48282e2db5"}},{"code_sha256_prefix":"22b6cdaad2f0133a","entry":"setup_model","repo":"VectorInstitute/flex_model","repo_kind":"official","path":"demos/induction_heads_multigpu.py","file_url":"https://github.com/VectorInstitute/flex_model/blob/HEAD/demos/induction_heads_multigpu.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"22b6cdaad2f0133a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}