Repository Analysis

huggingface/peft

🤗 PEFT: State-of-the-art Parameter-Efficient Fine-Tuning.

18.1 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of huggingface/peft, a Python project with 21,604 GitHub stars. SynthScan v2.0 examined 212,587 lines of code across 908 source files, recording 3276 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 18.1 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).

18.1
Adjusted Score
18.1
Raw Score
100%
Time Factor
2026-08-28
Last Push
21.6K
Stars
Python
Language
212.6K
Lines of Code
908
Files
3.3K
Pattern Hits
2026-08-29
Scan Date
0.18
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 38HIGH 128MEDIUM 79LOW 3031

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 3276 distinct pattern matches across 20 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.

Hyper-Verbose Identifiers1468 hits · 1119 pts
SeverityFileLineSnippetContext
LOWtests/test_mixed.py449 def test_target_different_layers(self, config0, config1):CODE
LOWtests/test_mixed.py490 def test_target_last_layer_same_type(self, config0, config1):CODE
LOWtests/test_mixed.py519 def test_target_first_layer_same_type(self, config0, config1):CODE
LOWtests/test_mixed.py655 def test_delete_merged_adapter_is_atomic(self):CODE
LOWtests/test_mixed.py694 def test_unload_modules_to_save_when_active_adapter_does_not_use_it(self):CODE
LOWtests/test_mixed.py729 def test_get_nb_trainable_parameters(self):CODE
LOWtests/test_mixed.py758 def test_bias_only_honored_for_non_lora_tuner(self):CODE
LOWtests/test_mixed.py769 def test_incompatible_config_raises(self):CODE
LOWtests/test_seq_classifier.py362 def prepare_inputs_for_testing(self):STRING
LOWtests/test_seq_classifier.py369 def test_attributes_parametrized(self, model_id, config_cls, config_kwargs):STRING
LOWtests/test_seq_classifier.py381 def test_prepare_for_training_parametrized(self, model_id, config_cls, config_kwargs):STRING
LOWtests/test_seq_classifier.py387 def test_prompt_tuning_text_prepare_for_training(self, model_id, config_cls, config_kwargs):STRING
LOWtests/test_seq_classifier.py405 def test_save_pretrained_pickle(self, model_id, config_cls, config_kwargs):STRING
LOWtests/test_seq_classifier.py412 def test_save_pretrained_selected_adapters(self, model_id, config_cls, config_kwargs):STRING
LOWtests/test_seq_classifier.py419 def test_save_pretrained_selected_adapters_pickle(self, model_id, config_cls, config_kwargs):STRING
LOWtests/test_seq_classifier.py428 def test_from_pretrained_config_construction(self, model_id, config_cls, config_kwargs):STRING
LOWtests/test_seq_classifier.py434 def test_modules_to_save_correctly_set(self, model_id, config_cls, config_kwargs):STRING
LOWtests/test_seq_classifier.py513 def test_prompt_learning_forward_with_inputs_embeds(self, config_cls, config_kwargs):STRING
LOWtests/test_lora_conversion.py79 def test_no_peft_layer_raises(self):CODE
LOWtests/test_lora_conversion.py86 def test_prompt_learning_model_raises(self):CODE
LOWtests/test_lora_conversion.py97 def test_peft_model_but_no_support_raises(self):CODE
LOWtests/test_lora_conversion.py107 def test_model_with_unsupported_layers_raises(self):CODE
LOWtests/test_lora_conversion.py123 def test_targeted_modules_identical(self, lokr_model):CODE
LOWtests/test_lora_conversion.py139 def test_targeted_modules_identical_target_modules_str(self):CODE
LOWtests/test_lora_conversion.py158 def test_fixed_rank_lora_config(self, lokr_model):CODE
LOWtests/test_lora_conversion.py168 def test_dynamic_rank_lora_config(self, lokr_model):CODE
LOWtests/test_lora_conversion.py194 def test_threshold_wrong_value_raises(self, lokr_model):CODE
LOWtests/test_lora_conversion.py204 def test_rank_higher_than_weight_dim_raises(self, lokr_model):CODE
LOWtests/test_lora_conversion.py215 def test_converting_transformers_model_works(self, lokr_model, tmp_path):CODE
LOWtests/test_lora_conversion.py246 def test_converted_lora_approximates_original_adapter(self, lokr_model):CODE
LOWtests/test_lora_conversion.py335 def test_model_without_peft_config(self, lokr_model):CODE
LOWtests/test_lora_conversion.py373 def test_converted_lora_to_lora_works_and_warns(self):CODE
LOWtests/test_lora_conversion.py411 def test_converted_lora_with_multiple_adapters(self, lokr_model):CODE
LOWtests/test_lora_conversion.py457 def test_convert_model_with_modules_to_save(self):CODE
LOWtests/test_lora_conversion.py497 def test_convert_model_with_trainable_bias_raises(self, bias):CODE
LOWtests/test_lora_conversion.py606 def test_miss_supports_lora_conversion(self, miss_model_standard, miss_model_mini, miss_model_bat):CODE
LOWtests/test_lora_conversion.py611 def test_miss_standard_exact_conversion(self, miss_model_standard):CODE
LOWtests/test_lora_conversion.py628 def test_miss_mini_exact_conversion(self, miss_model_mini):CODE
LOWtests/test_lora_conversion.py645 def test_miss_bat_approximate_conversion(self, miss_model_bat):CODE
LOWtests/test_lora_conversion.py667 def test_miss_targeted_modules_identical(self, miss_model_standard):CODE
LOWtests/test_lora_conversion.py710 def test_kasa_does_not_support_lora_conversion(self):CODE
LOWtests/test_tuners_utils.py464 def test_one_targeted_module_regex(self):STRING
LOWtests/test_tuners_utils.py469 def test_two_targeted_module_regex(self):STRING
LOWtests/test_tuners_utils.py474 def test_one_targeted_module_list(self):STRING
LOWtests/test_tuners_utils.py479 def test_two_targeted_module_list(self):STRING
LOWtests/test_tuners_utils.py582 def test_two_excluded_module_regex(self):STRING
LOWtests/test_tuners_utils.py587 def test_two_excluded_module_list(self):STRING
LOWtests/test_tuners_utils.py592 def test_multiple_excluded_modules_list(self):STRING
LOWtests/test_tuners_utils.py627 def test_no_modules_matched_second_adapter(self):STRING
LOWtests/test_tuners_utils.py637 def test_second_adapter_only_modules_to_save_raises(self):STRING
LOWtests/test_tuners_utils.py646 def test_no_matching_peft_module_error_hierarchy(self):STRING
LOWtests/test_tuners_utils.py651 def test_targeted_module_names_unique_across_adapters(self):STRING
LOWtests/test_tuners_utils.py658 def test_some_modules_excluded_some_unmatched(self):STRING
LOWtests/test_tuners_utils.py663 def test_exclude_modules_not_used(self):STRING
LOWtests/test_tuners_utils.py881 def test_available_adapters_small(self, small_model):STRING
LOWtests/test_tuners_utils.py887 def test_available_adapters_large(self, large_model):STRING
LOWtests/test_tuners_utils.py893 def test_devices_all_cpu_small(self, small_model):STRING
LOWtests/test_tuners_utils.py899 def test_devices_all_cpu_large(self, large_model):STRING
LOWtests/test_tuners_utils.py985 def test_target_parameters_and_target_modules(self, large_model):STRING
LOWtests/test_tuners_utils.py995 def test_quantization_backend_small(self, small_model):STRING
1408 more matches not shown…
Cross-File Repetition117 hits · 585 pts
SeverityFileLineSnippetContext
HIGHtests/test_gpu_examples.py0efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109STRING
HIGHtests/test_vision_models.py0efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109STRING
HIGHtests/test_gptqmodel.py0efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109STRING
HIGHtests/test_common_gpu.py0efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109STRING
HIGHtests/test_torch_compile.py0efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109STRING
HIGHdocs/source/package_reference/lora.md0run forward and backward passes for gradient estimation.STRING
HIGHexamples/lora_ga_finetuning/README.md0run forward and backward passes for gradient estimation.STRING
HIGHexamples/lora_ga_finetuning/lora_ga_finetuning.py0run forward and backward passes for gradient estimation.STRING
HIGHexamples/boft_controlnet/utils/tracemalloc.py0get resident set size memory for the current processSTRING
HIGH…_modeling/peft_lora_clm_accelerate_ds_zero3_offload.py0get resident set size memory for the current processSTRING
HIGHexamples/deft_dreambooth/train_dreambooth.py0get resident set size memory for the current processSTRING
HIGHexamples/oft_dreambooth/train_dreambooth.py0get resident set size memory for the current processSTRING
HIGHexamples/hra_dreambooth/utils/tracemalloc.py0get resident set size memory for the current processSTRING
HIGHexamples/stable_diffusion/train_dreambooth.py0get resident set size memory for the current processSTRING
HIGHexamples/lora_dreambooth/train_dreambooth.py0get resident set size memory for the current processSTRING
HIGHexamples/boft_dreambooth/utils/tracemalloc.py0get resident set size memory for the current processSTRING
HIGH…ation/peft_lora_seq2seq_accelerate_ds_zero3_offload.py0get resident set size memory for the current processSTRING
HIGHexamples/waveft_finetuning/waveft_finetuning.py0below is an instruction that describes a task. write a response that appropriately completes the request. ### instructioSTRING
HIGHexamples/hira_finetuning/hira_finetuning.py0below is an instruction that describes a task. write a response that appropriately completes the request. ### instructioSTRING
HIGHexamples/glora_finetuning/glora_finetuning.py0below is an instruction that describes a task. write a response that appropriately completes the request. ### instructioSTRING
HIGHexamples/olora_finetuning/olora_finetuning.py0below is an instruction that describes a task. write a response that appropriately completes the request. ### instructioSTRING
HIGHexamples/shira_finetuning/shira_finetuning.py0below is an instruction that describes a task. write a response that appropriately completes the request. ### instructioSTRING
HIGHexamples/deft_dreambooth/train_dreambooth.py0a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imagSTRING
HIGHexamples/oft_dreambooth/train_dreambooth.py0a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imagSTRING
HIGHexamples/hra_dreambooth/utils/dataset.py0a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imagSTRING
HIGHexamples/stable_diffusion/train_dreambooth.py0a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imagSTRING
HIGHexamples/lora_dreambooth/train_dreambooth.py0a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imagSTRING
HIGHexamples/boft_dreambooth/utils/dataset.py0a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imagSTRING
HIGHexamples/corda_finetuning/corda_finetuning.py0returns the number of trainable parameters and number of all parameters in the model.STRING
HIGHsrc/peft/peft_model.py0returns the number of trainable parameters and number of all parameters in the model.STRING
HIGHsrc/peft/mixed_model.py0returns the number of trainable parameters and number of all parameters in the model.STRING
HIGHsrc/peft/peft_model.py0deletes an existing adapter. args: adapter_name (str): name of the adapter to be deleted.STRING
HIGHsrc/peft/tuners/tuners_utils.py0deletes an existing adapter. args: adapter_name (str): name of the adapter to be deleted.STRING
HIGHsrc/peft/tuners/waveft/model.py0deletes an existing adapter. args: adapter_name (str): name of the adapter to be deleted.STRING
HIGHsrc/peft/utils/other.py0check if the arguments are compatible with the configs and state of the modelSTRING
HIGHsrc/peft/tuners/road/layer.py0check if the arguments are compatible with the configs and state of the modelSTRING
HIGHsrc/peft/tuners/lora/layer.py0check if the arguments are compatible with the configs and state of the modelSTRING
HIGHsrc/peft/tuners/lycoris_utils.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/hra/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/road/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/miss/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/oft/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/vera/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/delora/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/boft/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/waveft/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/c3a/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/hira/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/hira/bnb.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/road/bnb.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/fourierft/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/vblora/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/gralora/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/ia3/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/osf/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/adalora/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/pvera/layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/lora/hqq.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/lora/tp_layer.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
HIGHsrc/peft/tuners/lora/inc.py0merge the active adapter weights into the base weights. args: safe_merge (`bool`, *optional*): if `true`, the merge operSTRING
57 more matches not shown…
Hallucination Indicators38 hits · 470 pts
SeverityFileLineSnippetContext
CRITICALtests/test_mixed.py709 lin1_weight_before = peft_model.base_model.model.lin1.original_module.weight.data.clone()CODE
CRITICALtests/test_lora_conversion.py469 lokr_model.base_model.model.model.decoder.layers[0].fc1.modules_to_save.default.weight.data.mul_(-10.0)CODE
CRITICALtests/test_lora_conversion.py470 lokr_model.base_model.model.model.decoder.layers[0].fc1.modules_to_save.default.bias.data.mul_(-10.0)CODE
CRITICALtests/test_cpt.py247 emb = model.prompt_encoder.default.embedding.weight.data.clone().detach()CODE
CRITICALtests/test_cpt.py263 assert torch.all(model.prompt_encoder.default.embedding.weight.data.clone().detach().cpu() == emb.cpu())CODE
CRITICALtests/test_cpt.py277 emb = model.prompt_encoder.default.embedding.weight.data.clone().detach()CODE
CRITICALtests/test_cpt.py294 assert torch.all(model.prompt_encoder.default.embedding.weight.data.clone().detach().cpu() == emb.cpu())CODE
CRITICALtests/test_trainable_tokens.py228 initial_delta = model.model.model.embed_tokens.trainable_tokens_delta.default.clone()CODE
CRITICALtests/test_trainable_tokens.py229 initial_originals = model.model.model.embed_tokens.trainable_tokens_original.default.clone()CODE
CRITICALtests/test_trainable_tokens.py732 assert merged_model.model.decoder.embed_tokens.weight.data_ptr() == merged_model.lm_head.weight.data_ptr()CODE
CRITICALtests/test_trainable_tokens.py769 assert merged_model.model.decoder.embed_tokens.weight.data_ptr() == merged_model.lm_head.weight.data_ptr()CODE
CRITICALtests/test_trainable_tokens.py868 expected_changed_weights = peft_model.model.model.embed_tokens.trainable_tokens_delta.default.data.clone()CODE
CRITICALtests/test_gpu_examples.py2231 embed_params = model.base_model.model.model.decoder.embed_tokens.original_module.weight.numel()STRING
CRITICALtests/test_initialization.py6251 model.base_model.model.model.embed_tokens.weight.data_ptr()CODE
CRITICALtests/test_initialization.py6252 != model.base_model.model.lm_head.weight.data_ptr()CODE
CRITICALtests/test_initialization.py5723 peft_model.prompt_encoder.default.embedding.weight.data.fill_(1.0)CODE
CRITICALtests/test_initialization.py5940 embed_np = dict(model.base_model.model.model.embed_tokens.named_parameters())CODE
CRITICALtests/test_initialization.py6000 embed_np = dict(model.base_model.model.model.embed_tokens.named_parameters())CODE
CRITICALtests/test_initialization.py6175 shared_np = dict(model.base_model.model.model.shared.named_parameters())CODE
CRITICALtests/test_target_parameters.py384 gate_proj_1_0.lora_A.default.weight.data.copy_(gate_proj_0_0.lora_A.default.weight.data)CODE
CRITICALtests/test_target_parameters.py385 gate_proj_1_1.lora_A.default.weight.data.copy_(gate_proj_0_1.lora_A.default.weight.data)CODE
CRITICALtests/test_target_parameters.py386 gate_proj_1_0.lora_B.default.weight.data.copy_(gate_proj_0_0.lora_B.default.weight.data)CODE
CRITICALtests/test_target_parameters.py387 gate_proj_1_1.lora_B.default.weight.data.copy_(gate_proj_0_1.lora_B.default.weight.data)CODE
CRITICALtests/test_decoder_models.py865 layers[0].mlp.up_proj.base_layer.weight.data.storage().data_ptr()CODE
CRITICALtests/test_decoder_models.py866 == layers[1].mlp.up_proj.base_layer.weight.data.storage().data_ptr()CODE
CRITICALtests/test_decoder_models.py867 and layers[2].mlp.up_proj.base_layer.weight.data.storage().data_ptr()CODE
CRITICALtests/test_decoder_models.py868 == layers[3].mlp.up_proj.base_layer.weight.data.storage().data_ptr()CODE
CRITICALtests/test_decoder_models.py871 layers[0].mlp.up_proj.base_layer.weight.data.storage().data_ptr()CODE
CRITICALtests/test_decoder_models.py872 != layers[2].mlp.up_proj.base_layer.weight.data.storage().data_ptr()CODE
CRITICALtests/test_decoder_models.py875 layers[0].mlp.up_proj.lora_A.default.weight.data.storage().data_ptr()CODE
CRITICALtests/test_decoder_models.py876 != layers[1].mlp.up_proj.lora_A.default.weight.data.storage().data_ptr()CODE
CRITICALtests/test_decoder_models.py877 and layers[2].mlp.up_proj.lora_A.default.weight.data.storage().data_ptr()CODE
CRITICALtests/test_decoder_models.py878 != layers[3].mlp.up_proj.lora_A.default.weight.data.storage().data_ptr()CODE
CRITICALtests/test_shira.py300 peft.tuners.shira.layer._warn_once_about_module_hooks.cache_clear()CODE
CRITICALtests/test_custom_models.py2524 original_weight = model.base_model.model.conv.base_layer.weight.data.clone()CODE
CRITICALtests/test_custom_models.py4343 lm_head_keys = list(model.base_model.model.lm_head.modules_to_save.keys())CODE
CRITICALtests/test_custom_models.py4346 embed_token_keys = list(model.base_model.model.model.decoder.embed_tokens.modules_to_save.keys())CODE
CRITICALsrc/peft/tuners/tuners_utils.py653 model.lm_head.weight.data = model.model.embed_tokens.weight.data.clone()CODE
Unused Imports619 hits · 450 pts
SeverityFileLineSnippetContext
LOWtests/test_lorafa.py15CODE
LOWtests/test_trainable_tokens.py15CODE
LOWtests/test_loraplus.py14CODE
LOWmethod_comparison/app_embed.py26CODE
LOWmethod_comparison/app_embed.py26CODE
LOWexamples/stable_diffusion/inc_flux_lora_hpu.py26CODE
LOWsrc/peft/config.py14CODE
LOWsrc/peft/__init__.py17CODE
LOWsrc/peft/__init__.py17CODE
LOWsrc/peft/__init__.py17CODE
LOWsrc/peft/__init__.py17CODE
LOWsrc/peft/__init__.py17CODE
LOWsrc/peft/__init__.py17CODE
LOWsrc/peft/__init__.py17CODE
LOWsrc/peft/__init__.py17CODE
LOWsrc/peft/__init__.py27CODE
LOWsrc/peft/__init__.py27CODE
LOWsrc/peft/__init__.py28CODE
LOWsrc/peft/__init__.py29CODE
LOWsrc/peft/__init__.py29CODE
LOWsrc/peft/__init__.py29CODE
LOWsrc/peft/__init__.py29CODE
LOWsrc/peft/__init__.py29CODE
LOWsrc/peft/__init__.py36CODE
LOWsrc/peft/__init__.py37CODE
LOWsrc/peft/__init__.py38CODE
LOWsrc/peft/__init__.py38CODE
LOWsrc/peft/__init__.py38CODE
LOWsrc/peft/__init__.py38CODE
LOWsrc/peft/__init__.py38CODE
LOWsrc/peft/__init__.py38CODE
LOWsrc/peft/__init__.py38CODE
LOWsrc/peft/__init__.py38CODE
LOWsrc/peft/__init__.py38CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
LOWsrc/peft/__init__.py49CODE
559 more matches not shown…
Over-Commented Block399 hits · 388 pts
SeverityFileLineSnippetContext
LOWsetup.py1# Copyright 2023 The HuggingFace Team. All rights reserved.COMMENT
LOWsetup.py101# 4. Add a tag in git to mark the release: "git tag -a v<VERSION> -m 'Adds tag <VERSION> for pypi' "COMMENT
LOWtests/test_mixed.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_seq_classifier.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_lora_conversion.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_tuners_utils.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_tuners_utils.py2021 # resulting model for overview:COMMENT
LOWtests/conftest.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_xlora.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_riemannian_lora.py1# Copyright 2026-present the HuggingFace Inc. team.COMMENT
LOWtests/test_hub_features.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_lorafa.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_cpt.py1# Copyright 2024-present the HuggingFace Inc. team.COMMENT
LOWtests/test_low_level_api.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_lora_megatron.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_trainable_tokens.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_gpu_examples.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_integrations.py1# Copyright 2024-present the HuggingFace Inc. team.COMMENT
LOWtests/test_poly.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/testing_utils.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_loraplus.py1# Copyright 2024-present the HuggingFace Inc. team.COMMENT
LOWtests/test_adaption_prompt.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_shadow.py1# Copyright 2026-present the HuggingFace Inc. team.COMMENT
LOWtests/test_frod.py1# Copyright 2026-present the HuggingFace Inc. team.COMMENT
LOWtests/test_supertuning.py1# Copyright 2026-present the HuggingFace Inc. team.COMMENT
LOWtests/test_initialization.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_initialization.py5501 # )COMMENT
LOWtests/test_initialization.py5521 # (0): Linear(in_features=5120, out_features=5120, bias=True)COMMENT
LOWtests/test_initialization.py5541 # (down_proj): Linear(in_features=8960, out_features=1536, bias=False)COMMENT
LOWtests/test_initialization.py5581COMMENT
LOWtests/test_initialization.py5601 # (fc1): Linear(in_features=1280, out_features=5120, bias=True)COMMENT
LOWtests/test_initialization.py5621 # (q_proj): Linear(in_features=1536, out_features=1536, bias=True)COMMENT
LOWtests/test_target_parameters.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_pvera.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_vision_models.py1# Copyright 2024-present the HuggingFace Inc. team.COMMENT
LOWtests/test_gptqmodel.py1# Note: These tests were copied from test_common_gpu.py and test_gpu_examples.py as they can run on CPU too.COMMENT
LOWtests/test_decoder_models.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_encoder_decoder_models.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_multitask_prompt_tuning.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_lora_ga.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/testing_common.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_quantization.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_common_gpu.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_cartridge.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_vblora.py1# Copyright 2024-present the HuggingFace Inc. team.COMMENT
LOWtests/test_config.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_randlora.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_unilora.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_shira.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_boft.py1# Copyright 2024-present the HuggingFace Inc. team.COMMENT
LOWtests/test_feature_extraction_models.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_bdlora.py1# Copyright 2026-present the HuggingFace Inc. team.COMMENT
LOWtests/test_helpers.py1# Copyright 2024-present the HuggingFace Inc. team.COMMENT
LOWtests/test_stablediffusion.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_lora_variants.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
LOWtests/test_incremental_pca.py1# Copyright 2024-present the HuggingFace Inc. team.COMMENT
LOWtests/test_auto.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_deft.py1# Copyright 2026-present the HuggingFace Inc. team.COMMENT
LOWtests/test_other.py1# Copyright 2023-present the HuggingFace Inc. team.COMMENT
LOWtests/test_arrow.py1# Copyright 2025-present the HuggingFace Inc. team.COMMENT
339 more matches not shown…
Deep Nesting262 hits · 236 pts
SeverityFileLineSnippetContext
LOWtests/test_lora_conversion.py577CODE
LOWtests/test_trainable_tokens.py638CODE
LOWtests/test_gpu_examples.py6721CODE
LOWtests/test_gpu_examples.py6775CODE
LOWtests/test_gpu_examples.py5995CODE
LOWtests/testing_utils.py322CODE
LOWtests/test_initialization.py1493CODE
LOWtests/test_initialization.py4924CODE
LOWtests/test_initialization.py5101CODE
LOWtests/test_initialization.py5133CODE
LOWtests/test_decoder_models.py486CODE
LOWtests/testing_common.py596CODE
LOWtests/testing_common.py791CODE
LOWtests/testing_common.py1054CODE
LOWtests/testing_common.py1226CODE
LOWtests/testing_common.py1337CODE
LOWtests/testing_common.py1369CODE
LOWtests/testing_common.py1429CODE
LOWtests/testing_common.py1538CODE
LOWtests/test_other.py710CODE
LOWtests/test_arrow.py474CODE
LOWtests/test_custom_models.py2863CODE
LOWtests/test_custom_models.py2982CODE
LOWmethod_comparison/app_embed.py38CODE
LOWmethod_comparison/sanitizer.py6CODE
LOWmethod_comparison/app.py280CODE
LOWmethod_comparison/image-gen/run.py187CODE
LOWmethod_comparison/image-gen/utils.py322CODE
LOWmethod_comparison/text_generation_benchmark/run.py139CODE
LOWmethod_comparison/text_generation_benchmark/utils.py205CODE
LOWmethod_comparison/peft-shop/app.py1110CODE
LOWmethod_comparison/MetaMathQA/utils.py218CODE
LOWmethod_comparison/MetaMathQA/utils.py369CODE
LOW…les/sequence_classification/peft_no_lora_accelerate.py79CODE
LOWexamples/boft_controlnet/train_controlnet.py86CODE
LOWexamples/boft_controlnet/utils/pipeline_controlnet.py53CODE
LOWexamples/boft_controlnet/utils/pipeline_controlnet.py166CODE
LOWexamples/boft_controlnet/utils/dataset.py82CODE
LOWexamples/boft_controlnet/utils/dataset.py136CODE
LOW…ture_extraction/peft_lora_embedding_semantic_search.py210CODE
LOW…_modeling/peft_lora_clm_accelerate_ds_zero3_offload.py110CODE
LOWexamples/arrow_multitask/arrow_phi3_mini.py120CODE
LOWexamples/loftq_finetuning/int8_correction.py68CODE
LOWexamples/loftq_finetuning/train_gsm8k_llama.py297CODE
LOW…orthogonal_subspace_learning/osf_continual_learning.py51CODE
LOW…orthogonal_subspace_learning/osf_continual_learning.py99CODE
LOW…orthogonal_subspace_learning/osf_continual_learning.py142CODE
LOWexamples/orthogonal_subspace_learning/utils.py42CODE
LOWexamples/deft_dreambooth/train_dreambooth.py585CODE
LOWexamples/oft_dreambooth/train_dreambooth.py590CODE
LOWexamples/hra_dreambooth/train_dreambooth.py82CODE
LOWexamples/qalora_finetuning/qalora_gptq_finetuning.py23CODE
LOWexamples/stable_diffusion/train_dreambooth.py754CODE
LOWexamples/stable_diffusion/convert_sd_adapter_to_peft.py285CODE
LOWexamples/lora_dreambooth/train_dreambooth.py580CODE
LOWexamples/corda_finetuning/datautils.py106CODE
LOWexamples/sft/utils.py86CODE
LOWexamples/boft_dreambooth/train_dreambooth.py82CODE
LOW…ation/peft_lora_seq2seq_accelerate_ds_zero3_offload.py104CODE
LOW…s/int8_training/peft_adalora_whisper_large_training.py423CODE
202 more matches not shown…
Decorative Section Separators35 hits · 111 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_arrow.py30# ─── Fixtures ──────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/KappaTune/experiments_kappatune_peft.py19# ==========================================COMMENT
MEDIUMexamples/KappaTune/experiments_kappatune_peft.py21# ==========================================COMMENT
MEDIUMexamples/KappaTune/experiments_kappatune_peft.py47# ==========================================COMMENT
MEDIUMexamples/KappaTune/experiments_kappatune_peft.py49# ==========================================COMMENT
MEDIUMexamples/KappaTune/experiments_kappatune_peft.py146# ==========================================COMMENT
MEDIUMexamples/KappaTune/experiments_kappatune_peft.py148# ==========================================COMMENT
MEDIUM…etuning/sequence_classification_finetune_monteclora.py21# ----------------------------------------------------------------------------COMMENT
MEDIUM…etuning/sequence_classification_finetune_monteclora.py23# ----------------------------------------------------------------------------COMMENT
MEDIUM…etuning/sequence_classification_finetune_monteclora.py29# ----------------------------------------------------------------------------COMMENT
MEDIUM…etuning/sequence_classification_finetune_monteclora.py31# ----------------------------------------------------------------------------COMMENT
MEDIUM…etuning/sequence_classification_finetune_monteclora.py42# ----------------------------------------------------------------------------COMMENT
MEDIUM…etuning/sequence_classification_finetune_monteclora.py44# ----------------------------------------------------------------------------COMMENT
MEDIUM…etuning/sequence_classification_finetune_monteclora.py162# ----------------------------------------------------------------------------COMMENT
MEDIUM…etuning/sequence_classification_finetune_monteclora.py164# ----------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py74# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py76# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py91# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py93# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py177# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py179# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py196# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py198# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py257# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py259# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py353# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py355# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py410# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py412# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py453# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py455# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py524# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/check_doc_coverage.py526# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/peft/tuners/lora/layer.py867# ------------------------------------------------------------------------------------------COMMENT
MEDIUMsrc/peft/tuners/lora/layer.py870# ------------------------------------------------------------------------------------------COMMENT
Modern Structural Boilerplate99 hits · 96 pts
SeverityFileLineSnippetContext
LOWmethod_comparison/app.py46logger = logging.getLogger(__name__)CODE
LOWmethod_comparison/peft-shop/app.py294def _set_data(data: dict[str, Any]) -> None:CODE
LOWexamples/stable_diffusion/convert_sd_adapter_to_peft.py20logger = logging.getLogger(__name__)CODE
LOWsrc/peft/__init__.py184__all__ = [CODE
LOWsrc/peft/peft_model.py1572 def set_adapter(self, adapter_name: str, inference_mode: bool = False) -> None:CODE
LOWsrc/peft/peft_model.py1597 def set_requires_grad(self, adapter_names: str | Sequence[str], requires_grad: bool = True) -> None:CODE
LOWsrc/peft/functional.py26__all__ = [CODE
LOWsrc/peft/mixed_model.py254 def set_modules_to_save(self, peft_config: PeftConfig, adapter_name: str) -> None:CODE
LOWsrc/peft/mixed_model.py269 def set_adapter(self, adapter_name: Union[str, list[str]], inference_mode: bool = False) -> None:CODE
LOWsrc/peft/helpers.py39def update_forward_signature(model: PeftModel) -> None:CODE
LOWsrc/peft/helpers.py73def update_generate_signature(model: PeftModel) -> None:CODE
LOWsrc/peft/helpers.py114def update_signature(model: PeftModel, method: str = "all") -> None:CODE
LOWsrc/peft/utils/hotswap.py36def _update_scaling(lora_module: LoraLayer, adapter_name: str, scaling: float) -> None:CODE
LOWsrc/peft/utils/__init__.py93__all__ = [CODE
LOWsrc/peft/utils/other.py97__all__ = [CODE
LOWsrc/peft/utils/other.py528 def set_adapter(self, adapter_names: Union[str, list[str]], inference_mode: bool = False) -> None:CODE
LOWsrc/peft/utils/other.py554 def set_requires_grad(self, adapter_names: str | Sequence[str], requires_grad: bool = True) -> None:CODE
LOWsrc/peft/utils/other.py707 def set_adapter(self, adapter_names: Union[str, list[str]], inference_mode: bool = False) -> None:CODE
LOWsrc/peft/utils/other.py956 def set_adapter(self, adapter_names: Union[str, list[str]], inference_mode: bool = False) -> None:CODE
LOWsrc/peft/utils/other.py1136def _set_adapter(model, adapter_name: str | list[str], inference_mode: bool = False) -> None:CODE
LOWsrc/peft/utils/other.py284def _set_layer_requires_grad(layer, requires_grad: bool) -> None:STRING
LOWsrc/peft/utils/quantization_utils.py75 def set_base_weight(self, peft_layer, weight_data: torch.Tensor) -> None:CODE
LOWsrc/peft/utils/quantization_utils.py116 def set_base_weight(self, peft_layer, weight_data: torch.Tensor) -> None:CODE
LOWsrc/peft/utils/quantization_utils.py137 def set_base_weight(self, peft_layer, weight_data: torch.Tensor) -> None:CODE
LOWsrc/peft/utils/quantization_utils.py159 def set_base_weight(self, peft_layer, weight_data: torch.Tensor) -> None:CODE
LOWsrc/peft/utils/quantization_utils.py191 def set_base_weight(self, peft_layer, weight_data: torch.Tensor) -> None:CODE
LOWsrc/peft/utils/quantization_utils.py233 def set_base_weight(self, peft_layer, weight_data: torch.Tensor) -> None:CODE
LOWsrc/peft/tuners/__init__.py81__all__ = [CODE
LOWsrc/peft/tuners/tuners_utils.py1315 def set_adapter(self, adapter_name: str | list[str], inference_mode: bool = False) -> None:CODE
LOWsrc/peft/tuners/tuners_utils.py2009 def set_adapter(self, adapter_names: str | list[str], inference_mode: bool = False) -> None:CODE
LOWsrc/peft/tuners/tuners_utils.py2089 def set_requires_grad(self, adapter_names: str | Sequence[str], requires_grad: bool = True) -> None:CODE
LOWsrc/peft/tuners/tuners_utils.py2713def set_requires_grad(model, adapter_names: str | Sequence[str], requires_grad: bool = True) -> None:CODE
LOWsrc/peft/tuners/tuners_utils.py587 def set_requires_grad(self, adapter_names: str | Sequence[str], requires_grad: bool = True) -> None:STRING
LOWsrc/peft/tuners/tuners_utils.py1859 def set_base_weight(self, weight_data: torch.Tensor) -> None:STRING
LOWsrc/peft/tuners/peanut/__init__.py22__all__ = ["Linear", "PeanutConfig", "PeanutLayer", "PeanutModel"]CODE
LOWsrc/peft/tuners/prompt_tuning/__init__.py21__all__ = ["PromptEmbedding", "PromptTuningConfig", "PromptTuningInit"]CODE
LOWsrc/peft/tuners/hra/__init__.py22__all__ = ["HRAConfig", "HRAConv2d", "HRALayer", "HRALinear", "HRAModel"]CODE
LOWsrc/peft/tuners/loha/__init__.py22__all__ = ["Conv2d", "Linear", "LoHaConfig", "LoHaLayer", "LoHaModel"]CODE
LOWsrc/peft/tuners/lokr/__init__.py22__all__ = ["Conv2d", "Linear", "LoKrConfig", "LoKrLayer", "LoKrModel"]CODE
LOWsrc/peft/tuners/vera/__init__.py22__all__ = ["Linear", "VeraConfig", "VeraLayer", "VeraModel"]CODE
LOWsrc/peft/tuners/ln_tuning/__init__.py21__all__ = ["LNTuningConfig", "LNTuningModel"]CODE
LOWsrc/peft/tuners/cpt/__init__.py22__all__ = ["CPTConfig", "CPTEmbedding"]CODE
LOWsrc/peft/tuners/delora/__init__.py21__all__ = ["DeloraConfig", "DeloraLayer", "DeloraLinear", "DeloraModel"]CODE
LOWsrc/peft/tuners/boft/__init__.py22__all__ = ["BOFTConfig", "BOFTLayer", "BOFTModel"]CODE
LOWsrc/peft/tuners/psoft/__init__.py22__all__ = ["Linear", "PsoftConfig", "PsoftLayer", "PsoftModel"]CODE
LOWsrc/peft/tuners/psoft/layer.py235 def _set_psoft_ab_cache_buffers(self, adapter_name: str, A: torch.Tensor, B: torch.Tensor) -> None:CODE
LOWsrc/peft/tuners/psoft/layer.py239 def update_layer(self, adapter_name: str, config: PsoftConfig, **kwargs: Any) -> None:CODE
LOWsrc/peft/tuners/beft/__init__.py23__all__ = ["BeftConfig", "BeftLayer", "BeftModel", "Linear"]CODE
LOWsrc/peft/tuners/waveft/__init__.py22__all__ = ["WaveFTConfig", "WaveFTLayer", "WaveFTLinear", "WaveFTModel"]CODE
LOWsrc/peft/tuners/c3a/__init__.py21__all__ = ["C3AConfig", "C3ALayer", "C3ALinear", "C3AModel"]CODE
LOWsrc/peft/tuners/p_tuning/__init__.py21__all__ = ["PromptEncoder", "PromptEncoderConfig", "PromptEncoderReparameterizationType"]CODE
LOWsrc/peft/tuners/adamss/__init__.py22__all__ = [CODE
LOWsrc/peft/tuners/adamss/model.py157 def update_and_allocate(self, global_step: int) -> None:CODE
LOWsrc/peft/tuners/hira/__init__.py23__all__ = [CODE
LOWsrc/peft/tuners/hira/layer.py307 def update_layer(self, adapter_name, r, config: HiraConfig, **kwargs) -> None:CODE
LOWsrc/peft/tuners/mixed/__init__.py18__all__ = ["COMPATIBLE_TUNER_TYPES", "MixedModel"]CODE
LOWsrc/peft/tuners/mixed/model.py206 def set_adapter(self, adapter_name: Union[str, list[str]], inference_mode: bool = False) -> None:CODE
LOWsrc/peft/tuners/shadow/__init__.py22__all__ = ["DetachedShadowModel", "ShadowCache", "ShadowCarrier", "ShadowConfig", "ShadowLayer", "ShadowModel"]CODE
LOWsrc/peft/tuners/shadow/model.py165def _set_config_attr(config: Any, names: tuple[str, ...], value: int) -> None:CODE
LOWsrc/peft/tuners/shadow/model.py819 def set_adapter(self, adapter_name: str | list[str], inference_mode: bool = False) -> None:CODE
39 more matches not shown…
Self-Referential Comments27 hits · 80 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_trainable_tokens.py1257 # Create a composite model with two BART sub-modelsCOMMENT
MEDIUMtests/test_lora_ga.py130 # Create a fresh model and load the saved stateCOMMENT
MEDIUMtests/test_helpers.py669 # Create a minimal dummy MoE model with fused 3D weightsCOMMENT
MEDIUMtests/test_custom_models.py4974 # Create a weighted adapter combining both adapters and check that its output is same as setting multipleCOMMENT
MEDIUMmethod_comparison/app_embed.py58 # Create an empty figure.COMMENT
MEDIUMmethod_comparison/app.py57 # Create an empty figure.COMMENT
MEDIUMexamples/boft_controlnet/train_controlnet.py537 # Create the pipeline using using the trained modules and save it.COMMENT
MEDIUMexamples/arrow_multitask/arrow_phi3_mini.py362 # Creating the Arrow modelCOMMENT
MEDIUM…orthogonal_subspace_learning/osf_continual_learning.py57 # Create a simple dataloaderCOMMENT
MEDIUMexamples/deft_dreambooth/train_dreambooth.py1072 # Create the pipeline using using the trained modules and save it.COMMENT
MEDIUMexamples/oft_dreambooth/train_dreambooth.py1079 # Create the pipeline using using the trained modules and save it.COMMENT
MEDIUMexamples/hra_dreambooth/train_dreambooth.sh4# Define the UNIQUE_TOKEN, CLASS_TOKENs, and SUBJECT_NAMESCOMMENT
MEDIUMexamples/stable_diffusion/train_dreambooth.py1239 # Create the pipeline using using the trained modules and save it.COMMENT
MEDIUMexamples/stable_diffusion/convert_sd_adapter_to_peft.py409 # Create a corresponding adapter infoCOMMENT
MEDIUMexamples/lora_dreambooth/train_dreambooth.py1071 # Create the pipeline using using the trained modules and save it.COMMENT
MEDIUMexamples/boft_dreambooth/train_dreambooth.sh5# Define the UNIQUE_TOKEN, CLASS_TOKENs, and SUBJECT_NAMESCOMMENT
MEDIUMexamples/lora_ga_finetuning/lora_ga_finetuning.py167 # Create a simple DataLoader for gradient estimationCOMMENT
MEDIUMsrc/peft/utils/other.py1698 # Create the causal mask with fixed shape in advance, to reduce recompilations. If the function to createCOMMENT
MEDIUMsrc/peft/tuners/tuners_utils.py2265 # Create a reverse lookup for other_module_names to quickly check suffix matchesCOMMENT
MEDIUMsrc/peft/tuners/boft/layer.py178 # Create a mask with 1s for matrices to be replaced with identity and 0s otherwiseCOMMENT
MEDIUMsrc/peft/tuners/waveft/layer.py133 # Create a padded spectrum matrix with additional rows and columnsCOMMENT
MEDIUMsrc/peft/tuners/waveft/layer.py144 # Create the padded dense spectrum matrixCOMMENT
MEDIUMsrc/peft/tuners/waveft/waverec2d.py6# This file contains code derived from PyTorch-Wavelet-Toolbox:COMMENT
MEDIUMsrc/peft/tuners/adaption_prompt/model.py173 # The following classmethods mirror the state dict serialization hooks of BaseTuner, which AdaptionPromptModelCOMMENT
MEDIUMsrc/peft/tuners/osf/model.py103 # Create a new or update an existing OSF layer in placeCOMMENT
MEDIUMsrc/peft/tuners/xlora/model.py244 # Create an empty LoraModelCOMMENT
MEDIUMsrc/peft/tuners/adalora/model.py371 """This method is not supported for AdaLoRA, use LoRA instead."""STRING
Excessive Try-Catch Wrapping64 hits · 66 pts
SeverityFileLineSnippetContext
LOWtests/testing_utils.py374 except Exception:CODE
MEDIUMtests/test_initialization.py317def test_lora_init_orthogonal_half_precision_dtype(self, dtype):CODE
LOWtests/test_initialization.py320 except Exception:CODE
LOWtests/test_arrow.py336 except Exception:CODE
LOWtests/test_custom_models.py2640 except Exception:CODE
LOWtests/test_custom_models.py2680 except Exception:CODE
LOWtests/test_custom_models.py2719 except Exception:CODE
LOWtests/test_custom_models.py2758 except Exception:CODE
LOWtests/regression/test_state_dict.py584 except Exception:CODE
LOWmethod_comparison/app.py188 except Exception as exc:CODE
LOWmethod_comparison/app.py198 except Exception as exc:CODE
LOWmethod_comparison/app.py232 except Exception as exc:CODE
LOWmethod_comparison/app.py393 except Exception as exc:CODE
LOWmethod_comparison/app.py443 except Exception as exc:CODE
LOWmethod_comparison/app.py496 except Exception as e:CODE
LOWmethod_comparison/app.py518 except Exception as e:CODE
LOWmethod_comparison/image-gen/run.py572 except Exception as exc:CODE
LOWmethod_comparison/image-gen/run.py701 except Exception as exc:CODE
LOWmethod_comparison/image-gen/utils.py310 except Exception as exc:CODE
LOWmethod_comparison/image-gen/utils.py318 except Exception as exc:CODE
LOWmethod_comparison/image-gen/utils.py334 except Exception as exc:CODE
LOWmethod_comparison/image-gen/utils.py342 except Exception as exc:CODE
LOWmethod_comparison/image-gen/utils.py350 except Exception as exc:CODE
LOWmethod_comparison/image-gen/utils.py358 except Exception as exc:CODE
LOWmethod_comparison/image-gen/evaluate.py139 except Exception as exc:CODE
LOWmethod_comparison/image-gen/evaluate.py261 except Exception as exc:CODE
LOWmethod_comparison/text_generation_benchmark/run.py214 except Exception as exc:CODE
LOWmethod_comparison/text_generation_benchmark/run.py299 except Exception as exc:CODE
LOWmethod_comparison/MetaMathQA/run.py407 except Exception as exc:CODE
LOWmethod_comparison/MetaMathQA/utils.py365 except Exception as exc:CODE
LOWmethod_comparison/MetaMathQA/utils.py381 except Exception as exc:CODE
LOWmethod_comparison/MetaMathQA/utils.py389 except Exception as exc:CODE
LOWmethod_comparison/MetaMathQA/utils.py518 except Exception as exc:CODE
LOWmethod_comparison/MetaMathQA/utils.py526 except Exception as exc:CODE
LOWexamples/ephemeral_gpu_offloading/load_with_dora.py75 except Exception as e:CODE
LOWexamples/ephemeral_gpu_offloading/load_with_dora.py80 except Exception as e:CODE
LOWexamples/qalora_finetuning/qalora_gptq_finetuning.py69 except Exception as e:CODE
LOWexamples/adamss_finetuning/test_adamss_quick.py169except Exception as e:CODE
MEDIUMscripts/check_doc_coverage.py564 print(f"Error: source path not found: {args.src}", file=sys.stderr)CODE
MEDIUMscripts/check_doc_coverage.py567 print(f"Error: docs path not found: {args.docs}", file=sys.stderr)CODE
LOWscripts/check_doc_coverage.py271 except Exception as exc:CODE
LOWscripts/generate_method_capabilities.py283 except Exception as exc:CODE
LOWscripts/generate_method_capabilities.py303 except Exception as exc:CODE
LOWscripts/generate_method_capabilities.py326 except Exception as exc:CODE
LOWscripts/generate_method_capabilities.py362 except Exception as exc:CODE
LOWscripts/generate_method_capabilities.py394 except Exception as exc:CODE
LOWscripts/generate_method_capabilities.py460 except Exception as exc:CODE
LOWscripts/generate_method_capabilities.py514 except Exception as exc:CODE
LOWscripts/generate_method_capabilities.py580 except Exception as exc:CODE
LOWscripts/generate_method_capabilities.py588 except Exception as exc:CODE
MEDIUMscripts/generate_method_capabilities.py352def run(self) -> Finding:CODE
LOWsrc/peft/config.py116 except Exception:STRING
LOWsrc/peft/config.py262 except Exception as exc:STRING
LOWsrc/peft/config.py326 except Exception:STRING
MEDIUMsrc/peft/peft_model.py201def active_adapters(self) -> list[str]:CODE
LOWsrc/peft/peft_model.py1154 except Exception: # something went wrong, roll backCODE
LOWsrc/peft/peft_model.py2207 except Exception:CODE
LOWsrc/peft/peft_model.py2569 except Exception:CODE
LOWsrc/peft/mixed_model.py245 except Exception: # something went wrong, roll backCODE
LOWsrc/peft/helpers.py163 except Exception:CODE
4 more matches not shown…
AI Structural Patterns60 hits · 56 pts
SeverityFileLineSnippetContext
LOWtests/testing_utils.py287CODE
LOWtests/test_lora_variants.py75CODE
LOWtests/test_torch_compile.py146CODE
LOWmethod_comparison/text_generation_benchmark/run_base.py122CODE
LOWmethod_comparison/text_generation_benchmark/utils.py279CODE
LOWexamples/boft_controlnet/utils/pipeline_controlnet.py166CODE
LOWexamples/boft_controlnet/utils/unet_2d_condition.py38CODE
LOWexamples/waveft_finetuning/waveft_finetuning.py30CODE
LOWexamples/hira_finetuning/hira_finetuning.py26CODE
LOWexamples/glora_finetuning/glora_finetuning.py26CODE
LOWexamples/olora_finetuning/olora_finetuning.py30CODE
LOWexamples/shira_finetuning/shira_finetuning.py31CODE
LOWexamples/corda_finetuning/datautils.py95CODE
LOWscripts/train_memory.py106CODE
LOWsrc/peft/peft_model.py1864CODE
LOWsrc/peft/peft_model.py2047CODE
LOWsrc/peft/peft_model.py2391CODE
LOWsrc/peft/peft_model.py2718CODE
LOWsrc/peft/peft_model.py2948CODE
LOWsrc/peft/peft_model.py3019CODE
LOWsrc/peft/utils/incremental_pca.py46CODE
LOWsrc/peft/tuners/hra/layer.py268CODE
LOWsrc/peft/tuners/hra/layer.py458CODE
LOWsrc/peft/tuners/loha/layer.py246CODE
LOWsrc/peft/tuners/lokr/layer.py314CODE
LOWsrc/peft/tuners/vera/layer.py289CODE
LOWsrc/peft/tuners/delora/layer.py267CODE
LOWsrc/peft/tuners/boft/layer.py651CODE
LOWsrc/peft/tuners/boft/layer.py994CODE
LOWsrc/peft/tuners/waveft/layer.py289CODE
LOWsrc/peft/tuners/c3a/layer.py202CODE
LOWsrc/peft/tuners/frod/layer.py346CODE
LOWsrc/peft/tuners/road/layer.py397CODE
LOWsrc/peft/tuners/fourierft/layer.py191CODE
LOWsrc/peft/tuners/vblora/layer.py253CODE
LOWsrc/peft/tuners/gralora/layer.py387CODE
LOWsrc/peft/tuners/adaption_prompt/layer.py139CODE
LOWsrc/peft/tuners/unilora/layer.py253CODE
LOWsrc/peft/tuners/tinylora/layer.py418CODE
LOWsrc/peft/tuners/miss/layer.py372CODE
LOWsrc/peft/tuners/ia3/layer.py331CODE
LOWsrc/peft/tuners/xlora/layer.py131CODE
LOWsrc/peft/tuners/xlora/layer.py236CODE
LOWsrc/peft/tuners/pvera/layer.py320CODE
LOWsrc/peft/tuners/lora/variants.py248CODE
LOWsrc/peft/tuners/lora/variants.py347CODE
LOWsrc/peft/tuners/lora/variants.py436CODE
LOWsrc/peft/tuners/lora/variants.py891CODE
LOWsrc/peft/tuners/lora/variants.py1220CODE
LOWsrc/peft/tuners/lora/variants.py1538CODE
LOWsrc/peft/tuners/lora/eva.py655CODE
LOWsrc/peft/tuners/lora/layer.py744CODE
LOWsrc/peft/tuners/lora/layer.py2163CODE
LOWsrc/peft/tuners/randlora/layer.py346CODE
LOWsrc/peft/tuners/oft/awq.py69CODE
LOWsrc/peft/tuners/oft/gptq.py67CODE
LOWsrc/peft/tuners/oft/layer.py685CODE
LOWsrc/peft/tuners/oft/layer.py938CODE
LOWsrc/peft/tuners/deft/layer.py353CODE
LOWsrc/peft/tuners/poly/layer.py161CODE
Redundant / Tautological Comments28 hits · 46 pts
SeverityFileLineSnippetContext
LOWtests/test_xlora.py317 # Set it to 2 and make sure it actually isCOMMENT
LOWtests/test_xlora.py322 # Set it to None and make sure it is 1/nCOMMENT
LOWtests/test_lorafa.py303 # Check if lora_A weights have not changedCOMMENT
LOWtests/test_lorafa.py308 # Check if lora_B weights are non-zeroCOMMENT
LOWtests/test_lorafa.py334 # Check if lora_A weights have not changedCOMMENT
LOWtests/test_lorafa.py339 # Check if lora_B weights are non-zero and if they follow the expected relationCOMMENT
LOWtests/test_lorafa.py371 # Check if all non-LoRA params also follow the expected relationCOMMENT
LOWtests/test_config.py451 # Check if the user supplied timing values that will certainly fail because it breaksSTRING
LOWmethod_comparison/MetaMathQA/utils.py450 # Check if the string represents a fraction.COMMENT
LOWexamples/waveft_finetuning/waveft_finetuning.py50 # Set device_map to the right place when enabling DDP.COMMENT
LOWexamples/olora_finetuning/olora_finetuning.py51 # Set device_map to the right place when enabling DDP.COMMENT
LOWexamples/alora_finetuning/alora_finetuning.py186 # Print resultsCOMMENT
LOWexamples/qalora_finetuning/qalora_gptq_finetuning.py50 # Check if the model has GPTQ quantization attributesCOMMENT
LOWexamples/qalora_finetuning/qalora_gptq_finetuning.py78 # Check if we already have a cached quantized versionCOMMENT
LOWexamples/shira_finetuning/shira_finetuning.py49 # Set device_map to the right place when enabling DDP.COMMENT
LOWexamples/sft/utils.py194 # Check if the model is quantizedCOMMENT
LOW…s/int8_training/peft_adalora_whisper_large_training.py707 # Check if rank_pattern exists before calling update_and_allocateCOMMENT
LOWsrc/peft/utils/other.py1605 # Check if this is the embedding layer (use endswith to allow flexible matching)COMMENT
LOWsrc/peft/utils/other.py1610 # Check if this target layer matches any tied module (considering nested structures)COMMENT
LOWsrc/peft/utils/other.py1618 # Check if all tied layers have the same indicesCOMMENT
LOWsrc/peft/tuners/tuners_utils.py2282 # Check if adding this suffix covers the itemCOMMENT
LOWsrc/peft/tuners/adamss/model.py98 # Check if already an Adamss layerCOMMENT
LOWsrc/peft/tuners/hira/layer.py176 fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out)CODE
LOWsrc/peft/tuners/hira/layer.py297 fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out)CODE
LOWsrc/peft/tuners/adalora/config.py94 # Check if 'r' has been set to a non-default valueCOMMENT
LOWsrc/peft/tuners/lora/loraga.py136 # Check if any supported layers were foundCOMMENT
LOWsrc/peft/tuners/oft/layer.py546 fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out)CODE
LOWsrc/peft/tuners/oft/layer.py701 fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out)CODE
AI Slop Vocabulary17 hits · 38 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_trainable_tokens.py716 # for this we can leverage the fact that emb_out(1/emb_in(x)) is embed_dim on theCOMMENT
MEDIUMtests/test_trainable_tokens.py753 # for this we can leverage the fact that emb_out(1/emb_in(x)) is embed_dim on theCOMMENT
MEDIUMtests/test_trainable_tokens.py814 # for this we can leverage the fact that emb_out(1/emb_in(x)) is embed_dim on theCOMMENT
MEDIUMtests/test_gpu_examples.py5868 # increase the scale of the LoRA weights so that the difference between adapters is more pronounced, making COMMENT
MEDIUMtests/test_initialization.py1562 # some arguments don't work in conjunction with lora_bias and should raiseCOMMENT
LOWtests/test_decoder_models.py566 # a malicious prompt tuning model. This is because PEFT would just pass the on the tokenizer_kwargs defined inCOMMENT
LOWtests/test_other.py464 # aware that some of the passing tests may just pass owing to randomness.COMMENT
MEDIUMtests/test_custom_models.py7821 # robust and minimal FSDP setupCOMMENT
LOWexamples/dora_finetuning/dora_finetuning.py73 use_dora=use_dora, # to use Dora OR compare to Lora just set the --use_doraCODE
MEDIUMsrc/peft/peft_model.py1035 # TODO: consider replacing this patching of methods with a more robust mechanism: setting a flag andCOMMENT
LOWsrc/peft/utils/other.py1811 # technically it would be sufficient to just return candidates since that contains all the keys ofCOMMENT
LOWsrc/peft/utils/transformers_weight_conversion.py493 # If, for any reason, we cannot apply conversion, we just return the PEFT config as is.COMMENT
MEDIUMsrc/peft/tuners/tuners_utils.py921 # TODO: check if this the most robust waySTRING
LOWsrc/peft/tuners/tuners_utils.py323 # model, just add a `peft_config` dict attribute to your model.STRING
LOWsrc/peft/tuners/adamss/layer.py392 # so just call base_layer directly (no adapter delta needed).COMMENT
LOWsrc/peft/tuners/lora/conversion.py328 # effective rank is the same and target_modules are a set, just add the nameCOMMENT
MEDIUMsrc/peft/tuners/lora/layer.py391 # check without importing bitsandbytes and robust to bnb_4bit_quant_storage=float*COMMENT
Docstring Block Structure6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHexamples/boft_controlnet/utils/pipeline_controlnet.py196 Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[stSTRING
HIGHexamples/qalora_finetuning/qalora_gptq_finetuning.py109 Tokenize text data and prepare it for language modeling. Args: examples: Dataset examples with 'text' STRING
HIGHsrc/peft/peft_model.py3207Get the status of each adapter layer in the model. This function returns a list of `TunerLayerStatus` dataclass insSTRING
HIGHsrc/peft/peft_model.py3341Get the status of tuners of the model. This function returns a `TunerModelStatus` dataclass instance, which containSTRING
HIGHsrc/peft/tuners/tuners_utils.py386 A private method to prepare the adapter config. For transformers based models, if `peft_config.target_STRING
HIGHsrc/peft/tuners/tuners_utils.py2213Find the minimal set of target modules that is sufficient to separate them from the other modules. Sometimes, a verSTRING
Structural Annotation Overuse13 hits · 27 pts
SeverityFileLineSnippetContext
LOWtests/test_adamss_asa.py107 # Step 1: train so B becomes non-zeroCOMMENT
LOWtests/test_adamss_asa.py113 # Step 2: now gradients for A should be non-zeroCOMMENT
LOWtests/test_adamss_asa.py123 # Step 3: another update should change scores via EMACOMMENT
LOWtests/test_adamss_asa.py166 # Step 0: train to make B non-zeroCOMMENT
LOWexamples/lora_ga_finetuning/README.md38# Step 1: Create LoRA-GA configCOMMENT
LOWexamples/lora_ga_finetuning/README.md54# Step 2: Preprocess with LoRA-GA to estimate gradientsCOMMENT
LOWexamples/lora_ga_finetuning/README.md57# Step 3: Create PEFT model with LoRA-GA initializationCOMMENT
LOWexamples/lora_ga_finetuning/README.md60# Step 4: Train normallyCOMMENT
LOWexamples/lora_ga_finetuning/README.md68# Step 5: Save the trained adapterCOMMENT
LOWexamples/lora_ga_finetuning/README.md211### Step 1: Estimate gradients with full-precision modelCOMMENT
LOWexamples/lora_ga_finetuning/README.md250### Step 2: Load quantized model and apply LoRA-GACOMMENT
LOWsrc/peft/tuners/adamss/model.py193 # Step 1: accumulate importance EVERY step during warmupCOMMENT
LOWsrc/peft/tuners/adamss/model.py198 # Step 2: at mask intervals → schedule, global mask, then resetCOMMENT
Verbosity Indicators7 hits · 15 pts
SeverityFileLineSnippetContext
LOWtests/test_adamss_asa.py107 # Step 1: train so B becomes non-zeroCOMMENT
LOWtests/test_adamss_asa.py113 # Step 2: now gradients for A should be non-zeroCOMMENT
LOWtests/test_adamss_asa.py123 # Step 3: another update should change scores via EMACOMMENT
LOWtests/test_adamss_asa.py166 # Step 0: train to make B non-zeroCOMMENT
LOWsrc/peft/import_utils.py104 # We need to check if `xla_device` can be found, will raise a RuntimeError if notCOMMENT
LOWsrc/peft/tuners/adamss/model.py193 # Step 1: accumulate importance EVERY step during warmupCOMMENT
LOWsrc/peft/tuners/adamss/model.py198 # Step 2: at mask intervals → schedule, global mask, then resetCOMMENT
Cross-Language Confusion5 hits · 12 pts
SeverityFileLineSnippetContext
HIGHsrc/peft/peft_model.py1789 trainable params: 370178 || all params: 108680450 || trainable%: 0.3406113979101117STRING
HIGHsrc/peft/peft_model.py2037 trainable params: 1843200 || all params: 775873280 || trainable%: 0.23756456724479544STRING
HIGHsrc/peft/peft_model.py2378 trainable params: 884736 || all params: 223843584 || trainable%: 0.3952474242013566STRING
HIGHsrc/peft/peft_model.py2647 trainable params: 370178 || all params: 108680450 || trainable%: 0.3406113979101117STRING
HIGHsrc/peft/peft_model.py2877 trainable params: 592900 || all params: 108312580 || trainable%: 0.5473971721475013STRING
Slop Phrases7 hits · 10 pts
SeverityFileLineSnippetContext
LOWtests/regression/test_regression.py189 model output, and load_base_model(name) to load the base model. Don't forget to fix the seed in load_base_model.STRING
MEDIUMexamples/beft_finetuning/beft_finetuning.py68# you can try target_modules=["v"], target_modules=["q"], target_modules=["k"]COMMENT
LOW…ture_extraction/peft_lora_embedding_semantic_search.py157 # make sure to pop weight so that corresponding model is not saved againCOMMENT
MEDIUMexamples/arrow_multitask/arrow_phi3_mini.py57This script is mainly meant for demonstration purposes and lightweight evaluation,STRING
MEDIUMexamples/alora_finetuning/alora_finetuning.py168 Purely for demonstration purposes. See the [paper](https://huggingface.co/papers/2504.12397)STRING
LOW…s/int8_training/peft_adalora_whisper_large_training.py325 # make sure to pop weight so that corresponding model is not saved againCOMMENT
LOWsrc/peft/tuners/lora/intruders.py115 # we're not modifying the weights since there are no intruders but we make sure to copy theCOMMENT
TODO Padding4 hits · 5 pts
SeverityFileLineSnippetContext
LOWtests/testing_common.py1872 # TODO: add tests to check if disabling adapters works after calling merge_adapterSTRING
LOWsrc/peft/tuners/xlora/layer.py114 # TODO: implement X-LoRA with Lora+Dora layersCOMMENT
LOWsrc/peft/tuners/xlora/layer.py165 # TODO: implement X-LoRA with Lora+Dora layersCOMMENT
LOWsrc/peft/tuners/xlora/layer.py219 # TODO: implement X-LoRA with Lora+Dora layersCOMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWdocs/source/package_reference/lora.md742invocation_string = "placeholder"CODE