Repository Analysis

zjunlp/EasyEdit

[ACL 2024] An Easy-to-use Knowledge Editing Framework for LLMs.

22.2 Moderate AI signal View on GitHub

Analysis Overview

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).

22.2
Adjusted Score
22.2
Raw Score
100%
Time Factor
2026-07-14
Last Push
2.9K
Stars
Jupyter Notebook
Language
118.8K
Lines of Code
943
Files
2.0K
Pattern Hits
2026-07-14
Scan Date
0.15
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 9HIGH 134MEDIUM 68LOW 1775

Directory Score Breakdown

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.

Pattern Findings

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.

Unused Imports993 hits · 966 pts
SeverityFileLineSnippetContext
LOWaxbench.py2CODE
LOWaxbench.py7CODE
LOWsteering.py3CODE
LOWsteering.py3CODE
LOWmultimodal_steering.py3CODE
LOWmultimodal_steering.py3CODE
LOWmultimodal_steering.py4CODE
LOWedit.py2CODE
LOWvectors_generate.py2CODE
LOWmultimodal_edit.py1CODE
LOWmultimodal_edit.py2CODE
LOWmultimodal_edit.py5CODE
LOWmultimodal_edit.py7CODE
LOWmultimodal_edit.py7CODE
LOWmultimodal_edit.py11CODE
LOWdemo/EasySteer_demo/demo_hparams.py5CODE
LOWdemo/EasySteer_demo/app.py4CODE
LOWdemo/EasySteer_demo/app.py5CODE
LOWdemo/SafeEdit_demo/utils.py8CODE
LOWdemo/SafeEdit_demo/utils.py11CODE
LOWdemo/SafeEdit_demo/app.py2CODE
LOWeasyeditor/__init__.py1CODE
LOWeasyeditor/__init__.py2CODE
LOWeasyeditor/__init__.py3CODE
LOWeasyeditor/__init__.py4CODE
LOWeasyeditor/__init__.py5CODE
LOWeasyeditor/__init__.py6CODE
LOWeasyeditor/util/globals.py1CODE
LOWeasyeditor/util/globals.py6CODE
LOWeasyeditor/util/__init__.py1CODE
LOWeasyeditor/util/__init__.py2CODE
LOWeasyeditor/util/alg_dict.py1CODE
LOWeasyeditor/util/alg_dict.py2CODE
LOWeasyeditor/util/alg_dict.py3CODE
LOWeasyeditor/util/alg_dict.py4CODE
LOWeasyeditor/util/alg_dict.py5CODE
LOWeasyeditor/util/alg_dict.py6CODE
LOWeasyeditor/util/alg_dict.py7CODE
LOWeasyeditor/util/alg_dict.py8CODE
LOWeasyeditor/util/alg_dict.py10CODE
LOWeasyeditor/util/alg_dict.py11CODE
LOWeasyeditor/util/alg_dict.py12CODE
LOWeasyeditor/util/alg_dict.py13CODE
LOWeasyeditor/util/alg_dict.py14CODE
LOWeasyeditor/util/alg_dict.py15CODE
LOWeasyeditor/util/alg_dict.py16CODE
LOWeasyeditor/util/alg_dict.py17CODE
LOWeasyeditor/util/alg_dict.py18CODE
LOWeasyeditor/util/alg_dict.py19CODE
LOWeasyeditor/util/alg_dict.py20CODE
LOWeasyeditor/util/alg_dict.py21CODE
LOWeasyeditor/util/alg_dict.py22CODE
LOWeasyeditor/util/alg_dict.py23CODE
LOWeasyeditor/util/alg_dict.py24CODE
LOWeasyeditor/util/alg_dict.py25CODE
LOWeasyeditor/util/alg_dict.py26CODE
LOWeasyeditor/util/alg_dict.py27CODE
LOWeasyeditor/util/alg_dict.py28CODE
LOWeasyeditor/dataset/counterfact.py5CODE
LOWeasyeditor/dataset/counterfact.py10CODE
933 more matches not shown…
Cross-File Repetition124 hits · 620 pts
SeverityFileLineSnippetContext
HIGHeasyeditor/dataset/adsedit.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/dataset/coco_caption.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/dataset/ComprehendEdit.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/dataset/vqa.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/dataset/processor/base_dataset.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/dataset/processor/blip_processors.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/dataset/processor/base_processor.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/dataset/processor/randaugment.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/trainer/blip2_models/base_model.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/trainer/blip2_models/common/logger.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/trainer/blip2_models/common/utils.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/trainer/blip2_models/common/dist_utils.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/trainer/blip2_models/blip2_opt.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/trainer/blip2_models/blip2.py0copyright (c) 2023, salesforce.com, inc. all rights reserved. spdx-license-identifier: bsd-3-clause for full license texSTRING
HIGHeasyeditor/dataset/adsedit.py0vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation filSTRING
HIGHeasyeditor/dataset/coco_caption.py0vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation filSTRING
HIGHeasyeditor/dataset/ComprehendEdit.py0vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation filSTRING
HIGHeasyeditor/dataset/vqa.py0vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation filSTRING
HIGHeasyeditor/dataset/processor/base_dataset.py0vis_root (string): root directory of images (e.g. coco/images/) ann_root (string): directory to store the annotation filSTRING
HIGHeasyeditor/models/grace/utils.py0returns the directory in which to store model checkpointsSTRING
HIGHeasyeditor/models/defer/utils.py0returns the directory in which to store model checkpointsSTRING
HIGHeasyeditor/models/melo/util.py0returns the directory in which to store model checkpointsSTRING
HIGHeasyeditor/models/wise/utils.py0returns the directory in which to store model checkpointsSTRING
HIGHeasyeditor/models/dinm/dinm_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/lora_uns/lora_uns_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/ft_uns/ft_uns_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/lora/lora_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/ft/ft_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/core/core_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/r_rome/r_rome_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/emmet/emmet_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/memit/memit_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/rome/rome_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/memit_FE/memit_FE_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/pmet/pmet_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/eamet/eamet_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/SPHERE/SPHERE_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/alphaedit/AlphaEdit_main.py0returns a model with the desired changes. :param copy: if true, will preserve the original model while creating a new onSTRING
HIGHeasyeditor/models/dinm/dinm_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/ft_uns/ft_uns_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/ft/ft_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/core/core_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/lora_uns/lora_uns_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/lora/lora_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/r_rome/r_rome_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/rome/rome_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/SPHERE/SPHERE_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/alphaedit/AlphaEdit_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/emmet/emmet_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/memit/memit_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/memit_FE/memit_FE_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/pmet/pmet_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/eamet/eamet_main.py0executes the memit update algorithm for the specified update at the specified layer invariant: model at beginning of funSTRING
HIGHeasyeditor/models/core/compute_z.py0computes the value (right) vector for the rank-1 update. runs a simple optimization procedure.STRING
HIGHeasyeditor/models/r_rome/compute_v.py0computes the value (right) vector for the rank-1 update. runs a simple optimization procedure.STRING
HIGHeasyeditor/models/SPHERE/compute_z.py0computes the value (right) vector for the rank-1 update. runs a simple optimization procedure.STRING
HIGHeasyeditor/models/unke/compute_z.py0computes the value (right) vector for the rank-1 update. runs a simple optimization procedure.STRING
HIGHeasyeditor/models/emmet/compute_z.py0computes the value (right) vector for the rank-1 update. runs a simple optimization procedure.STRING
HIGHeasyeditor/models/alphaedit/compute_z.py0computes the value (right) vector for the rank-1 update. runs a simple optimization procedure.STRING
HIGHeasyeditor/models/memit/compute_z.py0computes the value (right) vector for the rank-1 update. runs a simple optimization procedure.STRING
64 more matches not shown…
Hyper-Verbose Identifiers251 hits · 231 pts
SeverityFileLineSnippetContext
LOWvectors_generate.py52# def generate_vector_prompt_vector(hparams_dict):COMMENT
LOWvectors_generate.py57# def generate_sae_feature_vector(hparams_dict):COMMENT
LOWvectors_apply.py38# def apply_sae_feature_to_model(hparams_dict, model):COMMENT
LOWvectors_apply.py50# def apply_vector_prompt_to_model(hparams_dict, model):COMMENT
LOWeasyeditor/util/hparams.py21 def construct_float_from_scientific_notation(config: dict):CODE
LOWeasyeditor/util/nethook.py441def invoke_with_optional_args(fn, *args, **kwargs):CODE
LOWeasyeditor/util/vl_utils.py58def prepend_qwen_vl_image_tokens_if_missing(model_name, chat, num_images=1):CODE
LOWeasyeditor/util/vl_utils.py66def normalize_multimodal_batch(media, batch_size, file_type):CODE
LOWeasyeditor/dataset/AKEW_both.py19def get_llama_without_answer_cot(que):CODE
LOWeasyeditor/dataset/AKEW_both.py25def get_qwen_without_answer_cot(que):CODE
LOWeasyeditor/dataset/AKEW_both.py28def get_vicuna_without_answer(que):CODE
LOWeasyeditor/dataset/AKEW_both.py30def get_list_llama_without_answer(que, cot):CODE
LOWeasyeditor/dataset/AKEW_both.py36def get_list_qwen_without_answer(que, cot):CODE
LOWeasyeditor/dataset/AKEW_both.py121 def _process_structured_format(self):CODE
LOWeasyeditor/dataset/AKEW_both.py137 def _process_unstructured_format(self):CODE
LOWeasyeditor/dataset/AKEW_both.py153 def _process_wikiupdate_structured(self, record, case_id):CODE
LOWeasyeditor/dataset/AKEW_both.py167 def _process_counterfact_structured(self, record, case_id):CODE
LOWeasyeditor/dataset/AKEW_both.py182 def _process_mquake_structured(self, record, case_id):CODE
LOWeasyeditor/dataset/AKEW_both.py197 def _process_counterfact_unstructured(self, record, case_id):CODE
LOWeasyeditor/dataset/AKEW_both.py226 def _process_mquake_unstructured(self, record, case_id):CODE
LOWeasyeditor/dataset/AKEW_both.py257 def _process_unke_unstructured(self, record, case_id):CODE
LOWeasyeditor/dataset/AKEW_both.py286 def _process_wikiupdate_unstructured(self, record, case_id):CODE
LOWeasyeditor/dataset/LEME.py104 def _process_counterfact_data(self, record, case_id):CODE
LOWeasyeditor/dataset/LEME.py134 def _extract_coupled_entities(self, record):CODE
LOWeasyeditor/dataset/coco_caption.py142 def _build_hf_multimodal_batch(prompts, targets, images, file_type):CODE
LOWeasyeditor/dataset/vqa.py148 def _build_hf_multimodal_batch(prompts, targets, images, file_type):CODE
LOWeasyeditor/dataset/sanitization.py20 def generate_next_locality_index(self):CODE
LOWeasyeditor/editors/utils.py100def get_metric_protocol_summary(dict_list):CODE
LOWeasyeditor/editors/multimodal_editor.py56def get_aligned_topk_token_ids(pre_logits, post_logits, k):CODE
LOWeasyeditor/editors/multimodal_editor.py81def attach_topk_locality_metrics(metrics):CODE
LOWeasyeditor/editors/editor.py56def finalize_locality_metrics(metric, request, hparams, model_name):CODE
LOWeasyeditor/models/grace/grace_main.py36def apply_grace_to_multimodal_model(CODE
LOWeasyeditor/models/core/compute_z.py17def get_required_ground_truth_for_context(request: Dict, context_type: str):CODE
LOWeasyeditor/models/core/compute_z.py346def get_module_input_output_at_words(CODE
LOWeasyeditor/models/melo/melo.py121 def register_lora_backward_hooks(self,backward_hook_fn):CODE
LOW…editor/models/melo/peft_egg/tests/test_gpu_examples.py173 def test_causal_lm_training_mutli_gpu(self):STRING
LOW…editor/models/melo/peft_egg/tests/test_gpu_examples.py357 def test_audio_model_training(self):STRING
LOW…tor/models/melo/peft_egg/tests/test_adaption_prompt.py60 def _create_test_llama_config():CODE
LOW…tor/models/melo/peft_egg/tests/test_adaption_prompt.py80 def test_prepare_for_training(self) -> None:CODE
LOW…tor/models/melo/peft_egg/tests/test_adaption_prompt.py178 def test_sequence_adapter_ops(self) -> None:CODE
LOW…tor/models/melo/peft_egg/tests/test_adaption_prompt.py247 def test_add_and_set_while_disabled(self):CODE
LOW…itor/models/melo/peft_egg/tests/test_decoder_models.py57 def prepare_inputs_for_testing(self):STRING
LOW…itor/models/melo/peft_egg/tests/test_decoder_models.py69 def test_attributes_parametrized(self, test_name, model_id, config_cls, config_kwargs):STRING
LOW…itor/models/melo/peft_egg/tests/test_decoder_models.py77 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.py109 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.py113 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.py117 def test_inference_safetensors(self, test_name, model_id, config_cls, config_kwargs):STRING
LOW…itor/models/melo/peft_egg/tests/test_decoder_models.py121 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.py48 def prepare_inputs_for_testing(self):STRING
LOW…els/melo/peft_egg/tests/test_encoder_decoder_models.py62 def test_attributes_parametrized(self, test_name, model_id, config_cls, config_kwargs):STRING
LOW…els/melo/peft_egg/tests/test_encoder_decoder_models.py70 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.py99 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.py103 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.py107 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.py111 def test_inference_safetensors(self, test_name, model_id, config_cls, config_kwargs):STRING
LOW…els/melo/peft_egg/tests/test_encoder_decoder_models.py115 def test_peft_model_device_map(self, test_name, model_id, config_cls, config_kwargs):STRING
LOWeasyeditor/models/melo/peft_egg/tests/testing_common.py145 def prepare_inputs_for_common(self):STRING
LOWeasyeditor/models/melo/peft_egg/tests/testing_common.py175 def _test_prepare_for_training(self, model_id, config_cls, config_kwargs):STRING
LOWeasyeditor/models/melo/peft_egg/tests/testing_common.py363 def _test_inference_safetensors(self, model_id, config_cls, config_kwargs):STRING
LOWeasyeditor/models/melo/peft_egg/tests/testing_common.py396 def _test_training_layer_indexing(self, model_id, config_cls, config_kwargs):STRING
191 more matches not shown…
Deep Nesting218 hits · 214 pts
SeverityFileLineSnippetContext
LOWedit.py1703CODE
LOWdemo/EasySteer_demo/demo_hparams.py215CODE
LOWdemo/EasySteer_demo/utils.py62CODE
LOWdemo/EasySteer_demo/utils.py226CODE
LOWdemo/EasySteer_demo/app.py34CODE
LOWdemo/EasySteer_demo/app.py579CODE
LOWdemo/EasySteer_demo/app.py343CODE
LOWdemo/EasySteer_demo/app.py440CODE
LOWdemo/EasySteer_demo/app.py671CODE
LOWeasyeditor/util/generate.py11CODE
LOWeasyeditor/util/generate.py78CODE
LOWeasyeditor/util/runningstats.py1469CODE
LOWeasyeditor/util/runningstats.py875CODE
LOWeasyeditor/dataset/Cknowedit.py16CODE
LOWeasyeditor/dataset/AKEW_both.py52CODE
LOWeasyeditor/dataset/AKEW_both.py121CODE
LOWeasyeditor/dataset/AKEW_both.py137CODE
LOWeasyeditor/dataset/MQuAKE.py19CODE
LOWeasyeditor/dataset/LEME.py24CODE
LOWeasyeditor/dataset/coco_caption.py25CODE
LOWeasyeditor/dataset/coco_caption.py126CODE
LOWeasyeditor/dataset/coco_caption.py142CODE
LOWeasyeditor/dataset/ComprehendEdit.py226CODE
LOWeasyeditor/dataset/HalluEditBench.py70CODE
LOWeasyeditor/dataset/multitask.py21CODE
LOWeasyeditor/dataset/multitask.py184CODE
LOWeasyeditor/dataset/zsre.py21CODE
LOWeasyeditor/dataset/vqa.py25CODE
LOWeasyeditor/dataset/vqa.py132CODE
LOWeasyeditor/dataset/vqa.py148CODE
LOWeasyeditor/dataset/processor/qwen2vl_processors.py9CODE
LOWeasyeditor/editors/steer_editor.py60CODE
LOWeasyeditor/editors/concept_editor.py74CODE
LOWeasyeditor/editors/concept_editor.py144CODE
LOWeasyeditor/editors/concept_editor.py250CODE
LOWeasyeditor/editors/safety_editor.py57CODE
LOWeasyeditor/editors/safety_editor.py128CODE
LOWeasyeditor/editors/safety_editor.py264CODE
LOWeasyeditor/editors/utils.py81CODE
LOWeasyeditor/editors/utils.py116CODE
LOWeasyeditor/editors/utils.py159CODE
LOWeasyeditor/editors/multimodal_editor.py147CODE
LOWeasyeditor/editors/multimodal_editor.py261CODE
LOWeasyeditor/editors/multimodal_editor.py506CODE
LOWeasyeditor/editors/editor.py105CODE
LOWeasyeditor/editors/editor.py471CODE
LOWeasyeditor/models/grace/GRACE.py183CODE
LOWeasyeditor/models/dinm/dinm_main.py60CODE
LOWeasyeditor/models/core/core_main.py308CODE
LOWeasyeditor/models/mend/oracle.py9CODE
LOWeasyeditor/models/mend/mend_main.py56CODE
LOWeasyeditor/models/mend/mend_main.py181CODE
LOWeasyeditor/models/melo/models.py76CODE
LOWeasyeditor/models/melo/peft_egg/tests/testing_common.py78CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/peft_model.py405CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/peft_model.py691CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/peft_model.py923CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/peft_model.py1008CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/mapping.py64CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/utils/other.py24CODE
158 more matches not shown…
Over-Commented Block140 hits · 139 pts
SeverityFileLineSnippetContext
LOWmultimodal_steering.py41 for input_type in input_types:COMMENT
LOWedit.py3021 # metrics, edited_model = test_KN()COMMENT
LOWedit.py3041 # test_SERAC()COMMENT
LOWedit.py3061 # test_KE_T5()COMMENT
LOWedit.py3081 # test_IKE_ChatGLM()COMMENT
LOWedit.py3101 # test_MEND_Train_Qwen()COMMENT
LOWvectors_generate.py1import hydraCOMMENT
LOWvectors_generate.py41COMMENT
LOWvectors_generate.py61COMMENT
LOWvectors_apply.py41# model = apply_sae_feature(hparams, model)COMMENT
LOWvectors_apply.py61COMMENT
LOWmultimodal_edit.py781 # train_MEND_Blip2OPT_VQA_Vision_debug()COMMENT
LOWmultimodal_edit.py801 # test_IKE_MiniGPT4_Caption()COMMENT
LOWdemo/EasySteer_demo/demo_hparams.py121 }COMMENT
LOWeasyeditor/util/globals.py21 stream_handler = logging.StreamHandler()COMMENT
LOWeasyeditor/util/globals.py41# print(f"Results will be stored at {run_dir}")COMMENT
LOWeasyeditor/dataset/MQuAKE.py181 loc = [b["locality_prompt"] for b in batch]COMMENT
LOWeasyeditor/dataset/LEME.py241 # for src_, trg_ in zip(src, trg)]COMMENT
LOWeasyeditor/dataset/ComprehendEdit.py301 # generated image content is not consist with question, so we don't use these samples.COMMENT
LOWeasyeditor/dataset/zsre.py201 # trg = [' ' + trg_ for trg_ in trg]COMMENT
LOWeasyeditor/dataset/wiki_recent.py101 loc = [b["locality_prompt"] for b in batch]COMMENT
LOWeasyeditor/dataset/wiki_recent.py121 # for i in range(len(self.tok(trg_, truncation=True, max_length=self.config.max_length)["input_ids"]COMMENT
LOWeasyeditor/editors/concept_editor.py101 elif 'llama' in self.model_name.lower():COMMENT
LOWeasyeditor/models/melo/peft_egg/grammar.py1# import torchCOMMENT
LOWeasyeditor/models/melo/peft_egg/setup.py1# Copyright 2023 The HuggingFace Team. All rights reserved.COMMENT
LOWeasyeditor/models/melo/peft_egg/setup.py61)COMMENT
LOW…editor/models/melo/peft_egg/tests/test_gpu_examples.py1# coding=utf-8COMMENT
LOWeasyeditor/models/melo/peft_egg/tests/testing_utils.py1# coding=utf-8COMMENT
LOW…tor/models/melo/peft_egg/tests/test_adaption_prompt.py1# coding=utf-8COMMENT
LOW…itor/models/melo/peft_egg/tests/test_decoder_models.py1# coding=utf-8COMMENT
LOW…els/melo/peft_egg/tests/test_encoder_decoder_models.py1# coding=utf-8COMMENT
LOWeasyeditor/models/melo/peft_egg/tests/testing_common.py1# coding=utf-8COMMENT
LOW…syeditor/models/melo/peft_egg/tests/test_common_gpu.py1# coding=utf-8COMMENT
LOWeasyeditor/models/melo/peft_egg/tests/test_config.py1# coding=utf-8COMMENT
LOWeasyeditor/models/melo/peft_egg/scripts/stale.py1# Copyright 2023 The HuggingFace Team, the AllenNLP library authors. All rights reserved.COMMENT
LOWeasyeditor/models/melo/peft_egg/src/peft/__init__.py1# flake8: noqaCOMMENT
LOWeasyeditor/models/melo/peft_egg/src/peft/peft_model.py1# coding=utf-8COMMENT
LOW…syeditor/models/melo/peft_egg/src/peft/import_utils.py1# coding=utf-8COMMENT
LOWeasyeditor/models/melo/peft_egg/src/peft/mapping.py1# coding=utf-8COMMENT
LOW…syeditor/models/melo/peft_egg/src/peft/utils/config.py1# coding=utf-8COMMENT
LOW…editor/models/melo/peft_egg/src/peft/utils/__init__.py1# flake8: noqaCOMMENT
LOWeasyeditor/models/melo/peft_egg/src/peft/utils/other.py1# coding=utf-8COMMENT
LOW…ditor/models/melo/peft_egg/src/peft/utils/hub_utils.py1# coding=utf-8COMMENT
LOW…r/models/melo/peft_egg/src/peft/utils/save_and_load.py1# coding=utf-8COMMENT
LOW…ditor/models/melo/peft_egg/src/peft/tuners/p_tuning.py1# coding=utf-8COMMENT
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/melo.py1# coding=utf-8COMMENT
LOW…ditor/models/melo/peft_egg/src/peft/tuners/__init__.py1# flake8: noqaCOMMENT
LOW…/models/melo/peft_egg/src/peft/tuners/prefix_tuning.py1# coding=utf-8COMMENT
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/lora.py1# coding=utf-8COMMENT
LOW…or/models/melo/peft_egg/src/peft/tuners/melo_backup.py1# coding=utf-8COMMENT
LOW…odels/melo/peft_egg/src/peft/tuners/adaption_prompt.py1# coding=utf-8COMMENT
LOW…/models/melo/peft_egg/src/peft/tuners/prompt_tuning.py1# coding=utf-8COMMENT
LOWeasyeditor/models/serac/serac_main.py81 request["prompt"] + targets[i]COMMENT
LOWeasyeditor/models/serac/serac_main.py101 #COMMENT
LOWeasyeditor/models/serac/serac_main.py121 # max_length=hparams.max_length)["input_ids"]COMMENT
LOWeasyeditor/models/serac/serac_main.py161 # # Also keep these learned LRs.COMMENT
LOWeasyeditor/models/serac/serac_main.py261 labels=labels,COMMENT
LOWeasyeditor/models/serac/serac_main.py281 #COMMENT
LOWeasyeditor/models/rome/repr_tools.py61 prefixes_len.append(prefix_len)COMMENT
LOWeasyeditor/models/rome/repr_tools.py81 #COMMENT
80 more matches not shown…
Excessive Try-Catch Wrapping82 hits · 114 pts
SeverityFileLineSnippetContext
LOWdemo/EasySteer_demo/utils.py57 except Exception as e:CODE
LOWdemo/EasySteer_demo/utils.py112 except Exception as e:CODE
LOWdemo/EasySteer_demo/utils.py256 except Exception as e:CODE
LOWdemo/EasySteer_demo/utils.py350 except Exception as e:CODE
MEDIUMdemo/EasySteer_demo/utils.py351 # print(f"Error during response generation: {str(e)}")COMMENT
MEDIUMdemo/EasySteer_demo/utils.py25def steer(steer_alg, prompt, pos_answer, neg_answer, steer_layer, steer_strengthCODE
MEDIUMdemo/EasySteer_demo/utils.py226def pretrained_vector(steer_vector, steer_strength, progress=gr.Progress()):CODE
LOWeasyeditor/util/runningstats.py1442 except Exception:CODE
LOWeasyeditor/util/runningstats.py1453 except Exception:CODE
LOWeasyeditor/dataset/personality.py174 except Exception as e:CODE
LOWeasyeditor/dataset/personality.py188 except Exception as e:CODE
LOWeasyeditor/dataset/tfidf_stats.py59 except Exception as e:CODE
MEDIUMeasyeditor/dataset/tfidf_stats.py60 print(f"Error downloading file:", e)CODE
MEDIUMeasyeditor/editors/steer_editor.py64 assert hparams is not None, print('Error: hparams is None.')CODE
MEDIUMeasyeditor/editors/steer_editor.py127 assert (input_image is not None and self.modal_type == 'mllm') or (input_image is None and self.modal_type == 'lCODE
MEDIUMeasyeditor/editors/concept_editor.py78 assert hparams is not None, print('Error: hparams is None.')CODE
MEDIUMeasyeditor/editors/safety_editor.py61 assert hparams is not None, print('Error: hparams is None.')CODE
MEDIUMeasyeditor/editors/per_editor.py53 assert hparams is not None, print('Error: hparams is None.')CODE
MEDIUMeasyeditor/editors/multimodal_editor.py151 assert hparams is not None or print('Error: hparams is None.')CODE
LOWeasyeditor/models/core/core_main.py137 except Exception as e:CODE
MEDIUMeasyeditor/models/core/core_main.py138 print(f"Error reading cache file due to {e}. Recomputing...")CODE
LOW…syeditor/models/melo/peft_egg/src/peft/utils/config.py115 except Exception:STRING
LOW…syeditor/models/melo/peft_egg/src/peft/utils/config.py175 except Exception:STRING
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/melo.py678 except Exception as e:STRING
LOWeasyeditor/models/SPHERE/SPHERE_main.py203 except Exception as e:CODE
MEDIUMeasyeditor/models/SPHERE/SPHERE_main.py204 print(f"Error reading cache file due to {e}. Recomputing...")CODE
LOWeasyeditor/models/emmet/emmet_main.py140 except Exception as e:CODE
MEDIUMeasyeditor/models/emmet/emmet_main.py141 print(f"Error reading cache file due to {e}. Recomputing...")CODE
LOWeasyeditor/models/alphaedit/AlphaEdit_main.py177 except Exception as e:CODE
MEDIUMeasyeditor/models/alphaedit/AlphaEdit_main.py178 print(f"Error reading cache file due to {e}. Recomputing...")CODE
LOWeasyeditor/models/memit/memit_main.py137 except Exception as e:CODE
MEDIUMeasyeditor/models/memit/memit_main.py138 print(f"Error reading cache file due to {e}. Recomputing...")CODE
LOWeasyeditor/models/memit_FE/memit_FE_main.py145 except Exception as e:CODE
MEDIUMeasyeditor/models/memit_FE/memit_FE_main.py146 print(f"Error reading cache file due to {e}. Recomputing...")CODE
LOWeasyeditor/models/memit_FE/compute_z.py44 except Exception as e:CODE
MEDIUMeasyeditor/models/memit_FE/compute_z.py47 print(f"Error computing z for layer {first_layer} due to {e}. Returning None.")CODE
LOWeasyeditor/models/pmet/pmet_main.py143 except Exception as e:CODE
MEDIUMeasyeditor/models/pmet/pmet_main.py144 print(f"Error reading cache file due to {e}. Recomputing...")CODE
LOWeasyeditor/models/eamet/eamet_main.py194 except Exception as e:CODE
MEDIUMeasyeditor/models/eamet/eamet_main.py195 print(f"Error reading cache file due to {e}. Recomputing...")CODE
LOWeasyeditor/models/eamet/eamet_main.py225 except Exception as e:CODE
MEDIUMeasyeditor/models/eamet/eamet_main.py226 print(f"Error loading cache file due to {e}.")CODE
MEDIUMeasyeditor/trainer/blip2_models/common/utils.py78 print(f"Error creating directory: {dir_path}")CODE
LOWeasyeditor/trainer/blip2_models/common/utils.py275 except Exception as e:CODE
LOWeasyeditor/trainer/blip2_models/common/utils.py357 except Exception:CODE
LOWexamples/run_personality_editing.py80 except Exception as e:CODE
LOWexamples/run_Hallueditbench.py79 except Exception as e:CODE
MEDIUMexamples/run_Hallueditbench.py80 print(f"Error in get_response: {e}")CODE
LOWexamples/test_InstructEdit.py228 except Exception as e:CODE
LOWsteer/__init__.py14 except Exception:CODE
MEDIUMsteer/vllm_hooks.py65def __call__(self, worker):CODE
MEDIUMsteer/vllm_hooks.py78def __call__(self, worker):CODE
MEDIUMsteer/vllm_hooks.py94def __call__(self, worker):CODE
MEDIUMsteer/vllm_hooks.py106def __call__(self, worker):CODE
MEDIUMsteer/vllm_hooks.py116def __call__(self, worker):CODE
MEDIUMsteer/vllm_hooks.py124def __call__(self, worker):CODE
LOWsteer/vllm_hooks.py111 except Exception:CODE
LOWsteer/vllm_hooks.py119 except Exception:CODE
LOWsteer/vllm_hooks.py127 except Exception:CODE
LOWsteer/vllm_hooks.py68 except Exception:CODE
22 more matches not shown…
Hallucination Indicators9 hits · 90 pts
SeverityFileLineSnippetContext
CRITICALeasyeditor/models/mend/mend_main.py30 ] = model.transformer.wte.weight.data.mean(0)CODE
CRITICALeasyeditor/models/mend/mend_main.py158 ] = model.transformer.wte.weight.data.mean(0)CODE
CRITICALeasyeditor/trainer/MultiTaskTrainer.py30 self.model.model.lm_head.weight.data[-1, :] = self.model.model.lm_head.weight.data.mean(0)CODE
CRITICALeasyeditor/trainer/utils.py114 model.transformer.wte.weight.data[-1] = model.transformer.wte.weight.data.mean(0)CODE
CRITICALsteer/vector_generators/spilt/generate_spilt.py191 data_state = benchmark_model.model.steer_vector.proj.weight.data.clone().cpu()CODE
CRITICALsteer/vector_generators/sft/generate_sft.py262 data_state = benchmark_model.model.steer_vector.proj.weight.data.clone().cpu()CODE
CRITICALsteer/vector_generators/reps/generate_reps.py191 data_state = benchmark_model.model.steer_vector.proj.weight.data.clone().cpu()CODE
CRITICALsteer/trainer/BaseModelTrainer.py69 weight = self.model.steer_vector.proj.weight.data.cpu()CODE
CRITICALsteer/trainer/BaseModelTrainer.py77 bias = self.model.steer_vector.proj.bias.data.cpu()CODE
AI Structural Patterns63 hits · 62 pts
SeverityFileLineSnippetContext
LOWdemo/EasySteer_demo/app.py440CODE
LOWeasyeditor/util/nethook.py50CODE
LOWeasyeditor/util/nethook.py151CODE
LOWeasyeditor/dataset/processor/randaugment.py49CODE
LOWeasyeditor/dataset/processor/randaugment.py73CODE
LOWeasyeditor/dataset/processor/randaugment.py84CODE
LOWeasyeditor/dataset/processor/randaugment.py94CODE
LOWeasyeditor/dataset/processor/randaugment.py112CODE
LOWeasyeditor/dataset/processor/randaugment.py126CODE
LOWeasyeditor/dataset/processor/randaugment.py135CODE
LOWeasyeditor/dataset/processor/randaugment.py165CODE
LOWeasyeditor/dataset/processor/randaugment.py177CODE
LOWeasyeditor/dataset/processor/randaugment.py189CODE
LOWeasyeditor/dataset/processor/randaugment.py197CODE
LOWeasyeditor/dataset/processor/randaugment.py206CODE
LOWeasyeditor/editors/editor.py529CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/peft_model.py1008CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/peft_model.py1392CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/peft_model.py1459CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/melo.py1038CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/melo.py1260CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/lora.py712CODE
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/lora.py935CODE
LOW…or/models/melo/peft_egg/src/peft/tuners/melo_backup.py965CODE
LOW…or/models/melo/peft_egg/src/peft/tuners/melo_backup.py1188CODE
LOWeasyeditor/models/r_rome/layer_stats.py79CODE
LOWeasyeditor/models/deco/generate.py72CODE
LOWeasyeditor/models/deco/generate.py340CODE
LOWeasyeditor/models/deco/generate.py553CODE
LOWeasyeditor/models/deco/generate.py773CODE
LOW…owledge_neurons/knowledge_neurons/knowledge_neurons.py373CODE
LOWeasyeditor/models/rome/layer_stats.py79CODE
LOWeasyeditor/models/dola/generate.py46CODE
LOWeasyeditor/models/eamet/eamet_main.py38CODE
LOWeasyeditor/evaluate/evaluate_utils.py349CODE
LOWeasyeditor/evaluate/evaluate_utils.py371CODE
LOWeasyeditor/evaluate/evaluate_utils.py634CODE
LOWeasyeditor/evaluate/evaluate_utils.py607CODE
LOWeasyeditor/evaluate/evaluate.py198CODE
LOWeasyeditor/evaluate/evaluate.py235CODE
LOWeasyeditor/evaluate/safety_evaluate.py48CODE
LOWeasyeditor/evaluate/multimodal_evaluate.py251CODE
LOWeasyeditor/evaluate/multimodal_evaluate.py344CODE
LOWeasyeditor/trainer/algs/MALMEN.py287CODE
LOWeasyeditor/trainer/blip2_models/clip_vit.py60CODE
LOWeasyeditor/trainer/blip2_models/mini_gpt4.py31CODE
LOWeasyeditor/trainer/blip2_models/mini_gpt4.py341CODE
LOWeasyeditor/trainer/blip2_models/eva_vit.py155CODE
LOWeasyeditor/trainer/blip2_models/eva_vit.py251CODE
LOWeasyeditor/trainer/blip2_models/base_model.py236CODE
LOWeasyeditor/trainer/blip2_models/blip2_opt.py48CODE
LOWeasyeditor/trainer/blip2_models/blip2_opt.py273CODE
LOWeasyeditor/trainer/blip2_models/modeling_opt.py604CODE
LOWeasyeditor/trainer/blip2_models/modeling_opt.py843CODE
LOWeasyeditor/trainer/blip2_models/modeling_opt.py933CODE
LOWeasyeditor/trainer/blip2_models/modeling_llama.py479CODE
LOWeasyeditor/trainer/blip2_models/modeling_llama.py642CODE
LOWeasyeditor/trainer/blip2_models/Qformer.py511CODE
LOWeasyeditor/trainer/blip2_models/Qformer.py820CODE
LOWeasyeditor/trainer/blip2_models/Qformer.py1003CODE
3 more matches not shown…
Decorative Section Separators22 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUMeasyeditor/models/melo/peft_egg/src/peft/tuners/melo.py545# ------------------------------------------------------------------------------------------STRING
MEDIUMeasyeditor/models/melo/peft_egg/src/peft/tuners/melo.py548# ------------------------------------------------------------------------------------------STRING
MEDIUMeasyeditor/models/melo/peft_egg/src/peft/tuners/lora.py509# ------------------------------------------------------------------------------------------STRING
MEDIUMeasyeditor/models/melo/peft_egg/src/peft/tuners/lora.py512# ------------------------------------------------------------------------------------------STRING
MEDIUM…or/models/melo/peft_egg/src/peft/tuners/melo_backup.py528# ------------------------------------------------------------------------------------------STRING
MEDIUM…or/models/melo/peft_egg/src/peft/tuners/melo_backup.py531# ------------------------------------------------------------------------------------------STRING
MEDIUMeasyeditor/trainer/algs/patch.py29# ==============================================================================COMMENT
MEDIUMeasyeditor/trainer/algs/patch.py31# ==============================================================================COMMENT
MEDIUMeasyeditor/trainer/algs/patch.py176# ==============================================================================STRING
MEDIUMeasyeditor/trainer/algs/patch.py178# ==============================================================================STRING
MEDIUMeasyeditor/trainer/algs/patch.py192# ==============================================================================STRING
MEDIUMeasyeditor/trainer/algs/patch.py194# ==============================================================================STRING
MEDIUMeasyeditor/trainer/algs/patch.py425# ==============================================================================STRING
MEDIUMeasyeditor/trainer/algs/patch.py427# ==============================================================================STRING
MEDIUMeasyeditor/trainer/algs/patch.py486# ==============================================================================COMMENT
MEDIUMeasyeditor/trainer/algs/patch.py490# ==============================================================================COMMENT
MEDIUMexamples/steer_eval.sh5# ===========================COMMENT
MEDIUMexamples/steer_eval.sh7# ===========================COMMENT
MEDIUMexamples/steer_eval.sh30# ===========================COMMENT
MEDIUMexamples/steer_eval.sh32# ===========================COMMENT
MEDIUMexamples/steer_eval.sh83# ===========================COMMENT
MEDIUMexamples/steer_eval.sh85# ===========================COMMENT
Cross-Language Confusion8 hits · 30 pts
SeverityFileLineSnippetContext
HIGHeasyeditor/util/runningstats.py1409# We wish to be able to save None (null) values in numpy npz files,COMMENT
HIGHeasyeditor/models/melo/peft_egg/src/peft/peft_model.py611 trainable params: 370178 || all params: 108680450 || trainable%: 0.3406113979101117STRING
HIGHeasyeditor/models/melo/peft_egg/src/peft/peft_model.py796 trainable params: 1843200 || all params: 775873280 || trainable%: 0.23756456724479544STRING
HIGHeasyeditor/models/melo/peft_egg/src/peft/peft_model.py997 trainable params: 884736 || all params: 223843584 || trainable%: 0.3952474242013566STRING
HIGHeasyeditor/models/melo/peft_egg/src/peft/peft_model.py1203 trainable params: 370178 || all params: 108680450 || trainable%: 0.3406113979101117STRING
HIGHeasyeditor/models/melo/peft_egg/src/peft/peft_model.py1373 trainable params: 592900 || all params: 108312580 || trainable%: 0.5473971721475013STRING
HIGHsteer/trainer/PreferenceModelTrainer.py358 "lr %.6f || loss %.6f || steer acc %.6f" % (CODE
HIGHsteer/trainer/SFTModelTrainer.py287 "lr %.6f || loss %.6f" % (CODE
Structural Annotation Overuse14 hits · 22 pts
SeverityFileLineSnippetContext
LOWREADME_2.md232#### Step 1: Choose the Steering MethodCOMMENT
LOWREADME_2.md242#### Step 2: Configure the Top-Level SettingsCOMMENT
LOWREADME_2.md266#### Step 3: Provide the Input DataCOMMENT
LOWREADME_2.md286#### Step 4: Pass the Configuration to Base Vector Generator and Start TrainingCOMMENT
LOWREADME_2.md305#### Step 1: Complete the Apply Configuration File(s)COMMENT
LOWREADME_2.md316#### Step 2: Apply Steer Vectors to the ModelCOMMENT
LOWREADME_2.md380#### Step 3: Provide the Text Generation DataCOMMENT
LOWREADME_2.md392#### Step 4: Generate Text Using the Steered ModelCOMMENT
LOWhparams/Steer/ccks2026_hparams/steer_eval_caa.yaml35# Step 1: generate_vector=true, generate_response=falseCOMMENT
LOWhparams/Steer/ccks2026_hparams/steer_eval_caa.yaml36# Step 2: generate_vector=false, generate_response=trueCOMMENT
LOWsteer/benchmarks/SteerEval/prompts.py20### Step 1: Generate "Gold Standard" ExampleCOMMENT
LOWsteer/benchmarks/SteerEval/prompts.py34### Step 2: Generate 120 Concept-Related Questions (Split into Train/Test)COMMENT
LOWsteer/benchmarks/SteerEval/prompts.py156### Step 3: Concept DescriptionCOMMENT
LOWsteer/benchmarks/SteerEval/prompts.py205### Step 1: Question Refinement (The "Pivot")COMMENT
Modern Structural Boilerplate22 hits · 22 pts
SeverityFileLineSnippetContext
LOW…odels/melo/peft_egg/src/peft/tuners/adaption_prompt.py205 def set_adapter(self, adapter_name: str) -> None:CODE
LOW…odels/melo/peft_egg/src/peft/tuners/adaption_prompt.py238 def _set_adapted_attentions(self, adapter_name: str) -> None:CODE
LOWeasyeditor/models/eamet/compute_z.py25def set_target_new_str(request: Dict, value: str) -> None:CODE
LOWsteer/vector_appliers/__init__.py10__all__ = []CODE
LOWsteer/vector_appliers/caa/__init__.py7__all__ = []CODE
LOWsteer/vector_appliers/sae_feature/__init__.py7__all__ = []CODE
LOWsteer/vector_appliers/merge/__init__.py7__all__ = []CODE
LOWsteer/vector_appliers/spilt/__init__.py7__all__ = []CODE
LOWsteer/vector_appliers/prompt/__init__.py7__all__ = []CODE
LOWsteer/vector_appliers/lm_steer/__init__.py7__all__ = []CODE
LOWsteer/vector_appliers/sft/__init__.py7__all__ = []CODE
LOWsteer/vector_appliers/reps/__init__.py7__all__ = []CODE
LOWsteer/vector_appliers/vector_prompt/__init__.py7__all__ = []CODE
LOWsteer/vector_appliers/sta/__init__.py7__all__ = []CODE
LOWsteer/vector_generators/__init__.py10__all__ = []CODE
LOWsteer/vector_generators/caa/__init__.py7__all__ = []CODE
LOWsteer/vector_generators/merge/__init__.py7__all__ = []CODE
LOWsteer/vector_generators/spilt/__init__.py7__all__ = []CODE
LOWsteer/vector_generators/lm_steer/__init__.py16__all__ = ["Hack_no_grad", "Projected_Adaptor"]CODE
LOWsteer/vector_generators/sft/__init__.py7__all__ = []CODE
LOWsteer/vector_generators/reps/__init__.py7__all__ = []CODE
LOWsteer/vector_generators/vector_prompt/__init__.py7__all__ = []CODE
Modern AI Meta-Vocabulary6 hits · 16 pts
SeverityFileLineSnippetContext
MEDIUMeasyeditor/models/grace/GRACE.py62 # if self.config.task == "hallucination":COMMENT
MEDIUMeasyeditor/models/defer/DEFER.py56 # if self.config.experiment.task == "hallucination":COMMENT
MEDIUMeasyeditor/models/defer/DEFER.py76 # if config["experiment"]["task"] == "hallucination":COMMENT
MEDIUMeasyeditor/models/melo/melo_hparams.py34 pt: str # set this to 'hallucination' inside your checkpoint directoryCODE
MEDIUMhparams/MELO/gpt2-xl.yaml41 pt: /home/yu/ECNU/MELO/melo/checkpoint # set this to 'hallucination' inside your checkpoint directoryCODE
MEDIUMexamples/run_wise_editing.sh24# --data_type=hallucinationCOMMENT
Redundant / Tautological Comments14 hits · 15 pts
SeverityFileLineSnippetContext
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/melo.py747 fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_outSTRING
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/melo.py966 fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out)STRING
LOWeasyeditor/models/melo/peft_egg/src/peft/tuners/lora.py638 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.py669 # 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.py893 # Set this to True if the layer to replace stores weight like (fan_in, fan_out)STRING
LOWeasyeditor/models/wise/utils.py135 # Append the masks to the listsCOMMENT
LOWeasyeditor/models/wise/utils.py360 # Append the masks to the listsCOMMENT
LOWexamples/axbench_generate.py85 # Check if this layer exists in vectors dictCOMMENT
LOWsteer/datasets/dataset_loader.py143 # Check if this is a multi-concept datasetSTRING
LOWsteer/datasets/sample.py41 # Check if it's a dict of lists with equal lengthsCOMMENT
LOWsteer/vector_appliers/vector_applier.py108 # Set pad_token_id to eos_token_id if not already set in generation_paramsCOMMENT
LOWsteer/vector_generators/spilt/utils.py56 # Check if this is axbench dataset (has output_concept and category fields)COMMENT
LOWsteer/vector_generators/sft/utils.py56 # Check if this is axbench dataset (has output_concept and category fields)COMMENT
LOWsteer/vector_generators/reps/utils.py57 # Check if this is axbench dataset (has output_concept and category fields)COMMENT
Self-Referential Comments5 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMeasyeditor/dataset/sanitization.py15# This class is only for SERAC, MEND, FT, LoRA in training stageCOMMENT
MEDIUMeasyeditor/models/grace/GRACE.py20 # Create a bunch of noised versions of the value, then create batch, then train valueCOMMENT
MEDIUMeasyeditor/models/dpo/dpo_main.py79 # Define the optimizerCOMMENT
MEDIUMeasyeditor/models/wise/WISE.py344 os.makedirs(directory) # Create the directory if it doesn't existCODE
MEDIUMeasyeditor/models/eamet/compute_z.py81 ### The above codes give [xxx] instead of [[xxx]]COMMENT
AI Slop Vocabulary4 hits · 10 pts
SeverityFileLineSnippetContext
LOWeasyeditor/models/rome/repr_tools.py105 # So, just return the last token of the word.COMMENT
MEDIUMexamples/train_DINM_for_NLPCC.py82# Besides, you should also assess the side effects, i.e., the general performance of edited model for unharmfullless useCOMMENT
MEDIUMsteer/utils/templates.py6# the text path uses safe_apply_chat_template (try/except) which is robust to local paths.COMMENT
MEDIUMsteer/vector_appliers/caa/apply_caa.py10 # We replace hardcoded hack_no_grad layer with a more flexible detection of the decoder layers, which is more robustCOMMENT
Verbosity Indicators6 hits · 10 pts
SeverityFileLineSnippetContext
LOWhparams/Steer/ccks2026_hparams/steer_eval_caa.yaml35# Step 1: generate_vector=true, generate_response=falseCOMMENT
LOWhparams/Steer/ccks2026_hparams/steer_eval_caa.yaml36# Step 2: generate_vector=false, generate_response=trueCOMMENT
LOWsteer/benchmarks/SteerEval/prompts.py20### Step 1: Generate "Gold Standard" ExampleCOMMENT
LOWsteer/benchmarks/SteerEval/prompts.py34### Step 2: Generate 120 Concept-Related Questions (Split into Train/Test)COMMENT
LOWsteer/benchmarks/SteerEval/prompts.py156### Step 3: Concept DescriptionCOMMENT
LOWsteer/benchmarks/SteerEval/prompts.py205### Step 1: Question Refinement (The "Pivot")COMMENT
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHhparams/DeepEdit_Api/chatglm_api.yaml3api_key: "your-api-key"CODE
Slop Phrases2 hits · 3 pts
SeverityFileLineSnippetContext
LOWexamples/run_AKEW_both.sh1# if you wanna run uns_data evaluate, don't forget to set --use_unstructured_data and choose --model_path all-MiniLM-L6-COMMENT
LOWexamples/run_AKEW_both.sh1# if you wanna run uns_data evaluate, don't forget to set --use_unstructured_data and choose --model_path all-MiniLM-L6-COMMENT
AI Response Leakage1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHdemo/SafeEdit_demo/app.py118 # ("DG of other questions: *The scene is set inside the underground headquarters of Dr. Al. He has cSTRING
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMeasyeditor/util/runningstats.py110CODE