A library for mechanistic interpretability of GPT-style language models
This report summarizes scanner evidence for TransformerLensOrg/TransformerLens, a Python project with 3,960 GitHub stars. SynthScan examined 255,636 lines of code across 1103 source files, recording 8380 pattern matches distributed across 24 syntactic categories. The legacy adjusted pattern signal is 48.5 (High pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 6231 finding(s).
Are imports declared and package/API names verified? 810 finding(s).
Are wrappers, guards, and repeated structures necessary? 7163 finding(s).
Which changes need focused human review? 8380 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 8380 distinct pattern matches across 24 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 62 | def _enable_hf_retry_for_tests(): | CODE |
| LOW | tests/tiny_checkpoints.py | 121 | def sequential_residual_params() -> list: | 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 | 58 | def test_append_preserves_cfg_dtype(): | CODE |
| LOW | tests/unit/test_key_value_cache_entry.py | 71 | 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 | 304 | def test_init_kaiming_uniform(self, d_model, d_mlp, nonlinearity): | CODE |
| LOW | tests/unit/test_utils.py | 441 | def test_no_split_tokens_across_chunks(self): | CODE |
| LOW | tests/unit/test_utils.py | 487 | def test_no_split_tokens_in_no_whitespace_text(self): | CODE |
| LOW | tests/unit/test_utils.py | 521 | def test_single_document_batch_does_not_crash(self): | CODE |
| LOW | tests/unit/test_utils.py | 542 | def test_iterable_dataset_with_set_format_false(self, gpt2_tokenizer): | CODE |
| LOW | tests/unit/test_utils.py | 574 | def test_tokenize_and_concatenate_no_spurious_sequence_length_warning(): | CODE |
| LOW | tests/unit/test_utils.py | 612 | def test_tokenize_and_concatenate_short_sequence_no_invalid_tokens(): | CODE |
| LOW | tests/unit/test_evals_ioi.py | 18 | def _make_automatic_bos_tokenizer(): | CODE |
| LOW | tests/unit/test_evals_ioi.py | 35 | def test_ioi_dataset_produces_diverse_samples(): | CODE |
| LOW⚡ | tests/unit/test_evals_ioi.py | 50 | def test_ioi_dataset_reproducible_with_seed(): | CODE |
| LOW⚡ | tests/unit/test_evals_ioi.py | 60 | def test_ioi_dataset_different_seeds_differ(): | CODE |
| LOW⚡ | tests/unit/test_evals_ioi.py | 70 | def test_ioi_dataset_no_seed_is_valid(): | CODE |
| LOW⚡ | tests/unit/test_evals_ioi.py | 77 | def test_ioi_dataset_symmetric(): | CODE |
| LOW⚡ | tests/unit/test_evals_ioi.py | 84 | def test_ioi_dataset_prepend_bos_is_the_only_source_of_special_tokens(): | CODE |
| LOW | tests/unit/test_evals_ioi.py | 111 | def test_ioi_eval_reads_logits_before_the_first_answer_token(): | CODE |
| LOW | tests/unit/test_lit.py | 132 | def test_tensor_to_numpy_tensor(self): | CODE |
| LOW | tests/unit/test_lit.py | 143 | def test_tensor_to_numpy_array(self): | CODE |
| LOW | tests/unit/test_lit.py | 153 | def test_tensor_to_numpy_none(self): | CODE |
| LOW | tests/unit/test_lit.py | 170 | def test_numpy_to_tensor_with_device(self): | CODE |
| LOW | tests/unit/test_lit.py | 251 | def test_input_field_names_drive_input_spec(self, mock_hooked_transformer): | CODE |
| LOW | tests/unit/test_lit.py | 290 | 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 | 452 | def test_model_wrapper_invalid_model(self): | CODE |
| LOW | tests/unit/test_lit.py | 484 | def test_model_output_spec_no_embeddings(self, mock_hooked_transformer): | CODE |
| LOW | tests/unit/test_lit.py | 554 | def test_full_prediction_flow(self, mock_hooked_transformer): | CODE |
| LOW | tests/unit/test_lit.py | 568 | def test_dataset_model_compatibility(self): | CODE |
| LOW | tests/unit/test_activation_cache.py | 158 | def test_compute_head_results_promotes_mixed_dtypes( | CODE |
| LOW | tests/unit/test_activation_cache.py | 197 | def test_compute_head_results_limits_temporary_allocation( | CODE |
| LOW | tests/unit/test_activation_cache.py | 252 | def test_batchless_accumulated_resid_matches_batched_row( | CODE |
| LOW | tests/unit/test_activation_cache.py | 283 | def test_get_neuron_results_projection_matches_unprojected( | CODE |
| LOW | tests/unit/test_activation_cache.py | 329 | def test_compute_head_results_handles_per_layer_cache( | CODE |
| LOW | tests/unit/test_activation_cache.py | 385 | def test_compute_head_results_requires_z_for_missing_results( | CODE |
| LOW | tests/unit/test_activation_cache.py | 404 | def test_compute_head_results_recomputes_wrong_head_count( | CODE |
| LOW | tests/unit/test_activation_cache.py | 438 | def test_stack_neuron_results_integer_neuron_slice_matches_list( | CODE |
| LOW | tests/unit/test_activation_cache.py | 475 | def test_stack_neuron_results_integer_neuron_slice_without_labels( | CODE |
| LOW | tests/unit/test_activation_cache.py | 495 | def test_logit_attrs_per_example_targets_match_individual_examples( | CODE |
| LOW | tests/unit/test_activation_cache.py | 552 | def test_logit_attrs_preserves_other_target_layouts( | CODE |
| LOW | tests/unit/test_activation_cache.py | 595 | def test_full_resid_decomposition_projected_ln_uses_mlp_input_scale( | CODE |
| LOW | tests/unit/test_activation_cache.py | 633 | def test_stack_neuron_results_projected_ln_honours_mlp_input( | CODE |
| LOW | tests/unit/test_activation_cache.py | 664 | def test_stack_neuron_results_mlp_input_remainder_fills_to_resid_mid( | CODE |
| LOW | tests/unit/test_activation_cache.py | 697 | def test_stack_head_results_does_not_warn_when_results_cached( | CODE |
| LOW | tests/unit/test_activation_cache.py | 723 | def test_stack_neuron_results_rejects_out_of_contract_remainder_layer( | CODE |
| LOW | tests/unit/test_activation_cache.py | 733 | def test_stack_neuron_results_layer_zero_remainder_is_the_whole_model( | CODE |
| LOW | tests/unit/test_activation_cache.py | 750 | def test_stack_neuron_results_mlp_input_layer_zero_remainder_is_resid_mid( | CODE |
| LOW | tests/unit/test_activation_cache.py | 789 | def test_logit_attrs_batch_slice_without_normalization( | CODE |
| 5721 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 81 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 83 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 241 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 243 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 312 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 314 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 405 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/test_direct_path_patching.py | 407 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/test_direct_path_patching.py | 23 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/test_direct_path_patching.py | 25 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/test_direct_path_patching.py | 185 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/test_direct_path_patching.py | 187 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 435 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 437 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 551 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 553 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 660 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 662 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 826 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_model_registry.py | 828 | # ============================================================ | 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 | 321 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 323 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 624 | # ============================================================ | COMMENT |
| MEDIUM | tests/unit/tools/test_model_registry.py | 626 | # ============================================================ | 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_attribution_patching.py | 313 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_attribution_patching.py | 315 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_attribution_patching.py | 385 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_attribution_patching.py | 387 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_attribution_patching.py | 611 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_attribution_patching.py | 613 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_attribution_patching.py | 1649 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_attribution_patching.py | 1651 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_attribution_patching.py | 1883 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/unit/tools/test_attribution_patching.py | 1885 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 229 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 231 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 716 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 718 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 837 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 839 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 1129 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 1131 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 1297 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 1299 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 1797 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/unit/tools/test_attribution_patching.py | 1799 | # --------------------------------------------------------------------------- | COMMENT |
| 745 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/unit/model_bridge/test_batched_moe_fold_ln.py | 0 | fold layer norms only, so any logit movement is the fold's own doing. | STRING |
| HIGH | tests/unit/model_bridge/test_fused_qkv_fold_ln.py | 0 | fold layer norms only, so any logit movement is the fold's own doing. | STRING |
| HIGH | tests/unit/model_bridge/test_lfm2_fold_ln.py | 0 | fold layer norms only, so any logit movement is the fold's own doing. | STRING |
| 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 | 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 | …ridge/supported_architectures/test_lfm2_moe_adapter.py | 0 | unit tests for gptjarchitectureadapter. tests cover: - config attribute validation - component mapping structure - weigh | STRING |
| HIGH | …el_bridge/supported_architectures/test_lfm2_adapter.py | 0 | unit tests for gptjarchitectureadapter. tests cover: - config attribute validation - component mapping structure - weigh | STRING |
| HIGH | …del_bridge/supported_architectures/test_phi_adapter.py | 0 | unit tests for gptjarchitectureadapter. tests cover: - config attribute validation - component mapping structure - weigh | STRING |
| HIGH | …pported_architectures/test_hunyuan_v1_dense_adapter.py | 0 | unit tests for gptjarchitectureadapter. tests cover: - config attribute validation - component mapping structure - weigh | STRING |
| HIGH | …el_bridge/supported_architectures/test_gptj_adapter.py | 0 | unit tests for gptjarchitectureadapter. tests cover: - config attribute validation - component mapping structure - weigh | STRING |
| HIGH | …ridge/supported_architectures/test_lfm2_moe_adapter.py | 0 | per-layer self_attn with a mutable .config so the eager flip is observable. | STRING |
| 115 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | easy_transformer/__init__.py | 4 | CODE | |
| LOW | tests/goldens.py | 20 | CODE | |
| LOW | tests/goldens_capture_spec.py | 10 | CODE | |
| LOW | tests/tiny_checkpoints.py | 9 | CODE | |
| LOW | tests/unit/test_lit.py | 15 | CODE | |
| LOW | tests/unit/test_deprecation_warnings.py | 8 | CODE | |
| LOW | tests/unit/test_tracr_conversion.py | 1 | CODE | |
| LOW | tests/unit/test_activation_cache_batch_dim.py | 9 | CODE | |
| LOW | tests/unit/test_goldens_infra.py | 7 | CODE | |
| LOW | tests/unit/test_lm_utils.py | 3 | CODE | |
| LOW | tests/unit/tools/test_attribution_patching.py | 9 | CODE | |
| LOW | …unit/tools/test_direct_logit_attribution_final_norm.py | 3 | CODE | |
| LOW | tests/unit/model_bridge/test_encdec_weight_stacking.py | 10 | CODE | |
| LOW | …nit/model_bridge/test_bridge_cross_run_qkv_patching.py | 13 | CODE | |
| LOW | tests/unit/model_bridge/test_inspect_vllm_provider.py | 5 | CODE | |
| LOW | tests/unit/model_bridge/test_inspect_vllm_provider.py | 129 | CODE | |
| LOW | tests/unit/model_bridge/test_inspect_vllm_provider.py | 315 | CODE | |
| LOW | tests/unit/model_bridge/test_process_weights_reentry.py | 7 | CODE | |
| LOW | tests/unit/model_bridge/test_gated_hooks.py | 7 | CODE | |
| LOW | tests/unit/model_bridge/test_state_dict_round_trip.py | 14 | CODE | |
| LOW | tests/unit/model_bridge/test_vllm_driver.py | 6 | CODE | |
| LOW | tests/unit/model_bridge/test_model_structure_doc.py | 3 | CODE | |
| LOW | tests/unit/model_bridge/test_boot_native.py | 3 | 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 | …/unit/model_bridge/test_position_ids_injection_gate.py | 12 | CODE | |
| LOW | …nit/model_bridge/test_original_model_not_registered.py | 7 | CODE | |
| LOW | …sts/unit/model_bridge/test_per_head_hooks_component.py | 16 | CODE | |
| LOW | …sts/unit/model_bridge/test_tl_checkpoint_conversion.py | 16 | CODE | |
| LOW | …/model_bridge/test_bridge_cross_run_mlp_in_patching.py | 12 | CODE | |
| LOW | tests/unit/model_bridge/test_reset_hooks_registry.py | 3 | CODE | |
| LOW | tests/unit/model_bridge/test_config_flag_assignment.py | 3 | CODE | |
| LOW | …t/model_bridge/test_run_with_hooks_remove_batch_dim.py | 3 | CODE | |
| LOW | tests/unit/model_bridge/test_hook_alias_resolution.py | 8 | CODE | |
| LOW | tests/unit/model_bridge/test_caching_hooks_aliases.py | 8 | CODE | |
| LOW | …s/unit/model_bridge/test_benchmark_gated_hooks_fire.py | 12 | CODE | |
| LOW | tests/unit/model_bridge/test_vllm_plugin.py | 7 | CODE | |
| LOW | tests/unit/model_bridge/test_vllm_worker_extension.py | 7 | CODE | |
| LOW | …nit/model_bridge/test_bridge_train_mode_propagation.py | 9 | CODE | |
| LOW | tests/unit/model_bridge/test_hook_set_enforcement.py | 3 | CODE | |
| LOW | tests/unit/model_bridge/test_state_dict_composition.py | 3 | CODE | |
| LOW | tests/unit/model_bridge/test_native_features.py | 10 | CODE | |
| LOW | tests/unit/model_bridge/test_inspect_driver.py | 7 | CODE | |
| LOW | …s/unit/model_bridge/test_alias_collection_traversal.py | 10 | CODE | |
| LOW | tests/unit/model_bridge/test_t5_block_parity.py | 9 | CODE | |
| LOW | tests/unit/model_bridge/test_remote_bridge.py | 3 | CODE | |
| LOW | …sts/unit/model_bridge/test_build_bridge_from_module.py | 6 | CODE | |
| LOW | tests/unit/model_bridge/test_bridge_str.py | 6 | CODE | |
| LOW | tests/unit/model_bridge/test_driver_protocol.py | 2 | CODE | |
| LOW | tests/unit/model_bridge/test_batched_string_padding.py | 3 | CODE | |
| LOW | tests/unit/model_bridge/test_vllm_internals.py | 7 | CODE | |
| LOW | …sts/unit/model_bridge/test_caching_remove_batch_dim.py | 9 | CODE | |
| LOW | …model_bridge/test_caching_hooks_pos_slice_batch_dim.py | 8 | CODE | |
| LOW | …ts/unit/model_bridge/test_stack_block_params_hybrid.py | 8 | CODE | |
| LOW | tests/unit/model_bridge/test_vllm_boot.py | 7 | CODE | |
| LOW | tests/unit/model_bridge/test_loss_attention_mask.py | 3 | CODE | |
| LOW | …odel_bridge/supported_architectures/_pretrain_mocks.py | 12 | CODE | |
| LOW | …ridge/supported_architectures/test_pretrain_adapter.py | 12 | CODE | |
| LOW | …ridge/supported_architectures/test_wav2vec2_adapter.py | 9 | CODE | |
| LOW | …pported_architectures/test_pretrain_model_container.py | 15 | CODE | |
| 684 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/unit/test_weight_processing.py | 743 | except KeyError: | CODE |
| HIGH | tests/unit/test_generate_no_tokenizer.py | 164 | except AssertionError: | CODE |
| HIGH | tests/unit/model_bridge/test_component_hooks_fire.py | 162 | except AttributeError: | CODE |
| HIGH | …ts/integration/model_bridge/test_bridge_integration.py | 654 | except Exception: | CODE |
| HIGH | …model_bridge/compatibility/test_legacy_api_coverage.py | 100 | except Exception: | CODE |
| HIGH | …model_bridge/compatibility/test_legacy_api_coverage.py | 165 | except AttributeError: | CODE |
| HIGH | …model_bridge/compatibility/test_legacy_api_coverage.py | 202 | except Exception: | CODE |
| HIGH | tests/benchmarks/test_boot_memory.py | 28 | except FileNotFoundError: | CODE |
| HIGH | …tools/adapter_builder/scripts/validate-adapter-deep.py | 200 | except Exception: | CODE |
| HIGH | scripts/inspect_parity_report.py | 143 | except Exception: | CODE |
| HIGH | scripts/vllm_parity_report.py | 211 | except Exception: | CODE |
| HIGH | transformer_lens/weight_processing.py | 1301 | except ValueError: | CODE |
| HIGH | transformer_lens/weight_processing.py | 1337 | except ValueError: | CODE |
| HIGH | transformer_lens/tools/analysis/direct_path_patching.py | 101 | except (AttributeError, TypeError): | CODE |
| HIGH | transformer_lens/tools/model_registry/hf_scraper.py | 106 | except (ValueError, TypeError): | CODE |
| HIGH | transformer_lens/tools/model_registry/hf_scraper.py | 115 | except (ValueError, TypeError): | CODE |
| HIGH | transformer_lens/tools/model_registry/hf_scraper.py | 126 | except (ValueError, TypeError): | CODE |
| HIGH | transformer_lens/tools/model_registry/verify_models.py | 488 | except Exception: | CODE |
| HIGH | transformer_lens/tools/model_registry/verify_models.py | 1405 | except ImportError: | CODE |
| HIGH | transformer_lens/tools/model_registry/verify_models.py | 877 | except OSError: | CODE |
| HIGH | transformer_lens/config/transformer_lens_config.py | 146 | except (ValueError, TypeError): | CODE |
| HIGH | transformer_lens/model_bridge/architecture_adapter.py | 821 | except Exception: | CODE |
| HIGH | transformer_lens/model_bridge/architecture_adapter.py | 874 | except Exception: | CODE |
| HIGH | transformer_lens/model_bridge/bridge_core.py | 741 | except AttributeError: | CODE |
| HIGH | transformer_lens/model_bridge/bridge_core.py | 240 | except AttributeError: | CODE |
| HIGH | transformer_lens/model_bridge/bridge_core.py | 1536 | except: | CODE |
| HIGH | transformer_lens/model_bridge/transformer_bridge.py | 346 | except Exception: | CODE |
| HIGH | transformer_lens/model_bridge/transformer_bridge.py | 503 | except AttributeError: | CODE |
| HIGH | transformer_lens/model_bridge/transformer_bridge.py | 4336 | except (AttributeError, TypeError): | CODE |
| HIGH | transformer_lens/model_bridge/transformer_bridge.py | 4369 | except (AttributeError, TypeError): | CODE |
| HIGH | transformer_lens/model_bridge/driver_protocol.py | 122 | except (BufferError, RuntimeError, ValueError, TypeError, AttributeError): | CODE |
| HIGH | transformer_lens/model_bridge/remote_bridge.py | 261 | except Exception: | CODE |
| HIGH | transformer_lens/model_bridge/get_params_util.py | 57 | except (StopIteration, TypeError, AttributeError): | CODE |
| HIGH | …_lens/model_bridge/supported_architectures/pretrain.py | 226 | except AttributeError: | CODE |
| HIGH | …r_lens/model_bridge/supported_architectures/openelm.py | 154 | except NotImplementedError: | CODE |
| HIGH | …rmer_lens/model_bridge/supported_architectures/gidd.py | 146 | except Exception: | CODE |
| HIGH | …er_lens/model_bridge/supported_architectures/laguna.py | 109 | except ImportError: | CODE |
| HIGH | …_lens/model_bridge/supported_architectures/baichuan.py | 298 | except Exception: | CODE |
| HIGH | …_lens/model_bridge/supported_architectures/hrm_text.py | 197 | except (KeyError, AttributeError): | CODE |
| HIGH | transformer_lens/model_bridge/sources/_hf_format.py | 120 | except (TypeError, ValueError): | CODE |
| HIGH | transformer_lens/model_bridge/sources/_hf_format.py | 140 | except (TypeError, ValueError, AttributeError): | CODE |
| HIGH | transformer_lens/model_bridge/sources/_hf_format.py | 156 | except (TypeError, ValueError, AttributeError): | CODE |
| HIGH | transformer_lens/model_bridge/sources/_hf_format.py | 163 | except (TypeError, ValueError, AttributeError): | CODE |
| HIGH | …mer_lens/model_bridge/sources/inspect/vllm_provider.py | 428 | except Exception: | CODE |
| HIGH | …mer_lens/model_bridge/sources/inspect/vllm_provider.py | 434 | except Exception: | CODE |
| HIGH | transformer_lens/model_bridge/sources/inspect/driver.py | 197 | except Exception: | CODE |
| HIGH | …rmer_lens/model_bridge/sources/transformers/helpers.py | 83 | except Exception: | CODE |
| HIGH | …rmer_lens/model_bridge/sources/transformers/helpers.py | 133 | except Exception: | CODE |
| HIGH | …_lens/model_bridge/generalized_components/embedding.py | 79 | except StopIteration: | CODE |
| HIGH | …ormer_lens/model_bridge/generalized_components/base.py | 246 | except AttributeError: | CODE |
| HIGH | …ormer_lens/model_bridge/generalized_components/base.py | 228 | except AttributeError: | CODE |
| HIGH | …ormer_lens/model_bridge/generalized_components/base.py | 452 | except AttributeError: | CODE |
| HIGH | …ormer_lens/model_bridge/generalized_components/base.py | 497 | except AttributeError: | CODE |
| HIGH | transformer_lens/utilities/exploratory_utils.py | 163 | except ModuleNotFoundError: | CODE |
| HIGH | transformer_lens/utilities/hf_utils.py | 231 | except FileNotFoundError: | CODE |
| HIGH | transformer_lens/utilities/attn_implementation.py | 28 | except Exception: | CODE |
| HIGH | transformer_lens/utilities/multi_gpu.py | 333 | except StopIteration: | CODE |
| HIGH | transformer_lens/benchmarks/main_benchmark.py | 105 | except Exception: | CODE |
| HIGH | transformer_lens/benchmarks/main_benchmark.py | 1770 | except Exception: | CODE |
| HIGH | transformer_lens/benchmarks/main_benchmark.py | 466 | except Exception: | CODE |
| 17 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/source/content/contributing.md | 188 | 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 | 524 | Evaluate a model on the MMLU benchmark. MMLU (Massive Multitask Language Understanding) is a benchmark for evaluati | STRING |
| HIGH | transformer_lens/ActivationCache.py | 388 | Accumulated Residual Stream. Returns the accumulated residual stream at each layer/sub-layer. This is useful fo | STRING |
| HIGH | transformer_lens/ActivationCache.py | 893 | Materialize SSM effective attention for one or all SSM layers, any family. The single discovery surface for eff | STRING |
| HIGH | transformer_lens/ActivationCache.py | 953 | Reconstruct the recurrent SSM state ``S`` from this cache. The single discovery surface for recurrent state acr | STRING |
| HIGH | transformer_lens/weight_processing.py | 171 | 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 | 195 | Compute Direct Logit Attribution for a prompt. Decomposes the contribution of model components to the logit of | STRING |
| HIGH | …/tools/analysis/jacobian_lens_causal_swap_benchmark.py | 325 | Runs one causal-swap trial: baseline, then real and control coordinate-patch conditions. A baseline forward pass sc | STRING |
| HIGH | …mer_lens/tools/analysis/jacobian_lens_decomposition.py | 380 | Greedily decompose ``x`` into a ``k``-sparse nonnegative combination of atoms. Args: x: Target vector, shap | STRING |
| HIGH | …mer_lens/tools/analysis/jacobian_lens_decomposition.py | 571 | Estimate how many dictionary atoms are meaningfully active in ``x``. Runs the projection-residual recurrence descri | STRING |
| HIGH | transformer_lens/tools/analysis/jacobian_lens.py | 469 | 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 | 612 | 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 | 722 | 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 | 908 | Decompose an activation into its J-space content at ``layer``. ``activation_or_prompt`` is either: - a | STRING |
| HIGH | transformer_lens/tools/analysis/jacobian_lens.py | 1120 | Profile the J-space share of activation variance over a prompt corpus. Each prompt is run once (caching ``block | STRING |
| HIGH | transformer_lens/tools/analysis/jacobian_lens.py | 1534 | Hooks that anchor-patch one J-space coordinate live, per forward-pass position. Unlike :meth:`coordinate_patch` | STRING |
| HIGH | transformer_lens/tools/analysis/jacobian_lens.py | 1655 | Fit a Jacobian lens on a hooked model. Implements the reference estimator exactly. For each prompt: one forward | STRING |
| HIGH | transformer_lens/tools/analysis/jacobian_lens.py | 2158 | Estimator-independent J-lens drive loop. Owns the mechanics shared by every estimator: the frozen-parameter lif | STRING |
| HIGH | transformer_lens/tools/analysis/svd_circuits.py | 388 | Decompose a head's QK (``W_Q W_K^T``) and/or OV (``W_V W_O``) maps via SVD. Weight-space only: this reads the head' | STRING |
| HIGH | transformer_lens/tools/analysis/svd_circuits.py | 534 | Project the top-k OV output directions through the unembedding. Requires ``head_svd.which == "OV"``: QK produces no | STRING |
| HIGH | transformer_lens/tools/analysis/svd_circuits.py | 595 | Signed logit effect of one OV direction's rank-1 reconstruction on the given tokens. Pure weight-space computation: | STRING |
| HIGH | transformer_lens/tools/analysis/svd_circuits.py | 665 | Project a head's actual per-position output onto its OV singular directions. Requires ``head_svd.which == "OV"``: t | STRING |
| HIGH | transformer_lens/tools/analysis/svd_circuits.py | 860 | Causally validate a claimed OV subfunction by reconstructing the head's output onto it. Requires ``head_svd.which = | STRING |
| HIGH | transformer_lens/tools/analysis/sparse_probing.py | 777 | Fit a train-only-selected k-sparse binary logistic probe. The stratified split is created before feature scoring or | STRING |
| HIGH | transformer_lens/tools/analysis/sparse_probing.py | 875 | Fit sparse probes and optional controls over one fixed train/test split. ``ks`` must contain strictly increasing po | STRING |
| HIGH | transformer_lens/tools/analysis/projection_kernel.py | 213 | Extract an explicitly ranked orthonormal column-space basis. Low-precision inputs are promoted to float32 before th | STRING |
| HIGH | transformer_lens/tools/analysis/logit_lens.py | 418 | Read ``d_model`` vectors through the model's final norm and unembedding. Computes ``transform(ln_final(x) @ W_U + b | STRING |
| HIGH | …_lens/tools/analysis/jacobian_lens_coordinate_patch.py | 357 | Edit one sparse J-space coordinate while preserving its recovered frame. ``substitute`` zeros the source and replac | STRING |
| HIGH | …_lens/tools/analysis/jacobian_lens_coordinate_patch.py | 508 | Apply :func:`solve_coordinate_patch` independently to every ``(batch, position)`` pair. ``activations`` holds one a | STRING |
| HIGH | transformer_lens/tools/analysis/attribution_patching.py | 372 | Enumerate the full node-granularity graph from the Bridge hook graph. The graph is *explicit*: for ``n_layers`` lay | STRING |
| HIGH | transformer_lens/tools/analysis/attribution_patching.py | 457 | Enumerate every writer -> reader edge in the residual-stream graph. At a fixed sequence position, the residual stre | STRING |
| HIGH | transformer_lens/tools/analysis/attribution_patching.py | 856 | Estimate every component's causal effect on ``metric_fn`` in two forwards + one backward. For each clean/corrupt pa | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 43 | 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 | 136 | Get a list of supported models. Args: architecture: Filter by architecture ID (e.g., "GPT2LMHeadModel"). | STRING |
| HIGH | transformer_lens/tools/model_registry/api.py | 170 | 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 | 203 | 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 | 225 | 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 | 249 | 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 | 270 | 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 | 333 | 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 | 432 | 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 | 595 | 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 | 244 | Parameter count for this model: published metadata first, else a config estimate. Fetches only metadata and the con | 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 TransformerLens model. Args: model: TransformerLens model with tokenizer. | 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 | 379 | 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 | 503 | Get the generalized component (bridge component) for a given TransformerLens path. Args: path: The | STRING |
| HIGH | transformer_lens/model_bridge/architecture_adapter.py | 576 | 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 | 633 | Translate a TransformerLens path to a remote model path. Args: path: The TransformerLens path to tr | STRING |
| HIGH | transformer_lens/model_bridge/transformer_bridge.py | 1206 | 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/transformer_bridge.py | 4142 | Prepare multimodal inputs using the model's processor. Converts text and images into model-ready tensors (input | STRING |
| HIGH | …l_bridge/generalized_components/joint_qkv_attention.py | 465 | 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 | 225 | 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 | 147 | 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/utilities/parameter_swap.py | 23 | Swap a parameter's value in place and restore it on exit, even on error. The parameter object is never replaced, so | STRING |
| 2 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/unit/test_patching.py | 265 | assert df.equals(flat.index_df) | CODE |
| HIGH | tests/unit/tools/test_jacobian_lens_coordinate_patch.py | 548 | # (near-null) direction of the atom1/atom2 pair, so recovering it needs the amplifying inverse. | COMMENT |
| HIGH⚡ | tests/integration/model_bridge/test_exaone4_adapter.py | 100 | The 1.2B fixture above is non-hybrid (sliding_window=null, RoPE everywhere) | STRING |
| HIGH⚡ | docs/make_docs.py | 268 | if (n === null || n === undefined) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 268 | if (n === null || n === undefined) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 277 | const d = cfg.hidden_size || cfg.n_embd || cfg.d_model; | CODE |
| HIGH⚡ | docs/make_docs.py | 278 | const L = cfg.num_hidden_layers || cfg.n_layer || cfg.num_layers; | CODE |
| HIGH⚡ | docs/make_docs.py | 280 | const dff = cfg.intermediate_size || cfg.d_ff; | CODE |
| HIGH⚡ | docs/make_docs.py | 281 | if (!d || !L) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 289 | if (cfg.rms_norm_eps !== undefined) return 'RMSNorm'; | CODE |
| HIGH⚡ | docs/make_docs.py | 290 | if (cfg.layer_norm_epsilon !== undefined || cfg.layer_norm_eps !== undefined) return 'LayerNorm'; | CODE |
| HIGH⚡ | docs/make_docs.py | 290 | if (cfg.layer_norm_epsilon !== undefined || cfg.layer_norm_eps !== undefined) return 'LayerNorm'; | CODE |
| HIGH⚡ | docs/make_docs.py | 291 | if (cfg.norm_eps !== undefined) return 'LayerNorm'; | CODE |
| HIGH⚡ | docs/make_docs.py | 292 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 297 | if (cfg.rope_theta || cfg.rope_parameters || cfg.rope_scaling || | CODE |
| HIGH⚡ | docs/make_docs.py | 298 | cfg.rotary_pct || cfg.rotary_dim || cfg.rotary_emb_base) return 'Rotary (RoPE)'; | CODE |
| HIGH⚡ | docs/make_docs.py | 299 | if (cfg.partial_rotary_factor !== undefined) return 'Partial Rotary (RoPE)'; | CODE |
| HIGH⚡ | docs/make_docs.py | 301 | if (cfg.alibi || cfg.position_embedding_type === 'alibi') return 'ALiBi'; | CODE |
| HIGH⚡ | docs/make_docs.py | 303 | if (cfg.relative_attention_num_buckets !== undefined) return 'Relative Bias (T5)'; | CODE |
| HIGH⚡ | docs/make_docs.py | 307 | if (cfg.max_position_embeddings || cfg.n_positions) return 'Learned'; | CODE |
| HIGH⚡ | docs/make_docs.py | 308 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 313 | if (cfg.parallel_attn !== undefined) return cfg.parallel_attn; | CODE |
| HIGH⚡ | docs/make_docs.py | 318 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 333 | if (cfg.feed_forward_proj && cfg.feed_forward_proj.includes('gated')) return true; | CODE |
| HIGH⚡ | docs/make_docs.py | 337 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 343 | if (t === null || t === undefined) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 343 | if (t === null || t === undefined) return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 346 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 424 | if (def !== null) return def; | CODE |
| HIGH⚡ | docs/make_docs.py | 426 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 433 | return est ? fmtParam(est) + ' (est.)' : null; | CODE |
| HIGH⚡ | docs/make_docs.py | 440 | if (cfg[k] !== undefined && cfg[k] !== null) return cfg[k]; | CODE |
| HIGH⚡ | docs/make_docs.py | 440 | if (cfg[k] !== undefined && cfg[k] !== null) return cfg[k]; | CODE |
| HIGH⚡ | docs/make_docs.py | 442 | return null; | CODE |
| HIGH⚡ | docs/make_docs.py | 486 | if (raw === null || raw === undefined) continue; | CODE |
| HIGH⚡ | docs/make_docs.py | 486 | if (raw === null || raw === undefined) continue; | CODE |
| HIGH⚡ | docs/make_docs.py | 492 | if (raw && typeof raw === 'object') { | CODE |
| HIGH⚡ | docs/make_docs.py | 669 | const aN = (va === null || va === undefined || va === ''); | CODE |
| HIGH⚡ | docs/make_docs.py | 670 | const bN = (vb === null || vb === undefined || vb === ''); | CODE |
| HIGH⚡ | docs/make_docs.py | 671 | if (aN && bN) return 0; | CODE |
| HIGH | docs/make_docs.py | 228 | let all=[], filt=[], pg=1, dt=null, sortCol='', sortDir='asc'; | CODE |
| HIGH | docs/make_docs.py | 389 | const classDefaults = (cls && TOKENIZER_CLASS_DEFAULTS[cls]) || {}; | CODE |
| HIGH | docs/make_docs.py | 394 | return null; | CODE |
| HIGH | docs/make_docs.py | 411 | if (tok[k] !== undefined && tok[k] !== null) { | CODE |
| HIGH | docs/make_docs.py | 411 | if (tok[k] !== undefined && tok[k] !== null) { | CODE |
| HIGH | docs/make_docs.py | 473 | if (val === null || val === undefined) continue; | CODE |
| HIGH | docs/make_docs.py | 473 | if (val === null || val === undefined) continue; | CODE |
| HIGH | docs/make_docs.py | 529 | if (nextRow && nextRow.classList.contains('bt-detail-row')) { | CODE |
| HIGH | docs/make_docs.py | 547 | const tok = tokResult.ok ? tokResult.tok : null; | CODE |
| HIGH | docs/make_docs.py | 588 | if (pinned.length && rest.length) { | CODE |
| HIGH | docs/make_docs.py | 594 | if (cur && pc[cur]) sel.value = cur; else sel.value = ''; | CODE |
| HIGH | docs/make_docs.py | 634 | if (a && m.architecture_id !== a) return false; | CODE |
| HIGH | docs/make_docs.py | 635 | if (pf && getPrefix(m.model_id) !== pf) return false; | CODE |
| HIGH | docs/make_docs.py | 697 | const qs = p.toString(); | CODE |
| HIGH | docs/make_docs.py | 698 | history.replaceState(null, '', qs ? '?' + qs : location.pathname); | CODE |
| HIGH | docs/make_docs.py | 766 | const pages=[1]; if(tp>1) pages.push(tp); | CODE |
| HIGH | docs/make_docs.py | 767 | 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/transformer_bridge.py | 3265 | # reject the paths whose cache would be wrong/undefined, with a clear pointer to the | COMMENT |
| HIGH | transformer_lens/utilities/statistics.py | 131 | hits = _count_hits(null, observed, alternative) | CODE |
| HIGH | transformer_lens/utilities/statistics.py | 142 | hits_total = hits_total + _count_hits(null, observed, alternative) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/goldens.py | 71 | except Exception: | CODE |
| LOW | tests/unit/model_bridge/test_component_hooks_fire.py | 47 | except Exception: | CODE |
| LOW | tests/unit/model_bridge/test_hook_alias_resolution.py | 97 | 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 | 336 | except Exception as e: | CODE |
| LOW | …ts/integration/model_bridge/test_bridge_integration.py | 654 | except Exception: | CODE |
| LOW | …model_bridge/compatibility/test_legacy_api_coverage.py | 38 | except Exception as e: | CODE |
| LOW | …model_bridge/compatibility/test_legacy_api_coverage.py | 100 | except Exception: | CODE |
| LOW | …model_bridge/compatibility/test_legacy_api_coverage.py | 143 | except Exception as e: | CODE |
| LOW | …model_bridge/compatibility/test_legacy_api_coverage.py | 202 | except Exception: | CODE |
| LOW | …model_bridge/compatibility/test_legacy_api_coverage.py | 267 | except Exception as e: | CODE |
| LOW | …model_bridge/compatibility/test_legacy_api_coverage.py | 308 | except Exception as e: | 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 | tests/benchmarks/test_boot_memory.py | 37 | except Exception: | CODE |
| LOW | devtools/adapter_builder/agents/ops.sh | 77 | except Exception: | CODE |
| LOW | devtools/adapter_builder/agents/watch-completion.sh | 87 | except Exception: | CODE |
| LOW | devtools/adapter_builder/agents/watch-completion.sh | 115 | except Exception: | CODE |
| LOW | devtools/adapter_builder/agents/watch-completion.sh | 133 | except Exception: | CODE |
| LOW | devtools/adapter_builder/agents/solo-coordinator.sh | 206 | except Exception: | CODE |
| LOW | devtools/adapter_builder/agents/solo-coordinator.sh | 216 | except Exception: | CODE |
| LOW | …pter_builder/agents/hooks/gate-reviewer-writes-file.sh | 70 | except Exception: | CODE |
| LOW | …pter_builder/agents/hooks/gate-reviewer-writes-file.sh | 88 | except Exception: | CODE |
| LOW | …ls/adapter_builder/agents/hooks/guard-verify-models.sh | 93 | except Exception: | CODE |
| LOW | devtools/adapter_builder/scripts/format-timeline.py | 67 | except Exception: | CODE |
| LOW | …tools/adapter_builder/scripts/validate-adapter-deep.py | 126 | except Exception: | CODE |
| LOW | …tools/adapter_builder/scripts/validate-adapter-deep.py | 200 | except Exception: | CODE |
| MEDIUM | …tools/adapter_builder/scripts/validate-adapter-deep.py | 237 | print(f"Error importing TransformerLens: {e}", file=sys.stderr) | CODE |
| MEDIUM | …tools/adapter_builder/scripts/validate-adapter-deep.py | 243 | print(f"Error: {args.architecture} not found in SUPPORTED_ARCHITECTURES", file=sys.stderr) | CODE |
| LOW | …tools/adapter_builder/scripts/validate-adapter-deep.py | 265 | except Exception as e: | CODE |
| MEDIUM | …tools/adapter_builder/scripts/validate-adapter-deep.py | 266 | print(f"Error creating adapter: {e}", file=sys.stderr) | CODE |
| LOW | …tools/adapter_builder/scripts/validate-architecture.py | 79 | except Exception: | CODE |
| LOW | scripts/bridge_multi_device_parity.py | 112 | except Exception as exc: # gated repo, OOM, unsupported arch -> SKIP with reason | CODE |
| LOW | scripts/inspect_parity_report.py | 135 | except Exception as e: # download/gating/locate failures are not parity failures | CODE |
| LOW | scripts/inspect_parity_report.py | 143 | except Exception: | CODE |
| LOW⚡ | scripts/vllm_parity_report.py | 193 | except Exception as e: # logit synth is best-effort; don't fail parity on it | CODE |
| LOW⚡ | scripts/vllm_parity_report.py | 203 | except Exception as e: # download/gating/OOM/vLLM-unavailable are not parity failures | CODE |
| LOW⚡ | scripts/vllm_parity_report.py | 211 | except Exception: | CODE |
| LOW | scripts/vllm_parity_report.py | 231 | except Exception as e: | CODE |
| LOW | scripts/phase4_rerun.py | 169 | except Exception: | CODE |
| LOW | scripts/phase4_rerun.py | 183 | except Exception: | CODE |
| LOW | scripts/phase4_rerun.py | 321 | except Exception as exc: # a corrupt cache must not stop verification | CODE |
| LOW | scripts/phase4_rerun.py | 353 | except Exception as exc: | CODE |
| LOW | scripts/phase4_rerun.py | 852 | except Exception: | CODE |
| MEDIUM | scripts/phase4_rerun.py | 331 | def free_bytes(self) -> float: | CODE |
| LOW⚡ | scripts/text_quality_judge_bakeoff.py | 206 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | transformer_lens/evals.py | 235 | except Exception as e: | CODE |
| LOW | transformer_lens/tools/model_registry/registry_io.py | 218 | except Exception: | CODE |
| LOW | transformer_lens/tools/model_registry/registry_io.py | 418 | except Exception: | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 275 | except Exception as exc: # pragma: no cover — network/transient | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 312 | except Exception as exc: # pragma: no cover — network/transient | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 594 | except Exception as exc: | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 631 | except Exception as e: | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 659 | 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 | 1040 | except Exception as e: | CODE |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 235 | except Exception: | CODE |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 488 | except Exception: | CODE |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 971 | except Exception as e: | CODE |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 1099 | except Exception as e: | CODE |
| 127 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/test_activation_cache.py | 552 | CODE | |
| LOW | tests/unit/tools/test_jacobian_lens_decomposition.py | 248 | CODE | |
| LOW | tests/unit/tools/conftest.py | 151 | CODE | |
| LOW | tests/unit/tools/test_attribution_patching.py | 141 | CODE | |
| LOW | tests/unit/factored_matrix/test_get_item.py | 218 | CODE | |
| LOW | tests/unit/model_bridge/test_batched_moe_fold_ln.py | 115 | CODE | |
| LOW | tests/unit/model_bridge/test_fused_qkv_fold_ln.py | 239 | CODE | |
| LOW | tests/unit/model_bridge/test_boot_native.py | 596 | CODE | |
| LOW | tests/unit/model_bridge/test_boot_native.py | 904 | CODE | |
| LOW | tests/unit/model_bridge/test_component_hooks_fire.py | 123 | CODE | |
| LOW | tests/unit/model_bridge/test_hook_alias_resolution.py | 92 | CODE | |
| LOW | tests/unit/model_bridge/test_inspect_driver.py | 833 | CODE | |
| LOW | tests/unit/benchmarks/test_text_quality_scoring.py | 293 | CODE | |
| LOW | tests/unit/benchmarks/test_text_quality_scoring.py | 569 | CODE | |
| LOW | …tils/conversion_steps/test_repeat_tensor_conversion.py | 33 | CODE | |
| LOW | tests/integration/test_hook_shape_compatibility.py | 122 | CODE | |
| LOW | …tegration/model_bridge/test_optimizer_compatibility.py | 119 | CODE | |
| LOW | …ion/model_bridge/test_encdec_weight_stacking_parity.py | 42 | CODE | |
| LOW | …ce/model_bridge/compatibility/test_activation_cache.py | 61 | CODE | |
| LOW | tests/benchmarks/test_boot_memory.py | 16 | CODE | |
| LOW | devtools/adapter_builder/scripts/format-timeline.py | 25 | CODE | |
| LOW | …tools/adapter_builder/scripts/validate-adapter-deep.py | 23 | CODE | |
| LOW | …tools/adapter_builder/scripts/validate-adapter-deep.py | 90 | CODE | |
| LOW | …tools/adapter_builder/scripts/validate-adapter-deep.py | 144 | CODE | |
| LOW | devtools/adapter_builder/scripts/analyze-hf-model.py | 138 | CODE | |
| LOW | scripts/bridge_multi_device_parity.py | 53 | CODE | |
| LOW | scripts/inspect_parity_report.py | 83 | CODE | |
| LOW | scripts/vllm_parity_report.py | 106 | CODE | |
| LOW | scripts/phase4_rerun.py | 504 | CODE | |
| LOW | transformer_lens/HookedRootModule.py | 447 | CODE | |
| LOW | transformer_lens/patching.py | 262 | CODE | |
| LOW | transformer_lens/ActivationCache.py | 204 | CODE | |
| LOW | transformer_lens/ActivationCache.py | 1251 | CODE | |
| LOW | transformer_lens/ActivationCache.py | 1497 | CODE | |
| LOW | transformer_lens/weight_processing.py | 109 | CODE | |
| LOW | transformer_lens/weight_processing.py | 320 | CODE | |
| LOW | transformer_lens/weight_processing.py | 475 | CODE | |
| LOW | transformer_lens/weight_processing.py | 626 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1076 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1176 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1453 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1626 | CODE | |
| LOW | transformer_lens/weight_processing.py | 1931 | CODE | |
| LOW | transformer_lens/weight_processing.py | 2065 | CODE | |
| LOW | transformer_lens/weight_processing.py | 2149 | CODE | |
| LOW | transformer_lens/tools/analysis/jacobian_lens.py | 1109 | CODE | |
| LOW | transformer_lens/tools/analysis/logit_lens.py | 406 | CODE | |
| LOW | transformer_lens/tools/analysis/logit_lens.py | 212 | CODE | |
| LOW | …_lens/tools/analysis/jacobian_lens_coordinate_patch.py | 494 | CODE | |
| LOW | transformer_lens/tools/analysis/attribution_patching.py | 849 | CODE | |
| LOW | transformer_lens/tools/analysis/attribution_patching.py | 100 | CODE | |
| LOW | transformer_lens/tools/model_registry/registry_io.py | 279 | CODE | |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 86 | CODE | |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 132 | CODE | |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 246 | CODE | |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 320 | CODE | |
| LOW | transformer_lens/tools/model_registry/validate.py | 207 | CODE | |
| LOW | transformer_lens/tools/model_registry/validate.py | 594 | CODE | |
| LOW | …ansformer_lens/tools/model_registry/generate_report.py | 187 | CODE | |
| LOW | …ansformer_lens/tools/model_registry/generate_report.py | 212 | CODE | |
| 106 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/unit/test_hook_points.py | 129 | # Create a test hook conversion | COMMENT |
| MEDIUM⚡ | tests/unit/test_hook_points.py | 137 | # Create a simple test module that uses HookPoint | COMMENT |
| MEDIUM | tests/unit/test_hook_points.py | 178 | # Create a test hook conversion | COMMENT |
| MEDIUM | tests/unit/test_hook_points.py | 445 | # Create a complex setup with multiple hooks | COMMENT |
| MEDIUM | tests/unit/test_weight_processing.py | 761 | # 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 | 181 | # Create a mock linear layer for testing | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 200 | # 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 | 223 | # Create a hook that returns the input | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 264 | # Create a mock linear layer for testing | COMMENT |
| MEDIUM | …dge/generalized_components/test_joint_qkv_attention.py | 283 | # 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 | 306 | # 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 | 26 | # Create a real cache entry with 0 positions | COMMENT |
| MEDIUM | tests/unit/utilities/test_cache.py | 41 | # Create a real cache entry with 1 position | COMMENT |
| MEDIUM | tests/unit/utilities/test_cache.py | 56 | # Create a real cache entry with multiple positions | COMMENT |
| MEDIUM | tests/unit/utilities/test_cache.py | 71 | # Create a real cache entry with many positions | COMMENT |
| MEDIUM | …ts/integration/model_bridge/test_bridge_integration.py | 189 | # Create a custom QKV conversion rule | COMMENT |
| MEDIUM | …ts/integration/model_bridge/test_bridge_integration.py | 577 | # Create a simple backward hook that tracks if it was called | COMMENT |
| MEDIUM | …model_bridge/compatibility/test_legacy_api_coverage.py | 289 | # Create a longer prompt (but not too long to avoid timeouts) | COMMENT |
| MEDIUM | transformer_lens/hook_points.py | 224 | # Create a simple wrapper that acts like a HookPoint but with a different name | COMMENT |
| MEDIUM | transformer_lens/hook_points.py | 228 | # Create a view of this HookPoint with the alias name | COMMENT |
| MEDIUM | transformer_lens/patching.py | 489 | # Create an empty tensor to show the patched metric for each patch | 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 | 369 | # Create a new parameter from the weight tensor | 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_attribution_patching.py | 979 | def set_use_attn_result(self, use_attn_result: bool) -> None: | CODE |
| LOW⚡ | tests/unit/tools/test_attribution_patching.py | 982 | def set_use_split_qkv_input(self, use_split_qkv_input: bool) -> None: | CODE |
| LOW⚡ | tests/unit/tools/test_attribution_patching.py | 987 | def set_use_hook_mlp_in(self, use_hook_mlp_in: bool) -> None: | CODE |
| LOW⚡ | tests/unit/tools/test_attribution_patching.py | 990 | def set_use_attn_in(self, use_attn_in: bool) -> None: | CODE |
| LOW⚡ | tests/unit/tools/test_attribution_patching.py | 1459 | def set_use_attn_result(self, use_attn_result: bool) -> None: | CODE |
| LOW⚡ | tests/unit/tools/test_attribution_patching.py | 1462 | def set_use_split_qkv_input(self, use_split_qkv_input: bool) -> None: | CODE |
| LOW⚡ | tests/unit/tools/test_attribution_patching.py | 1465 | def set_use_hook_mlp_in(self, use_hook_mlp_in: bool) -> None: | CODE |
| LOW | …bridge/supported_architectures/test_smollm3_adapter.py | 116 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …ridge/supported_architectures/test_lfm2_moe_adapter.py | 124 | def set_rotary_emb(self, pos_emb: object) -> None: | CODE |
| LOW | …ridge/supported_architectures/test_stablelm_adapter.py | 128 | 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 | 74 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …l_bridge/supported_architectures/test_olmo2_adapter.py | 97 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …bridge/supported_architectures/test_mixtral_adapter.py | 110 | 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 | 114 | 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 | 93 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …el_bridge/supported_architectures/test_ouro_adapter.py | 73 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …ridge/supported_architectures/test_glm4_moe_adapter.py | 50 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …el_bridge/supported_architectures/test_neox_adapter.py | 79 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | …l_bridge/supported_architectures/test_olmoe_adapter.py | 118 | def set_rotary_emb(self, rotary_emb: object) -> None: | CODE |
| LOW | transformer_lens/__init__.py | 100 | __all__ = [ | CODE |
| LOW | transformer_lens/tools/__init__.py | 20 | __all__ = ["analysis", "model_registry", "training"] | CODE |
| LOW | transformer_lens/tools/analysis/__init__.py | 135 | __all__ = [ | CODE |
| LOW | transformer_lens/tools/model_registry/registry_io.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 66 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/tools/model_registry/__init__.py | 392 | __all__ = [ | CODE |
| LOW | transformer_lens/tools/model_registry/api.py | 32 | 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 | 71 | logger = logging.getLogger(__name__) | CODE |
| LOW | transformer_lens/lit/__init__.py | 63 | __all__ = [ | CODE |
| LOW | transformer_lens/lit/__init__.py | 86 | 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/transformer_bridge_config.py | 260 | def _set_bridge_managed_hook_flag(self, name: str, value: bool) -> None: | CODE |
| LOW | transformer_lens/config/__init__.py | 7 | __all__ = ["TransformerBridgeConfig", "TransformerLensConfig"] | CODE |
| LOW | transformer_lens/model_bridge/architecture_adapter.py | 254 | def _set_rms_rotary_defaults(self, *, final_rms: bool = True, gated: bool = True) -> None: | CODE |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 281 | def _set_processed_weight_attributes(self) -> None: | CODE |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 615 | def set_compatibility_mode(component: Any) -> None: | CODE |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 642 | def _setup_hook_compatibility(self) -> None: | CODE |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 4324 | def set_use_hook_mlp_in(self, use_hook_mlp_in: bool) -> None: | CODE |
| LOW | transformer_lens/model_bridge/bridge.py | 14 | __all__ = ["BridgeCore", "RemoteBridge", "TransformerBridge"] | CODE |
| LOW | transformer_lens/model_bridge/__init__.py | 37 | __all__ = [ | CODE |
| LOW | transformer_lens/model_bridge/driver_protocol.py | 218 | __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 | 80 | def set_original_component(self, component: torch.nn.Module) -> None: | CODE |
| LOW | …r_lens/model_bridge/supported_architectures/apertus.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | …r_lens/model_bridge/supported_architectures/gemma3n.py | 39 | def set_processed_weights(self, weights, verbose: bool = False) -> None: | 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 | 230 | def set_original_component(self, original_component: torch.nn.Module) -> None: | CODE |
| LOW | …_lens/model_bridge/supported_architectures/__init__.py | 322 | __all__ = [ | CODE |
| LOW | …mer_lens/model_bridge/supported_architectures/qwen3.py | 43 | def _setup_qwen3_config(self, cfg: Any) -> None: | CODE |
| LOW | …ns/model_bridge/supported_architectures/olmo_hybrid.py | 58 | def set_original_component(self, original_component: nn.Module) -> None: | CODE |
| LOW | …r_lens/model_bridge/supported_architectures/granite.py | 54 | def _setup_common_config(self, cfg: Any) -> None: | CODE |
| LOW | transformer_lens/model_bridge/sources/__init__.py | 20 | __all__ = [ | CODE |
| LOW | …ormer_lens/model_bridge/sources/transformers_driver.py | 99 | def set_underlying_model(self, value: nn.Module) -> None: | CODE |
| 34 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/tiny_checkpoints.py | 21 | FP32_NOISE_TOL = 1e-2 if _MACOS_ARM64 else 1e-5 | COMMENT |
| LOW | tests/integration/test_jacobian_lens.py | 661 | tokens = model.to_tokens(PROMPT) | COMMENT |
| LOW | docs/make_docs.py | 101 | #bt-root thead th { | COMMENT |
| LOW | docs/make_docs.py | 121 | #bt-root .bt-muted { color: var(--color-foreground-muted, #999); } | COMMENT |
| LOW | docs/source/_static/adapter-template.py | 81 | } | COMMENT |
| LOW | devtools/adapter_builder/agents/launch.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/launch.sh | 21 | # [--worktree-dir <path>] Where to create the worktree (default: $WORKTREE_BASE/<new-branch>) | COMMENT |
| LOW | devtools/adapter_builder/agents/launch.sh | 181 | || err "--target-repo '$TARGET_REPO' is not a git repository." | COMMENT |
| LOW | devtools/adapter_builder/agents/launch.sh | 201 | FACTORY_REL="transformer_lens/factories/architecture_adapter_factory.py" | COMMENT |
| LOW | devtools/adapter_builder/agents/launch.sh | 581 | COMMENT | |
| LOW | devtools/adapter_builder/agents/check-signals.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/ops.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/ops.sh | 41 | COMMENT | |
| LOW | devtools/adapter_builder/agents/ops.sh | 501 | # a bracketed paste, which stages them as `[Pasted text #1]` and swallows | COMMENT |
| LOW | devtools/adapter_builder/agents/progress.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/watch-completion.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/watch-completion.sh | 21 | # | COMMENT |
| LOW | devtools/adapter_builder/agents/solo-coordinator.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/solo-coordinator.sh | 21 | # *-approved, *-changes-N → programmer (proceed / address review) | COMMENT |
| LOW | devtools/adapter_builder/agents/launch-solo-pair.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/launch-solo-pair.sh | 21 | # Options: | COMMENT |
| LOW | devtools/adapter_builder/agents/signals.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/overlord-request.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/launch-agent-pair.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | …tools/adapter_builder/agents/hooks/timeline-capture.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | …pter_builder/agents/hooks/gate-reviewer-writes-file.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | …pter_builder/agents/hooks/gate-reviewer-writes-file.sh | 21 | # timestamp, it: | COMMENT |
| LOW | devtools/adapter_builder/agents/hooks/guard-git.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | …tools/adapter_builder/agents/hooks/gate-lint-checks.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | …ls/adapter_builder/agents/hooks/guard-verify-models.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | …s/adapter_builder/agents/hooks/notify-on-completion.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | …ls/adapter_builder/agents/hooks/guard-review-rounds.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/agents/lib/common.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/docs/adapter-template.py | 81 | COMMENT | |
| LOW | devtools/adapter_builder/scripts/dry-run-test.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/scripts/validate-adapter.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/scripts/compare-adapters.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | devtools/adapter_builder/scripts/notify.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | transformer_lens/__init__.py | 21 | from .HookedRootModule import HookedRootModule | COMMENT |
| LOW | …mer_lens/tools/analysis/jacobian_lens_decomposition.py | 81 | #: norms. This is a numerical-activity threshold, not an interpretability one. It matches the | COMMENT |
| LOW | …_lens/tools/analysis/jacobian_lens_coordinate_patch.py | 221 | # Measure the selected span's conditioning once and relax the compatibility checks by it: the | COMMENT |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 461 | # scan of 200K+ models needs only ~200 paginated requests (well within the | COMMENT |
| LOW | transformer_lens/model_bridge/architecture_adapter.py | 81 | return {"max_new_tokens": max_new_tokens} | COMMENT |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 721 | # Folding and centering do arithmetic on raw weights, so packed or | COMMENT |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 2201 | input_ids, | COMMENT |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 2621 | _hf_kv_cache = None | COMMENT |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 4721 | COMMENT | |
| LOW | …mer_lens/model_bridge/supported_architectures/bd3lm.py | 81 | # ── Component mapping ────────────────────────────────────────── | COMMENT |
| LOW | …er_lens/model_bridge/supported_architectures/gemma2.py | 41 | # Note: n_key_value_heads is now automatically mapped from num_key_value_heads | COMMENT |
| LOW | …er_lens/model_bridge/supported_architectures/cohere.py | 81 | # sources/transformers.py copies num_key_value_heads generically. | COMMENT |
| LOW | …er_lens/model_bridge/supported_architectures/cohere.py | 121 | # Submodule shapes follow Llama: separate q/k/v/o projections and SwiGLU MLP. | COMMENT |
| LOW | transformer_lens/model_bridge/sources/vllm/driver.py | 61 | # ranks within a stage hold replicas of that stage's post-all-reduce hook | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/model_bridge/test_optimizer_compatibility.py | 181 | # Check if parameter changed | COMMENT |
| LOW | devtools/adapter_builder/scripts/dry-run-test.sh | 221 | # Check if any SIG_* variable contains this phrase | COMMENT |
| LOW | …tools/adapter_builder/scripts/validate-adapter-deep.py | 132 | # Check if the source_key (if any) maps to something | COMMENT |
| LOW | transformer_lens/hook_points.py | 318 | # Check if this hook matches our criteria | COMMENT |
| LOW | transformer_lens/weight_processing.py | 345 | # Check if standard keys exist, otherwise update to use underscore-prefixed versions | COMMENT |
| LOW | transformer_lens/weight_processing.py | 593 | # Check if a separate ln2 exists for this layer | COMMENT |
| LOW | transformer_lens/weight_processing.py | 1968 | # Check if we have a conversion for this parameter. | COMMENT |
| LOW | transformer_lens/weight_processing.py | 2103 | # 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/transformer_bridge.py | 770 | # Check if they point to the same tensor (weight tying) | COMMENT |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 4093 | # Check if output is a ModelOutput | COMMENT |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 4490 | # Check if this part is a registered submodule | COMMENT |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 4502 | # Check if next is weight/bias | COMMENT |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 4607 | # Check if this is a valid bridge path (not a nested HF component) | COMMENT |
| LOW | …r_lens/model_bridge/supported_architectures/apertus.py | 102 | # 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 | 201 | # Check if VAR_KEYWORD (like **kwargs) is accepted | COMMENT |
| LOW | …rmer_lens/model_bridge/generalized_components/block.py | 393 | # 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/backward_gradients.py | 200 | # Check if mismatches are acceptable patterns | COMMENT |
| LOW | transformer_lens/benchmarks/component_outputs.py | 829 | # Check if shared_inputs contains positional args | COMMENT |
| LOW | transformer_lens/benchmarks/component_outputs.py | 1017 | # Check if within tolerance | COMMENT |
| LOW | transformer_lens/benchmarks/component_outputs.py | 1063 | # Set models to eval mode (disable dropout, etc.) | COMMENT |
| LOW | transformer_lens/benchmarks/weight_processing.py | 423 | # Check if W_out exists and is accessible (HT format or bridge format) | COMMENT |
| LOW | transformer_lens/benchmarks/weight_processing.py | 579 | # Check if b_V exists | COMMENT |
| LOW | transformer_lens/benchmarks/weight_processing.py | 598 | # Check if b_V is approximately zero | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …del_bridge/supported_architectures/test_opt_adapter.py | 404 | # via set_use_hook_mlp_in, which this harness bypasses. | COMMENT |
| MEDIUM | tests/benchmarks/test_benchmarks.py | 19 | """Test suite that runs comprehensive benchmarks for each model.""" | STRING |
| LOW | transformer_lens/hook_points.py | 293 | # 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 | 129 | # It's a vector, so we collapse the factorisation and just return a vector | COMMENT |
| LOW | transformer_lens/FactoredMatrix.py | 176 | # It's a vector, so we collapse the factorisation and just return a vector | COMMENT |
| LOW | transformer_lens/weight_processing.py | 1987 | # Legacy string mapping - just return the tensor as-is | COMMENT |
| LOW | transformer_lens/weight_processing.py | 2118 | # Legacy string mapping - just return the tensor as-is | COMMENT |
| MEDIUM | transformer_lens/model_bridge/architecture_adapter.py | 87 | # 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 | 166 | # 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 | 77 | # The original BLOOM block passes it, so we just pass everything through | COMMENT |
| LOW | …odel_bridge/generalized_components/rotary_embedding.py | 134 | # For unexpected tuple lengths, just pass through | COMMENT |
| MEDIUM | …former_lens/model_bridge/generalized_components/moe.py | 306 | # Symmetric restore so a rebinding harness cannot leave a chimera. | 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 | 487 | """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 | 189 | """Benchmark multiple generation calls to ensure KV cache handling is robust. | STRING |
| LOW | transformer_lens/benchmarks/component_outputs.py | 887 | # Some pos embeds just return their embeddings directly | 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 | 40 | CODE | |
| LOW | …ridge/supported_architectures/test_lfm2_moe_adapter.py | 42 | 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 | …el_bridge/supported_architectures/test_phi3_adapter.py | 44 | 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 | transformer_lens/tools/analysis/sparse_probing.py | 761 | CODE | |
| LOW | transformer_lens/tools/analysis/sparse_probing.py | 857 | CODE | |
| LOW | transformer_lens/tools/analysis/logit_lens.py | 572 | CODE | |
| LOW | transformer_lens/tools/model_registry/hf_scraper.py | 320 | CODE | |
| LOW | transformer_lens/tools/model_registry/api.py | 428 | CODE | |
| LOW | transformer_lens/config/transformer_bridge_config.py | 35 | CODE | |
| LOW | transformer_lens/model_bridge/bridge_core.py | 1233 | CODE | |
| LOW | transformer_lens/model_bridge/bridge_core.py | 1431 | CODE | |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 2033 | CODE | |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 2950 | CODE | |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 3607 | CODE | |
| LOW | transformer_lens/model_bridge/transformer_bridge.py | 3940 | CODE | |
| LOW | transformer_lens/model_bridge/remote_bridge.py | 133 | CODE | |
| LOW | transformer_lens/model_bridge/sources/vllm/source.py | 138 | CODE | |
| LOW | …ormer_lens/model_bridge/sources/transformers/source.py | 46 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/attention.py | 68 | CODE | |
| LOW | …model_bridge/generalized_components/bloom_attention.py | 134 | CODE | |
| LOW | …odel_bridge/generalized_components/depthwise_conv1d.py | 45 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/bloom_mlp.py | 84 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/embedding.py | 94 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/gated_mlp.py | 387 | CODE | |
| LOW | …l_bridge/generalized_components/joint_qkv_attention.py | 381 | CODE | |
| LOW | …_lens/model_bridge/generalized_components/pos_embed.py | 94 | CODE | |
| LOW | …ens/model_bridge/generalized_components/unembedding.py | 152 | CODE | |
| LOW | …del_bridge/generalized_components/codegen_attention.py | 267 | CODE | |
| LOW | …r_lens/model_bridge/generalized_components/t5_block.py | 214 | CODE | |
| LOW | …r_lens/model_bridge/generalized_components/t5_block.py | 97 | CODE | |
| LOW | …s/model_bridge/generalized_components/normalization.py | 211 | CODE | |
| LOW | transformer_lens/benchmarks/main_benchmark.py | 472 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL⚡ | tests/acceptance/model_bridge/test_inspect_provider.py | 484 | assert next(b1._driver._model.api._hf.parameters()).dtype == torch.float32 | CODE |
| CRITICAL⚡ | tests/acceptance/model_bridge/test_inspect_provider.py | 485 | assert next(b2._driver._model.api._hf.parameters()).dtype == torch.float16 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | devtools/adapter_builder/README.md | 115 | │ ├── orchestrator.md # Teams orchestration prompt template ({{PLACEHOLDER}} tokens) | CODE |
| MEDIUM | devtools/adapter_builder/README.md | 140 | │ ├── analyze-hf-model.py # Analyze HF model config, generate scaffold adapters | CODE |
| MEDIUM⚡ | devtools/adapter_builder/agents/launch.sh | 14 | # [--seed-model <hf-id>] Known model for scaffolding (e.g. Qwen/Qwen3.5-9B) | COMMENT |
| MEDIUM | devtools/adapter_builder/agents/launch.sh | 360 | # Create .adapter-workspace/ for brief/plan/scaffold/timeline/reviews — NOT in | COMMENT |
| MEDIUM | devtools/adapter_builder/agents/launch.sh | 508 | # Build the orchestration prompt from template + signals | COMMENT |
| MEDIUM | devtools/adapter_builder/agents/launch.sh | 591 | # Write the orchestration prompt to a file (too big for shell quoting) | COMMENT |
| MEDIUM | devtools/adapter_builder/agents/launch.sh | 623 | # Read the orchestration prompt from the file | COMMENT |
| MEDIUM | devtools/adapter_builder/agents/launch-solo-pair.sh | 22 | # [--seed-model <hf-id>] Known model for scaffolding | COMMENT |
| MEDIUM | devtools/adapter_builder/docs/scripts-reference.md | 5 | ## Adapter analysis and scaffolding | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | devtools/adapter_builder/agents/programmer.md | 62 | ## Step 2: Implement | COMMENT |
| LOW | devtools/adapter_builder/agents/programmer.md | 81 | ## Step 3: Verify | COMMENT |
| LOW | devtools/adapter_builder/agents/solo-programmer.md | 92 | ## Step 2: Implement | COMMENT |
| LOW | devtools/adapter_builder/agents/solo-programmer.md | 107 | ## Step 3: Verify | COMMENT |
| LOW | …vtools/adapter_builder/docs/hf-model-analysis-guide.md | 5 | ## Step 1: Read the Model's config.json | COMMENT |
| LOW | …vtools/adapter_builder/docs/hf-model-analysis-guide.md | 35 | ## Step 2: Determine Architecture Characteristics | COMMENT |
| LOW | …vtools/adapter_builder/docs/hf-model-analysis-guide.md | 71 | ## Step 3: Inspect Module Names | COMMENT |
| LOW | …vtools/adapter_builder/docs/hf-model-analysis-guide.md | 109 | ## Step 4: Check for Biases | COMMENT |
| LOW | …vtools/adapter_builder/docs/hf-model-analysis-guide.md | 120 | ## Step 5: Examine State Dict Keys | COMMENT |
| LOW | …vtools/adapter_builder/docs/hf-model-analysis-guide.md | 133 | ## Step 6: Find an Existing Similar Adapter | COMMENT |
| LOW⚡ | transformer_lens/tools/model_registry/verify_models.py | 1034 | # Step 1: Estimate parameters | COMMENT |
| LOW⚡ | transformer_lens/tools/model_registry/verify_models.py | 1044 | # Step 2: Check memory | COMMENT |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 999 | # Step 0: Skip formats with no HF loader path (GGUF / MLX / FP4 / FP8). | COMMENT |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 1059 | # Step 3: Run benchmarks (all phases in a single call to share models) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | devtools/adapter_builder/agents/launch.sh | 10 | # Usage: | COMMENT |
| LOW⚡ | devtools/adapter_builder/agents/ops.sh | 9 | # Usage: | COMMENT |
| LOW | devtools/adapter_builder/agents/solo-coordinator.sh | 34 | # Usage: | COMMENT |
| LOW | devtools/adapter_builder/agents/launch-solo-pair.sh | 18 | # Usage: | COMMENT |
| LOW⚡ | devtools/adapter_builder/agents/launch-agent-pair.sh | 10 | # Usage: | COMMENT |
| LOW | devtools/adapter_builder/scripts/dry-run-test.sh | 18 | # Usage: | COMMENT |
| LOW⚡ | devtools/adapter_builder/scripts/validate-adapter.sh | 8 | # Usage: | COMMENT |
| LOW⚡ | devtools/adapter_builder/scripts/compare-adapters.sh | 9 | # Usage: | COMMENT |
| LOW⚡ | devtools/adapter_builder/scripts/notify.sh | 11 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | transformer_lens/tools/model_registry/verify_models.py | 1034 | # Step 1: Estimate parameters | COMMENT |
| LOW⚡ | transformer_lens/tools/model_registry/verify_models.py | 1044 | # Step 2: Check memory | COMMENT |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 999 | # Step 0: Skip formats with no HF loader path (GGUF / MLX / FP4 / FP8). | COMMENT |
| LOW | transformer_lens/tools/model_registry/verify_models.py | 1059 | # Step 3: Run benchmarks (all phases in a single call to share models) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | tests/unit/model_bridge/test_vllm_boot.py | 84 | assert mocked_boot["auto_config"].call_args.kwargs["token"] == "fake-token" | CODE |
| LOW⚡ | tests/unit/model_bridge/test_vllm_boot.py | 85 | assert mocked_boot["auto_tokenizer"].call_args.kwargs["token"] == "fake-token" | CODE |
| LOW | …el_bridge/sources/test_boot_architecture_resolution.py | 53 | lambda: "fake-token", | CODE |
| LOW | tests/acceptance/test_evals.py | 57 | names=["John Smith", "John Doe"], | CODE |
| 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 | 160 | ) # 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 | 298 | CODE |