Tools for merging pretrained large language models.
This report summarizes scanner evidence for arcee-ai/mergekit, a Python project with 7,392 GitHub stars. SynthScan examined 28,268 lines of code across 191 source files, recording 317 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 11.9 (Moderate 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? 225 finding(s).
Are imports declared and package/API names verified? 59 finding(s).
Are wrappers, guards, and repeated structures necessary? 207 finding(s).
Which changes need focused human review? 317 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
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 317 distinct pattern matches across 10 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 | mergekit/common.py | 274 | def __get_pydantic_core_schema__( | CODE |
| LOW | mergekit/common.py | 388 | def get_torch_accelerator_module(accelerator_name: Optional[str] = None): | CODE |
| LOW | mergekit/common.py | 400 | def get_torch_accelerator_count(accelerator_name: Optional[str] = None): | CODE |
| LOW | mergekit/common.py | 417 | def get_torch_accelerator_type(accelerator_name: Optional[str] = None): | CODE |
| LOW | mergekit/tokensurgeon/rope_helpers.py | 123 | def estimate_position_id_projection( | CODE |
| LOW | mergekit/tokensurgeon/common_interpolation.py | 24 | def approximate_from_landmarks( | CODE |
| LOW | mergekit/tokensurgeon/common_interpolation.py | 81 | def common_interp_approximate( | CODE |
| LOW | mergekit/evo/monkeypatch.py | 8 | def monkeypatch_lmeval_shuffle(): | CODE |
| LOW | mergekit/merge_methods/task_adapter.py | 70 | def validate_configured_inputs(self) -> "ExecuteMergeMethodTask": | CODE |
| LOW | mergekit/merge_methods/arcee_fusion.py | 36 | def calculate_dynamic_threshold(self, importance_scores): | CODE |
| LOW | mergekit/merge_methods/arcee_fusion.py | 68 | def arcee_fusion_merge_method(group: TensorGroup) -> torch.Tensor: | CODE |
| LOW | mergekit/tokenizer/embed.py | 155 | def compute_default_embedding( | CODE |
| LOW | mergekit/architecture/conversion.py | 70 | def _has_complete_wildcard_group(wildcard_values: set[tuple[str, ...]]) -> bool: | CODE |
| LOW | mergekit/architecture/conversion.py | 74 | def convert_checkpoint_tensors( | CODE |
| LOW | mergekit/architecture/conversion.py | 128 | def can_convert_checkpoint_keys( | CODE |
| LOW | mergekit/architecture/auto.py | 127 | def _target_present_in_all_models( | CODE |
| LOW | mergekit/architecture/auto.py | 145 | def _template_present_in_all_models( | CODE |
| LOW | mergekit/scripts/tokensurgeon.py | 186 | def remap_auxiliary_vocabulary( | CODE |
| LOW | mergekit/scripts/fill_missing_params.py | 50 | def copy_and_fill_missing_params( | CODE |
| LOW | mergekit/scripts/fill_missing_params.py | 215 | def get_model_parameter_names(repo_id: str) -> List[str]: | CODE |
| LOW | mergekit/scripts/fill_missing_params.py | 253 | def find_common_ordered_names( | CODE |
| LOW | mergekit/scripts/fill_missing_params.py | 306 | def are_common_params_ordered(list1: List[str], list2: List[str]) -> bool: | CODE |
| LOW | mergekit/moe/common.py | 107 | def convert_and_save_checkpoint_tensors( | CODE |
| LOW | tests/test_merge_method_interface.py | 35 | def test_merge_tensors_aligns_parameters_and_preserves_gradients(weight): | CODE |
| LOW | tests/test_merge_method_interface.py | 53 | def test_module_inputs_preserve_parameter_gradients(method_name): | CODE |
| LOW | tests/test_merge_method_interface.py | 74 | def test_merge_tensors_base_index_refers_to_input_order(): | CODE |
| LOW | tests/test_merge_method_interface.py | 95 | def test_plain_annotations_preserve_constraints_defaults_and_requiredness(input_type): | CODE |
| LOW | tests/test_merge_method_interface.py | 138 | def test_signature_rejects_missing_or_ambiguous_parameter_types( | CODE |
| LOW | tests/test_merge_method_interface.py | 151 | def test_signature_infers_parameter_scopes_and_accepts_shared_lists(): | CODE |
| LOW | tests/test_merge_method_interface.py | 178 | def test_contract_validates_entire_batch_before_math_runs(): | CODE |
| LOW | tests/test_merge_method_interface.py | 213 | def test_per_input_values_are_ordered_and_shape_checked(values_type): | CODE |
| LOW | tests/test_merge_method_interface.py | 235 | def test_registered_method_can_be_called_directly(sequence_type): | CODE |
| LOW | tests/test_merge_method_interface.py | 249 | def test_group_factory_base_and_embedding_metadata(): | CODE |
| LOW | tests/test_merge_method_interface.py | 276 | def test_group_sequence_checks_all_element_types_before_execution(input_type): | CODE |
| LOW | tests/test_merge_method_interface.py | 288 | def test_explicit_per_group_parameter_values(): | CODE |
| LOW | tests/test_merge_method_interface.py | 301 | def test_merge_state_dicts_matches_tensor_names_and_model_ids(): | CODE |
| LOW | tests/test_merge_method_interface.py | 314 | def test_merge_state_dicts_validates_keys_before_merging(): | CODE |
| LOW | tests/test_merge_method_interface.py | 326 | def test_config_parameter_carrier_preserves_scalar_types(): | CODE |
| LOW | tests/test_merge_method_interface.py | 337 | def test_raw_parameter_binding_preserves_zero_values(): | CODE |
| LOW | tests/test_merge_method_interface.py | 357 | def test_group_adapter_validates_every_group_before_execution(failure): | CODE |
| LOW | tests/test_merge_method_interface.py | 376 | def test_state_dict_merge_rejects_broadcastable_weights(): | CODE |
| LOW | tests/test_merge_method_interface.py | 405 | def test_methods_reject_mismatched_embedding_shapes(method_name, count, shape): | CODE |
| LOW | tests/test_merge_method_interface.py | 420 | def test_group_kernel_must_preserve_weight_shape(): | CODE |
| LOW | tests/test_merge_method_interface.py | 430 | def test_model_stock_singularity_retains_base_with_finite_gradients(filter_wise): | CODE |
| LOW | tests/test_merge_method_interface.py | 449 | def test_sce_zero_variance_preserves_shape(shape, density): | CODE |
| LOW | tests/test_merge_method_interface.py | 461 | def test_none_input_ids_are_rejected_at_every_entry_point(): | CODE |
| LOW | tests/test_merge_method_interface.py | 478 | def test_passthrough_graph_does_not_visit_math_device(tmp_path, scale): | CODE |
| LOW | tests/test_merge_method_interface.py | 501 | def test_construction_and_registration_are_independent(monkeypatch): | CODE |
| LOW | tests/test_merge_method_interface.py | 526 | def test_execution_controls_do_not_reserve_algorithm_parameter_names(): | CODE |
| LOW | tests/test_merge_method_interface.py | 547 | def test_kernel_wrappers_do_not_reserve_algorithm_parameter_names(batched): | CODE |
| LOW | tests/test_merge_dtypes.py | 39 | def test_state_dict_promotes_each_weight_independently(method): | CODE |
| LOW | tests/test_merge_dtypes.py | 53 | def test_input_cast_and_output_cast_have_distinct_numerics(): | CODE |
| LOW | tests/test_merge_dtypes.py | 78 | def test_state_dict_rejects_nonfloating_dtype_overrides(option): | CODE |
| LOW | tests/test_merge_dtypes.py | 91 | def test_raw_graph_dtype_policy(tmp_path, monkeypatch, dtype, out_dtype, method_name): | CODE |
| LOW | tests/test_merge_dtypes.py | 147 | def test_raw_graph_missing_tensors(tmp_path, dtype, mode): | CODE |
| LOW | tests/test_merge_dtypes.py | 190 | def test_raw_graph_rejects_nonfloating_input_dtype(tmp_path): | CODE |
| LOW | tests/test_merge_dtypes.py | 208 | def test_raw_graph_merges_batchnorm_without_casting_buffers(tmp_path, method_name): | CODE |
| LOW | tests/test_merge_dtypes.py | 264 | def test_raw_graph_rejects_differing_buffers_before_casting(tmp_path, other): | CODE |
| LOW | tests/test_merge_dtypes.py | 300 | def test_linear_ignores_ambient_autocast(device, autocast_dtype): | CODE |
| LOW | tests/test_merge_dtypes.py | 312 | def test_linear_scratch_is_bounded_independently_of_input_count(count): | CODE |
| 110 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mergekit/card.py | 10 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 4 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 4 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 4 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 9 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 10 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 10 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 11 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 12 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 12 | CODE | |
| LOW | mergekit/tokensurgeon/__init__.py | 13 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 4 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 4 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 5 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 25 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 26 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 29 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 30 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 31 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 32 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 33 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 33 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 33 | CODE | |
| LOW | mergekit/merge_methods/__init__.py | 34 | CODE | |
| LOW | mergekit/merge_methods/base.py | 6 | CODE | |
| LOW | mergekit/tokenizer/__init__.py | 4 | CODE | |
| LOW | mergekit/tokenizer/__init__.py | 5 | CODE | |
| LOW | mergekit/tokenizer/__init__.py | 5 | CODE | |
| LOW | mergekit/tokenizer/__init__.py | 6 | CODE | |
| LOW | mergekit/tokenizer/__init__.py | 7 | CODE | |
| LOW | mergekit/io/__init__.py | 4 | CODE | |
| LOW | mergekit/io/__init__.py | 4 | CODE | |
| LOW | mergekit/io/__init__.py | 4 | CODE | |
| LOW | mergekit/io/__init__.py | 9 | CODE | |
| LOW | mergekit/architecture/__init__.py | 10 | CODE | |
| LOW | mergekit/architecture/__init__.py | 10 | CODE | |
| LOW | mergekit/architecture/__init__.py | 10 | CODE | |
| LOW | mergekit/architecture/__init__.py | 10 | CODE | |
| LOW | mergekit/architecture/__init__.py | 26 | CODE | |
| LOW | mergekit/architecture/base.py | 7 | CODE | |
| LOW | mergekit/scripts/merge_raw_pytorch.py | 15 | CODE | |
| LOW | tests/test_merge_method_interface.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mergekit/plan.py | 93 | CODE | |
| LOW | mergekit/merge.py | 155 | CODE | |
| LOW | mergekit/merge.py | 287 | CODE | |
| LOW | mergekit/config.py | 27 | CODE | |
| LOW | mergekit/config.py | 122 | CODE | |
| LOW | mergekit/config.py | 194 | CODE | |
| LOW | mergekit/multigpu_executor.py | 131 | CODE | |
| LOW | mergekit/multigpu_executor.py | 329 | CODE | |
| LOW | mergekit/graph.py | 528 | CODE | |
| LOW | mergekit/common.py | 228 | CODE | |
| LOW | mergekit/common.py | 248 | CODE | |
| LOW | mergekit/common.py | 368 | CODE | |
| LOW | mergekit/sparsify.py | 23 | CODE | |
| LOW | mergekit/sparsify.py | 173 | CODE | |
| LOW | mergekit/tokensurgeon/subword.py | 20 | CODE | |
| LOW | mergekit/evo/config.py | 52 | CODE | |
| LOW | mergekit/evo/strategy.py | 138 | CODE | |
| LOW | mergekit/evo/actors.py | 150 | CODE | |
| LOW | mergekit/evo/actors.py | 258 | CODE | |
| LOW | mergekit/evo/genome.py | 156 | CODE | |
| LOW | mergekit/evo/genome.py | 220 | CODE | |
| LOW | mergekit/evo/genome.py | 343 | CODE | |
| LOW | mergekit/merge_methods/batching.py | 97 | CODE | |
| LOW | mergekit/merge_methods/batching.py | 56 | CODE | |
| LOW | mergekit/merge_methods/base.py | 503 | CODE | |
| LOW | mergekit/tokenizer/build.py | 106 | CODE | |
| LOW | mergekit/tokenizer/embed.py | 34 | CODE | |
| LOW | mergekit/io/lazy_tensor_loader.py | 118 | CODE | |
| LOW | mergekit/architecture/conversion.py | 128 | CODE | |
| LOW | mergekit/architecture/__init__.py | 33 | CODE | |
| LOW | mergekit/scripts/evolve.py | 125 | CODE | |
| LOW | mergekit/scripts/evolve.py | 309 | CODE | |
| LOW | mergekit/scripts/tokensurgeon.py | 204 | CODE | |
| LOW | mergekit/scripts/tokensurgeon.py | 289 | CODE | |
| LOW | mergekit/scripts/tokensurgeon.py | 425 | CODE | |
| LOW | mergekit/scripts/tokensurgeon.py | 657 | CODE | |
| LOW | mergekit/scripts/merge_raw_pytorch.py | 87 | CODE | |
| LOW | mergekit/scripts/extract_lora.py | 348 | CODE | |
| LOW | mergekit/scripts/multimerge.py | 124 | CODE | |
| LOW | mergekit/scripts/multimerge.py | 136 | CODE | |
| LOW | mergekit/moe/qwen.py | 94 | CODE | |
| LOW | mergekit/moe/router.py | 71 | CODE | |
| LOW | mergekit/moe/router.py | 154 | CODE | |
| LOW | mergekit/moe/qwen3.py | 74 | CODE | |
| LOW | mergekit/moe/mixtral.py | 94 | CODE | |
| LOW | tests/common.py | 27 | CODE | |
| LOW | tests/test_vocabulary_axis.py | 257 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mergekit/scripts/tokensurgeon.py | 218 | except ValueError: | CODE |
| HIGH | mergekit/scripts/multimerge.py | 163 | except ValueError: | CODE |
| HIGH | mergekit/moe/__init__.py | 11 | except ImportError: | CODE |
| HIGH | mergekit/moe/__init__.py | 18 | except ImportError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mergekit/tokensurgeon/rope_helpers.py | 200 | CODE | |
| MEDIUM | mergekit/tokensurgeon/rope_helpers.py | 207 | CODE | |
| MEDIUM | mergekit/tokensurgeon/rope_helpers.py | 214 | CODE | |
| MEDIUM | mergekit/tokensurgeon/rope_helpers.py | 221 | CODE | |
| MEDIUM | mergekit/tokensurgeon/rope_helpers.py | 228 | CODE | |
| MEDIUM | mergekit/tokensurgeon/rope_helpers.py | 229 | CODE | |
| MEDIUM | mergekit/tokensurgeon/rope_helpers.py | 230 | CODE | |
| MEDIUM | mergekit/tokensurgeon/rope_helpers.py | 235 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mergekit/options.py | 166 | except Exception: | CODE |
| MEDIUM | mergekit/options.py | 167 | print(f"Error creating MergeOptions with args: {arg_dict}") | CODE |
| LOW | mergekit/merge.py | 124 | except Exception as e: | CODE |
| LOW | mergekit/merge.py | 179 | except Exception as e: | CODE |
| LOW | mergekit/merge.py | 339 | except Exception as e: | CODE |
| LOW | mergekit/merge.py | 362 | except Exception as e: | CODE |
| LOW | mergekit/evo/strategy.py | 199 | except Exception as e: | CODE |
| LOW | mergekit/tokenizer/build.py | 35 | except Exception as e: | CODE |
| LOW | mergekit/tokenizer/build.py | 208 | except Exception as e: | CODE |
| LOW | mergekit/io/lazy_unpickle.py | 140 | except Exception: | CODE |
| LOW | mergekit/architecture/auto.py | 73 | except Exception as e: | CODE |
| LOW | mergekit/architecture/auto.py | 86 | except Exception as e: | CODE |
| LOW | mergekit/architecture/auto.py | 100 | except Exception as e: | CODE |
| LOW | mergekit/scripts/evolve.py | 424 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mergekit/merge.py | 369 | __all__ = ["MergeOptions", "run_merge"] | CODE |
| LOW | mergekit/tokensurgeon/__init__.py | 15 | __all__ = [ | CODE |
| LOW | mergekit/merge_methods/__init__.py | 36 | __all__ = [ | CODE |
| LOW | mergekit/tokenizer/__init__.py | 9 | __all__ = [ | CODE |
| LOW | mergekit/io/__init__.py | 11 | __all__ = [ | CODE |
| LOW | mergekit/architecture/__init__.py | 94 | __all__ = [ | CODE |
| LOW | mergekit/moe/__init__.py | 23 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mergekit/scripts/fill_missing_params.py | 56 | Merge submodel weights into a base model and fill in missing parameters. Use Case: Given a submodel (e.g., | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mergekit/scripts/fill_missing_params.py | 161 | # Check if the parameter is common to both models | COMMENT |
| LOW | tests/test_graph.py | 140 | # Check if tasks with the same group label are scheduled consecutively when possible | COMMENT |
| LOW | tests/test_graph.py | 166 | # Check if task3 is scheduled after task1 and task2 due to dependency, even though it has the same group label a | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mergekit/sparsify.py | 74 | CODE | |
| LOW | mergekit/sparsify.py | 111 | CODE | |
| LOW | mergekit/tokensurgeon/rope_helpers.py | 235 | CODE | |
| LOW | mergekit/architecture/auto.py | 304 | CODE |