[ACL 2024] An Easy-to-use Knowledge Editing Framework for LLMs.
This report presents the forensic synthetic code analysis of zjunlp/EasyEdit, a Jupyter Notebook project with 2,875 GitHub stars. SynthScan v2.0 examined 118,819 lines of code across 943 source files, recording 1986 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 22.2 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1986 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | axbench.py | 2 | CODE | |
| LOW | axbench.py | 7 | CODE | |
| LOW | steering.py | 3 | CODE | |
| LOW | steering.py | 3 | CODE | |
| LOW | multimodal_steering.py | 3 | CODE | |
| LOW | multimodal_steering.py | 3 | CODE | |
| LOW | multimodal_steering.py | 4 | CODE | |
| LOW | edit.py | 2 | CODE | |
| LOW | vectors_generate.py | 2 | CODE | |
| LOW | multimodal_edit.py | 1 | CODE | |
| LOW | multimodal_edit.py | 2 | CODE | |
| LOW | multimodal_edit.py | 5 | CODE | |
| LOW | multimodal_edit.py | 7 | CODE | |
| LOW | multimodal_edit.py | 7 | CODE | |
| LOW | multimodal_edit.py | 11 | CODE | |
| LOW | demo/EasySteer_demo/demo_hparams.py | 5 | CODE | |
| LOW | demo/EasySteer_demo/app.py | 4 | CODE | |
| LOW | demo/EasySteer_demo/app.py | 5 | CODE | |
| LOW | demo/SafeEdit_demo/utils.py | 8 | CODE | |
| LOW | demo/SafeEdit_demo/utils.py | 11 | CODE | |
| LOW | demo/SafeEdit_demo/app.py | 2 | CODE | |
| LOW | easyeditor/__init__.py | 1 | CODE | |
| LOW | easyeditor/__init__.py | 2 | CODE | |
| LOW | easyeditor/__init__.py | 3 | CODE | |
| LOW | easyeditor/__init__.py | 4 | CODE | |
| LOW | easyeditor/__init__.py | 5 | CODE | |
| LOW | easyeditor/__init__.py | 6 | CODE | |
| LOW | easyeditor/util/globals.py | 1 | CODE | |
| LOW | easyeditor/util/globals.py | 6 | CODE | |
| LOW | easyeditor/util/__init__.py | 1 | CODE | |
| LOW | easyeditor/util/__init__.py | 2 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 1 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 2 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 3 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 4 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 5 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 6 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 7 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 8 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 10 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 11 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 12 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 13 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 14 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 15 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 16 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 17 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 18 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 19 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 20 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 21 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 22 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 23 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 24 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 25 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 26 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 27 | CODE | |
| LOW | easyeditor/util/alg_dict.py | 28 | CODE | |
| LOW | easyeditor/dataset/counterfact.py | 5 | CODE | |
| LOW | easyeditor/dataset/counterfact.py | 10 | CODE | |
| 933 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | easyeditor/dataset/adsedit.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/dataset/coco_caption.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/dataset/ComprehendEdit.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/dataset/vqa.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/dataset/processor/base_dataset.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/dataset/processor/blip_processors.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/dataset/processor/base_processor.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/dataset/processor/randaugment.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/trainer/blip2_models/base_model.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/trainer/blip2_models/common/logger.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/trainer/blip2_models/common/utils.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/trainer/blip2_models/common/dist_utils.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/trainer/blip2_models/blip2_opt.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/trainer/blip2_models/blip2.py | 0 | copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license tex | STRING |
| HIGH | easyeditor/dataset/adsedit.py | 0 | vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation fil | STRING |
| HIGH | easyeditor/dataset/coco_caption.py | 0 | vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation fil | STRING |
| HIGH | easyeditor/dataset/ComprehendEdit.py | 0 | vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation fil | STRING |
| HIGH | easyeditor/dataset/vqa.py | 0 | vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation fil | STRING |
| HIGH | easyeditor/dataset/processor/base_dataset.py | 0 | vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation fil | STRING |
| HIGH | easyeditor/models/grace/utils.py | 0 | returns the directory in which to store model checkpoints | STRING |
| HIGH | easyeditor/models/defer/utils.py | 0 | returns the directory in which to store model checkpoints | STRING |
| HIGH | easyeditor/models/melo/util.py | 0 | returns the directory in which to store model checkpoints | STRING |
| HIGH | easyeditor/models/wise/utils.py | 0 | returns the directory in which to store model checkpoints | STRING |
| HIGH | easyeditor/models/dinm/dinm_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/lora_uns/lora_uns_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/ft_uns/ft_uns_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/lora/lora_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/ft/ft_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/core/core_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/r_rome/r_rome_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/emmet/emmet_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/memit/memit_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/rome/rome_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/memit_FE/memit_FE_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/pmet/pmet_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/eamet/eamet_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/SPHERE/SPHERE_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/alphaedit/AlphaEdit_main.py | 0 | returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new on | STRING |
| HIGH | easyeditor/models/dinm/dinm_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/ft_uns/ft_uns_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/ft/ft_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/core/core_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/lora_uns/lora_uns_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/lora/lora_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/r_rome/r_rome_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/rome/rome_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/SPHERE/SPHERE_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/alphaedit/AlphaEdit_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/emmet/emmet_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/memit/memit_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/memit_FE/memit_FE_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/pmet/pmet_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/eamet/eamet_main.py | 0 | executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of fun | STRING |
| HIGH | easyeditor/models/core/compute_z.py | 0 | computes the value (right) vector for the rank-1 update. runs a simple optimization procedure. | STRING |
| HIGH | easyeditor/models/r_rome/compute_v.py | 0 | computes the value (right) vector for the rank-1 update. runs a simple optimization procedure. | STRING |
| HIGH | easyeditor/models/SPHERE/compute_z.py | 0 | computes the value (right) vector for the rank-1 update. runs a simple optimization procedure. | STRING |
| HIGH | easyeditor/models/unke/compute_z.py | 0 | computes the value (right) vector for the rank-1 update. runs a simple optimization procedure. | STRING |
| HIGH | easyeditor/models/emmet/compute_z.py | 0 | computes the value (right) vector for the rank-1 update. runs a simple optimization procedure. | STRING |
| HIGH | easyeditor/models/alphaedit/compute_z.py | 0 | computes the value (right) vector for the rank-1 update. runs a simple optimization procedure. | STRING |
| HIGH | easyeditor/models/memit/compute_z.py | 0 | computes the value (right) vector for the rank-1 update. runs a simple optimization procedure. | STRING |
| 64 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | vectors_generate.py | 52 | # def generate_vector_prompt_vector(hparams_dict): | COMMENT |
| LOW | vectors_generate.py | 57 | # def generate_sae_feature_vector(hparams_dict): | COMMENT |
| LOW | vectors_apply.py | 38 | # def apply_sae_feature_to_model(hparams_dict, model): | COMMENT |
| LOW | vectors_apply.py | 50 | # def apply_vector_prompt_to_model(hparams_dict, model): | COMMENT |
| LOW | easyeditor/util/hparams.py | 21 | def construct_float_from_scientific_notation(config: dict): | CODE |
| LOW | easyeditor/util/nethook.py | 441 | def invoke_with_optional_args(fn, *args, **kwargs): | CODE |
| LOW | easyeditor/util/vl_utils.py | 58 | def prepend_qwen_vl_image_tokens_if_missing(model_name, chat, num_images=1): | CODE |
| LOW | easyeditor/util/vl_utils.py | 66 | def normalize_multimodal_batch(media, batch_size, file_type): | CODE |
| LOW⚡ | easyeditor/dataset/AKEW_both.py | 19 | def get_llama_without_answer_cot(que): | CODE |
| LOW⚡ | easyeditor/dataset/AKEW_both.py | 25 | def get_qwen_without_answer_cot(que): | CODE |
| LOW⚡ | easyeditor/dataset/AKEW_both.py | 28 | def get_vicuna_without_answer(que): | CODE |
| LOW⚡ | easyeditor/dataset/AKEW_both.py | 30 | def get_list_llama_without_answer(que, cot): | CODE |
| LOW⚡ | easyeditor/dataset/AKEW_both.py | 36 | def get_list_qwen_without_answer(que, cot): | CODE |
| LOW | easyeditor/dataset/AKEW_both.py | 121 | def _process_structured_format(self): | CODE |
| LOW | easyeditor/dataset/AKEW_both.py | 137 | def _process_unstructured_format(self): | CODE |
| LOW | easyeditor/dataset/AKEW_both.py | 153 | def _process_wikiupdate_structured(self, record, case_id): | CODE |
| LOW | easyeditor/dataset/AKEW_both.py | 167 | def _process_counterfact_structured(self, record, case_id): | CODE |
| LOW | easyeditor/dataset/AKEW_both.py | 182 | def _process_mquake_structured(self, record, case_id): | CODE |
| LOW | easyeditor/dataset/AKEW_both.py | 197 | def _process_counterfact_unstructured(self, record, case_id): | CODE |
| LOW | easyeditor/dataset/AKEW_both.py | 226 | def _process_mquake_unstructured(self, record, case_id): | CODE |
| LOW | easyeditor/dataset/AKEW_both.py | 257 | def _process_unke_unstructured(self, record, case_id): | CODE |
| LOW | easyeditor/dataset/AKEW_both.py | 286 | def _process_wikiupdate_unstructured(self, record, case_id): | CODE |
| LOW | easyeditor/dataset/LEME.py | 104 | def _process_counterfact_data(self, record, case_id): | CODE |
| LOW | easyeditor/dataset/LEME.py | 134 | def _extract_coupled_entities(self, record): | CODE |
| LOW | easyeditor/dataset/coco_caption.py | 142 | def _build_hf_multimodal_batch(prompts, targets, images, file_type): | CODE |
| LOW | easyeditor/dataset/vqa.py | 148 | def _build_hf_multimodal_batch(prompts, targets, images, file_type): | CODE |
| LOW | easyeditor/dataset/sanitization.py | 20 | def generate_next_locality_index(self): | CODE |
| LOW | easyeditor/editors/utils.py | 100 | def get_metric_protocol_summary(dict_list): | CODE |
| LOW | easyeditor/editors/multimodal_editor.py | 56 | def get_aligned_topk_token_ids(pre_logits, post_logits, k): | CODE |
| LOW | easyeditor/editors/multimodal_editor.py | 81 | def attach_topk_locality_metrics(metrics): | CODE |
| LOW | easyeditor/editors/editor.py | 56 | def finalize_locality_metrics(metric, request, hparams, model_name): | CODE |
| LOW | easyeditor/models/grace/grace_main.py | 36 | def apply_grace_to_multimodal_model( | CODE |
| LOW | easyeditor/models/core/compute_z.py | 17 | def get_required_ground_truth_for_context(request: Dict, context_type: str): | CODE |
| LOW | easyeditor/models/core/compute_z.py | 346 | def get_module_input_output_at_words( | CODE |
| LOW | easyeditor/models/melo/melo.py | 121 | def register_lora_backward_hooks(self,backward_hook_fn): | CODE |
| LOW | …editor/models/melo/peft_egg/tests/test_gpu_examples.py | 173 | def test_causal_lm_training_mutli_gpu(self): | STRING |
| LOW | …editor/models/melo/peft_egg/tests/test_gpu_examples.py | 357 | def test_audio_model_training(self): | STRING |
| LOW | …tor/models/melo/peft_egg/tests/test_adaption_prompt.py | 60 | def _create_test_llama_config(): | CODE |
| LOW | …tor/models/melo/peft_egg/tests/test_adaption_prompt.py | 80 | def test_prepare_for_training(self) -> None: | CODE |
| LOW | …tor/models/melo/peft_egg/tests/test_adaption_prompt.py | 178 | def test_sequence_adapter_ops(self) -> None: | CODE |
| LOW | …tor/models/melo/peft_egg/tests/test_adaption_prompt.py | 247 | def test_add_and_set_while_disabled(self): | CODE |
| LOW | …itor/models/melo/peft_egg/tests/test_decoder_models.py | 57 | def prepare_inputs_for_testing(self): | STRING |
| LOW | …itor/models/melo/peft_egg/tests/test_decoder_models.py | 69 | def test_attributes_parametrized(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW | …itor/models/melo/peft_egg/tests/test_decoder_models.py | 77 | def test_prepare_for_training_parametrized(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW⚡ | …itor/models/melo/peft_egg/tests/test_decoder_models.py | 109 | def test_training_decoders_layer_indexing(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW⚡ | …itor/models/melo/peft_egg/tests/test_decoder_models.py | 113 | def test_training_decoders_gradient_checkpointing(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW⚡ | …itor/models/melo/peft_egg/tests/test_decoder_models.py | 117 | def test_inference_safetensors(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW⚡ | …itor/models/melo/peft_egg/tests/test_decoder_models.py | 121 | def test_peft_model_device_map(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW | …els/melo/peft_egg/tests/test_encoder_decoder_models.py | 48 | def prepare_inputs_for_testing(self): | STRING |
| LOW | …els/melo/peft_egg/tests/test_encoder_decoder_models.py | 62 | def test_attributes_parametrized(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW | …els/melo/peft_egg/tests/test_encoder_decoder_models.py | 70 | def test_prepare_for_training_parametrized(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW⚡ | …els/melo/peft_egg/tests/test_encoder_decoder_models.py | 99 | def test_training_encoder_decoders(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW⚡ | …els/melo/peft_egg/tests/test_encoder_decoder_models.py | 103 | def test_training_encoder_decoders_layer_indexing(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW⚡ | …els/melo/peft_egg/tests/test_encoder_decoder_models.py | 107 | def test_training_encoder_decoders_gradient_checkpointing(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW⚡ | …els/melo/peft_egg/tests/test_encoder_decoder_models.py | 111 | def test_inference_safetensors(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW⚡ | …els/melo/peft_egg/tests/test_encoder_decoder_models.py | 115 | def test_peft_model_device_map(self, test_name, model_id, config_cls, config_kwargs): | STRING |
| LOW | easyeditor/models/melo/peft_egg/tests/testing_common.py | 145 | def prepare_inputs_for_common(self): | STRING |
| LOW | easyeditor/models/melo/peft_egg/tests/testing_common.py | 175 | def _test_prepare_for_training(self, model_id, config_cls, config_kwargs): | STRING |
| LOW | easyeditor/models/melo/peft_egg/tests/testing_common.py | 363 | def _test_inference_safetensors(self, model_id, config_cls, config_kwargs): | STRING |
| LOW | easyeditor/models/melo/peft_egg/tests/testing_common.py | 396 | def _test_training_layer_indexing(self, model_id, config_cls, config_kwargs): | STRING |
| 191 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | edit.py | 1703 | CODE | |
| LOW | demo/EasySteer_demo/demo_hparams.py | 215 | CODE | |
| LOW | demo/EasySteer_demo/utils.py | 62 | CODE | |
| LOW | demo/EasySteer_demo/utils.py | 226 | CODE | |
| LOW | demo/EasySteer_demo/app.py | 34 | CODE | |
| LOW | demo/EasySteer_demo/app.py | 579 | CODE | |
| LOW | demo/EasySteer_demo/app.py | 343 | CODE | |
| LOW | demo/EasySteer_demo/app.py | 440 | CODE | |
| LOW | demo/EasySteer_demo/app.py | 671 | CODE | |
| LOW | easyeditor/util/generate.py | 11 | CODE | |
| LOW | easyeditor/util/generate.py | 78 | CODE | |
| LOW | easyeditor/util/runningstats.py | 1469 | CODE | |
| LOW | easyeditor/util/runningstats.py | 875 | CODE | |
| LOW | easyeditor/dataset/Cknowedit.py | 16 | CODE | |
| LOW | easyeditor/dataset/AKEW_both.py | 52 | CODE | |
| LOW | easyeditor/dataset/AKEW_both.py | 121 | CODE | |
| LOW | easyeditor/dataset/AKEW_both.py | 137 | CODE | |
| LOW | easyeditor/dataset/MQuAKE.py | 19 | CODE | |
| LOW | easyeditor/dataset/LEME.py | 24 | CODE | |
| LOW | easyeditor/dataset/coco_caption.py | 25 | CODE | |
| LOW | easyeditor/dataset/coco_caption.py | 126 | CODE | |
| LOW | easyeditor/dataset/coco_caption.py | 142 | CODE | |
| LOW | easyeditor/dataset/ComprehendEdit.py | 226 | CODE | |
| LOW | easyeditor/dataset/HalluEditBench.py | 70 | CODE | |
| LOW | easyeditor/dataset/multitask.py | 21 | CODE | |
| LOW | easyeditor/dataset/multitask.py | 184 | CODE | |
| LOW | easyeditor/dataset/zsre.py | 21 | CODE | |
| LOW | easyeditor/dataset/vqa.py | 25 | CODE | |
| LOW | easyeditor/dataset/vqa.py | 132 | CODE | |
| LOW | easyeditor/dataset/vqa.py | 148 | CODE | |
| LOW | easyeditor/dataset/processor/qwen2vl_processors.py | 9 | CODE | |
| LOW | easyeditor/editors/steer_editor.py | 60 | CODE | |
| LOW | easyeditor/editors/concept_editor.py | 74 | CODE | |
| LOW | easyeditor/editors/concept_editor.py | 144 | CODE | |
| LOW | easyeditor/editors/concept_editor.py | 250 | CODE | |
| LOW | easyeditor/editors/safety_editor.py | 57 | CODE | |
| LOW | easyeditor/editors/safety_editor.py | 128 | CODE | |
| LOW | easyeditor/editors/safety_editor.py | 264 | CODE | |
| LOW | easyeditor/editors/utils.py | 81 | CODE | |
| LOW | easyeditor/editors/utils.py | 116 | CODE | |
| LOW | easyeditor/editors/utils.py | 159 | CODE | |
| LOW | easyeditor/editors/multimodal_editor.py | 147 | CODE | |
| LOW | easyeditor/editors/multimodal_editor.py | 261 | CODE | |
| LOW | easyeditor/editors/multimodal_editor.py | 506 | CODE | |
| LOW | easyeditor/editors/editor.py | 105 | CODE | |
| LOW | easyeditor/editors/editor.py | 471 | CODE | |
| LOW | easyeditor/models/grace/GRACE.py | 183 | CODE | |
| LOW | easyeditor/models/dinm/dinm_main.py | 60 | CODE | |
| LOW | easyeditor/models/core/core_main.py | 308 | CODE | |
| LOW | easyeditor/models/mend/oracle.py | 9 | CODE | |
| LOW | easyeditor/models/mend/mend_main.py | 56 | CODE | |
| LOW | easyeditor/models/mend/mend_main.py | 181 | CODE | |
| LOW | easyeditor/models/melo/models.py | 76 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/tests/testing_common.py | 78 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 405 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 691 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 923 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 1008 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/mapping.py | 64 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/utils/other.py | 24 | CODE | |
| 158 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | multimodal_steering.py | 41 | for input_type in input_types: | COMMENT |
| LOW | edit.py | 3021 | # metrics, edited_model = test_KN() | COMMENT |
| LOW | edit.py | 3041 | # test_SERAC() | COMMENT |
| LOW | edit.py | 3061 | # test_KE_T5() | COMMENT |
| LOW | edit.py | 3081 | # test_IKE_ChatGLM() | COMMENT |
| LOW | edit.py | 3101 | # test_MEND_Train_Qwen() | COMMENT |
| LOW | vectors_generate.py | 1 | import hydra | COMMENT |
| LOW | vectors_generate.py | 41 | COMMENT | |
| LOW | vectors_generate.py | 61 | COMMENT | |
| LOW | vectors_apply.py | 41 | # model = apply_sae_feature(hparams, model) | COMMENT |
| LOW | vectors_apply.py | 61 | COMMENT | |
| LOW | multimodal_edit.py | 781 | # train_MEND_Blip2OPT_VQA_Vision_debug() | COMMENT |
| LOW | multimodal_edit.py | 801 | # test_IKE_MiniGPT4_Caption() | COMMENT |
| LOW | demo/EasySteer_demo/demo_hparams.py | 121 | } | COMMENT |
| LOW | easyeditor/util/globals.py | 21 | stream_handler = logging.StreamHandler() | COMMENT |
| LOW | easyeditor/util/globals.py | 41 | # print(f"Results will be stored at {run_dir}") | COMMENT |
| LOW | easyeditor/dataset/MQuAKE.py | 181 | loc = [b["locality_prompt"] for b in batch] | COMMENT |
| LOW | easyeditor/dataset/LEME.py | 241 | # for src_, trg_ in zip(src, trg)] | COMMENT |
| LOW | easyeditor/dataset/ComprehendEdit.py | 301 | # generated image content is not consist with question, so we don't use these samples. | COMMENT |
| LOW | easyeditor/dataset/zsre.py | 201 | # trg = [' ' + trg_ for trg_ in trg] | COMMENT |
| LOW | easyeditor/dataset/wiki_recent.py | 101 | loc = [b["locality_prompt"] for b in batch] | COMMENT |
| LOW | easyeditor/dataset/wiki_recent.py | 121 | # for i in range(len(self.tok(trg_, truncation=True, max_length=self.config.max_length)["input_ids"] | COMMENT |
| LOW | easyeditor/editors/concept_editor.py | 101 | elif 'llama' in self.model_name.lower(): | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/grammar.py | 1 | # import torch | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/setup.py | 1 | # Copyright 2023 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/setup.py | 61 | ) | COMMENT |
| LOW | …editor/models/melo/peft_egg/tests/test_gpu_examples.py | 1 | # coding=utf-8 | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/tests/testing_utils.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …tor/models/melo/peft_egg/tests/test_adaption_prompt.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …itor/models/melo/peft_egg/tests/test_decoder_models.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …els/melo/peft_egg/tests/test_encoder_decoder_models.py | 1 | # coding=utf-8 | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/tests/testing_common.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …syeditor/models/melo/peft_egg/tests/test_common_gpu.py | 1 | # coding=utf-8 | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/tests/test_config.py | 1 | # coding=utf-8 | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/scripts/stale.py | 1 | # Copyright 2023 The HuggingFace Team, the AllenNLP library authors. All rights reserved. | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/src/peft/__init__.py | 1 | # flake8: noqa | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …syeditor/models/melo/peft_egg/src/peft/import_utils.py | 1 | # coding=utf-8 | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/src/peft/mapping.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …syeditor/models/melo/peft_egg/src/peft/utils/config.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …editor/models/melo/peft_egg/src/peft/utils/__init__.py | 1 | # flake8: noqa | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/src/peft/utils/other.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …ditor/models/melo/peft_egg/src/peft/utils/hub_utils.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …r/models/melo/peft_egg/src/peft/utils/save_and_load.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …ditor/models/melo/peft_egg/src/peft/tuners/p_tuning.py | 1 | # coding=utf-8 | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/melo.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …ditor/models/melo/peft_egg/src/peft/tuners/__init__.py | 1 | # flake8: noqa | COMMENT |
| LOW | …/models/melo/peft_egg/src/peft/tuners/prefix_tuning.py | 1 | # coding=utf-8 | COMMENT |
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/lora.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …or/models/melo/peft_egg/src/peft/tuners/melo_backup.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …odels/melo/peft_egg/src/peft/tuners/adaption_prompt.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …/models/melo/peft_egg/src/peft/tuners/prompt_tuning.py | 1 | # coding=utf-8 | COMMENT |
| LOW | easyeditor/models/serac/serac_main.py | 81 | request["prompt"] + targets[i] | COMMENT |
| LOW | easyeditor/models/serac/serac_main.py | 101 | # | COMMENT |
| LOW | easyeditor/models/serac/serac_main.py | 121 | # max_length=hparams.max_length)["input_ids"] | COMMENT |
| LOW | easyeditor/models/serac/serac_main.py | 161 | # # Also keep these learned LRs. | COMMENT |
| LOW | easyeditor/models/serac/serac_main.py | 261 | labels=labels, | COMMENT |
| LOW | easyeditor/models/serac/serac_main.py | 281 | # | COMMENT |
| LOW | easyeditor/models/rome/repr_tools.py | 61 | prefixes_len.append(prefix_len) | COMMENT |
| LOW | easyeditor/models/rome/repr_tools.py | 81 | # | COMMENT |
| 80 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | demo/EasySteer_demo/utils.py | 57 | except Exception as e: | CODE |
| LOW | demo/EasySteer_demo/utils.py | 112 | except Exception as e: | CODE |
| LOW | demo/EasySteer_demo/utils.py | 256 | except Exception as e: | CODE |
| LOW | demo/EasySteer_demo/utils.py | 350 | except Exception as e: | CODE |
| MEDIUM | demo/EasySteer_demo/utils.py | 351 | # print(f"Error during response generation: {str(e)}") | COMMENT |
| MEDIUM | demo/EasySteer_demo/utils.py | 25 | def steer(steer_alg, prompt, pos_answer, neg_answer, steer_layer, steer_strength | CODE |
| MEDIUM | demo/EasySteer_demo/utils.py | 226 | def pretrained_vector(steer_vector, steer_strength, progress=gr.Progress()): | CODE |
| LOW | easyeditor/util/runningstats.py | 1442 | except Exception: | CODE |
| LOW | easyeditor/util/runningstats.py | 1453 | except Exception: | CODE |
| LOW | easyeditor/dataset/personality.py | 174 | except Exception as e: | CODE |
| LOW | easyeditor/dataset/personality.py | 188 | except Exception as e: | CODE |
| LOW | easyeditor/dataset/tfidf_stats.py | 59 | except Exception as e: | CODE |
| MEDIUM | easyeditor/dataset/tfidf_stats.py | 60 | print(f"Error downloading file:", e) | CODE |
| MEDIUM | easyeditor/editors/steer_editor.py | 64 | assert hparams is not None, print('Error: hparams is None.') | CODE |
| MEDIUM | easyeditor/editors/steer_editor.py | 127 | assert (input_image is not None and self.modal_type == 'mllm') or (input_image is None and self.modal_type == 'l | CODE |
| MEDIUM | easyeditor/editors/concept_editor.py | 78 | assert hparams is not None, print('Error: hparams is None.') | CODE |
| MEDIUM | easyeditor/editors/safety_editor.py | 61 | assert hparams is not None, print('Error: hparams is None.') | CODE |
| MEDIUM | easyeditor/editors/per_editor.py | 53 | assert hparams is not None, print('Error: hparams is None.') | CODE |
| MEDIUM | easyeditor/editors/multimodal_editor.py | 151 | assert hparams is not None or print('Error: hparams is None.') | CODE |
| LOW | easyeditor/models/core/core_main.py | 137 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/core/core_main.py | 138 | print(f"Error reading cache file due to {e}. Recomputing...") | CODE |
| LOW | …syeditor/models/melo/peft_egg/src/peft/utils/config.py | 115 | except Exception: | STRING |
| LOW | …syeditor/models/melo/peft_egg/src/peft/utils/config.py | 175 | except Exception: | STRING |
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/melo.py | 678 | except Exception as e: | STRING |
| LOW | easyeditor/models/SPHERE/SPHERE_main.py | 203 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/SPHERE/SPHERE_main.py | 204 | print(f"Error reading cache file due to {e}. Recomputing...") | CODE |
| LOW | easyeditor/models/emmet/emmet_main.py | 140 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/emmet/emmet_main.py | 141 | print(f"Error reading cache file due to {e}. Recomputing...") | CODE |
| LOW | easyeditor/models/alphaedit/AlphaEdit_main.py | 177 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/alphaedit/AlphaEdit_main.py | 178 | print(f"Error reading cache file due to {e}. Recomputing...") | CODE |
| LOW | easyeditor/models/memit/memit_main.py | 137 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/memit/memit_main.py | 138 | print(f"Error reading cache file due to {e}. Recomputing...") | CODE |
| LOW | easyeditor/models/memit_FE/memit_FE_main.py | 145 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/memit_FE/memit_FE_main.py | 146 | print(f"Error reading cache file due to {e}. Recomputing...") | CODE |
| LOW | easyeditor/models/memit_FE/compute_z.py | 44 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/memit_FE/compute_z.py | 47 | print(f"Error computing z for layer {first_layer} due to {e}. Returning None.") | CODE |
| LOW | easyeditor/models/pmet/pmet_main.py | 143 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/pmet/pmet_main.py | 144 | print(f"Error reading cache file due to {e}. Recomputing...") | CODE |
| LOW | easyeditor/models/eamet/eamet_main.py | 194 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/eamet/eamet_main.py | 195 | print(f"Error reading cache file due to {e}. Recomputing...") | CODE |
| LOW | easyeditor/models/eamet/eamet_main.py | 225 | except Exception as e: | CODE |
| MEDIUM | easyeditor/models/eamet/eamet_main.py | 226 | print(f"Error loading cache file due to {e}.") | CODE |
| MEDIUM | easyeditor/trainer/blip2_models/common/utils.py | 78 | print(f"Error creating directory: {dir_path}") | CODE |
| LOW | easyeditor/trainer/blip2_models/common/utils.py | 275 | except Exception as e: | CODE |
| LOW | easyeditor/trainer/blip2_models/common/utils.py | 357 | except Exception: | CODE |
| LOW | examples/run_personality_editing.py | 80 | except Exception as e: | CODE |
| LOW | examples/run_Hallueditbench.py | 79 | except Exception as e: | CODE |
| MEDIUM | examples/run_Hallueditbench.py | 80 | print(f"Error in get_response: {e}") | CODE |
| LOW | examples/test_InstructEdit.py | 228 | except Exception as e: | CODE |
| LOW | steer/__init__.py | 14 | except Exception: | CODE |
| MEDIUM | steer/vllm_hooks.py | 65 | def __call__(self, worker): | CODE |
| MEDIUM | steer/vllm_hooks.py | 78 | def __call__(self, worker): | CODE |
| MEDIUM | steer/vllm_hooks.py | 94 | def __call__(self, worker): | CODE |
| MEDIUM | steer/vllm_hooks.py | 106 | def __call__(self, worker): | CODE |
| MEDIUM | steer/vllm_hooks.py | 116 | def __call__(self, worker): | CODE |
| MEDIUM | steer/vllm_hooks.py | 124 | def __call__(self, worker): | CODE |
| LOW⚡ | steer/vllm_hooks.py | 111 | except Exception: | CODE |
| LOW⚡ | steer/vllm_hooks.py | 119 | except Exception: | CODE |
| LOW⚡ | steer/vllm_hooks.py | 127 | except Exception: | CODE |
| LOW | steer/vllm_hooks.py | 68 | except Exception: | CODE |
| 22 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | easyeditor/models/mend/mend_main.py | 30 | ] = model.transformer.wte.weight.data.mean(0) | CODE |
| CRITICAL | easyeditor/models/mend/mend_main.py | 158 | ] = model.transformer.wte.weight.data.mean(0) | CODE |
| CRITICAL | easyeditor/trainer/MultiTaskTrainer.py | 30 | self.model.model.lm_head.weight.data[-1, :] = self.model.model.lm_head.weight.data.mean(0) | CODE |
| CRITICAL | easyeditor/trainer/utils.py | 114 | model.transformer.wte.weight.data[-1] = model.transformer.wte.weight.data.mean(0) | CODE |
| CRITICAL | steer/vector_generators/spilt/generate_spilt.py | 191 | data_state = benchmark_model.model.steer_vector.proj.weight.data.clone().cpu() | CODE |
| CRITICAL | steer/vector_generators/sft/generate_sft.py | 262 | data_state = benchmark_model.model.steer_vector.proj.weight.data.clone().cpu() | CODE |
| CRITICAL | steer/vector_generators/reps/generate_reps.py | 191 | data_state = benchmark_model.model.steer_vector.proj.weight.data.clone().cpu() | CODE |
| CRITICAL | steer/trainer/BaseModelTrainer.py | 69 | weight = self.model.steer_vector.proj.weight.data.cpu() | CODE |
| CRITICAL | steer/trainer/BaseModelTrainer.py | 77 | bias = self.model.steer_vector.proj.bias.data.cpu() | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | demo/EasySteer_demo/app.py | 440 | CODE | |
| LOW | easyeditor/util/nethook.py | 50 | CODE | |
| LOW | easyeditor/util/nethook.py | 151 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 49 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 73 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 84 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 94 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 112 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 126 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 135 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 165 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 177 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 189 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 197 | CODE | |
| LOW | easyeditor/dataset/processor/randaugment.py | 206 | CODE | |
| LOW | easyeditor/editors/editor.py | 529 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 1008 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 1392 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 1459 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/melo.py | 1038 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/melo.py | 1260 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/lora.py | 712 | CODE | |
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/lora.py | 935 | CODE | |
| LOW | …or/models/melo/peft_egg/src/peft/tuners/melo_backup.py | 965 | CODE | |
| LOW | …or/models/melo/peft_egg/src/peft/tuners/melo_backup.py | 1188 | CODE | |
| LOW | easyeditor/models/r_rome/layer_stats.py | 79 | CODE | |
| LOW | easyeditor/models/deco/generate.py | 72 | CODE | |
| LOW | easyeditor/models/deco/generate.py | 340 | CODE | |
| LOW | easyeditor/models/deco/generate.py | 553 | CODE | |
| LOW | easyeditor/models/deco/generate.py | 773 | CODE | |
| LOW | …owledge_neurons/knowledge_neurons/knowledge_neurons.py | 373 | CODE | |
| LOW | easyeditor/models/rome/layer_stats.py | 79 | CODE | |
| LOW | easyeditor/models/dola/generate.py | 46 | CODE | |
| LOW | easyeditor/models/eamet/eamet_main.py | 38 | CODE | |
| LOW | easyeditor/evaluate/evaluate_utils.py | 349 | CODE | |
| LOW | easyeditor/evaluate/evaluate_utils.py | 371 | CODE | |
| LOW | easyeditor/evaluate/evaluate_utils.py | 634 | CODE | |
| LOW | easyeditor/evaluate/evaluate_utils.py | 607 | CODE | |
| LOW | easyeditor/evaluate/evaluate.py | 198 | CODE | |
| LOW | easyeditor/evaluate/evaluate.py | 235 | CODE | |
| LOW | easyeditor/evaluate/safety_evaluate.py | 48 | CODE | |
| LOW | easyeditor/evaluate/multimodal_evaluate.py | 251 | CODE | |
| LOW | easyeditor/evaluate/multimodal_evaluate.py | 344 | CODE | |
| LOW | easyeditor/trainer/algs/MALMEN.py | 287 | CODE | |
| LOW | easyeditor/trainer/blip2_models/clip_vit.py | 60 | CODE | |
| LOW | easyeditor/trainer/blip2_models/mini_gpt4.py | 31 | CODE | |
| LOW | easyeditor/trainer/blip2_models/mini_gpt4.py | 341 | CODE | |
| LOW | easyeditor/trainer/blip2_models/eva_vit.py | 155 | CODE | |
| LOW | easyeditor/trainer/blip2_models/eva_vit.py | 251 | CODE | |
| LOW | easyeditor/trainer/blip2_models/base_model.py | 236 | CODE | |
| LOW | easyeditor/trainer/blip2_models/blip2_opt.py | 48 | CODE | |
| LOW | easyeditor/trainer/blip2_models/blip2_opt.py | 273 | CODE | |
| LOW | easyeditor/trainer/blip2_models/modeling_opt.py | 604 | CODE | |
| LOW | easyeditor/trainer/blip2_models/modeling_opt.py | 843 | CODE | |
| LOW | easyeditor/trainer/blip2_models/modeling_opt.py | 933 | CODE | |
| LOW | easyeditor/trainer/blip2_models/modeling_llama.py | 479 | CODE | |
| LOW | easyeditor/trainer/blip2_models/modeling_llama.py | 642 | CODE | |
| LOW | easyeditor/trainer/blip2_models/Qformer.py | 511 | CODE | |
| LOW | easyeditor/trainer/blip2_models/Qformer.py | 820 | CODE | |
| LOW | easyeditor/trainer/blip2_models/Qformer.py | 1003 | CODE | |
| 3 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | easyeditor/models/melo/peft_egg/src/peft/tuners/melo.py | 545 | # ------------------------------------------------------------------------------------------ | STRING |
| MEDIUM⚡ | easyeditor/models/melo/peft_egg/src/peft/tuners/melo.py | 548 | # ------------------------------------------------------------------------------------------ | STRING |
| MEDIUM⚡ | easyeditor/models/melo/peft_egg/src/peft/tuners/lora.py | 509 | # ------------------------------------------------------------------------------------------ | STRING |
| MEDIUM⚡ | easyeditor/models/melo/peft_egg/src/peft/tuners/lora.py | 512 | # ------------------------------------------------------------------------------------------ | STRING |
| MEDIUM⚡ | …or/models/melo/peft_egg/src/peft/tuners/melo_backup.py | 528 | # ------------------------------------------------------------------------------------------ | STRING |
| MEDIUM⚡ | …or/models/melo/peft_egg/src/peft/tuners/melo_backup.py | 531 | # ------------------------------------------------------------------------------------------ | STRING |
| MEDIUM | easyeditor/trainer/algs/patch.py | 29 | # ============================================================================== | COMMENT |
| MEDIUM | easyeditor/trainer/algs/patch.py | 31 | # ============================================================================== | COMMENT |
| MEDIUM | easyeditor/trainer/algs/patch.py | 176 | # ============================================================================== | STRING |
| MEDIUM | easyeditor/trainer/algs/patch.py | 178 | # ============================================================================== | STRING |
| MEDIUM | easyeditor/trainer/algs/patch.py | 192 | # ============================================================================== | STRING |
| MEDIUM | easyeditor/trainer/algs/patch.py | 194 | # ============================================================================== | STRING |
| MEDIUM | easyeditor/trainer/algs/patch.py | 425 | # ============================================================================== | STRING |
| MEDIUM | easyeditor/trainer/algs/patch.py | 427 | # ============================================================================== | STRING |
| MEDIUM | easyeditor/trainer/algs/patch.py | 486 | # ============================================================================== | COMMENT |
| MEDIUM | easyeditor/trainer/algs/patch.py | 490 | # ============================================================================== | COMMENT |
| MEDIUM | examples/steer_eval.sh | 5 | # =========================== | COMMENT |
| MEDIUM | examples/steer_eval.sh | 7 | # =========================== | COMMENT |
| MEDIUM | examples/steer_eval.sh | 30 | # =========================== | COMMENT |
| MEDIUM | examples/steer_eval.sh | 32 | # =========================== | COMMENT |
| MEDIUM | examples/steer_eval.sh | 83 | # =========================== | COMMENT |
| MEDIUM | examples/steer_eval.sh | 85 | # =========================== | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | easyeditor/util/runningstats.py | 1409 | # We wish to be able to save None (null) values in numpy npz files, | COMMENT |
| HIGH | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 611 | trainable params: 370178 || all params: 108680450 || trainable%: 0.3406113979101117 | STRING |
| HIGH | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 796 | trainable params: 1843200 || all params: 775873280 || trainable%: 0.23756456724479544 | STRING |
| HIGH | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 997 | trainable params: 884736 || all params: 223843584 || trainable%: 0.3952474242013566 | STRING |
| HIGH | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 1203 | trainable params: 370178 || all params: 108680450 || trainable%: 0.3406113979101117 | STRING |
| HIGH | easyeditor/models/melo/peft_egg/src/peft/peft_model.py | 1373 | trainable params: 592900 || all params: 108312580 || trainable%: 0.5473971721475013 | STRING |
| HIGH | steer/trainer/PreferenceModelTrainer.py | 358 | "lr %.6f || loss %.6f || steer acc %.6f" % ( | CODE |
| HIGH | steer/trainer/SFTModelTrainer.py | 287 | "lr %.6f || loss %.6f" % ( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README_2.md | 232 | #### Step 1: Choose the Steering Method | COMMENT |
| LOW | README_2.md | 242 | #### Step 2: Configure the Top-Level Settings | COMMENT |
| LOW | README_2.md | 266 | #### Step 3: Provide the Input Data | COMMENT |
| LOW | README_2.md | 286 | #### Step 4: Pass the Configuration to Base Vector Generator and Start Training | COMMENT |
| LOW | README_2.md | 305 | #### Step 1: Complete the Apply Configuration File(s) | COMMENT |
| LOW | README_2.md | 316 | #### Step 2: Apply Steer Vectors to the Model | COMMENT |
| LOW | README_2.md | 380 | #### Step 3: Provide the Text Generation Data | COMMENT |
| LOW | README_2.md | 392 | #### Step 4: Generate Text Using the Steered Model | COMMENT |
| LOW⚡ | hparams/Steer/ccks2026_hparams/steer_eval_caa.yaml | 35 | # Step 1: generate_vector=true, generate_response=false | COMMENT |
| LOW⚡ | hparams/Steer/ccks2026_hparams/steer_eval_caa.yaml | 36 | # Step 2: generate_vector=false, generate_response=true | COMMENT |
| LOW | steer/benchmarks/SteerEval/prompts.py | 20 | ### Step 1: Generate "Gold Standard" Example | COMMENT |
| LOW | steer/benchmarks/SteerEval/prompts.py | 34 | ### Step 2: Generate 120 Concept-Related Questions (Split into Train/Test) | COMMENT |
| LOW | steer/benchmarks/SteerEval/prompts.py | 156 | ### Step 3: Concept Description | COMMENT |
| LOW | steer/benchmarks/SteerEval/prompts.py | 205 | ### Step 1: Question Refinement (The "Pivot") | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …odels/melo/peft_egg/src/peft/tuners/adaption_prompt.py | 205 | def set_adapter(self, adapter_name: str) -> None: | CODE |
| LOW⚡ | …odels/melo/peft_egg/src/peft/tuners/adaption_prompt.py | 238 | def _set_adapted_attentions(self, adapter_name: str) -> None: | CODE |
| LOW | easyeditor/models/eamet/compute_z.py | 25 | def set_target_new_str(request: Dict, value: str) -> None: | CODE |
| LOW | steer/vector_appliers/__init__.py | 10 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/caa/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/sae_feature/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/merge/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/spilt/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/prompt/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/lm_steer/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/sft/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/reps/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/vector_prompt/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_appliers/sta/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_generators/__init__.py | 10 | __all__ = [] | CODE |
| LOW | steer/vector_generators/caa/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_generators/merge/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_generators/spilt/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_generators/lm_steer/__init__.py | 16 | __all__ = ["Hack_no_grad", "Projected_Adaptor"] | CODE |
| LOW | steer/vector_generators/sft/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_generators/reps/__init__.py | 7 | __all__ = [] | CODE |
| LOW | steer/vector_generators/vector_prompt/__init__.py | 7 | __all__ = [] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | easyeditor/models/grace/GRACE.py | 62 | # if self.config.task == "hallucination": | COMMENT |
| MEDIUM | easyeditor/models/defer/DEFER.py | 56 | # if self.config.experiment.task == "hallucination": | COMMENT |
| MEDIUM | easyeditor/models/defer/DEFER.py | 76 | # if config["experiment"]["task"] == "hallucination": | COMMENT |
| MEDIUM | easyeditor/models/melo/melo_hparams.py | 34 | pt: str # set this to 'hallucination' inside your checkpoint directory | CODE |
| MEDIUM | hparams/MELO/gpt2-xl.yaml | 41 | pt: /home/yu/ECNU/MELO/melo/checkpoint # set this to 'hallucination' inside your checkpoint directory | CODE |
| MEDIUM | examples/run_wise_editing.sh | 24 | # --data_type=hallucination | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/melo.py | 747 | fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out | STRING |
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/melo.py | 966 | fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out) | STRING |
| LOW | easyeditor/models/melo/peft_egg/src/peft/tuners/lora.py | 638 | fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out) | STRING |
| LOW | …or/models/melo/peft_egg/src/peft/tuners/melo_backup.py | 669 | # Set this to True if the layer to replace stores weight like (fan_in, fan_out) | STRING |
| LOW | …or/models/melo/peft_egg/src/peft/tuners/melo_backup.py | 893 | # Set this to True if the layer to replace stores weight like (fan_in, fan_out) | STRING |
| LOW | easyeditor/models/wise/utils.py | 135 | # Append the masks to the lists | COMMENT |
| LOW | easyeditor/models/wise/utils.py | 360 | # Append the masks to the lists | COMMENT |
| LOW | examples/axbench_generate.py | 85 | # Check if this layer exists in vectors dict | COMMENT |
| LOW | steer/datasets/dataset_loader.py | 143 | # Check if this is a multi-concept dataset | STRING |
| LOW | steer/datasets/sample.py | 41 | # Check if it's a dict of lists with equal lengths | COMMENT |
| LOW | steer/vector_appliers/vector_applier.py | 108 | # Set pad_token_id to eos_token_id if not already set in generation_params | COMMENT |
| LOW | steer/vector_generators/spilt/utils.py | 56 | # Check if this is axbench dataset (has output_concept and category fields) | COMMENT |
| LOW | steer/vector_generators/sft/utils.py | 56 | # Check if this is axbench dataset (has output_concept and category fields) | COMMENT |
| LOW | steer/vector_generators/reps/utils.py | 57 | # Check if this is axbench dataset (has output_concept and category fields) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | easyeditor/dataset/sanitization.py | 15 | # This class is only for SERAC, MEND, FT, LoRA in training stage | COMMENT |
| MEDIUM | easyeditor/models/grace/GRACE.py | 20 | # Create a bunch of noised versions of the value, then create batch, then train value | COMMENT |
| MEDIUM | easyeditor/models/dpo/dpo_main.py | 79 | # Define the optimizer | COMMENT |
| MEDIUM | easyeditor/models/wise/WISE.py | 344 | os.makedirs(directory) # Create the directory if it doesn't exist | CODE |
| MEDIUM | easyeditor/models/eamet/compute_z.py | 81 | ### The above codes give [xxx] instead of [[xxx]] | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | easyeditor/models/rome/repr_tools.py | 105 | # So, just return the last token of the word. | COMMENT |
| MEDIUM | examples/train_DINM_for_NLPCC.py | 82 | # Besides, you should also assess the side effects, i.e., the general performance of edited model for unharmfullless use | COMMENT |
| MEDIUM | steer/utils/templates.py | 6 | # the text path uses safe_apply_chat_template (try/except) which is robust to local paths. | COMMENT |
| MEDIUM | steer/vector_appliers/caa/apply_caa.py | 10 | # We replace hardcoded hack_no_grad layer with a more flexible detection of the decoder layers, which is more robust | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | hparams/Steer/ccks2026_hparams/steer_eval_caa.yaml | 35 | # Step 1: generate_vector=true, generate_response=false | COMMENT |
| LOW⚡ | hparams/Steer/ccks2026_hparams/steer_eval_caa.yaml | 36 | # Step 2: generate_vector=false, generate_response=true | COMMENT |
| LOW | steer/benchmarks/SteerEval/prompts.py | 20 | ### Step 1: Generate "Gold Standard" Example | COMMENT |
| LOW | steer/benchmarks/SteerEval/prompts.py | 34 | ### Step 2: Generate 120 Concept-Related Questions (Split into Train/Test) | COMMENT |
| LOW | steer/benchmarks/SteerEval/prompts.py | 156 | ### Step 3: Concept Description | COMMENT |
| LOW | steer/benchmarks/SteerEval/prompts.py | 205 | ### Step 1: Question Refinement (The "Pivot") | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | hparams/DeepEdit_Api/chatglm_api.yaml | 3 | api_key: "your-api-key" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/run_AKEW_both.sh | 1 | # if you wanna run uns_data evaluate, don't forget to set --use_unstructured_data and choose --model_path all-MiniLM-L6- | COMMENT |
| LOW | examples/run_AKEW_both.sh | 1 | # if you wanna run uns_data evaluate, don't forget to set --use_unstructured_data and choose --model_path all-MiniLM-L6- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | demo/SafeEdit_demo/app.py | 118 | # ("DG of other questions: *The scene is set inside the underground headquarters of Dr. Al. He has c | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | easyeditor/util/runningstats.py | 110 | CODE |