🤗 PEFT: State-of-the-art Parameter-Efficient Fine-Tuning.
2702 matches across 15 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/test_gpu_examples.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_gpu_examples.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_gpu_examples.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_gpu_examples.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_gpu_examples.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_gpu_examples.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_gpu_examples.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_vision_models.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_gptqmodel.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_gptqmodel.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_common_gpu.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_torch_compile.py | 0 | efficient mechanism to free gpu memory after each test. based on https://github.com/huggingface/transformers/issues/2109 |
| HIGH | tests/test_gpu_examples.py | 0 | test the causallm training on a single gpu device. the test would simply fail if the adapters are not set correctly. |
| HIGH | tests/test_gpu_examples.py | 0 | test the causallm training on a single gpu device. the test would simply fail if the adapters are not set correctly. |
| HIGH | tests/test_gpu_examples.py | 0 | test the causallm training on a single gpu device. the test would simply fail if the adapters are not set correctly. |
| HIGH | tests/test_gpu_examples.py | 0 | test the causallm training on a single gpu device. the test would simply fail if the adapters are not set correctly. |
| HIGH | tests/test_gptqmodel.py | 0 | test the causallm training on a single gpu device. the test would simply fail if the adapters are not set correctly. |
| HIGH | tests/test_gptqmodel.py | 0 | test the causallm training on a single gpu device. the test would simply fail if the adapters are not set correctly. |
| HIGH | tests/test_gpu_examples.py | 0 | test the causallm training on a multi-accelerator device. the test would simply fail if the adapters are not set correct |
| HIGH | tests/test_gptqmodel.py | 0 | test the causallm training on a multi-accelerator device. the test would simply fail if the adapters are not set correct |
| HIGH | tests/test_gptqmodel.py | 0 | test the causallm training on a multi-accelerator device. the test would simply fail if the adapters are not set correct |
| HIGH | docs/source/developer_guides/lora.md | 0 | run forward and backward passes for gradient estimation. |
| HIGH | examples/lora_ga_finetuning/README.md | 0 | run forward and backward passes for gradient estimation. |
| HIGH | examples/lora_ga_finetuning/lora_ga_finetuning.py | 0 | run forward and backward passes for gradient estimation. |
| HIGH | examples/boft_controlnet/utils/tracemalloc.py | 0 | get resident set size memory for the current process |
| HIGH | …_modeling/peft_lora_clm_accelerate_ds_zero3_offload.py | 0 | get resident set size memory for the current process |
| HIGH | examples/oft_dreambooth/train_dreambooth.py | 0 | get resident set size memory for the current process |
| HIGH | examples/hra_dreambooth/utils/tracemalloc.py | 0 | get resident set size memory for the current process |
| HIGH | examples/stable_diffusion/train_dreambooth.py | 0 | get resident set size memory for the current process |
| HIGH | examples/lora_dreambooth/train_dreambooth.py | 0 | get resident set size memory for the current process |
| HIGH | examples/boft_dreambooth/utils/tracemalloc.py | 0 | get resident set size memory for the current process |
| HIGH | …ation/peft_lora_seq2seq_accelerate_ds_zero3_offload.py | 0 | get resident set size memory for the current process |
| HIGH | examples/waveft_finetuning/waveft_finetuning.py | 0 | below is an instruction that describes a task. write a response that appropriately completes the request. ### instructio |
| HIGH | examples/hira_finetuning/hira_finetuning.py | 0 | below is an instruction that describes a task. write a response that appropriately completes the request. ### instructio |
| HIGH | examples/olora_finetuning/olora_finetuning.py | 0 | below is an instruction that describes a task. write a response that appropriately completes the request. ### instructio |
| HIGH | examples/shira_finetuning/shira_finetuning.py | 0 | below is an instruction that describes a task. write a response that appropriately completes the request. ### instructio |
| HIGH | examples/oft_dreambooth/train_dreambooth.py | 0 | a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imag |
| HIGH | examples/hra_dreambooth/utils/dataset.py | 0 | a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imag |
| HIGH | examples/stable_diffusion/train_dreambooth.py | 0 | a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imag |
| HIGH | examples/lora_dreambooth/train_dreambooth.py | 0 | a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imag |
| HIGH | examples/boft_dreambooth/utils/dataset.py | 0 | a dataset to prepare the instance and class images with the prompts for fine-tuning the model. it pre-processes the imag |
| HIGH | src/peft/peft_model.py | 0 | add an adapter to the model based on the passed configuration. this adapter is not trained. to load a trained adapter, c |
| HIGH | src/peft/peft_model.py | 0 | add an adapter to the model based on the passed configuration. this adapter is not trained. to load a trained adapter, c |
| HIGH | src/peft/peft_model.py | 0 | add an adapter to the model based on the passed configuration. this adapter is not trained. to load a trained adapter, c |
| HIGH | src/peft/peft_model.py | 0 | add an adapter to the model based on the passed configuration. this adapter is not trained. to load a trained adapter, c |
| HIGH | src/peft/peft_model.py | 0 | deletes an existing adapter. args: adapter_name (str): name of the adapter to be deleted. |
| HIGH | src/peft/tuners/tuners_utils.py | 0 | deletes an existing adapter. args: adapter_name (str): name of the adapter to be deleted. |
| HIGH | src/peft/tuners/waveft/model.py | 0 | deletes an existing adapter. args: adapter_name (str): name of the adapter to be deleted. |
| HIGH | src/peft/utils/other.py | 0 | return all adapter names that can be found on this module. |
| HIGH | src/peft/utils/other.py | 0 | return all adapter names that can be found on this module. |
| HIGH | src/peft/utils/other.py | 0 | return all adapter names that can be found on this module. |
| HIGH | src/peft/tuners/tuners_utils.py | 0 | return all adapter names that can be found on this module. |
| HIGH | src/peft/utils/other.py | 0 | check if the arguments are compatible with the configs and state of the model |
| HIGH | src/peft/tuners/road/layer.py | 0 | check if the arguments are compatible with the configs and state of the model |
| HIGH | src/peft/tuners/lora/layer.py | 0 | check if the arguments are compatible with the configs and state of the model |
| HIGH | src/peft/tuners/lora/layer.py | 0 | check if the arguments are compatible with the configs and state of the model |
| HIGH | src/peft/utils/other.py | 0 | helper function to check if the given adapter(s) can be set. return the name of the adapter to be set or none if no adap |
| HIGH | src/peft/utils/other.py | 0 | helper function to check if the given adapter(s) can be set. return the name of the adapter to be set or none if no adap |
| HIGH | src/peft/utils/other.py | 0 | helper function to check if the given adapter(s) can be set. return the name of the adapter to be set or none if no adap |
| HIGH | src/peft/utils/other.py | 0 | enable or disable gradients on the given adapter(s). args: adapter_name (`str` or `sequence[str]`): the name of the adap |
| 127 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_mixed.py | 448 | def test_target_different_layers(self, config0, config1): |
| LOW | tests/test_mixed.py | 489 | def test_target_last_layer_same_type(self, config0, config1): |
| LOW | tests/test_mixed.py | 518 | def test_target_first_layer_same_type(self, config0, config1): |
| LOW | tests/test_mixed.py | 666 | def test_get_nb_trainable_parameters(self): |
| LOW | tests/test_mixed.py | 695 | def test_incompatible_config_raises(self): |
| LOW | tests/test_seq_classifier.py | 302 | def prepare_inputs_for_testing(self): |
| LOW | tests/test_seq_classifier.py | 309 | def test_attributes_parametrized(self, model_id, config_cls, config_kwargs): |
| LOW | tests/test_seq_classifier.py | 319 | def test_prepare_for_training_parametrized(self, model_id, config_cls, config_kwargs): |
| LOW | tests/test_seq_classifier.py | 324 | def test_prompt_tuning_text_prepare_for_training(self, model_id, config_cls, config_kwargs): |
| LOW | tests/test_seq_classifier.py | 341 | def test_save_pretrained_pickle(self, model_id, config_cls, config_kwargs): |
| LOW | tests/test_seq_classifier.py | 347 | def test_save_pretrained_selected_adapters(self, model_id, config_cls, config_kwargs): |
| LOW | tests/test_seq_classifier.py | 353 | def test_save_pretrained_selected_adapters_pickle(self, model_id, config_cls, config_kwargs): |
| LOW | tests/test_seq_classifier.py | 361 | def test_from_pretrained_config_construction(self, model_id, config_cls, config_kwargs): |
| LOW | tests/test_seq_classifier.py | 366 | def test_modules_to_save_correctly_set(self, model_id, config_cls, config_kwargs): |
| LOW | tests/test_lora_conversion.py | 78 | def test_no_peft_layer_raises(self): |
| LOW | tests/test_lora_conversion.py | 85 | def test_prompt_learning_model_raises(self): |
| LOW | tests/test_lora_conversion.py | 96 | def test_peft_model_but_no_support_raises(self): |
| LOW | tests/test_lora_conversion.py | 106 | def test_model_with_unsupported_layers_raises(self): |
| LOW | tests/test_lora_conversion.py | 122 | def test_targeted_modules_identical(self, lokr_model): |
| LOW | tests/test_lora_conversion.py | 138 | def test_targeted_modules_identical_target_modules_str(self): |
| LOW | tests/test_lora_conversion.py | 157 | def test_fixed_rank_lora_config(self, lokr_model): |
| LOW | tests/test_lora_conversion.py | 167 | def test_dynamic_rank_lora_config(self, lokr_model): |
| LOW | tests/test_lora_conversion.py | 193 | def test_threshold_wrong_value_raises(self, lokr_model): |
| LOW | tests/test_lora_conversion.py | 203 | def test_rank_higher_than_weight_dim_raises(self, lokr_model): |
| LOW | tests/test_lora_conversion.py | 214 | def test_converting_transformers_model_works(self, lokr_model, tmp_path): |
| LOW | tests/test_lora_conversion.py | 245 | def test_converted_lora_approximates_original_adapter(self, lokr_model): |
| LOW | tests/test_lora_conversion.py | 334 | def test_model_without_peft_config(self, lokr_model): |
| LOW | tests/test_lora_conversion.py | 372 | def test_converted_lora_to_lora_works_and_warns(self): |
| LOW | tests/test_lora_conversion.py | 410 | def test_converted_lora_with_multiple_adapters(self, lokr_model): |
| LOW | tests/test_lora_conversion.py | 456 | def test_convert_model_with_modules_to_save(self): |
| LOW | tests/test_lora_conversion.py | 496 | def test_convert_model_with_trainable_bias_raises(self, bias): |
| LOW | tests/test_lora_conversion.py | 605 | def test_miss_supports_lora_conversion(self, miss_model_standard, miss_model_mini, miss_model_bat): |
| LOW | tests/test_lora_conversion.py | 610 | def test_miss_standard_exact_conversion(self, miss_model_standard): |
| LOW | tests/test_lora_conversion.py | 627 | def test_miss_mini_exact_conversion(self, miss_model_mini): |
| LOW | tests/test_lora_conversion.py | 644 | def test_miss_bat_approximate_conversion(self, miss_model_bat): |
| LOW | tests/test_lora_conversion.py | 666 | def test_miss_targeted_modules_identical(self, miss_model_standard): |
| LOW | tests/test_tuners_utils.py | 450 | def test_one_targeted_module_regex(self): |
| LOW | tests/test_tuners_utils.py | 455 | def test_two_targeted_module_regex(self): |
| LOW | tests/test_tuners_utils.py | 460 | def test_one_targeted_module_list(self): |
| LOW | tests/test_tuners_utils.py | 465 | def test_two_targeted_module_list(self): |
| LOW | tests/test_tuners_utils.py | 526 | def test_two_excluded_module_regex(self): |
| LOW | tests/test_tuners_utils.py | 531 | def test_two_excluded_module_list(self): |
| LOW | tests/test_tuners_utils.py | 536 | def test_multiple_excluded_modules_list(self): |
| LOW | tests/test_tuners_utils.py | 794 | def test_available_adapters_small(self, small_model): |
| LOW | tests/test_tuners_utils.py | 800 | def test_available_adapters_large(self, large_model): |
| LOW | tests/test_tuners_utils.py | 806 | def test_devices_all_cpu_small(self, small_model): |
| LOW | tests/test_tuners_utils.py | 812 | def test_devices_all_cpu_large(self, large_model): |
| LOW | tests/test_tuners_utils.py | 912 | def test_base_model_type_small(self, small_model): |
| LOW | tests/test_tuners_utils.py | 916 | def test_base_model_type_large(self, large_model): |
| LOW | tests/test_tuners_utils.py | 920 | def test_base_model_type_transformers_automodel(self): |
| LOW | tests/test_tuners_utils.py | 929 | def test_adapter_model_type_small(self, small_model): |
| LOW | tests/test_tuners_utils.py | 933 | def test_adapter_model_type_large(self, large_model): |
| LOW | tests/test_tuners_utils.py | 971 | def test_model_disabled_small(self, small_model): |
| LOW | tests/test_tuners_utils.py | 976 | def test_model_disabled_large(self, large_model): |
| LOW | tests/test_tuners_utils.py | 981 | def test_model_enabled_irregular(self, large_model): |
| LOW | tests/test_tuners_utils.py | 1018 | def test_model_active_adapters_small(self, small_model): |
| LOW | tests/test_tuners_utils.py | 1022 | def test_model_active_adapters_large(self, large_model): |
| LOW | tests/test_tuners_utils.py | 1030 | def test_model_active_adapters_irregular(self, large_model): |
| LOW | tests/test_tuners_utils.py | 1102 | def test_model_merged_adapters_irregular(self, large_model): |
| LOW | tests/test_tuners_utils.py | 1110 | def test_model_requires_grad_model_small(self, small_model): |
| 1132 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | tests/test_lora_conversion.py | 468 | lokr_model.base_model.model.model.decoder.layers[0].fc1.modules_to_save.default.weight.data.mul_(-10.0) |
| CRITICAL | tests/test_lora_conversion.py | 469 | lokr_model.base_model.model.model.decoder.layers[0].fc1.modules_to_save.default.bias.data.mul_(-10.0) |
| CRITICAL | tests/test_cpt.py | 247 | emb = model.prompt_encoder.default.embedding.weight.data.clone().detach() |
| CRITICAL | tests/test_cpt.py | 263 | assert torch.all(model.prompt_encoder.default.embedding.weight.data.clone().detach().cpu() == emb.cpu()) |
| CRITICAL | tests/test_cpt.py | 277 | emb = model.prompt_encoder.default.embedding.weight.data.clone().detach() |
| CRITICAL | tests/test_cpt.py | 294 | assert torch.all(model.prompt_encoder.default.embedding.weight.data.clone().detach().cpu() == emb.cpu()) |
| CRITICAL | tests/test_trainable_tokens.py | 228 | initial_delta = model.model.model.embed_tokens.trainable_tokens_delta.default.clone() |
| CRITICAL | tests/test_trainable_tokens.py | 229 | initial_originals = model.model.model.embed_tokens.trainable_tokens_original.default.clone() |
| CRITICAL | tests/test_trainable_tokens.py | 680 | assert merged_model.model.decoder.embed_tokens.weight.data_ptr() == merged_model.lm_head.weight.data_ptr() |
| CRITICAL | tests/test_trainable_tokens.py | 717 | assert merged_model.model.decoder.embed_tokens.weight.data_ptr() == merged_model.lm_head.weight.data_ptr() |
| CRITICAL | tests/test_trainable_tokens.py | 816 | expected_changed_weights = peft_model.model.model.embed_tokens.trainable_tokens_delta.default.data.clone() |
| CRITICAL | tests/test_gpu_examples.py | 2194 | embed_params = model.base_model.model.model.decoder.embed_tokens.original_module.weight.numel() |
| CRITICAL | tests/test_initialization.py | 5545 | model.base_model.model.model.embed_tokens.weight.data_ptr() |
| CRITICAL | tests/test_initialization.py | 5546 | != model.base_model.model.lm_head.weight.data_ptr() |
| CRITICAL | tests/test_initialization.py | 5017 | peft_model.prompt_encoder.default.embedding.weight.data.fill_(1.0) |
| CRITICAL | tests/test_initialization.py | 5234 | embed_np = dict(model.base_model.model.model.embed_tokens.named_parameters()) |
| CRITICAL | tests/test_initialization.py | 5294 | embed_np = dict(model.base_model.model.model.embed_tokens.named_parameters()) |
| CRITICAL | tests/test_initialization.py | 5469 | shared_np = dict(model.base_model.model.model.shared.named_parameters()) |
| CRITICAL | tests/test_target_parameters.py | 386 | gate_proj_1_0.lora_A.default.weight.data.copy_(gate_proj_0_0.lora_A.default.weight.data) |
| CRITICAL | tests/test_target_parameters.py | 387 | gate_proj_1_1.lora_A.default.weight.data.copy_(gate_proj_0_1.lora_A.default.weight.data) |
| CRITICAL | tests/test_target_parameters.py | 388 | gate_proj_1_0.lora_B.default.weight.data.copy_(gate_proj_0_0.lora_B.default.weight.data) |
| CRITICAL | tests/test_target_parameters.py | 389 | gate_proj_1_1.lora_B.default.weight.data.copy_(gate_proj_0_1.lora_B.default.weight.data) |
| CRITICAL | tests/test_decoder_models.py | 777 | layers[0].mlp.up_proj.base_layer.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_decoder_models.py | 778 | == layers[1].mlp.up_proj.base_layer.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_decoder_models.py | 779 | and layers[2].mlp.up_proj.base_layer.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_decoder_models.py | 780 | == layers[3].mlp.up_proj.base_layer.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_decoder_models.py | 783 | layers[0].mlp.up_proj.base_layer.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_decoder_models.py | 784 | != layers[2].mlp.up_proj.base_layer.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_decoder_models.py | 787 | layers[0].mlp.up_proj.lora_A.default.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_decoder_models.py | 788 | != layers[1].mlp.up_proj.lora_A.default.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_decoder_models.py | 789 | and layers[2].mlp.up_proj.lora_A.default.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_decoder_models.py | 790 | != layers[3].mlp.up_proj.lora_A.default.weight.data.storage().data_ptr() |
| CRITICAL | tests/test_custom_models.py | 3695 | lm_head_keys = list(model.base_model.model.lm_head.modules_to_save.keys()) |
| CRITICAL | tests/test_custom_models.py | 3698 | embed_token_keys = list(model.base_model.model.model.decoder.embed_tokens.modules_to_save.keys()) |
| CRITICAL | src/peft/tuners/tuners_utils.py | 609 | model.lm_head.weight.data = model.model.embed_tokens.weight.data.clone() |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_lorafa.py | 15 | |
| LOW | tests/test_trainable_tokens.py | 15 | |
| LOW | tests/test_loraplus.py | 14 | |
| LOW | examples/stable_diffusion/inc_flux_lora_hpu.py | 26 | |
| LOW | src/peft/config.py | 14 | |
| LOW | src/peft/__init__.py | 17 | |
| LOW | src/peft/__init__.py | 17 | |
| LOW | src/peft/__init__.py | 17 | |
| LOW | src/peft/__init__.py | 17 | |
| LOW | src/peft/__init__.py | 17 | |
| LOW | src/peft/__init__.py | 17 | |
| LOW | src/peft/__init__.py | 17 | |
| LOW | src/peft/__init__.py | 17 | |
| LOW | src/peft/__init__.py | 27 | |
| LOW | src/peft/__init__.py | 27 | |
| LOW | src/peft/__init__.py | 28 | |
| LOW | src/peft/__init__.py | 29 | |
| LOW | src/peft/__init__.py | 29 | |
| LOW | src/peft/__init__.py | 29 | |
| LOW | src/peft/__init__.py | 29 | |
| LOW | src/peft/__init__.py | 29 | |
| LOW | src/peft/__init__.py | 36 | |
| LOW | src/peft/__init__.py | 37 | |
| LOW | src/peft/__init__.py | 38 | |
| LOW | src/peft/__init__.py | 38 | |
| LOW | src/peft/__init__.py | 38 | |
| LOW | src/peft/__init__.py | 38 | |
| LOW | src/peft/__init__.py | 38 | |
| LOW | src/peft/__init__.py | 38 | |
| LOW | src/peft/__init__.py | 38 | |
| LOW | src/peft/__init__.py | 38 | |
| LOW | src/peft/__init__.py | 38 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| LOW | src/peft/__init__.py | 49 | |
| 488 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | setup.py | 1 | # Copyright 2023 The HuggingFace Team. All rights reserved. |
| LOW | setup.py | 101 | # Push the tag to git: |
| LOW | tests/test_mixed.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_seq_classifier.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_lora_conversion.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_tuners_utils.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_tuners_utils.py | 61 | # Implements tests for regex matching logic common for all BaseTuner subclasses, and |
| LOW | tests/conftest.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_xlora.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_hub_features.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_lorafa.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_cpt.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_low_level_api.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_lora_megatron.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_trainable_tokens.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_gpu_examples.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_integrations.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_poly.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/testing_utils.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_loraplus.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_adaption_prompt.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_initialization.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_initialization.py | 4781 | def __getattr__(self, item): |
| LOW | tests/test_initialization.py | 4801 | # (attn): VisionSdpaAttention( |
| LOW | tests/test_initialization.py | 4821 | # (model): Qwen2VLModel( |
| LOW | tests/test_initialization.py | 4881 | # (visual): Qwen2VisionTransformerPretrainedModel( |
| LOW | tests/test_initialization.py | 4901 | # (merger): PatchMerger( |
| LOW | tests/test_initialization.py | 4921 | # (mlp): Qwen2MLP( |
| LOW | tests/test_target_parameters.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_pvera.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_vision_models.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_gptqmodel.py | 1 | # Note: These tests were copied from test_common_gpu.py and test_gpu_examples.py as they can run on CPU too. |
| LOW | tests/test_decoder_models.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_encoder_decoder_models.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_multitask_prompt_tuning.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_lora_ga.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/testing_common.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_common_gpu.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_cartridge.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_vblora.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_config.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_randlora.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_shira.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_boft.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_feature_extraction_models.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_helpers.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_stablediffusion.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_lora_variants.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_incremental_pca.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_auto.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_other.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_arrow.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/test_vera.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_torch_compile.py | 1 | # Copyright 2024-present the HuggingFace Inc. team. |
| LOW | tests/test_custom_models.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| LOW | tests/test_mapping.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/training/lora_tp.py | 1 | # Copyright 2026-present the HuggingFace Inc. team. |
| LOW | tests/training/training.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/training/adapters.py | 1 | # Copyright 2025-present the HuggingFace Inc. team. |
| LOW | tests/regression/test_regression.py | 1 | # Copyright 2023-present the HuggingFace Inc. team. |
| 290 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_lora_conversion.py | 576 | |
| LOW | tests/test_trainable_tokens.py | 586 | |
| LOW | tests/test_gpu_examples.py | 6527 | |
| LOW | tests/test_gpu_examples.py | 6581 | |
| LOW | tests/test_gpu_examples.py | 5814 | |
| LOW | tests/testing_utils.py | 318 | |
| LOW | tests/test_initialization.py | 1355 | |
| LOW | tests/test_initialization.py | 4218 | |
| LOW | tests/test_initialization.py | 4395 | |
| LOW | tests/test_initialization.py | 4427 | |
| LOW | tests/test_decoder_models.py | 398 | |
| LOW | tests/testing_common.py | 563 | |
| LOW | tests/testing_common.py | 1159 | |
| LOW | tests/testing_common.py | 1263 | |
| LOW | tests/testing_common.py | 1295 | |
| LOW | tests/testing_common.py | 1355 | |
| LOW | tests/testing_common.py | 1464 | |
| LOW | tests/test_other.py | 650 | |
| LOW | tests/test_arrow.py | 474 | |
| LOW | tests/test_custom_models.py | 2551 | |
| LOW | method_comparison/sanitizer.py | 6 | |
| LOW | method_comparison/app.py | 194 | |
| LOW | method_comparison/text_generation_benchmark/run.py | 139 | |
| LOW | method_comparison/text_generation_benchmark/utils.py | 205 | |
| LOW | method_comparison/MetaMathQA/utils.py | 210 | |
| LOW | method_comparison/MetaMathQA/utils.py | 359 | |
| LOW | …les/sequence_classification/peft_no_lora_accelerate.py | 79 | |
| LOW | examples/boft_controlnet/train_controlnet.py | 86 | |
| LOW | examples/boft_controlnet/utils/pipeline_controlnet.py | 53 | |
| LOW | examples/boft_controlnet/utils/pipeline_controlnet.py | 166 | |
| LOW | examples/boft_controlnet/utils/dataset.py | 82 | |
| LOW | examples/boft_controlnet/utils/dataset.py | 136 | |
| LOW | …ture_extraction/peft_lora_embedding_semantic_search.py | 210 | |
| LOW | …_modeling/peft_lora_clm_accelerate_ds_zero3_offload.py | 110 | |
| LOW | examples/arrow_multitask/arrow_phi3_mini.py | 120 | |
| LOW | examples/loftq_finetuning/int8_correction.py | 68 | |
| LOW | examples/loftq_finetuning/train_gsm8k_llama.py | 297 | |
| LOW | …orthogonal_subspace_learning/osf_continual_learning.py | 51 | |
| LOW | …orthogonal_subspace_learning/osf_continual_learning.py | 99 | |
| LOW | …orthogonal_subspace_learning/osf_continual_learning.py | 142 | |
| LOW | examples/orthogonal_subspace_learning/utils.py | 42 | |
| LOW | examples/oft_dreambooth/train_dreambooth.py | 590 | |
| LOW | examples/hra_dreambooth/train_dreambooth.py | 82 | |
| LOW | examples/qalora_finetuning/qalora_gptq_finetuning.py | 23 | |
| LOW | examples/stable_diffusion/train_dreambooth.py | 754 | |
| LOW | examples/stable_diffusion/convert_sd_adapter_to_peft.py | 285 | |
| LOW | examples/lora_dreambooth/train_dreambooth.py | 580 | |
| LOW | examples/corda_finetuning/datautils.py | 106 | |
| LOW | examples/sft/utils.py | 86 | |
| LOW | examples/boft_dreambooth/train_dreambooth.py | 82 | |
| LOW | …ation/peft_lora_seq2seq_accelerate_ds_zero3_offload.py | 104 | |
| LOW | …s/int8_training/peft_adalora_whisper_large_training.py | 423 | |
| LOW | scripts/log_reports.py | 19 | |
| LOW | scripts/train_memory.py | 109 | |
| LOW | src/peft/peft_model.py | 3227 | |
| LOW | src/peft/peft_model.py | 212 | |
| LOW | src/peft/peft_model.py | 421 | |
| LOW | src/peft/peft_model.py | 642 | |
| LOW | src/peft/peft_model.py | 761 | |
| LOW | src/peft/peft_model.py | 928 | |
| 188 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/test_trainable_tokens.py | 1205 | # Create a composite model with two BART sub-models |
| MEDIUM | tests/test_lora_ga.py | 130 | # Create a fresh model and load the saved state |
| MEDIUM | tests/test_helpers.py | 669 | # Create a minimal dummy MoE model with fused 3D weights |
| MEDIUM | tests/test_custom_models.py | 4271 | # Create a weighted adapter combining both adapters and check that its output is same as setting multiple |
| MEDIUM | method_comparison/app.py | 102 | # Create an empty figure. |
| MEDIUM | examples/boft_controlnet/train_controlnet.py | 537 | # Create the pipeline using using the trained modules and save it. |
| MEDIUM | examples/arrow_multitask/arrow_phi3_mini.py | 362 | # Creating the Arrow model |
| MEDIUM | …orthogonal_subspace_learning/osf_continual_learning.py | 57 | # Create a simple dataloader |
| MEDIUM | examples/oft_dreambooth/train_dreambooth.py | 1079 | # Create the pipeline using using the trained modules and save it. |
| MEDIUM | examples/hra_dreambooth/train_dreambooth.sh | 4 | # Define the UNIQUE_TOKEN, CLASS_TOKENs, and SUBJECT_NAMES |
| MEDIUM | examples/stable_diffusion/train_dreambooth.py | 1239 | # Create the pipeline using using the trained modules and save it. |
| MEDIUM | examples/stable_diffusion/convert_sd_adapter_to_peft.py | 409 | # Create a corresponding adapter info |
| MEDIUM | examples/lora_dreambooth/train_dreambooth.py | 1071 | # Create the pipeline using using the trained modules and save it. |
| MEDIUM | examples/boft_dreambooth/train_dreambooth.sh | 5 | # Define the UNIQUE_TOKEN, CLASS_TOKENs, and SUBJECT_NAMES |
| MEDIUM | examples/lora_ga_finetuning/lora_ga_finetuning.py | 167 | # Create a simple DataLoader for gradient estimation |
| MEDIUM | src/peft/utils/other.py | 1643 | # Create the causal mask with fixed shape in advance, to reduce recompilations. If the function to create |
| MEDIUM | src/peft/tuners/tuners_utils.py | 1762 | # Create a reverse lookup for other_module_names to quickly check suffix matches |
| MEDIUM | src/peft/tuners/boft/layer.py | 177 | # Create a mask with 1s for matrices to be replaced with identity and 0s otherwise |
| MEDIUM | src/peft/tuners/waveft/layer.py | 133 | # Create a padded spectrum matrix with additional rows and columns |
| MEDIUM | src/peft/tuners/waveft/layer.py | 144 | # Create the padded dense spectrum matrix |
| MEDIUM | src/peft/tuners/waveft/waverec2d.py | 6 | # This file contains code derived from PyTorch-Wavelet-Toolbox: |
| MEDIUM | src/peft/tuners/osf/model.py | 103 | # Create a new or update an existing OSF layer in place |
| MEDIUM | src/peft/tuners/xlora/model.py | 244 | # Create an empty LoraModel |
| MEDIUM | src/peft/tuners/adalora/model.py | 348 | """This method is not supported for AdaLoRA, use LoRA instead.""" |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/test_arrow.py | 30 | # ─── Fixtures ────────────────────────────────────────────────────────── |
| MEDIUM | examples/KappaTune/experiments_kappatune_peft.py | 19 | # ========================================== |
| MEDIUM | examples/KappaTune/experiments_kappatune_peft.py | 21 | # ========================================== |
| MEDIUM | examples/KappaTune/experiments_kappatune_peft.py | 47 | # ========================================== |
| MEDIUM | examples/KappaTune/experiments_kappatune_peft.py | 49 | # ========================================== |
| MEDIUM | examples/KappaTune/experiments_kappatune_peft.py | 146 | # ========================================== |
| MEDIUM | examples/KappaTune/experiments_kappatune_peft.py | 148 | # ========================================== |
| MEDIUM | …etuning/sequence_classification_finetune_monteclora.py | 21 | # ---------------------------------------------------------------------------- |
| MEDIUM | …etuning/sequence_classification_finetune_monteclora.py | 23 | # ---------------------------------------------------------------------------- |
| MEDIUM | …etuning/sequence_classification_finetune_monteclora.py | 29 | # ---------------------------------------------------------------------------- |
| MEDIUM | …etuning/sequence_classification_finetune_monteclora.py | 31 | # ---------------------------------------------------------------------------- |
| MEDIUM | …etuning/sequence_classification_finetune_monteclora.py | 42 | # ---------------------------------------------------------------------------- |
| MEDIUM | …etuning/sequence_classification_finetune_monteclora.py | 44 | # ---------------------------------------------------------------------------- |
| MEDIUM | …etuning/sequence_classification_finetune_monteclora.py | 162 | # ---------------------------------------------------------------------------- |
| MEDIUM | …etuning/sequence_classification_finetune_monteclora.py | 164 | # ---------------------------------------------------------------------------- |
| MEDIUM | src/peft/tuners/lora/layer.py | 766 | # ------------------------------------------------------------------------------------------ |
| MEDIUM | src/peft/tuners/lora/layer.py | 769 | # ------------------------------------------------------------------------------------------ |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | examples/boft_controlnet/utils/pipeline_controlnet.py | 196 | Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[st |
| HIGH | examples/qalora_finetuning/qalora_gptq_finetuning.py | 109 | Tokenize text data and prepare it for language modeling. Args: examples: Dataset examples with 'text' |
| HIGH | src/peft/peft_model.py | 1189 | Get the status of each adapter layer in the model. This method returns a list of `TunerLayerStatus` dataclass i |
| HIGH | src/peft/peft_model.py | 1219 | Get the status of tuners of the model. This method returns a `TunerModelStatus` dataclass instance, which conta |
| HIGH | src/peft/peft_model.py | 3228 | Get the status of each adapter layer in the model. This function returns a list of `TunerLayerStatus` dataclass ins |
| HIGH | src/peft/peft_model.py | 3355 | Get the status of tuners of the model. This function returns a `TunerModelStatus` dataclass instance, which contain |
| HIGH | src/peft/tuners/tuners_utils.py | 358 | A private method to prepare the adapter config. For transformers based models, if `peft_config.target_ |
| HIGH | src/peft/tuners/tuners_utils.py | 1710 | Find the minimal set of target modules that is sufficient to separate them from the other modules. Sometimes, a ver |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_xlora.py | 317 | # Set it to 2 and make sure it actually is |
| LOW | tests/test_xlora.py | 322 | # Set it to None and make sure it is 1/n |
| LOW | tests/test_lorafa.py | 144 | # Check if lora_A weights have not changed |
| LOW | tests/test_lorafa.py | 149 | # Check if lora_B weights are non-zero |
| LOW | tests/test_config.py | 412 | # Check if the user supplied timing values that will certainly fail because it breaks |
| LOW | method_comparison/MetaMathQA/utils.py | 440 | # Check if the string represents a fraction. |
| LOW | examples/waveft_finetuning/waveft_finetuning.py | 50 | # Set device_map to the right place when enabling DDP. |
| LOW | examples/olora_finetuning/olora_finetuning.py | 51 | # Set device_map to the right place when enabling DDP. |
| LOW | examples/alora_finetuning/alora_finetuning.py | 186 | # Print results |
| LOW | examples/qalora_finetuning/qalora_gptq_finetuning.py | 50 | # Check if the model has GPTQ quantization attributes |
| LOW | examples/qalora_finetuning/qalora_gptq_finetuning.py | 78 | # Check if we already have a cached quantized version |
| LOW | examples/shira_finetuning/shira_finetuning.py | 49 | # Set device_map to the right place when enabling DDP. |
| LOW | examples/sft/utils.py | 194 | # Check if the model is quantized |
| LOW | …s/int8_training/peft_adalora_whisper_large_training.py | 707 | # Check if rank_pattern exists before calling update_and_allocate |
| LOW | src/peft/utils/other.py | 1550 | # Check if this is the embedding layer (use endswith to allow flexible matching) |
| LOW | src/peft/utils/other.py | 1555 | # Check if this target layer matches any tied module (considering nested structures) |
| LOW | src/peft/utils/other.py | 1563 | # Check if all tied layers have the same indices |
| LOW | src/peft/tuners/tuners_utils.py | 1779 | # Check if adding this suffix covers the item |
| LOW | src/peft/tuners/adamss/model.py | 98 | # Check if already an Adamss layer |
| LOW | src/peft/tuners/hira/layer.py | 138 | fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out) |
| LOW | src/peft/tuners/hira/layer.py | 299 | fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out) |
| LOW | src/peft/tuners/adalora/config.py | 94 | # Check if 'r' has been set to a non-default value |
| LOW | src/peft/tuners/lora/loraga.py | 136 | # Check if any supported layers were found |
| LOW | src/peft/tuners/oft/layer.py | 548 | fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out) |
| LOW | src/peft/tuners/oft/layer.py | 703 | fan_in_fan_out: bool = False, # Set this to True if the layer to replace stores weight like (fan_in, fan_out) |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/testing_utils.py | 370 | except Exception: |
| MEDIUM | tests/test_initialization.py | 310 | def test_lora_init_orthogonal_half_precision_dtype(self, dtype): |
| LOW | tests/test_initialization.py | 313 | except Exception: |
| LOW | tests/test_arrow.py | 336 | except Exception: |
| LOW | tests/test_custom_models.py | 2260 | except Exception: |
| LOW | tests/test_custom_models.py | 2300 | except Exception: |
| LOW | tests/test_custom_models.py | 2339 | except Exception: |
| LOW | tests/test_custom_models.py | 2378 | except Exception: |
| LOW | method_comparison/app.py | 284 | except Exception as exc: |
| LOW | method_comparison/app.py | 299 | except Exception as exc: |
| LOW | method_comparison/app.py | 313 | except Exception as e: |
| LOW | method_comparison/app.py | 334 | except Exception as e: |
| LOW | method_comparison/text_generation_benchmark/run.py | 214 | except Exception as exc: |
| LOW | method_comparison/text_generation_benchmark/run.py | 299 | except Exception as exc: |
| LOW | method_comparison/MetaMathQA/run.py | 386 | except Exception as exc: |
| LOW | method_comparison/MetaMathQA/utils.py | 355 | except Exception as exc: |
| LOW | method_comparison/MetaMathQA/utils.py | 371 | except Exception as exc: |
| LOW | method_comparison/MetaMathQA/utils.py | 379 | except Exception as exc: |
| LOW | method_comparison/MetaMathQA/utils.py | 508 | except Exception as exc: |
| LOW | method_comparison/MetaMathQA/utils.py | 516 | except Exception as exc: |
| LOW | examples/ephemeral_gpu_offloading/load_with_dora.py | 75 | except Exception as e: |
| LOW | examples/ephemeral_gpu_offloading/load_with_dora.py | 80 | except Exception as e: |
| LOW | examples/qalora_finetuning/qalora_gptq_finetuning.py | 69 | except Exception as e: |
| LOW | examples/adamss_finetuning/test_adamss_quick.py | 169 | except Exception as e: |
| LOW | src/peft/config.py | 116 | except Exception: |
| LOW | src/peft/config.py | 258 | except Exception as exc: |
| LOW | src/peft/config.py | 322 | except Exception: |
| MEDIUM | src/peft/peft_model.py | 176 | def active_adapters(self) -> list[str]: |
| LOW | src/peft/peft_model.py | 1146 | except Exception: # something went wrong, roll back |
| LOW | src/peft/mixed_model.py | 242 | except Exception: # something went wrong, roll back |
| LOW | src/peft/helpers.py | 162 | except Exception: |
| LOW | src/peft/utils/other.py | 1452 | except Exception as e: |
| LOW | src/peft/tuners/boft/layer.py | 96 | except Exception as e: |
| LOW | src/peft/tuners/adamss/layer.py | 179 | except Exception as e: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/test_trainable_tokens.py | 664 | # for this we can leverage the fact that emb_out(1/emb_in(x)) is embed_dim on the |
| MEDIUM | tests/test_trainable_tokens.py | 701 | # for this we can leverage the fact that emb_out(1/emb_in(x)) is embed_dim on the |
| MEDIUM | tests/test_trainable_tokens.py | 762 | # for this we can leverage the fact that emb_out(1/emb_in(x)) is embed_dim on the |
| MEDIUM | tests/test_initialization.py | 1424 | # some arguments don't work in conjunction with lora_bias and should raise |
| LOW | tests/test_decoder_models.py | 478 | # a malicious prompt tuning model. This is because PEFT would just pass the on the tokenizer_kwargs defined in |
| LOW | tests/test_other.py | 404 | # aware that some of the passing tests may just pass owing to randomness. |
| LOW | examples/dora_finetuning/dora_finetuning.py | 73 | use_dora=use_dora, # to use Dora OR compare to Lora just set the --use_dora |
| MEDIUM | src/peft/peft_model.py | 1032 | # TODO: consider replacing this patching of methods with a more robust mechanism: setting a flag and |
| LOW | src/peft/utils/other.py | 1740 | # technically it would be sufficient to just return candidates since that contains all the keys of |
| LOW | src/peft/utils/transformers_weight_conversion.py | 431 | # If, for any reason, we cannot apply conversion, we just return the PEFT config as is. |
| MEDIUM | src/peft/tuners/tuners_utils.py | 865 | # TODO: check if this the most robust way |
| LOW | src/peft/tuners/tuners_utils.py | 295 | # model, just add a `peft_config` dict attribute to your model. |
| LOW | src/peft/tuners/adamss/layer.py | 394 | # so just call base_layer directly (no adapter delta needed). |
| LOW | src/peft/tuners/lora/conversion.py | 329 | # effective rank is the same and target_modules are a set, just add the name |
| MEDIUM | src/peft/tuners/lora/layer.py | 325 | # check without importing bitsandbytes and robust to bnb_4bit_quant_storage=float* |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_adamss_asa.py | 107 | # Step 1: train so B becomes non-zero |
| LOW | tests/test_adamss_asa.py | 113 | # Step 2: now gradients for A should be non-zero |
| LOW | tests/test_adamss_asa.py | 123 | # Step 3: another update should change scores via EMA |
| LOW | tests/test_adamss_asa.py | 166 | # Step 0: train to make B non-zero |
| LOW | src/peft/import_utils.py | 96 | # We need to check if `xla_device` can be found, will raise a RuntimeError if not |
| LOW | src/peft/tuners/adamss/model.py | 193 | # Step 1: accumulate importance EVERY step during warmup |
| LOW | src/peft/tuners/adamss/model.py | 198 | # Step 2: at mask intervals → schedule, global mask, then reset |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | src/peft/peft_model.py | 1752 | trainable params: 370178 || all params: 108680450 || trainable%: 0.3406113979101117 |
| HIGH | src/peft/peft_model.py | 2006 | trainable params: 1843200 || all params: 775873280 || trainable%: 0.23756456724479544 |
| HIGH | src/peft/peft_model.py | 2365 | trainable params: 884736 || all params: 223843584 || trainable%: 0.3952474242013566 |
| HIGH | src/peft/peft_model.py | 2650 | trainable params: 370178 || all params: 108680450 || trainable%: 0.3406113979101117 |
| HIGH | src/peft/peft_model.py | 2886 | trainable params: 592900 || all params: 108312580 || trainable%: 0.5473971721475013 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/regression/test_regression.py | 196 | model output, and load_base_model(name) to load the base model. Don't forget to fix the seed in load_base_model. |
| MEDIUM | examples/beft_finetuning/beft_finetuning.py | 68 | # you can try target_modules=["v"], target_modules=["q"], target_modules=["k"] |
| LOW | …ture_extraction/peft_lora_embedding_semantic_search.py | 157 | # make sure to pop weight so that corresponding model is not saved again |
| MEDIUM | examples/arrow_multitask/arrow_phi3_mini.py | 57 | This script is mainly meant for demonstration purposes and lightweight evaluation, |
| MEDIUM | examples/alora_finetuning/alora_finetuning.py | 168 | Purely for demonstration purposes. See the [paper](https://huggingface.co/papers/2504.12397) |
| LOW | …s/int8_training/peft_adalora_whisper_large_training.py | 325 | # make sure to pop weight so that corresponding model is not saved again |
| LOW | src/peft/tuners/lora/intruders.py | 112 | # we're not modifying the weights since there are no intruders but we make sure to copy the |