A library for mechanistic interpretability of GPT-style language models
This report presents the forensic synthetic code analysis of TransformerLensOrg/TransformerLens, a Python project with 3,764 GitHub stars. SynthScan v2.0 examined 212,279 lines of code across 925 source files, recording 6001 pattern matches distributed across 22 syntactic categories. The overall adjusted score of 44.7 places this repository in the Strong AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 6001 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 62 | def _enable_hf_retry_for_tests(): | CODE |
| LOW | tests/unit/test_key_value_cache_entry.py | 45 | def test_init_cache_entry_dtype_independent_of_global_default(): | CODE |
| LOW | tests/unit/test_key_value_cache_entry.py | 64 | def test_append_preserves_cfg_dtype(): | CODE |
| LOW | tests/unit/test_key_value_cache_entry.py | 77 | def test_init_cache_entry_handles_grouped_query_attention(): | CODE |
| LOW | tests/unit/test_utils.py | 154 | def test_override_or_use_default_value(): | CODE |
| LOW | tests/unit/test_utils.py | 170 | def test_is_library_available(): | CODE |
| LOW | tests/unit/test_utils.py | 306 | def test_init_kaiming_uniform(self, d_model, d_mlp, nonlinearity): | CODE |
| LOW | tests/unit/test_utils.py | 443 | def test_no_split_tokens_across_chunks(self): | CODE |
| LOW | tests/unit/test_utils.py | 486 | def test_no_split_tokens_in_no_whitespace_text(self): | CODE |
| LOW | tests/unit/test_utils.py | 520 | def test_single_document_batch_does_not_crash(self): | CODE |
| LOW | tests/unit/test_utils.py | 541 | def test_iterable_dataset_with_set_format_false(self, gpt2_tokenizer): | CODE |
| LOW | tests/unit/test_utils.py | 573 | def test_tokenize_and_concatenate_no_spurious_sequence_length_warning(): | CODE |
| LOW | tests/unit/test_utils.py | 611 | def test_tokenize_and_concatenate_short_sequence_no_invalid_tokens(): | CODE |
| LOW | tests/unit/test_evals_ioi.py | 19 | def test_ioi_dataset_produces_diverse_samples(): | CODE |
| LOW⚡ | tests/unit/test_evals_ioi.py | 34 | def test_ioi_dataset_reproducible_with_seed(): | CODE |
| LOW⚡ | tests/unit/test_evals_ioi.py | 44 | def test_ioi_dataset_different_seeds_differ(): | CODE |
| LOW⚡ | tests/unit/test_evals_ioi.py | 54 | def test_ioi_dataset_no_seed_is_valid(): | CODE |
| LOW⚡ | tests/unit/test_evals_ioi.py | 61 | def test_ioi_dataset_symmetric(): | CODE |
| LOW | tests/unit/test_lit.py | 130 | def test_tensor_to_numpy_tensor(self): | CODE |
| LOW | tests/unit/test_lit.py | 141 | def test_tensor_to_numpy_array(self): | CODE |
| LOW | tests/unit/test_lit.py | 151 | def test_tensor_to_numpy_none(self): | CODE |
| LOW | tests/unit/test_lit.py | 168 | def test_numpy_to_tensor_with_device(self): | CODE |
| LOW | tests/unit/test_lit.py | 249 | def test_input_field_names_drive_input_spec(self, mock_hooked_transformer): | CODE |
| LOW | tests/unit/test_lit.py | 289 | def test_no_tokenizer_error_is_raised(self, mock_hooked_transformer): | CODE |
| LOW⚡ | tests/unit/test_lit.py | 308 | def test_simple_text_dataset_init(self, sample_examples): | CODE |
| LOW⚡ | tests/unit/test_lit.py | 318 | def test_simple_text_dataset_from_strings(self, sample_texts): | CODE |
| LOW⚡ | tests/unit/test_lit.py | 328 | def test_simple_text_dataset_spec(self, sample_examples): | CODE |
| LOW | tests/unit/test_lit.py | 339 | def test_simple_text_dataset_missing_text(self): | CODE |
| LOW | tests/unit/test_lit.py | 347 | def test_prompt_completion_dataset(self): | CODE |
| LOW | tests/unit/test_lit.py | 363 | def test_prompt_completion_from_pairs(self): | CODE |
| LOW | tests/unit/test_lit.py | 373 | def test_ioi_dataset_generate(self): | CODE |
| LOW | tests/unit/test_lit.py | 388 | def test_induction_dataset_generate(self): | CODE |
| LOW | tests/unit/test_lit.py | 407 | def test_default_config_drives_wrapper_behavior(self, mock_hooked_transformer): | CODE |
| LOW | tests/unit/test_lit.py | 454 | def test_model_wrapper_invalid_model(self): | CODE |
| LOW | tests/unit/test_lit.py | 488 | def test_model_output_spec_no_embeddings(self, mock_hooked_transformer): | CODE |
| LOW | tests/unit/test_lit.py | 560 | def test_full_prediction_flow(self, mock_hooked_transformer): | CODE |
| LOW | tests/unit/test_lit.py | 575 | def test_dataset_model_compatibility(self): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 21 | def _config_with_architecture(architecture: str) -> HookedTransformerConfig: | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 50 | def test_object_style_quantization_config(self, mock_auto_config: mock.MagicMock): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 61 | def test_unquantized_gpt_oss_finetune_untouched(self, mock_auto_config: mock.MagicMock): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 69 | def test_non_gpt_oss_skips_config_fetch(self, mock_auto_config: mock.MagicMock): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 103 | def test_fill_missing_keys_raises_on_missing_attention_weights(): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 118 | def test_fill_missing_keys_with_hf_model_keys(): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 133 | def test_fill_missing_keys_no_missing_keys(): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 143 | def test_n_ctx_override_reduces_context(): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 156 | def test_n_ctx_override_larger_than_default_warns(mock_warning: mock.MagicMock): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 196 | def test_qwen_uses_hf_seq_length_for_n_ctx(mock_from_pretrained: mock.MagicMock): | CODE |
| LOW | tests/unit/test_loading_from_pretrained_utilities.py | 272 | def test_apertus_instruct_config(self): | CODE |
| LOW | tests/unit/test_patching.py | 27 | def test_get_act_patch_attn_head_all_pos_every_shape(model, corrupted_tokens, clean_cache): | CODE |
| LOW | tests/unit/test_patching.py | 38 | def test_get_act_patch_attn_head_all_pos_every_values_vary(model, corrupted_tokens, clean_cache): | CODE |
| LOW | tests/unit/test_deprecation_warnings.py | 28 | def _assert_single_deprecation(constructor, class_name: str) -> None: | CODE |
| LOW | tests/unit/test_deprecation_warnings.py | 37 | def test_importing_transformer_lens_emits_no_deprecation_warning(): | CODE |
| LOW⚡ | tests/unit/test_deprecation_warnings.py | 60 | def test_hooked_transformer_constructor_warns_once(): | CODE |
| LOW⚡ | tests/unit/test_deprecation_warnings.py | 66 | def test_hooked_encoder_constructor_warns_once(): | CODE |
| LOW⚡ | tests/unit/test_deprecation_warnings.py | 72 | def test_hooked_encoder_from_pretrained_warning_reaches_external_caller(): | CODE |
| LOW | tests/unit/test_deprecation_warnings.py | 100 | def test_bert_next_sentence_prediction_constructor_warns_once(): | CODE |
| LOW | tests/unit/test_deprecation_warnings.py | 108 | def test_direct_hooked_root_module_construction_warns_once(): | CODE |
| LOW⚡ | tests/unit/test_optional_submodule.py | 223 | def test_prunes_hook_aliases_for_skipped_ssm(self): | CODE |
| LOW⚡ | tests/unit/test_optional_submodule.py | 229 | def test_keeps_mlp_alias_fallback_after_skipped_post_norm(self): | CODE |
| LOW⚡ | tests/unit/test_optional_submodule.py | 235 | def test_pruned_aliases_do_not_warn_on_register(self): | CODE |
| 3785 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 67 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 69 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 198 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 200 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 269 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 271 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 375 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 377 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/test_direct_path_patching.py | 22 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/test_direct_path_patching.py | 24 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/test_direct_path_patching.py | 142 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/test_direct_path_patching.py | 144 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 404 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 406 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 490 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 492 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 588 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 590 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 754 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 756 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 18 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 20 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 105 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 107 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 290 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 292 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 552 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 554 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_relevancy.py | 66 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_relevancy.py | 68 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_relevancy.py | 97 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_relevancy.py | 99 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_relevancy.py | 167 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_relevancy.py | 169 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_relevancy.py | 18 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_relevancy.py | 20 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_relevancy.py | 40 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_relevancy.py | 42 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_jacobian_lens.py | 1074 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_jacobian_lens.py | 1076 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_jacobian_lens_import.py | 98 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_jacobian_lens_import.py | 100 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_jacobian_lens_import.py | 242 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_jacobian_lens_import.py | 244 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_jacobian_lens_import.py | 11 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_jacobian_lens_import.py | 13 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_jacobian_lens_import.py | 57 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_jacobian_lens_import.py | 59 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_gemma.py | 109 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_gemma.py | 111 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_gemma.py | 194 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_gemma.py | 196 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_gemma.py | 236 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_gemma.py | 238 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_gemma.py | 298 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_gemma.py | 300 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_olmo3.py | 88 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_olmo3.py | 90 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_olmo3.py | 152 | # ============================================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/pretrained_weight_conversions/test_olmo3.py | 154 | # ============================================================================ | COMMENT |
| 647 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …ge/supported_architectures/test_deepseek_v2_adapter.py | 0 | tests that the adapter sets the correct config flags. | STRING |
| HIGH | …bridge/supported_architectures/test_granite_adapter.py | 0 | tests that the adapter sets the correct config flags. | STRING |
| HIGH | …el_bridge/supported_architectures/test_phi3_adapter.py | 0 | tests that the adapter sets the correct config flags. | STRING |
| HIGH | …ge/supported_architectures/test_deepseek_v3_adapter.py | 0 | tests that the adapter sets the correct config flags. | STRING |
| HIGH | …ge/supported_architectures/test_deepseek_v2_adapter.py | 0 | tests that component_mapping has the correct bridge types and hf module names. | STRING |
| HIGH | …del_bridge/supported_architectures/test_neo_adapter.py | 0 | tests that component_mapping has the correct bridge types and hf module names. | STRING |
| HIGH | …el_bridge/supported_architectures/test_gpt2_adapter.py | 0 | tests that component_mapping has the correct bridge types and hf module names. | STRING |
| HIGH | …bridge/supported_architectures/test_openelm_adapter.py | 0 | tests that component_mapping has the correct bridge types and hf module names. | STRING |
| HIGH | …bridge/supported_architectures/test_granite_adapter.py | 0 | tests that component_mapping has the correct bridge types and hf module names. | STRING |
| HIGH | …el_bridge/supported_architectures/test_phi3_adapter.py | 0 | tests that component_mapping has the correct bridge types and hf module names. | STRING |
| HIGH | …ge/supported_architectures/test_deepseek_v3_adapter.py | 0 | tests that component_mapping has the correct bridge types and hf module names. | STRING |
| HIGH | …el_bridge/supported_architectures/test_neox_adapter.py | 0 | tests that component_mapping has the correct bridge types and hf module names. | STRING |
| HIGH | …idge/supported_architectures/test_internlm2_adapter.py | 0 | guards against drift toward neighbouring adapter patterns. | STRING |
| HIGH | …idge/supported_architectures/test_falcon_h1_adapter.py | 0 | guards against drift toward neighbouring adapter patterns. | STRING |
| HIGH | …dge/supported_architectures/test_nemotron_h_adapter.py | 0 | guards against drift toward neighbouring adapter patterns. | STRING |
| HIGH | …el_bridge/supported_architectures/test_xglm_adapter.py | 0 | guards against drift toward neighbouring adapter patterns. | STRING |
| HIGH | …_bridge/supported_architectures/test_cohere_adapter.py | 0 | guards against drift toward neighbouring adapter patterns. | STRING |
| HIGH | …dge/supported_architectures/test_blenderbot_adapter.py | 0 | unit tests for the pegasusarchitectureadapter. download-free: tiny synthetic configs and structural assertions only. | STRING |
| HIGH | …l_bridge/supported_architectures/test_mbart_adapter.py | 0 | unit tests for the pegasusarchitectureadapter. download-free: tiny synthetic configs and structural assertions only. | STRING |
| HIGH | …bridge/supported_architectures/test_pegasus_adapter.py | 0 | unit tests for the pegasusarchitectureadapter. download-free: tiny synthetic configs and structural assertions only. | STRING |
| HIGH | …_bridge/supported_architectures/test_gemma3_adapter.py | 0 | component bridge classes — guards against silent type substitution. | STRING |
| HIGH | …ported_architectures/test_gemma3_multimodal_adapter.py | 0 | component bridge classes — guards against silent type substitution. | STRING |
| HIGH | …l_bridge/supported_architectures/test_llava_adapter.py | 0 | component bridge classes — guards against silent type substitution. | STRING |
| HIGH | …bridge/supported_architectures/test_smollm3_adapter.py | 0 | minimal hf model exposing only model.rotary_emb (no config/layers). | STRING |
| HIGH | …bridge/supported_architectures/test_mixtral_adapter.py | 0 | minimal hf model exposing only model.rotary_emb (no config/layers). | STRING |
| HIGH | …ridge/supported_architectures/test_glm4_moe_adapter.py | 0 | minimal hf model exposing only model.rotary_emb (no config/layers). | STRING |
| HIGH | …l_bridge/supported_architectures/test_olmoe_adapter.py | 0 | minimal hf model exposing only model.rotary_emb (no config/layers). | STRING |
| HIGH | …bridge/supported_architectures/test_smollm3_adapter.py | 0 | weight_processing_conversions is optional on the base class; assert it is populated. | STRING |
| HIGH | …bridge/supported_architectures/test_mixtral_adapter.py | 0 | weight_processing_conversions is optional on the base class; assert it is populated. | STRING |
| HIGH | …l_bridge/supported_architectures/test_olmoe_adapter.py | 0 | weight_processing_conversions is optional on the base class; assert it is populated. | STRING |
| HIGH | …bridge/supported_architectures/test_smollm3_adapter.py | 0 | adapter-owned config defaults that downstream bridge code relies on. | STRING |
| HIGH | …bridge/supported_architectures/test_mixtral_adapter.py | 0 | adapter-owned config defaults that downstream bridge code relies on. | STRING |
| HIGH | …l_bridge/supported_architectures/test_qwen2_adapter.py | 0 | adapter-owned config defaults that downstream bridge code relies on. | STRING |
| HIGH | …el_bridge/supported_architectures/test_ouro_adapter.py | 0 | adapter-owned config defaults that downstream bridge code relies on. | STRING |
| HIGH | …l_bridge/supported_architectures/test_olmoe_adapter.py | 0 | adapter-owned config defaults that downstream bridge code relies on. | STRING |
| HIGH | …bridge/supported_architectures/test_smollm3_adapter.py | 0 | wire a fake attention module into the bridge and verify gqa hook shapes. spec assertions cannot prove the bridge reshape | STRING |
| HIGH | …ridge/supported_architectures/test_stablelm_adapter.py | 0 | wire a fake attention module into the bridge and verify gqa hook shapes. spec assertions cannot prove the bridge reshape | STRING |
| HIGH | …bridge/supported_architectures/test_mixtral_adapter.py | 0 | wire a fake attention module into the bridge and verify gqa hook shapes. spec assertions cannot prove the bridge reshape | STRING |
| HIGH | …bridge/supported_architectures/test_gpt_oss_adapter.py | 0 | wire a fake attention module into the bridge and verify gqa hook shapes. spec assertions cannot prove the bridge reshape | STRING |
| HIGH | …bridge/supported_architectures/test_smollm3_adapter.py | 0 | setup_component_testing wires the shared rotary embedding and forces eager attention. | STRING |
| HIGH | …bridge/supported_architectures/test_mixtral_adapter.py | 0 | setup_component_testing wires the shared rotary embedding and forces eager attention. | STRING |
| HIGH | …l_bridge/supported_architectures/test_olmoe_adapter.py | 0 | setup_component_testing wires the shared rotary embedding and forces eager attention. | STRING |
| HIGH | …bridge/supported_architectures/test_smollm3_adapter.py | 0 | bridge attention only matches hf under eager attention, so it is forced on. | STRING |
| HIGH | …bridge/supported_architectures/test_mixtral_adapter.py | 0 | bridge attention only matches hf under eager attention, so it is forced on. | STRING |
| HIGH | …l_bridge/supported_architectures/test_olmoe_adapter.py | 0 | bridge attention only matches hf under eager attention, so it is forced on. | STRING |
| HIGH | …bridge/supported_architectures/test_smollm3_adapter.py | 0 | the defensive hasattr branches must not raise when config/layers are absent. | STRING |
| HIGH | …ridge/supported_architectures/test_stablelm_adapter.py | 0 | the defensive hasattr branches must not raise when config/layers are absent. | STRING |
| HIGH | …l_bridge/supported_architectures/test_olmo2_adapter.py | 0 | the defensive hasattr branches must not raise when config/layers are absent. | STRING |
| HIGH | …bridge/supported_architectures/test_mixtral_adapter.py | 0 | the defensive hasattr branches must not raise when config/layers are absent. | STRING |
| HIGH | …l_bridge/supported_architectures/test_olmoe_adapter.py | 0 | the defensive hasattr branches must not raise when config/layers are absent. | STRING |
| HIGH | …el_bridge/supported_architectures/test_bert_adapter.py | 0 | component mapping has the correct slots, bridge types, and hf module paths. | STRING |
| HIGH | …_bridge/supported_architectures/test_falcon_adapter.py | 0 | component mapping has the correct slots, bridge types, and hf module paths. | STRING |
| HIGH | …l_bridge/supported_architectures/test_llama_adapter.py | 0 | component mapping has the correct slots, bridge types, and hf module paths. | STRING |
| HIGH | …bridge/supported_architectures/test_mistral_adapter.py | 0 | component mapping has the correct slots, bridge types, and hf module paths. | STRING |
| HIGH | …_bridge/supported_architectures/test_hubert_adapter.py | 0 | component mapping has the correct slots, bridge types, and hf module paths. | STRING |
| HIGH | …el_bridge/supported_architectures/test_gpt2_adapter.py | 0 | tests that weight_processing_conversions has exactly the expected keys. | STRING |
| HIGH | …bridge/supported_architectures/test_granite_adapter.py | 0 | tests that weight_processing_conversions has exactly the expected keys. | STRING |
| HIGH | …el_bridge/supported_architectures/test_phi3_adapter.py | 0 | tests that weight_processing_conversions has exactly the expected keys. | STRING |
| HIGH | …bridge/supported_architectures/test_qwen3_5_adapter.py | 0 | top-level bridge classes — guards against silent type substitution. | STRING |
| HIGH | …dge/supported_architectures/test_qwen3_next_adapter.py | 0 | top-level bridge classes — guards against silent type substitution. | STRING |
| 130 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | easy_transformer/__init__.py | 4 | CODE | |
| LOW | tests/unit/test_lit.py | 15 | CODE | |
| LOW | tests/unit/test_deprecation_warnings.py | 3 | CODE | |
| LOW | tests/unit/test_tracr_conversion.py | 1 | CODE | |
| LOW | tests/unit/model_bridge/test_boot_native.py | 2 | CODE | |
| LOW | tests/unit/model_bridge/test_component_hooks_fire.py | 9 | CODE | |
| LOW | tests/unit/model_bridge/test_mistral_attn_in_fork.py | 9 | CODE | |
| LOW | …sts/unit/model_bridge/test_per_head_hooks_component.py | 16 | CODE | |
| LOW | …e/test_bridge_vs_hooked_transformer_mlp_in_patching.py | 6 | CODE | |
| LOW | tests/unit/model_bridge/test_hook_alias_resolution.py | 8 | CODE | |
| LOW | …s/unit/model_bridge/test_benchmark_gated_hooks_fire.py | 12 | CODE | |
| LOW | …nit/model_bridge/test_bridge_train_mode_propagation.py | 9 | CODE | |
| LOW | tests/unit/model_bridge/test_native_features.py | 10 | CODE | |
| LOW | …sts/unit/model_bridge/test_build_bridge_from_module.py | 6 | CODE | |
| LOW | …l_bridge/test_bridge_vs_hooked_transformer_patching.py | 6 | CODE | |
| LOW | …odel_bridge/supported_architectures/_pretrain_mocks.py | 12 | CODE | |
| LOW | …ridge/supported_architectures/test_pretrain_adapter.py | 12 | CODE | |
| LOW | …pported_architectures/test_pretrain_model_container.py | 15 | CODE | |
| LOW | …el_bridge/supported_architectures/test_olmo_adapter.py | 13 | CODE | |
| LOW | …generalized_components/test_moe_bridge_tuple_output.py | 10 | CODE | |
| LOW | tests/unit/utilities/test_hf_utils.py | 3 | CODE | |
| LOW | tests/integration/test_hook_shape_compatibility.py | 131 | CODE | |
| LOW | tests/integration/test_hooked_encoder_properties.py | 11 | CODE | |
| LOW | tests/integration/model_bridge/test_pretrain_adapter.py | 27 | CODE | |
| LOW | tests/integration/model_bridge/test_native_training.py | 8 | CODE | |
| LOW | tests/integration/model_bridge/test_llada_adapter.py | 3 | CODE | |
| LOW | …sts/acceptance/model_bridge/_bridge_multigpu_common.py | 8 | CODE | |
| LOW | tests/acceptance/model_bridge/test_bridge_multigpu.py | 13 | CODE | |
| LOW | …ptance/model_bridge/test_bridge_multigpu_device_map.py | 13 | CODE | |
| LOW | scripts/bridge_multi_device_parity.py | 18 | CODE | |
| LOW | transformer_lens/HookedEncoderDecoder.py | 7 | CODE | |
| LOW | transformer_lens/hook_points.py | 1 | CODE | |
| LOW | transformer_lens/loading_from_pretrained.py | 6 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 1 | CODE | |
| LOW | transformer_lens/__init__.py | 13 | CODE | |
| LOW | transformer_lens/__init__.py | 14 | CODE | |
| LOW | transformer_lens/__init__.py | 15 | CODE | |
| LOW | transformer_lens/__init__.py | 16 | CODE | |
| LOW | transformer_lens/__init__.py | 17 | CODE | |
| LOW | transformer_lens/__init__.py | 18 | CODE | |
| LOW | transformer_lens/__init__.py | 19 | CODE | |
| LOW | transformer_lens/__init__.py | 19 | CODE | |
| LOW | transformer_lens/__init__.py | 20 | CODE | |
| LOW | transformer_lens/__init__.py | 21 | CODE | |
| LOW | transformer_lens/__init__.py | 22 | CODE | |
| LOW | transformer_lens/__init__.py | 23 | CODE | |
| LOW | transformer_lens/__init__.py | 24 | CODE | |
| LOW | transformer_lens/__init__.py | 25 | CODE | |
| LOW | transformer_lens/__init__.py | 34 | CODE | |
| LOW | transformer_lens/HookedAudioEncoder.py | 7 | CODE | |
| LOW | transformer_lens/HookedRootModule.py | 9 | CODE | |
| 501 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | tests/integration/model_bridge/test_exaone4_adapter.py | 114 | The 1.2B fixture above is non-hybrid (sliding_window=null, RoPE everywhere) | STRING |
| HIGH⚡ | docs/make_docs.py | 975 | if (n === null || n === undefined) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 975 | if (n === null || n === undefined) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 984 | const d = cfg.hidden_size || cfg.n_embd || cfg.d_model; | CODE |
| HIGH⚡ | docs/make_docs.py | 985 | const L = cfg.num_hidden_layers || cfg.n_layer || cfg.num_layers; | CODE |
| HIGH⚡ | docs/make_docs.py | 987 | const dff = cfg.intermediate_size || cfg.d_ff; | CODE |
| HIGH⚡ | docs/make_docs.py | 988 | if (!d || !L) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 996 | if (cfg.rms_norm_eps !== undefined) return 'RMSNorm'; | CODE |
| HIGH⚡ | docs/make_docs.py | 997 | if (cfg.layer_norm_epsilon !== undefined || cfg.layer_norm_eps !== undefined) return 'LayerNorm'; | CODE |
| HIGH⚡ | docs/make_docs.py | 997 | if (cfg.layer_norm_epsilon !== undefined || cfg.layer_norm_eps !== undefined) return 'LayerNorm'; | CODE |
| HIGH⚡ | docs/make_docs.py | 998 | if (cfg.norm_eps !== undefined) return 'LayerNorm'; | CODE |
| HIGH⚡ | docs/make_docs.py | 999 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1004 | if (cfg.rope_theta || cfg.rope_parameters || cfg.rope_scaling || | CODE |
| HIGH⚡ | docs/make_docs.py | 1005 | cfg.rotary_pct || cfg.rotary_dim || cfg.rotary_emb_base) return 'Rotary (RoPE)'; | CODE |
| HIGH⚡ | docs/make_docs.py | 1006 | if (cfg.partial_rotary_factor !== undefined) return 'Partial Rotary (RoPE)'; | CODE |
| HIGH⚡ | docs/make_docs.py | 1008 | if (cfg.alibi || cfg.position_embedding_type === 'alibi') return 'ALiBi'; | CODE |
| HIGH⚡ | docs/make_docs.py | 1010 | if (cfg.relative_attention_num_buckets !== undefined) return 'Relative Bias (T5)'; | CODE |
| HIGH⚡ | docs/make_docs.py | 1014 | if (cfg.max_position_embeddings || cfg.n_positions) return 'Learned'; | CODE |
| HIGH⚡ | docs/make_docs.py | 1015 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1020 | if (cfg.parallel_attn !== undefined) return cfg.parallel_attn; | CODE |
| HIGH⚡ | docs/make_docs.py | 1025 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1040 | if (cfg.feed_forward_proj && cfg.feed_forward_proj.includes('gated')) return true; | CODE |
| HIGH⚡ | docs/make_docs.py | 1044 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1050 | if (t === null || t === undefined) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1050 | if (t === null || t === undefined) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1053 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1131 | if (def !== null) return def; | CODE |
| HIGH⚡ | docs/make_docs.py | 1133 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1140 | return est ? fmtParam(est) + ' (est.)' : null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1147 | if (cfg[k] !== undefined && cfg[k] !== null) return cfg[k]; | CODE |
| HIGH⚡ | docs/make_docs.py | 1147 | if (cfg[k] !== undefined && cfg[k] !== null) return cfg[k]; | CODE |
| HIGH⚡ | docs/make_docs.py | 1149 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 1193 | if (raw === null || raw === undefined) continue; | CODE |
| HIGH⚡ | docs/make_docs.py | 1193 | if (raw === null || raw === undefined) continue; | CODE |
| HIGH⚡ | docs/make_docs.py | 1199 | if (raw && typeof raw === 'object') { | CODE |
| HIGH⚡ | docs/make_docs.py | 1376 | const aN = (va === null || va === undefined || va === ''); | CODE |
| HIGH⚡ | docs/make_docs.py | 1377 | const bN = (vb === null || vb === undefined || vb === ''); | CODE |
| HIGH⚡ | docs/make_docs.py | 1378 | if (aN && bN) return 0; | CODE |
| HIGH | docs/make_docs.py | 935 | let all=[], filt=[], pg=1, dt=null, sortCol='', sortDir='asc'; | CODE |
| HIGH | docs/make_docs.py | 1096 | const classDefaults = (cls && TOKENIZER_CLASS_DEFAULTS[cls]) || {}; | CODE |
| HIGH | docs/make_docs.py | 1101 | return null; | CODE |
| HIGH | docs/make_docs.py | 1118 | if (tok[k] !== undefined && tok[k] !== null) { | CODE |
| HIGH | docs/make_docs.py | 1118 | if (tok[k] !== undefined && tok[k] !== null) { | CODE |
| HIGH | docs/make_docs.py | 1180 | if (val === null || val === undefined) continue; | CODE |
| HIGH | docs/make_docs.py | 1180 | if (val === null || val === undefined) continue; | CODE |
| HIGH | docs/make_docs.py | 1236 | if (nextRow && nextRow.classList.contains('bt-detail-row')) { | CODE |
| HIGH | docs/make_docs.py | 1254 | const tok = tokResult.ok ? tokResult.tok : null; | CODE |
| HIGH | docs/make_docs.py | 1295 | if (pinned.length && rest.length) { | CODE |
| HIGH | docs/make_docs.py | 1301 | if (cur && pc[cur]) sel.value = cur; else sel.value = ''; | CODE |
| HIGH | docs/make_docs.py | 1341 | if (a && m.architecture_id !== a) return false; | CODE |
| HIGH | docs/make_docs.py | 1342 | if (pf && getPrefix(m.model_id) !== pf) return false; | CODE |
| HIGH | docs/make_docs.py | 1404 | const qs = p.toString(); | CODE |
| HIGH | docs/make_docs.py | 1405 | history.replaceState(null, '', qs ? '?' + qs : location.pathname); | CODE |
| HIGH | docs/make_docs.py | 1473 | const pages=[1]; if(tp>1) pages.push(tp); | CODE |
| HIGH | docs/make_docs.py | 1474 | for(let i=Math.max(2,pg-1);i<=Math.min(tp-1,pg+1);i++) if(!pages.includes(i)) pages.push(i); | CODE |
| HIGH | transformer_lens/model_bridge/bridge.py | 3031 | # reject the paths whose cache would be wrong/undefined, with a clear pointer to the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/source/content/contributing.md | 190 | Title In Title Case. A description of what the function/class does, including as much detail as is necessary to fully u | STRING |
| HIGH | transformer_lens/evals.py | 158 | Load MMLU (Massive Multitask Language Understanding) dataset. MMLU tests model performance on 57 subjects acro | STRING |
| HIGH | transformer_lens/evals.py | 523 | Evaluate a model on the MMLU benchmark. MMLU (Massive Multitask Language Understanding) is a benchmark for evaluati | STRING |
| HIGH | transformer_lens/BertNextSentencePrediction.py | 149 | Forward pass through the NextSentencePrediction module. Performs Next Sentence Prediction on a pair of sentences. | STRING |
| HIGH | transformer_lens/HookedEncoder.py | 159 | Processes input through the encoder layers and returns the resulting residual stream. Args: input: | STRING |
| HIGH | transformer_lens/HookedEncoder.py | 240 | Forward pass through the HookedEncoder. Performs Masked Language Modelling on the given input. Args: | STRING |
| HIGH | transformer_lens/ActivationCache.py | 358 | Accumulated Residual Stream. Returns the accumulated residual stream at each layer/sub-layer. This is useful fo | STRING |
| HIGH | transformer_lens/ActivationCache.py | 823 | Materialize SSM effective attention for one or all SSM layers, any family. The single discovery surface for eff | STRING |
| HIGH | transformer_lens/ActivationCache.py | 883 | Reconstruct the recurrent SSM state ``S`` from this cache. The single discovery surface for recurrent state acr | STRING |
| HIGH | transformer_lens/weight_processing.py | 170 | Safely get a tensor from state_dict, handling optional parameters. This is the recommended way to access parame | STRING |
| HIGH | …former_lens/tools/analysis/direct_logit_attribution.py | 175 | Compute Direct Logit Attribution for a prompt. Decomposes the contribution of model components to the logit of | STRING |
| HIGH | transformer_lens/tools/analysis/jacobian_lens.py | 431 | Load a lens from a local path, a short model name, or a Hub repo. Resolution order ---------------- | STRING |
| HIGH | transformer_lens/tools/analysis/jacobian_lens.py | 574 | Check that ``model`` matches this lens; raise loudly if not. Requires a raw causal ``TransformerBridge`` with t | STRING |
| HIGH | transformer_lens/tools/analysis/jacobian_lens.py | 682 | Read per-layer vocabulary logits for a prompt. Runs the model once with caching, transports the residual stream | STRING |
| HIGH | transformer_lens/tools/analysis/jacobian_lens.py | 1029 | Fit a Jacobian lens on a hooked model. Implements the reference estimator exactly. For each prompt: one forward | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 42 | Load a JSON file from the data directory. Args: filename: Name of the JSON file Returns: Parse | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 135 | Get a list of supported models. Args: architecture: Filter by architecture ID (e.g., "GPT2LMHeadModel"). | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 169 | Get a list of unsupported architectures sorted by model count. Args: min_models: Minimum number of models f | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 202 | Check if a model is supported by TransformerLens. Args: model_id: The HuggingFace model ID to check (e.g., | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 224 | Get the architecture ID for a given model. Args: model_id: The HuggingFace model ID to look up Returns | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 248 | Get all model IDs for a given architecture. Args: architecture_id: The architecture to get models for (e.g. | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 269 | Suggest a similar supported model for an unsupported model ID. This function attempts to find a supported model tha | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 332 | Get full information about a specific model. Args: model_id: The HuggingFace model ID to look up Retur | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 431 | Check if an architecture is supported by TransformerLens. Args: architecture_id: The architecture ID to che | STRING |
| HIGH | transformer_lens/tools/model_registry/validate.py | 562 | Validate a JSON file against its expected schema. This function reads a JSON file and validates it against one of t | STRING |
| HIGH | transformer_lens/tools/model_registry/verify_models.py | 232 | Estimate parameter count using AutoConfig (lightweight, no model download). Fetches only the config JSON (~KB) and | STRING |
| HIGH | transformer_lens/lit/dataset.py | 177 | Load a dataset from a text file. Each line in the file becomes one example. Args: filepath | STRING |
| HIGH | transformer_lens/lit/dataset.py | 463 | Generate random IOI examples. Args: n_examples: Number of examples to generate. seed: R | STRING |
| HIGH | transformer_lens/lit/dataset.py | 577 | Generate simple induction examples. Args: n_examples: Number of examples to generate. s | STRING |
| HIGH | transformer_lens/lit/utils.py | 95 | Get tokens and token IDs from a HookedTransformer model. Args: model: HookedTransformer model with tokenize | STRING |
| HIGH | transformer_lens/lit/utils.py | 344 | Split examples into batches. Args: examples: List of example dictionaries. batch_size: Size of each | STRING |
| HIGH | transformer_lens/model_bridge/architecture_adapter.py | 317 | Get a component from a remote model by its path. This method should be overridden by subclasses to provide the | STRING |
| HIGH | transformer_lens/model_bridge/architecture_adapter.py | 441 | Get the generalized component (bridge component) for a given TransformerLens path. Args: path: The | STRING |
| HIGH | transformer_lens/model_bridge/architecture_adapter.py | 514 | Get a component from the model using the component_mapping. Args: model: The model to extract compo | STRING |
| HIGH | transformer_lens/model_bridge/architecture_adapter.py | 571 | Translate a TransformerLens path to a remote model path. Args: path: The TransformerLens path to tr | STRING |
| HIGH | transformer_lens/model_bridge/bridge.py | 1189 | Map a string that makes up a single token to the id for that token. Args: string: The string to con | STRING |
| HIGH | transformer_lens/model_bridge/bridge.py | 3784 | Prepare multimodal inputs using the model's processor. Converts text and images into model-ready tensors (input | STRING |
| HIGH | transformer_lens/model_bridge/sources/transformers.py | 247 | Determine the architecture name from HuggingFace config. Args: hf_config: The HuggingFace config object | STRING |
| HIGH | …l_bridge/generalized_components/joint_qkv_attention.py | 399 | Apply attention input hook to the input tensor. This method extracts the input tensor from args/kwargs and appl | STRING |
| HIGH | …rmer_lens/model_bridge/generalized_components/block.py | 179 | Forward pass through the block bridge. Args: *args: Input arguments **kwargs: Input key | STRING |
| HIGH | transformer_lens/utilities/exploratory_utils.py | 23 | Test if the Model Can Give the Correct Answer to a Prompt. Intended for exploratory analysis. Prints out the perfor | STRING |
| HIGH | transformer_lens/utilities/slice.py | 120 | Returns the indices when this slice is applied to an axis of size max_ctx. Returns them as a numpy array, for i | STRING |
| HIGH | transformer_lens/components/abstract_attention.py | 860 | Create an ALiBi Slope Matrix. Create the slope matrix used in ALiBi, before it is multiplied by the head-specif | STRING |
| HIGH | transformer_lens/components/abstract_attention.py | 902 | Create the ALiBi Scalar Multipliers for each Head. For n heads, the set of multipliers (m) is the geometric seq | STRING |
| HIGH | transformer_lens/components/abstract_attention.py | 941 | Create the ALiBi Bias for all Heads. Calculate the ALiBi bias (https://arxiv.org/pdf/2108.12409.pdf) for all he | STRING |
| HIGH | …sformer_lens/factories/architecture_adapter_factory.py | 407 | Select the appropriate architecture adapter for the given config. Args: cfg: The TransformerBridgeC | STRING |
| HIGH | …nsformer_lens/factories/activation_function_factory.py | 17 | Use this to select what activation function is needed based on configuration. Args: cfg (HookedTran | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/model_bridge/test_component_hooks_fire.py | 47 | except Exception: | CODE |
| LOW | tests/unit/model_bridge/test_hook_alias_resolution.py | 101 | except Exception as exc: | CODE |
| LOW | tests/integration/model_bridge/test_ssm_real_weights.py | 64 | except Exception as e: # availability gate: network / missing arch / OOM / gated repo | CODE |
| LOW | …ts/integration/model_bridge/test_bridge_integration.py | 349 | except Exception as e: | CODE |
| LOW | …ts/integration/model_bridge/test_bridge_integration.py | 747 | except Exception: | CODE |
| LOW | …ce/model_bridge/compatibility/test_activation_cache.py | 118 | except Exception as e: | CODE |
| LOW | …ce/model_bridge/compatibility/test_activation_cache.py | 168 | except Exception as e: | CODE |
| LOW | …mpatibility/test_legacy_hooked_transformer_coverage.py | 38 | except Exception as e: | CODE |
| LOW | …mpatibility/test_legacy_hooked_transformer_coverage.py | 100 | except Exception: | CODE |
| LOW | …mpatibility/test_legacy_hooked_transformer_coverage.py | 143 | except Exception as e: | CODE |
| LOW | …mpatibility/test_legacy_hooked_transformer_coverage.py | 202 | except Exception: | CODE |
| LOW | …mpatibility/test_legacy_hooked_transformer_coverage.py | 267 | except Exception as e: | CODE |
| LOW | …mpatibility/test_legacy_hooked_transformer_coverage.py | 308 | except Exception as e: | CODE |
| LOW | tests/benchmarks/test_boot_memory.py | 37 | except Exception: | CODE |
| LOW | docs/make_docs.py | 48 | except Exception as e: | CODE |
| LOW | docs/make_docs.py | 191 | except Exception as e: | CODE |
| LOW | docs/make_docs.py | 206 | except Exception: | CODE |
| LOW | docs/make_docs.py | 355 | except Exception as e: | CODE |
| LOW | docs/make_docs.py | 367 | except Exception as e: | CODE |
| LOW | docs/make_docs.py | 378 | except Exception as e: | CODE |
| LOW | docs/make_docs.py | 396 | except Exception as e: | CODE |
| LOW | docs/make_docs.py | 450 | except Exception as e: | CODE |
| LOW | docs/make_docs.py | 527 | except Exception as e: | CODE |
| LOW | scripts/bridge_multi_device_parity.py | 112 | except Exception as exc: # gated repo, OOM, unsupported arch -> SKIP with reason | CODE |
| LOW | transformer_lens/evals.py | 235 | except Exception as e: | CODE |
| LOW | transformer_lens/tools/model_registry/registry_io.py | 178 | except Exception: | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 205 | except Exception as exc: # pragma: no cover — network/transient | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 228 | except Exception as exc: # pragma: no cover — network/transient | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 483 | except Exception as exc: | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 520 | except Exception as e: | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 544 | except Exception as exc: | CODE |
| LOW | …er_lens/tools/model_registry/discover_architectures.py | 76 | except Exception: | CODE |
| LOW⚡ | transformer_lens/tools/model_registry/verify_models.py | 942 | except Exception as e: | CODE |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 461 | except Exception: | CODE |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 873 | except Exception as e: | CODE |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 995 | except Exception as e: | CODE |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 1317 | except Exception as e: | CODE |
| LOW | transformer_lens/lit/model.py | 625 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/architecture_adapter.py | 759 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/architecture_adapter.py | 812 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/compat.py | 34 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 488 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 2217 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 2310 | except Exception as e: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 3740 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 4118 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 4143 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/buffer_restore.py | 66 | except Exception: | CODE |
| LOW | …r_lens/model_bridge/supported_architectures/openelm.py | 117 | except Exception: | CODE |
| LOW | …mer_lens/model_bridge/supported_architectures/raven.py | 272 | except Exception: | CODE |
| LOW | …rmer_lens/model_bridge/supported_architectures/ouro.py | 181 | except Exception: | CODE |
| LOW | …rmer_lens/model_bridge/supported_architectures/gidd.py | 151 | except Exception: | CODE |
| LOW | …mer_lens/model_bridge/supported_architectures/bd3lm.py | 148 | except Exception: | CODE |
| LOW | …lens/model_bridge/supported_architectures/internlm2.py | 240 | except Exception: | CODE |
| LOW | …mer_lens/model_bridge/supported_architectures/rwkv7.py | 190 | except Exception: | CODE |
| LOW | …mer_lens/model_bridge/supported_architectures/rwkv7.py | 200 | except Exception: | CODE |
| LOW | …mer_lens/model_bridge/supported_architectures/dream.py | 144 | except Exception: | CODE |
| LOW | …_lens/model_bridge/supported_architectures/baichuan.py | 297 | except Exception as exc: | CODE |
| LOW | …_lens/model_bridge/supported_architectures/baichuan.py | 310 | except Exception: | CODE |
| LOW | transformer_lens/model_bridge/sources/transformers.py | 906 | except Exception: | CODE |
| 111 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/unit/test_hook_points.py | 128 | # Create a test hook conversion | COMMENT |
| MEDIUM⚡ | tests/unit/test_hook_points.py | 136 | # Create a simple test module that uses HookPoint | COMMENT |
| MEDIUM | tests/unit/test_hook_points.py | 177 | # Create a test hook conversion | COMMENT |
| MEDIUM | tests/unit/test_hook_points.py | 366 | # Create a complex setup with multiple hooks | COMMENT |
| MEDIUM | tests/unit/test_weight_processing.py | 749 | # Create a state dict with known values for deterministic testing | COMMENT |
| MEDIUM | tests/unit/model_bridge/test_gpt_oss_moe.py | 144 | # Create a small GPT-OSS config with random weights | COMMENT |
| MEDIUM⚡ | tests/unit/model_bridge/test_component_setup.py | 65 | # Create a component with submodules | COMMENT |
| MEDIUM | tests/unit/model_bridge/test_component_setup.py | 94 | # Create a component with nested submodules | COMMENT |
| MEDIUM | tests/unit/model_bridge/test_component_setup.py | 267 | # Create a simpler adapter without outer_blocks for this test | COMMENT |
| MEDIUM | tests/unit/model_bridge/test_get_params_util.py | 16 | # Create a mock bridge with basic components | COMMENT |
| MEDIUM | tests/unit/model_bridge/test_get_params_util.py | 49 | # Create a mock bridge with missing components | COMMENT |
| MEDIUM | tests/unit/model_bridge/test_end_to_end_bridge.py | 21 | # Create a mock model with different naming conventions | COMMENT |
| MEDIUM | tests/unit/model_bridge/test_end_to_end_bridge.py | 44 | # Create the bridge | COMMENT |
| MEDIUM | …l_bridge/supported_architectures/test_bd3lm_adapter.py | 179 | # Create a mock model matching the real BD3LM structure | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 99 | # Create a mock linear layer for testing | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 118 | # Create a mock attention layer for testing, doesn't do anything because we're only interested in the QKV compon | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 140 | # Create a hook that returns the input | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 183 | # Create a mock linear layer for testing | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 202 | # Create a mock attention layer for testing, doesn't do anything because we're only interested in the QKV compon | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 225 | # Create a hook that returns the input | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 270 | # Create a mock linear layer for testing | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 289 | # Create a mock attention layer for testing, doesn't do anything because we're only interested in the QKV compon | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 312 | # Create a hook that returns the input | COMMENT |
| MEDIUM | tests/unit/utilities/test_aliases.py | 203 | # Create a mock module structure | COMMENT |
| MEDIUM | tests/unit/utilities/test_aliases.py | 241 | # Create a mock module structure that mimics real bridge components | COMMENT |
| MEDIUM | tests/unit/utilities/test_aliases.py | 320 | # Create a class that will actually raise AttributeError | COMMENT |
| MEDIUM⚡ | tests/unit/utilities/test_cache.py | 28 | # Create a real cache entry with 0 positions | COMMENT |
| MEDIUM | tests/unit/utilities/test_cache.py | 43 | # Create a real cache entry with 1 position | COMMENT |
| MEDIUM | tests/unit/utilities/test_cache.py | 58 | # Create a real cache entry with multiple positions | COMMENT |
| MEDIUM | tests/unit/utilities/test_cache.py | 73 | # Create a real cache entry with many positions | COMMENT |
| MEDIUM | tests/integration/test_only_tokenizer.py | 83 | # Create the HookedTransformer object | COMMENT |
| MEDIUM | …ts/integration/model_bridge/test_bridge_integration.py | 202 | # Create a custom QKV conversion rule | COMMENT |
| MEDIUM | …ts/integration/model_bridge/test_bridge_integration.py | 654 | # Create a simple backward hook that tracks if it was called | COMMENT |
| MEDIUM | …mpatibility/test_legacy_hooked_transformer_coverage.py | 289 | # Create a longer prompt (but not too long to avoid timeouts) | COMMENT |
| MEDIUM | transformer_lens/hook_points.py | 218 | # Create a simple wrapper that acts like a HookPoint but with a different name | COMMENT |
| MEDIUM | transformer_lens/hook_points.py | 221 | # Create a view of this HookPoint with the alias name | COMMENT |
| MEDIUM | transformer_lens/patching.py | 197 | # Create an empty tensor to show the patched metric for each patch | COMMENT |
| MEDIUM | transformer_lens/HookedTransformer.py | 1453 | # Create the HookedTransformer object | COMMENT |
| MEDIUM | transformer_lens/lit/__init__.py | 15 | >>> # Create a dataset | STRING |
| MEDIUM | transformer_lens/lit/dataset.py | 10 | >>> # Create a dataset from examples | STRING |
| MEDIUM | transformer_lens/lit/dataset.py | 559 | # Create the full text: pattern + separator + repeated start | COMMENT |
| MEDIUM | …ormer_lens/model_bridge/generalized_components/base.py | 270 | # Create a new parameter from the weight tensor | COMMENT |
| MEDIUM | transformer_lens/components/abstract_attention.py | 732 | # Create a n_ctx x rotary_dim tensor, where each column is an arithmetic sequence of angles in that frequency | COMMENT |
| MEDIUM | transformer_lens/components/abstract_attention.py | 971 | # Create the slope matrix | COMMENT |
| MEDIUM | transformer_lens/components/abstract_attention.py | 976 | # Create the scalar multiplier for each head. | COMMENT |
| MEDIUM | transformer_lens/benchmarks/encoder_common.py | 249 | # Create a slightly perturbed version | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/tools/test_jacobian_lens.py | 166 | CODE | |
| LOW | tests/unit/model_bridge/test_component_hooks_fire.py | 123 | CODE | |
| LOW | tests/unit/model_bridge/test_hook_alias_resolution.py | 96 | CODE | |
| LOW | …tils/conversion_steps/test_repeat_tensor_conversion.py | 35 | CODE | |
| LOW | tests/integration/test_hook_shape_compatibility.py | 124 | CODE | |
| LOW | …tegration/model_bridge/test_optimizer_compatibility.py | 118 | CODE | |
| LOW | …n/model_bridge/test_weight_processing_perfect_match.py | 14 | CODE | |
| LOW | tests/acceptance/test_hooked_transformer.py | 636 | CODE | |
| LOW | …ce/model_bridge/compatibility/test_activation_cache.py | 61 | CODE | |
| LOW | tests/benchmarks/test_boot_memory.py | 16 | CODE | |
| LOW | docs/make_docs.py | 240 | CODE | |
| LOW | docs/make_docs.py | 401 | CODE | |
| LOW | docs/make_docs.py | 505 | CODE | |
| LOW | docs/make_docs.py | 571 | CODE | |
| LOW | scripts/bridge_multi_device_parity.py | 53 | CODE | |
| LOW | transformer_lens/loading_from_pretrained.py | 128 | CODE | |
| LOW | transformer_lens/loading_from_pretrained.py | 1832 | CODE | |
| LOW | transformer_lens/loading_from_pretrained.py | 1892 | CODE | |
| LOW | transformer_lens/HookedRootModule.py | 445 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 145 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 331 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 538 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 901 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1064 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1508 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1557 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1575 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1597 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1624 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1889 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 2277 | CODE | |
| LOW | transformer_lens/ActivationCache.py | 186 | CODE | |
| LOW | transformer_lens/ActivationCache.py | 1180 | CODE | |
| LOW | transformer_lens/ActivationCache.py | 1401 | CODE | |
| LOW | transformer_lens/weight_processing.py | 108 | CODE | |
| LOW | transformer_lens/weight_processing.py | 319 | CODE | |
| LOW | transformer_lens/weight_processing.py | 422 | CODE | |
| LOW | transformer_lens/weight_processing.py | 566 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1016 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1116 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1391 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1564 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1869 | CODE | |
| LOW | transformer_lens/weight_processing.py | 2003 | CODE | |
| LOW | transformer_lens/weight_processing.py | 2087 | CODE | |
| LOW | transformer_lens/tools/model_registry/registry_io.py | 182 | CODE | |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 63 | CODE | |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 109 | CODE | |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 180 | CODE | |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 236 | CODE | |
| LOW | transformer_lens/tools/model_registry/validate.py | 207 | CODE | |
| LOW | transformer_lens/tools/model_registry/validate.py | 561 | CODE | |
| LOW | …ansformer_lens/tools/model_registry/generate_report.py | 187 | CODE | |
| LOW | …ansformer_lens/tools/model_registry/generate_report.py | 212 | CODE | |
| LOW | …er_lens/tools/model_registry/discover_architectures.py | 31 | CODE | |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 384 | CODE | |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 442 | CODE | |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 474 | CODE | |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 823 | CODE | |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 1278 | CODE | |
| 101 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …bridge/supported_architectures/test_smollm3_adapter.py | 131 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …ridge/supported_architectures/test_stablelm_adapter.py | 144 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …el_bridge/supported_architectures/test_lfm2_adapter.py | 115 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …del_bridge/supported_architectures/test_phi_adapter.py | 78 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …l_bridge/supported_architectures/test_olmo2_adapter.py | 113 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …bridge/supported_architectures/test_mixtral_adapter.py | 126 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …bridge/supported_architectures/test_apertus_adapter.py | 273 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …pported_architectures/test_hunyuan_v1_dense_adapter.py | 102 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …bridge/supported_architectures/test_gpt_oss_adapter.py | 113 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW⚡ | …l_bridge/supported_architectures/test_llama_adapter.py | 207 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …l_bridge/supported_architectures/test_qwen2_adapter.py | 97 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …el_bridge/supported_architectures/test_ouro_adapter.py | 77 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …ridge/supported_architectures/test_glm4_moe_adapter.py | 64 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …el_bridge/supported_architectures/test_neox_adapter.py | 75 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …l_bridge/supported_architectures/test_olmoe_adapter.py | 129 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | transformer_lens/__init__.py | 43 | __all__ = [ | CODE |
| LOW | transformer_lens/utils.py | 18 | __all__ = [ | CODE |
| LOW | transformer_lens/tools/__init__.py | 13 | __all__ = ["analysis", "model_registry"] | CODE |
| LOW | transformer_lens/tools/analysis/__init__.py | 30 | __all__ = [ | CODE |
| LOW | transformer_lens/tools/model_registry/registry_io.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 43 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/tools/model_registry/__init__.py | 351 | __all__ = [ | CODE |
| LOW | transformer_lens/tools/model_registry/api.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/tools/model_registry/validate.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 60 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/lit/__init__.py | 63 | __all__ = [ | CODE |
| LOW | transformer_lens/lit/__init__.py | 84 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/lit/model.py | 73 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/lit/dataset.py | 58 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/lit/utils.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/config/__init__.py | 7 | __all__ = ["HookedTransformerConfig", "TransformerBridgeConfig", "TransformerLensConfig"] | CODE |
| LOW⚡ | transformer_lens/model_bridge/architecture_adapter.py | 204 | def _set_rms_rotary_defaults(self, *, final_rms: bool = True) -> None: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 423 | def _set_processed_weight_attributes(self) -> None: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 853 | def set_compatibility_mode(component: Any) -> None: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 880 | def _setup_hook_compatibility(self) -> None: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 4105 | def set_use_hook_mlp_in(self, use_hook_mlp_in: bool) -> None: | CODE |
| LOW | transformer_lens/model_bridge/__init__.py | 37 | __all__ = [ | CODE |
| LOW | transformer_lens/model_bridge/component_setup.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/model_bridge/get_params_util.py | 7 | logger = logging.getLogger(__name__) | CODE |
| LOW | …_lens/model_bridge/supported_architectures/pretrain.py | 97 | def set_original_component(self, component: torch.nn.Module) -> None: | CODE |
| LOW | …r_lens/model_bridge/supported_architectures/apertus.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | …mer_lens/model_bridge/supported_architectures/llada.py | 45 | def set_original_component(self, original_component: torch.nn.Module) -> None: | CODE |
| LOW | …mer_lens/model_bridge/supported_architectures/llada.py | 225 | def set_original_component(self, original_component: torch.nn.Module) -> None: | CODE |
| LOW | …_lens/model_bridge/supported_architectures/__init__.py | 271 | __all__ = [ | CODE |
| LOW | …mer_lens/model_bridge/supported_architectures/qwen3.py | 48 | def _setup_qwen3_config(self, cfg: Any) -> None: | CODE |
| LOW | …r_lens/model_bridge/supported_architectures/granite.py | 51 | def _setup_common_config(self, cfg: Any) -> None: | CODE |
| LOW | transformer_lens/model_bridge/sources/__init__.py | 17 | __all__ = [ | CODE |
| LOW | …ansformer_lens/model_bridge/sources/native/__init__.py | 10 | __all__ = [ | CODE |
| LOW | …eneralized_components/position_embeddings_attention.py | 63 | def _setup_eager_attention_hook_wrapper() -> None: | CODE |
| LOW | …eneralized_components/position_embeddings_attention.py | 183 | def set_original_component(self, component: torch.nn.Module) -> None: | CODE |
| LOW | …_lens/model_bridge/generalized_components/attention.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | …_lens/model_bridge/generalized_components/attention.py | 144 | def set_original_component(self, original_component: torch.nn.Module) -> None: | CODE |
| LOW | …_lens/model_bridge/generalized_components/attention.py | 265 | def _setup_qkv_hook_reshaping(self) -> None: | CODE |
| LOW | …l_bridge/generalized_components/clip_vision_encoder.py | 177 | def set_original_component(self, original_component: torch.nn.Module) -> None: | CODE |
| LOW | …bridge/generalized_components/t5gemma_decoder_block.py | 49 | def set_original_component(self, component: torch.nn.Module) -> None: | CODE |
| LOW⚡ | …neralized_components/position_embedding_hooks_mixin.py | 22 | def set_rotary_emb(self, rotary_emb: Any) -> None: | CODE |
| LOW | …ridge/generalized_components/t5gemma2_decoder_block.py | 54 | def set_original_component(self, component: torch.nn.Module) -> None: | CODE |
| LOW | …del_bridge/generalized_components/joint_gate_up_mlp.py | 107 | def set_original_component(self, original_component: torch.nn.Module) -> None: | CODE |
| LOW | …l_bridge/generalized_components/joint_qkv_attention.py | 274 | def set_original_component(self, original_component: torch.nn.Module) -> None: | CODE |
| LOW | …r_lens/model_bridge/generalized_components/__init__.py | 147 | __all__ = [ | CODE |
| 12 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/model_bridge/test_optimizer_compatibility.py | 183 | # Check if parameter changed | COMMENT |
| LOW | tests/unit/components/test_attention.py | 476 | # Check if new implementation without einsum produces correct shape | COMMENT |
| LOW | tests/unit/components/test_abstract_attention.py | 29 | # Check if upper triangle is all zeros | COMMENT |
| LOW | tests/unit/components/test_abstract_attention.py | 37 | # Check if the lower triangle is decreasing by a constant slope (towards the bottom left corner). | COMMENT |
| LOW | tests/integration/test_fold_layer_integration.py | 66 | # Check if LayerNorm parameters exist (they shouldn't for processed models) | COMMENT |
| LOW | tests/integration/test_fold_layer_integration.py | 195 | # Check if LayerNorm parameters exist (they shouldn't for processed models) | COMMENT |
| LOW | transformer_lens/hook_points.py | 308 | # Check if this hook matches our criteria | COMMENT |
| LOW | transformer_lens/evals.py | 627 | # Check if correct | COMMENT |
| LOW | transformer_lens/weight_processing.py | 344 | # Check if standard keys exist, otherwise update to use underscore-prefixed versions | COMMENT |
| LOW | transformer_lens/weight_processing.py | 533 | # Check if a separate ln2 exists for this layer | COMMENT |
| LOW | transformer_lens/weight_processing.py | 1906 | # Check if we have a conversion for this parameter. | COMMENT |
| LOW | transformer_lens/weight_processing.py | 2041 | # Check if we have a conversion for this parameter. | COMMENT |
| LOW | transformer_lens/lit/__init__.py | 60 | # Check if LIT is available | COMMENT |
| LOW | transformer_lens/model_bridge/bridge.py | 969 | # Check if they point to the same tensor (weight tying) | COMMENT |
| LOW | transformer_lens/model_bridge/bridge.py | 3735 | # Check if output is a ModelOutput | COMMENT |
| LOW | transformer_lens/model_bridge/bridge.py | 4266 | # Check if this part is a registered submodule | COMMENT |
| LOW | transformer_lens/model_bridge/bridge.py | 4278 | # Check if next is weight/bias | COMMENT |
| LOW | transformer_lens/model_bridge/bridge.py | 4379 | # Check if this is a valid bridge path (not a nested HF component) | COMMENT |
| LOW | …r_lens/model_bridge/supported_architectures/apertus.py | 115 | # Check if upstream already defers scalar computation (fix landed) | COMMENT |
| LOW | …odel_bridge/supported_architectures/llava_onevision.py | 32 | # Check if text config expects tied weights but top-level config doesn't | COMMENT |
| LOW | …mer_lens/model_bridge/supported_architectures/bd3lm.py | 197 | # Check if VAR_KEYWORD (like **kwargs) is accepted | COMMENT |
| LOW | …rmer_lens/model_bridge/generalized_components/block.py | 324 | # Check if the signature accepts **kwargs (VAR_KEYWORD) | COMMENT |
| LOW | …conversion_utils/helpers/merge_quantiziation_fields.py | 22 | # Check if existing field is None and raise error as expected by tests | COMMENT |
| LOW | …conversion_utils/helpers/merge_quantiziation_fields.py | 37 | # Check if the second element is a TensorConversionSet-like object | COMMENT |
| LOW | transformer_lens/utilities/aliases.py | 47 | # Check if the final attribute exists | COMMENT |
| LOW | transformer_lens/utilities/aliases.py | 55 | # Check if the target attribute exists before getting it | COMMENT |
| LOW⚡ | transformer_lens/benchmarks/main_benchmark.py | 245 | # Check if we have a same-architecture reference | COMMENT |
| LOW | transformer_lens/benchmarks/backward_gradients.py | 159 | # Check if mismatches are acceptable patterns | COMMENT |
| LOW | …nsformer_lens/benchmarks/granular_weight_processing.py | 216 | # Check if HookedTransformer supports this model using a lightweight config-only | COMMENT |
| LOW | transformer_lens/benchmarks/component_outputs.py | 829 | # Check if shared_inputs contains positional args | COMMENT |
| LOW | transformer_lens/benchmarks/component_outputs.py | 1007 | # Check if within tolerance | COMMENT |
| LOW | transformer_lens/benchmarks/component_outputs.py | 1053 | # Set models to eval mode (disable dropout, etc.) | COMMENT |
| LOW | transformer_lens/benchmarks/weight_processing.py | 167 | # Check if models have GQA (different head counts for K/V vs Q) | COMMENT |
| LOW | transformer_lens/benchmarks/weight_processing.py | 679 | # Check if W_out exists and is accessible (HT format or bridge format) | COMMENT |
| LOW | transformer_lens/benchmarks/weight_processing.py | 839 | # Check if b_V exists | COMMENT |
| LOW | transformer_lens/benchmarks/weight_processing.py | 858 | # Check if b_V is approximately zero | COMMENT |
| LOW | transformer_lens/pretrained/weight_conversions/gemma.py | 13 | # Check if this is a multimodal model (Gemma3ForConditionalGeneration) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …odel_bridge/supported_architectures/_pretrain_mocks.py | 108 | CODE | |
| LOW | …l_bridge/supported_architectures/test_raven_adapter.py | 34 | CODE | |
| LOW | …idge/supported_architectures/test_falcon_h1_adapter.py | 35 | CODE | |
| LOW | …el_bridge/supported_architectures/test_lfm2_adapter.py | 41 | CODE | |
| LOW | …del_bridge/supported_architectures/test_opt_adapter.py | 33 | CODE | |
| LOW | …dge/supported_architectures/test_nemotron_h_adapter.py | 31 | CODE | |
| LOW | …_bridge/supported_architectures/test_falcon_adapter.py | 40 | CODE | |
| LOW | …bridge/supported_architectures/test_cohere2_adapter.py | 41 | CODE | |
| LOW | …_bridge/supported_architectures/test_cohere_adapter.py | 23 | CODE | |
| LOW | …_bridge/supported_architectures/test_mamba2_adapter.py | 32 | CODE | |
| LOW | …l_bridge/supported_architectures/test_bd3lm_adapter.py | 30 | CODE | |
| LOW | …l_bridge/supported_architectures/test_jamba_adapter.py | 27 | CODE | |
| LOW | tests/integration/test_only_tokenizer.py | 47 | CODE | |
| LOW | transformer_lens/HookedEncoderDecoder.py | 303 | CODE | |
| LOW | transformer_lens/loading_from_pretrained.py | 1636 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 471 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 488 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 505 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 522 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 538 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1158 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1477 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 1889 | CODE | |
| LOW | transformer_lens/HookedTransformer.py | 2277 | CODE | |
| LOW | transformer_lens/tools/model_registry/api.py | 427 | CODE | |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 823 | CODE | |
| LOW | transformer_lens/config/transformer_bridge_config.py | 21 | CODE | |
| LOW | transformer_lens/model_bridge/bridge.py | 218 | CODE | |
| LOW | transformer_lens/model_bridge/bridge.py | 1735 | CODE | |
| LOW | transformer_lens/model_bridge/bridge.py | 2351 | CODE | |
| LOW | transformer_lens/model_bridge/bridge.py | 2820 | CODE | |
| LOW | transformer_lens/model_bridge/bridge.py | 3374 | CODE | |
| LOW | transformer_lens/model_bridge/bridge.py | 3603 | CODE | |
| LOW | transformer_lens/model_bridge/sources/transformers.py | 473 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/attention.py | 57 | CODE | |
| LOW | …model_bridge/generalized_components/bloom_attention.py | 129 | CODE | |
| LOW | …odel_bridge/generalized_components/depthwise_conv1d.py | 35 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/bloom_mlp.py | 75 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/embedding.py | 94 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/gated_mlp.py | 141 | CODE | |
| LOW | …mer_lens/model_bridge/generalized_components/linear.py | 39 | CODE | |
| LOW | …l_bridge/generalized_components/joint_qkv_attention.py | 315 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/pos_embed.py | 94 | CODE | |
| LOW | …mer_lens/model_bridge/generalized_components/conv1d.py | 39 | CODE | |
| LOW | …ens/model_bridge/generalized_components/unembedding.py | 104 | CODE | |
| LOW | …del_bridge/generalized_components/codegen_attention.py | 267 | CODE | |
| LOW | …r_lens/model_bridge/generalized_components/t5_block.py | 187 | CODE | |
| LOW | …r_lens/model_bridge/generalized_components/t5_block.py | 71 | CODE | |
| LOW | …s/model_bridge/generalized_components/normalization.py | 105 | CODE | |
| LOW | transformer_lens/benchmarks/main_benchmark.py | 575 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …ation/model_bridge/test_bridge_vs_hooked_comparison.py | 1 | """Test comprehensive comparison between Bridge and HookedTransformer.""" | STRING |
| MEDIUM | tests/benchmarks/test_benchmarks.py | 19 | """Test suite that runs comprehensive benchmarks for each model.""" | STRING |
| LOW | transformer_lens/hook_points.py | 283 | # we could just pass this as an argument in PyTorch 2.0, but for now we manually do this... | COMMENT |
| LOW | transformer_lens/FactoredMatrix.py | 127 | # It's a vector, so we collapse the factorisation and just return a vector | COMMENT |
| LOW | transformer_lens/FactoredMatrix.py | 174 | # It's a vector, so we collapse the factorisation and just return a vector | COMMENT |
| LOW | transformer_lens/weight_processing.py | 1925 | # Legacy string mapping - just return the tensor as-is | COMMENT |
| LOW | transformer_lens/weight_processing.py | 2056 | # Legacy string mapping - just return the tensor as-is | COMMENT |
| MEDIUM | transformer_lens/model_bridge/architecture_adapter.py | 81 | # component harness's synthesized probes — e.g. fused top-k routers whose | COMMENT |
| MEDIUM | …rmer_lens/model_bridge/supported_architectures/rwkv.py | 110 | # MLPBridge so the component harness sizes inputs by the | COMMENT |
| MEDIUM | …ns/model_bridge/supported_architectures/deepseek_v4.py | 165 | # The isolated component harness assumes a three-dimensional residual. V4's | COMMENT |
| MEDIUM | …er_lens/model_bridge/supported_architectures/jetmoe.py | 46 | # the harness's isolated probes; routers stay hookable at runtime. | COMMENT |
| LOW | …_lens/model_bridge/generalized_components/bloom_mlp.py | 68 | # The original BLOOM block passes it, so we just pass everything through | COMMENT |
| LOW | …odel_bridge/generalized_components/rotary_embedding.py | 140 | # For unexpected tuple lengths, just pass through | COMMENT |
| LOW | transformer_lens/utilities/components_utils.py | 51 | # If this was called on a full name, just return it | COMMENT |
| MEDIUM | transformer_lens/benchmarks/main_benchmark.py | 591 | """Run comprehensive benchmark suite for TransformerBridge. | STRING |
| MEDIUM | transformer_lens/benchmarks/component_benchmark.py | 65 | # Run comprehensive benchmark | COMMENT |
| MEDIUM⚡ | transformer_lens/benchmarks/generation.py | 194 | """Benchmark multiple generation calls to ensure KV cache handling is robust. | STRING |
| MEDIUM | transformer_lens/benchmarks/text_quality.py | 31 | # Diverse prompts used alongside the caller-provided test_text to get a robust | COMMENT |
| LOW | transformer_lens/benchmarks/component_outputs.py | 887 | # Some pos embeds just return their embeddings directly | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/integration/test_cross_entropy_loss.py | 11 | # Step 1: Get the default loss on a prompt | COMMENT |
| LOW⚡ | tests/integration/test_cross_entropy_loss.py | 21 | # Step 2: Get the loss when we add some extra tokens to the input and set their attention mask | COMMENT |
| LOW⚡ | tests/integration/test_tensor_extraction_consistency.py | 216 | # Step 1: Fold biases | COMMENT |
| LOW⚡ | tests/integration/test_tensor_extraction_consistency.py | 221 | # Step 2: Fold weights | COMMENT |
| LOW⚡ | tests/integration/test_tensor_extraction_consistency.py | 226 | # Step 3: Center weights | COMMENT |
| LOW⚡ | transformer_lens/tools/model_registry/verify_models.py | 936 | # Step 1: Estimate parameters | COMMENT |
| LOW⚡ | transformer_lens/tools/model_registry/verify_models.py | 946 | # Step 2: Check memory | COMMENT |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 901 | # Step 0: Skip formats with no HF loader path (GGUF / MLX / FP4 / FP8). | COMMENT |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 961 | # Step 3: Run benchmarks (all phases in a single call to share models) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/integration/test_cross_entropy_loss.py | 11 | # Step 1: Get the default loss on a prompt | COMMENT |
| LOW⚡ | tests/integration/test_cross_entropy_loss.py | 21 | # Step 2: Get the loss when we add some extra tokens to the input and set their attention mask | COMMENT |
| LOW⚡ | tests/integration/test_tensor_extraction_consistency.py | 216 | # Step 1: Fold biases | COMMENT |
| LOW⚡ | tests/integration/test_tensor_extraction_consistency.py | 221 | # Step 2: Fold weights | COMMENT |
| LOW⚡ | tests/integration/test_tensor_extraction_consistency.py | 226 | # Step 3: Center weights | COMMENT |
| LOW⚡ | transformer_lens/tools/model_registry/verify_models.py | 936 | # Step 1: Estimate parameters | COMMENT |
| LOW⚡ | transformer_lens/tools/model_registry/verify_models.py | 946 | # Step 2: Check memory | COMMENT |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 901 | # Step 0: Skip formats with no HF loader path (GGUF / MLX / FP4 / FP8). | COMMENT |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 961 | # Step 3: Run benchmarks (all phases in a single call to share models) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | …sts/unit/factories/test_activation_function_factory.py | 18 | dummy_data = torch.zeros((1, 4, 32)) | CODE |
| LOW⚡ | …sts/unit/factories/test_activation_function_factory.py | 19 | result = function(dummy_data) | CODE |
| LOW | tests/integration/test_cache_pos_slice.py | 11 | prompt = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor." | CODE |
| LOW | tests/integration/test_cache_pos_slice.py | 11 | prompt = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor." | CODE |
| LOW⚡ | tests/integration/test_cross_entropy_loss.py | 23 | extra_prompt = ["Lorem ipsum dolor sit amet, consectetur adipiscing elit."] | CODE |
| LOW⚡ | tests/integration/test_cross_entropy_loss.py | 23 | extra_prompt = ["Lorem ipsum dolor sit amet, consectetur adipiscing elit."] | CODE |
| LOW | tests/acceptance/test_evals.py | 58 | names=["John Smith", "John Doe"], | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/make_docs.py | 821 | #bt-root tbody td a:hover { text-decoration: underline; } | COMMENT |
| LOW | docs/make_docs.py | 881 | background: var(--color-background-primary, #fff); color: var(--color-foreground-primary, #333); | COMMENT |
| LOW | docs/source/_static/adapter-template.py | 81 | } | COMMENT |
| LOW | transformer_lens/model_bridge/architecture_adapter.py | 41 | """ | COMMENT |
| LOW | …mer_lens/model_bridge/supported_architectures/bd3lm.py | 81 | # of the SSM-specific hook_mixer_in alias that SSMBlockBridge would | COMMENT |
| LOW | …er_lens/model_bridge/supported_architectures/gemma3.py | 41 | # Gemma models use (1.0 + weight) in RMSNorm instead of just weight | COMMENT |
| LOW | …er_lens/model_bridge/supported_architectures/cohere.py | 81 | COMMENT | |
| LOW | transformer_lens/model_bridge/sources/transformers.py | 761 | f"weight mismatch." | COMMENT |
| LOW | transformer_lens/benchmarks/main_benchmark.py | 1421 | if ht_model_unprocessed is not None: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/source/content/news/release-3.0.md | 18 | Additionally, I am working on an automated Claude tool for TransformerBridge architecture adapters. It will allow contri | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | transformer_lens/HookedRootModule.py | 163 | ) # TODO does adding assert meaningfully slow down performance? I've added them for type checking purposes. | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | transformer_lens/head_detector.py | 270 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/make_docs.py | 167 | # input shape for activations -- "847"~="bat", subtract 7 for the context window to make it unique | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | transformer_lens/components/mlps/moe.py | 103 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |