🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
28669 matches across 20 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/test_tokenization_common.py | 0 | this is a test 😊 i was born in 92000, and this is falsé. 生活的真谛是 hi hello hi hello hello <s> hi<s>there the following str |
| HIGH | tests/test_tokenization_common.py | 0 | this is a test 😊 i was born in 92000, and this is falsé. 生活的真谛是 hi hello hi hello hello <s> hi<s>there the following str |
| HIGH | tests/test_tokenizers_backend_mixin.py | 0 | this is a test 😊 i was born in 92000, and this is falsé. 生活的真谛是 hi hello hi hello hello <s> hi<s>there the following str |
| HIGH | tests/test_tokenization_common.py | 0 | test that passing pad_token when creating a tokenizer works correctly. |
| HIGH | tests/models/udop/test_tokenization_udop.py | 0 | test that passing pad_token when creating a tokenizer works correctly. |
| HIGH | tests/models/layoutxlm/test_tokenization_layoutxlm.py | 0 | test that passing pad_token when creating a tokenizer works correctly. |
| HIGH | tests/test_modeling_common.py | 0 | tests the equivalence between the eager and flash attention implementations. this test is only for inference and runs wi |
| HIGH | tests/models/sam3_tracker/test_modeling_sam3_tracker.py | 0 | tests the equivalence between the eager and flash attention implementations. this test is only for inference and runs wi |
| HIGH | tests/models/sam2/test_modeling_sam2.py | 0 | tests the equivalence between the eager and flash attention implementations. this test is only for inference and runs wi |
| HIGH | tests/test_modeling_common.py | 0 | tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by |
| HIGH | tests/models/blip_2/test_modeling_blip_2.py | 0 | tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by |
| HIGH | tests/models/blip_2/test_modeling_blip_2.py | 0 | tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by |
| HIGH | tests/models/sam/test_modeling_sam.py | 0 | tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by |
| HIGH | tests/models/sam3_tracker/test_modeling_sam3_tracker.py | 0 | tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by |
| HIGH | tests/models/instructblip/test_modeling_instructblip.py | 0 | tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by |
| HIGH | tests/models/sam2/test_modeling_sam2.py | 0 | tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by |
| HIGH | tests/test_processing_common.py | 0 | this function prepares a list of pil images for testing |
| HIGH | tests/models/mllama/test_processing_mllama.py | 0 | this function prepares a list of pil images for testing |
| HIGH | …/models/video_llama_3/test_processing_video_llama_3.py | 0 | this function prepares a list of pil images for testing |
| HIGH | tests/models/gemma3/test_processing_gemma3.py | 0 | this function prepares a list of pil images for testing |
| HIGH | tests/models/gemma4/test_processing_gemma4.py | 0 | this function prepares a list of pil images for testing |
| HIGH | tests/models/lfm2_vl/test_processing_lfm2_vl.py | 0 | this function prepares a list of pil images for testing |
| HIGH | tests/models/smolvlm/test_processing_smolvlm.py | 0 | this function prepares a list of pil images for testing |
| HIGH | tests/test_processing_common.py | 0 | we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the |
| HIGH | tests/test_processing_common.py | 0 | we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the |
| HIGH | tests/models/colqwen2/test_processing_colqwen2.py | 0 | we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the |
| HIGH | tests/models/colpali/test_processing_colpali.py | 0 | we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the |
| HIGH | …odels/colmodernvbert/test_processing_colmodernvbert.py | 0 | we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the |
| HIGH | tests/test_image_processing_common.py | 0 | this function prepares a list of pil images, or a list of numpy arrays if one specifies numpify=true, or a list of pytor |
| HIGH | tests/models/mllama/test_image_processing_mllama.py | 0 | this function prepares a list of pil images, or a list of numpy arrays if one specifies numpify=true, or a list of pytor |
| HIGH | tests/models/aria/test_image_processing_aria.py | 0 | this function prepares a list of pil images, or a list of numpy arrays if one specifies numpify=true, or a list of pytor |
| HIGH | tests/models/idefics3/test_image_processing_idefics3.py | 0 | this function prepares a list of pil images, or a list of numpy arrays if one specifies numpify=true, or a list of pytor |
| HIGH | tests/models/smolvlm/test_image_processing_smolvlm.py | 0 | this function prepares a list of pil images, or a list of numpy arrays if one specifies numpify=true, or a list of pytor |
| HIGH | tests/test_image_processing_common.py | 0 | test that explicitly setting an attribute to none is preserved through save/load. |
| HIGH | tests/test_video_processing_common.py | 0 | test that explicitly setting an attribute to none is preserved through save/load. |
| HIGH | tests/models/mllama/test_image_processing_mllama.py | 0 | test that explicitly setting an attribute to none is preserved through save/load. |
| HIGH | tests/causal_lm_tester.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. |
| HIGH | tests/models/olmo3/test_modeling_olmo3.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. |
| HIGH | tests/models/gemma3/test_modeling_gemma3.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. |
| HIGH | tests/models/gemma3n/test_modeling_gemma3n.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. |
| HIGH | …modernbert_decoder/test_modeling_modernbert_decoder.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. |
| HIGH | tests/models/eurobert/test_modeling_eurobert.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. |
| HIGH | tests/test_video_processing_common.py | 0 | tests that the processor can work with nested list where each video is a list of arrays |
| HIGH | …nie4_5_vl_moe/test_video_processing_ernie4_5_vl_moe.py | 0 | tests that the processor can work with nested list where each video is a list of arrays |
| HIGH | tests/models/glm46v/test_video_processing_glm46v.py | 0 | tests that the processor can work with nested list where each video is a list of arrays |
| HIGH | …s/video_llama_3/test_video_processing_video_llama_3.py | 0 | tests that the processor can work with nested list where each video is a list of arrays |
| HIGH | tests/models/glmga/test_video_processing_glmga.py | 0 | tests that the processor can work with nested list where each video is a list of arrays |
| HIGH | tests/models/qwen2_vl/test_video_processing_qwen2_vl.py | 0 | tests that the processor can work with nested list where each video is a list of arrays |
| HIGH | tests/models/glm4v/test_video_processing_glm4v.py | 0 | tests that the processor can work with nested list where each video is a list of arrays |
| HIGH | tests/models/qwen3_vl/test_video_processing_qwen3_vl.py | 0 | tests that the processor can work with nested list where each video is a list of arrays |
| HIGH | tests/utils/test_chat_template_utils.py | 0 | test function args: x: the input returns: the output |
| HIGH | tests/utils/test_chat_template_utils.py | 0 | test function args: x: the input returns: the output |
| HIGH | tests/utils/test_chat_template_utils.py | 0 | test function args: x: the input returns: the output |
| HIGH | tests/utils/test_chat_template_utils.py | 0 | test function args: x: the input returns: the output |
| HIGH | …ts/models/edgetam_video/test_modeling_edgetam_video.py | 0 | test that inference works correctly for float32, bfloat16, and float16 dtypes. |
| HIGH | tests/models/sam3_video/test_modeling_sam3_video.py | 0 | test that inference works correctly for float32, bfloat16, and float16 dtypes. |
| HIGH | …sam3_tracker_video/test_modeling_sam3_tracker_video.py | 0 | test that inference works correctly for float32, bfloat16, and float16 dtypes. |
| HIGH | tests/models/sam2_video/test_modeling_sam2_video.py | 0 | test that inference works correctly for float32, bfloat16, and float16 dtypes. |
| HIGH | tests/models/biogpt/test_tokenization_biogpt.py | 0 | adapted from sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt |
| HIGH | tests/models/xlm/test_tokenization_xlm.py | 0 | adapted from sennrich et al. 2015 and https://github.com/rsennrich/subword-nmt |
| 5076 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | conftest.py | 105 | def pytest_collection_modifyitems(items): |
| LOW | benchmark/benchmarks_entrypoint.py | 146 | def collect_device_measurements(self, benchmark_id: str, cpu_util, mem_megabytes, gpu_util, gpu_mem_megabytes): |
| LOW | benchmark/benchmarks_entrypoint.py | 179 | def collect_model_measurements(self, benchmark_id: str, measurements: dict[str, float]): |
| LOW | benchmark/benchmarks_entrypoint.py | 378 | def create_database_connection(): |
| LOW | benchmark/benchmarks_entrypoint.py | 397 | def create_global_metrics_recorder( |
| LOW | benchmark/benches/llama.py | 143 | def multinomial_sample_one_no_sync(probs_sort): # Does multinomial sampling without a cuda synchronization |
| LOW | …rk_v2/benchmark_scripts/continuous_batching_overall.py | 69 | def _build_lighteval_inputs_scorer( |
| LOW | benchmark_v2/framework/hardware_metrics.py | 30 | def get_device_name_and_memory_total() -> tuple[str, float]: |
| LOW | benchmark_v2/framework/benchmark_runner.py | 59 | def compact_json_numeric_arrays(data: dict): |
| LOW | benchmark_v2/framework/data_classes.py | 39 | def equalize_lengths_and_collate(stats: dict[str, dict[str, str]]) -> dict[str, str]: |
| LOW | tests/test_tokenization_common.py | 135 | def merge_model_tokenizer_mappings( |
| LOW | tests/test_tokenization_common.py | 477 | def get_extracted_tokenizer_from_sentencepiece(self, reference_tokenizer=None): |
| LOW | tests/test_tokenization_common.py | 497 | def tokenizer_integration_test_util( |
| LOW | tests/test_tokenization_common.py | 567 | def assert_padded_input_match(self, input_r: list, input_p: list, max_length: int, pad_token_id: int): |
| LOW | tests/test_tokenization_common.py | 577 | def assert_batch_padded_input_match( |
| LOW | tests/test_tokenization_common.py | 604 | def convert_batch_to_list_format(batch_encode_plus_sequences): |
| LOW | tests/test_tokenization_common.py | 613 | def test_tokenize_special_tokens(self): |
| LOW | tests/test_tokenization_common.py | 633 | def test_model_input_names_signature(self): |
| LOW | tests/test_tokenization_common.py | 644 | def test_tokenizer_store_full_signature(self): |
| LOW | tests/test_tokenization_common.py | 661 | def test_tokenizers_common_properties(self): |
| LOW | tests/test_tokenization_common.py | 693 | def test_tokenizers_common_ids_setters(self): |
| LOW | tests/test_tokenization_common.py | 726 | def test_save_and_load_tokenizer(self): |
| LOW | tests/test_tokenization_common.py | 859 | def test_integration_from_extractor(self): |
| LOW | tests/test_tokenization_common.py | 892 | def test_internal_consistency(self): |
| LOW | tests/test_tokenization_common.py | 1014 | def test_chat_template_save_loading(self): |
| LOW | tests/test_tokenization_common.py | 1056 | def test_chat_template_batched(self): |
| LOW | tests/test_tokenization_common.py | 1130 | def test_chat_template_return_assistant_tokens_mask(self): |
| LOW | tests/test_tokenization_common.py | 1323 | def test_chat_template_return_assistant_tokens_mask_truncated(self): |
| LOW | tests/test_tokenization_common.py | 1434 | def test_continue_final_message(self): |
| LOW | tests/test_tokenization_common.py | 1462 | def test_continue_final_message_with_trim(self): |
| LOW | tests/test_tokenization_common.py | 1492 | def test_continue_final_message_with_decoy_earlier_message(self): |
| LOW | tests/test_tokenization_common.py | 1517 | def test_continue_final_message_string_and_reasoning(self): |
| LOW | tests/test_tokenization_common.py | 1565 | def test_chat_template_dict_saving(self): |
| LOW | tests/test_tokenization_common.py | 1596 | def test_chat_template_dict_saving_rejects_path_traversal(self): |
| LOW | tests/test_tokenization_common.py | 1613 | def test_chat_template_file_priority(self): |
| LOW | tests/test_tokenization_common.py | 1626 | def test_number_of_added_tokens(self): |
| LOW | tests/test_tokenization_common.py | 1638 | def test_maximum_encoding_length_single_input(self): |
| LOW | tests/test_tokenization_common.py | 1733 | def test_maximum_encoding_length_pair_input(self): |
| LOW | tests/test_tokenization_common.py | 2006 | def test_special_tokens_mask_input_pairs(self): |
| LOW | tests/test_tokenization_common.py | 2029 | def test_padding_side_in_kwargs(self): |
| LOW | tests/test_tokenization_common.py | 2046 | def test_truncation_side_in_kwargs(self): |
| LOW | tests/test_tokenization_common.py | 2063 | def test_encode_basic_padding(self): |
| LOW | tests/test_tokenization_common.py | 2092 | def test_right_and_left_truncation(self): |
| LOW | tests/test_tokenization_common.py | 2146 | def test_padding_to_multiple_of(self): |
| LOW | tests/test_tokenization_common.py | 2178 | def test_padding_with_attention_mask(self): |
| LOW | tests/test_tokenization_common.py | 2196 | def test_encode_plus_with_padding(self, use_padding_as_call_kwarg: bool): |
| LOW | tests/test_tokenization_common.py | 2321 | def test_conversion_reversible(self): |
| LOW | tests/test_tokenization_common.py | 2359 | def test_batch_encode_plus_batch_sequence_length(self): |
| LOW | tests/test_tokenization_common.py | 2407 | def test_batch_encode_plus_padding(self): |
| LOW | tests/test_tokenization_common.py | 2521 | def _check_no_pad_token_padding(self, tokenizer, sequences): |
| LOW | tests/test_tokenization_common.py | 2575 | def test_batch_encode_dynamic_overflowing(self): |
| LOW | tests/test_tokenization_common.py | 2638 | def test_added_tokens_serialization(self): |
| LOW | tests/test_tokenization_common.py | 2665 | def test_tokenizer_initialization_with_conflicting_key(self): |
| LOW | tests/test_tokenization_common.py | 2700 | def test_pad_token_initialization(self): |
| LOW | tests/test_tokenization_common.py | 2733 | def test_bos_token_with_add_bos_token_true(self): |
| LOW | tests/test_tokenization_common.py | 2750 | def test_bos_token_with_add_bos_token_false(self): |
| LOW | tests/test_tokenization_common.py | 2836 | def test_add_tokens_tokenizer(self): |
| LOW | tests/test_modeling_common.py | 1742 | def test_training_gradient_checkpointing(self): |
| LOW | tests/test_modeling_common.py | 1746 | def test_training_gradient_checkpointing_use_reentrant_false(self): |
| LOW | tests/test_modeling_common.py | 1751 | def test_training_gradient_checkpointing_use_reentrant_true(self): |
| 13228 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | conftest.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | setup.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | benchmark/benchmark.py | 1 | # Copyright 2024 The HuggingFace Team. All rights reserved. |
| LOW | benchmark/benchmarks_entrypoint.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. |
| LOW | benchmark/benches/llama.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. |
| LOW | benchmark_v2/run_benchmarks.py | 1 | #!/usr/bin/env python3 |
| LOW | tests/test_tokenization_common.py | 1 | # Copyright 2019 HuggingFace Inc. |
| LOW | tests/test_modeling_common.py | 1 | # Copyright 2019 HuggingFace Inc. |
| LOW | tests/test_configuration_common.py | 1 | # Copyright 2019 HuggingFace Inc. |
| LOW | tests/multimodal_tester.py | 1 | # Copyright 2026 HuggingFace Inc. |
| LOW | tests/test_tensor_parallel_mixin.py | 1 | # |
| LOW | tests/test_monkey_patching.py | 1 | # Copyright 2026 The HuggingFace Inc. team. |
| LOW | tests/test_processing_common.py | 1 | # Copyright 2024 The HuggingFace Inc. team. All rights reserved. |
| LOW | tests/test_backbone_common.py | 1 | # Copyright 2023 The HuggingFace Inc. team. All rights reserved. |
| LOW | tests/test_image_processing_common.py | 1 | # Copyright 2023 HuggingFace Inc. |
| LOW | tests/causal_lm_tester.py | 1 | # Copyright 2025 HuggingFace Inc. |
| LOW | tests/test_executorch.py | 1 | # Copyright 2025 HuggingFace Inc. |
| LOW | tests/test_feature_extraction_common.py | 1 | # Copyright 2021 HuggingFace Inc. |
| LOW | tests/alm_tester.py | 1 | # Copyright 2026 HuggingFace Inc. |
| LOW | tests/test_video_processing_common.py | 1 | # Copyright 2025 HuggingFace Inc. |
| LOW | tests/test_pipeline_mixin.py | 1 | # Copyright 2023 The HuggingFace Inc. team. All rights reserved. |
| LOW | tests/test_tokenization_mistral_common.py | 1 | # Copyright 2025 Mistral AI and The HuggingFace Inc. team. All rights reserved. |
| LOW | tests/vlm_tester.py | 1 | # Copyright 2026 HuggingFace Inc. |
| LOW | tests/test_training_mixin.py | 1 | # Copyright 2023 The HuggingFace Inc. team. All rights reserved. |
| LOW | tests/test_sequence_feature_extraction_common.py | 1 | # Copyright 2021 HuggingFace Inc. |
| LOW | tests/test_image_transforms.py | 1 | # Copyright 2022 HuggingFace Inc. |
| LOW | tests/kernels/test_kernels.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. |
| LOW | tests/tensor_parallel/test_tensor_parallel.py | 1 | # Copyright 2024 The HuggingFace Inc. team. All rights reserved. |
| LOW | tests/peft_integration/test_peft_integration.py | 1 | # Copyright 2023 The HuggingFace Inc. team. All rights reserved. |
| LOW | tests/optimization/test_greedy_lr.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. |
| LOW | tests/optimization/test_optimization.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | …s/pipelines/test_pipelines_image_feature_extraction.py | 1 | # Copyright 2024 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_object_detection.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_common.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_text_classification.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_token_classification.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_image_text_to_text.py | 1 | # Copyright 2024 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_zero_shot.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_depth_estimation.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_mask_generation.py | 1 | # Copyright 2023 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_text_generation.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_text_to_audio.py | 1 | # Copyright 2023 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_feature_extraction.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | …ipelines/test_pipelines_document_question_answering.py | 1 | # Copyright 2022 The HuggingFace Team. All rights reserved. |
| LOW | …pelines/test_pipelines_automatic_speech_recognition.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_image_classification.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | …pipelines/test_pipelines_zero_shot_object_detection.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | …lines/test_pipelines_zero_shot_image_classification.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | …lines/test_pipelines_zero_shot_image_classification.py | 41 | |
| LOW | …s/pipelines/test_pipelines_table_question_answering.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_image_segmentation.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | …lines/test_pipelines_zero_shot_audio_classification.py | 1 | # Copyright 2023 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_keypoint_matching.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_fill_mask.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_audio_classification.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_video_classification.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. |
| LOW | tests/pipelines/test_pipelines_any_to_any.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. |
| LOW | tests/utils/test_activations.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. |
| LOW | tests/utils/test_deprecation.py | 1 | # Copyright 2024 The HuggingFace Team. All rights reserved. |
| LOW | tests/utils/test_fusion_mapping.py | 1 | # Copyright 2026 The HuggingFace Inc. team. |
| 3807 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | benchmark_v2/framework/benchmark_config.py | 17 | |
| LOW | tests/test_tokenization_common.py | 85 | |
| LOW | tests/test_tokenization_common.py | 85 | |
| LOW | …ipelines/test_pipelines_document_question_answering.py | 43 | |
| LOW | …pipelines/test_pipelines_zero_shot_object_detection.py | 35 | |
| LOW | tests/utils/test_file_utils.py | 23 | |
| LOW | tests/models/mistral4/__init__.py | 17 | |
| LOW | tests/models/mistral4/__init__.py | 17 | |
| LOW | tests/models/opt/test_modeling_opt.py | 20 | |
| LOW | tests/models/fsmt/test_modeling_fsmt.py | 19 | |
| LOW | tests/tokenization/test_tokenization_utils.py | 281 | |
| LOW | utils/check_import_complexity.py | 27 | |
| LOW | …amples/modular-transformers/modular_switch_function.py | 2 | |
| LOW | src/transformers/image_utils.py | 36 | |
| LOW | src/transformers/image_utils.py | 36 | |
| LOW | src/transformers/image_utils.py | 36 | |
| LOW | src/transformers/image_utils.py | 36 | |
| LOW | src/transformers/image_utils.py | 36 | |
| LOW | src/transformers/image_utils.py | 36 | |
| LOW | src/transformers/modeling_rope_utils.py | 31 | |
| LOW | src/transformers/pytorch_utils.py | 14 | |
| LOW | src/transformers/_typing.py | 16 | |
| LOW | src/transformers/trainer_seq2seq.py | 36 | |
| LOW | src/transformers/trainer_seq2seq.py | 39 | |
| LOW | src/transformers/trainer_seq2seq.py | 41 | |
| LOW | src/transformers/trainer_seq2seq.py | 42 | |
| LOW | src/transformers/trainer_seq2seq.py | 43 | |
| LOW | src/transformers/trainer_seq2seq.py | 44 | |
| LOW | src/transformers/trainer_seq2seq.py | 45 | |
| LOW | src/transformers/trainer_seq2seq.py | 46 | |
| LOW | src/transformers/trainer_seq2seq.py | 47 | |
| LOW | src/transformers/trainer_seq2seq.py | 48 | |
| LOW | src/transformers/trainer_seq2seq.py | 48 | |
| LOW | src/transformers/trainer_seq2seq.py | 49 | |
| LOW | src/transformers/feature_extraction_utils.py | 47 | |
| LOW | src/transformers/tokenization_utils_base.py | 21 | |
| LOW | src/transformers/core_model_loading.py | 16 | |
| LOW | src/transformers/safetensors_conversion.py | 4 | |
| LOW | src/transformers/processing_utils.py | 80 | |
| LOW | src/transformers/processing_utils.py | 85 | |
| LOW | src/transformers/trainer_optimizer.py | 18 | |
| LOW | src/transformers/optimization.py | 16 | |
| LOW | src/transformers/__init__.py | 30 | |
| LOW | src/transformers/__init__.py | 31 | |
| LOW | src/transformers/__init__.py | 31 | |
| LOW | src/transformers/__init__.py | 31 | |
| LOW | src/transformers/__init__.py | 31 | |
| LOW | src/transformers/__init__.py | 31 | |
| LOW | src/transformers/__init__.py | 31 | |
| LOW | src/transformers/__init__.py | 46 | |
| LOW | src/transformers/__init__.py | 47 | |
| LOW | src/transformers/__init__.py | 49 | |
| LOW | src/transformers/__init__.py | 50 | |
| LOW | src/transformers/__init__.py | 53 | |
| LOW | src/transformers/__init__.py | 485 | |
| LOW | src/transformers/__init__.py | 485 | |
| LOW | src/transformers/__init__.py | 486 | |
| LOW | src/transformers/__init__.py | 487 | |
| LOW | src/transformers/__init__.py | 488 | |
| LOW | src/transformers/__init__.py | 489 | |
| 3083 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | benchmark/benchmark.py | 60 | |
| LOW | benchmark_v2/framework/hardware_metrics.py | 184 | |
| LOW | benchmark_v2/framework/benchmark_runner.py | 82 | |
| LOW | benchmark_v2/framework/benchmark_runner.py | 443 | |
| LOW | benchmark_v2/framework/data_classes.py | 21 | |
| LOW | benchmark_v2/framework/benchmark_config.py | 255 | |
| LOW | tests/test_tokenization_common.py | 135 | |
| LOW | tests/test_tokenization_common.py | 225 | |
| LOW | tests/test_tokenization_common.py | 1130 | |
| LOW | tests/test_tokenization_common.py | 1323 | |
| LOW | tests/test_tokenization_common.py | 1638 | |
| LOW | tests/test_tokenization_common.py | 1733 | |
| LOW | tests/test_tokenization_common.py | 2638 | |
| LOW | tests/test_modeling_common.py | 160 | |
| LOW | tests/test_modeling_common.py | 558 | |
| LOW | tests/test_modeling_common.py | 724 | |
| LOW | tests/test_modeling_common.py | 894 | |
| LOW | tests/test_modeling_common.py | 930 | |
| LOW | tests/test_modeling_common.py | 1118 | |
| LOW | tests/test_modeling_common.py | 1483 | |
| LOW | tests/test_modeling_common.py | 1629 | |
| LOW | tests/test_modeling_common.py | 2038 | |
| LOW | tests/test_modeling_common.py | 2299 | |
| LOW | tests/test_modeling_common.py | 2497 | |
| LOW | tests/test_modeling_common.py | 2523 | |
| LOW | tests/test_modeling_common.py | 2567 | |
| LOW | tests/test_modeling_common.py | 2640 | |
| LOW | tests/test_modeling_common.py | 2698 | |
| LOW | tests/test_modeling_common.py | 2988 | |
| LOW | tests/test_modeling_common.py | 3031 | |
| LOW | tests/test_modeling_common.py | 3069 | |
| LOW | tests/test_modeling_common.py | 3115 | |
| LOW | tests/test_modeling_common.py | 3159 | |
| LOW | tests/test_modeling_common.py | 3261 | |
| LOW | tests/test_modeling_common.py | 3474 | |
| LOW | tests/test_modeling_common.py | 3534 | |
| LOW | tests/test_modeling_common.py | 3571 | |
| LOW | tests/test_modeling_common.py | 3653 | |
| LOW | tests/test_modeling_common.py | 3740 | |
| LOW | tests/test_modeling_common.py | 3802 | |
| LOW | tests/test_modeling_common.py | 3901 | |
| LOW | tests/test_modeling_common.py | 4173 | |
| LOW | tests/test_modeling_common.py | 4517 | |
| LOW | tests/test_modeling_common.py | 4560 | |
| LOW | tests/test_modeling_common.py | 4685 | |
| LOW | tests/test_modeling_common.py | 4753 | |
| LOW | tests/test_modeling_common.py | 5190 | |
| LOW | tests/test_modeling_common.py | 5351 | |
| LOW | tests/test_modeling_common.py | 5492 | |
| LOW | tests/test_modeling_common.py | 5625 | |
| LOW | tests/test_modeling_common.py | 1491 | |
| LOW | tests/test_modeling_common.py | 2705 | |
| LOW | tests/test_modeling_common.py | 4207 | |
| LOW | tests/test_modeling_common.py | 2710 | |
| LOW | tests/test_modeling_common.py | 3365 | |
| LOW | tests/test_configuration_common.py | 94 | |
| LOW | tests/test_configuration_common.py | 187 | |
| LOW | tests/test_tensor_parallel_mixin.py | 131 | |
| LOW | tests/test_tensor_parallel_mixin.py | 192 | |
| LOW | tests/test_processing_common.py | 314 | |
| 1562 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/test_tensor_parallel_mixin.py | 425 | # ============================================================ |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 427 | # ============================================================ |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 438 | # ============================================================ |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 440 | # ============================================================ |
| MEDIUM | tests/test_pipeline_mixin.py | 410 | # --------------------------------------------------------- |
| MEDIUM | tests/test_training_mixin.py | 42 | # ============================================================ |
| MEDIUM | tests/test_training_mixin.py | 44 | # ============================================================ |
| MEDIUM | tests/test_training_mixin.py | 61 | # ============================================================ |
| MEDIUM | tests/test_training_mixin.py | 63 | # ============================================================ |
| MEDIUM | tests/test_training_mixin.py | 77 | # ============================================================ |
| MEDIUM | tests/test_training_mixin.py | 79 | # ============================================================ |
| MEDIUM | tests/utils/test_auto_docstring.py | 673 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/utils/test_auto_docstring.py | 675 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 151 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 153 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 289 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 291 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 258 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 260 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 441 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 443 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 454 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 456 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 331 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 333 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 369 | # ------------------------ |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 371 | # ------------------------ |
| MEDIUM | tests/trainer/test_trainer_callback.py | 234 | # ------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_callback.py | 236 | # ------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_callback.py | 320 | # ------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_callback.py | 322 | # ------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_callback.py | 441 | # ------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_callback.py | 443 | # ------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_callback.py | 56 | # ============================================================================= |
| MEDIUM | tests/trainer/test_trainer_callback.py | 58 | # ============================================================================= |
| MEDIUM | tests/trainer/test_trainer_callback.py | 168 | # ============================================================================= |
| MEDIUM | tests/trainer/test_trainer_callback.py | 170 | # ============================================================================= |
| MEDIUM | tests/trainer/test_trainer_callback.py | 184 | # ============================================================================= |
| MEDIUM | tests/trainer/test_trainer_callback.py | 186 | # ============================================================================= |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 244 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 246 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 253 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 255 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 263 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 265 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 410 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 412 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 448 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 450 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 500 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 502 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 527 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 529 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 78 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 80 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 158 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 160 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 186 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 188 | # --------------------------------------------------------------------------- |
| MEDIUM | tests/trainer/test_trainer_optimizers.py | 221 | # --------------------------------------------------------------------------- |
| 357 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | benchmark/benchmarks_entrypoint.py | 428 | # Create a global metrics recorder |
| MEDIUM | benchmark_v2/framework/data_classes.py | 150 | # Create a new instance and accumulate the data |
| MEDIUM | tests/test_monkey_patching.py | 155 | # Create a dummy module in transformers namespace for testing |
| MEDIUM | tests/test_processing_common.py | 1099 | # Define the kwargs for each modality |
| MEDIUM | tests/test_processing_common.py | 1122 | # Define the kwargs for each modality |
| MEDIUM | tests/test_processing_common.py | 1257 | # Define the kwargs for each modality |
| MEDIUM | tests/test_processing_common.py | 1448 | # Define the kwargs for each modality |
| MEDIUM | tests/test_processing_common.py | 1471 | # Define the kwargs for each modality |
| MEDIUM | tests/test_tokenizers_backend_mixin.py | 383 | # Create a new mapping from the special tokens defined in the original tokenizer |
| MEDIUM | tests/test_training_mixin.py | 87 | # Create a deterministic sequence (not random, so model can learn it) |
| MEDIUM | tests/kernels/test_kernels.py | 489 | # Create a mock model on CUDA device |
| MEDIUM | tests/kernels/test_kernels.py | 524 | # Create a mock model |
| MEDIUM | tests/peft_integration/test_peft_integration.py | 1292 | # Create a temporary directory with a complete adapter model structure |
| MEDIUM | tests/optimization/test_greedy_lr.py | 193 | # Create a new scheduler and load state |
| MEDIUM | tests/pipelines/test_pipelines_common.py | 242 | # Create a temporary directory with a complete adapter model structure |
| MEDIUM | tests/utils/test_masking_utils.py | 253 | # Create a new input after the prefill |
| MEDIUM | tests/models/udop/test_tokenization_udop.py | 133 | # # Create a minimal mock tokenizer for the converter |
| MEDIUM | tests/models/udop/test_tokenization_udop.py | 1240 | # Create a new mapping from the special tokens defined in the original tokenizer |
| MEDIUM | tests/models/flava/test_modeling_flava.py | 1147 | # Create a clone of the input_ids tensor that will be its masked version |
| MEDIUM | tests/models/flava/test_modeling_flava.py | 1195 | # Create a clone of the input_ids tensor that will be its masked version |
| MEDIUM | …cohere2_vision/test_image_processing_cohere2_vision.py | 208 | # Create a 2:3 aspect ratio image (2 rows x 3 columns of patches) |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 300 | # Create a temp file that calls the worker |
| MEDIUM | tests/models/lighton_ocr/test_modeling_lighton_ocr.py | 507 | # Create a small config for fast testing |
| MEDIUM | …ts/models/superglue/test_image_processing_superglue.py | 410 | # Create a specific scenario with intentional padding issues |
| MEDIUM | …ts/models/superglue/test_image_processing_superglue.py | 429 | # Create a match that points to a padded keypoint in image 1 |
| MEDIUM | …ts/models/superglue/test_image_processing_superglue.py | 434 | # Create a valid match for comparison |
| MEDIUM | tests/models/pix2struct/test_processing_pix2struct.py | 167 | # Define the kwargs for each modality |
| MEDIUM | tests/models/pix2struct/test_processing_pix2struct.py | 196 | # Define the kwargs for each modality |
| MEDIUM | tests/models/markuplm/test_tokenization_markuplm.py | 1245 | # Create a new mapping from the special tokens defined in the original tokenizer |
| MEDIUM | tests/models/colqwen2/test_processing_colqwen2.py | 241 | # Define the kwargs for each modality |
| MEDIUM | tests/models/colqwen2/test_processing_colqwen2.py | 261 | # Define the kwargs for each modality |
| MEDIUM | tests/models/nemotron_h/test_modeling_nemotron_h.py | 735 | # Create a legacy config.json |
| MEDIUM | tests/models/auto/test_video_processing_auto.py | 85 | # Create a dummy config file with image_processor_type |
| MEDIUM | tests/models/auto/test_image_processing_auto.py | 102 | # Create a dummy config file with image_processor_type |
| MEDIUM | tests/models/auto/test_modeling_auto.py | 576 | # Create a temporary directory with a complete adapter model structure |
| MEDIUM | tests/models/kosmos2_5/test_processor_kosmos2_5.py | 199 | # Define the kwargs for each modality |
| MEDIUM | tests/models/kosmos2_5/test_processor_kosmos2_5.py | 228 | # Define the kwargs for each modality |
| MEDIUM | …ts/models/oneformer/test_image_processing_oneformer.py | 351 | # Create a temporary json file |
| MEDIUM | tests/models/layoutlmv2/test_tokenization_layoutlmv2.py | 1284 | # Create a new mapping from the special tokens defined in the original tokenizer |
| MEDIUM | tests/models/layoutlmv3/test_tokenization_layoutlmv3.py | 1330 | # Create a new mapping from the special tokens defined in the original tokenizer |
| MEDIUM | tests/models/kosmos2/test_processing_kosmos2.py | 412 | # Define the kwargs for each modality |
| MEDIUM | tests/models/kosmos2/test_processing_kosmos2.py | 438 | # Define the kwargs for each modality |
| MEDIUM | tests/models/colpali/test_processing_colpali.py | 246 | # Define the kwargs for each modality |
| MEDIUM | tests/models/colpali/test_processing_colpali.py | 266 | # Define the kwargs for each modality |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 294 | # Create a small image (256x256) |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 312 | # Create a small image that won't exceed the max_image_tokens threshold |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 328 | # Create a large image (2048x2048) |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 347 | # Create a large image that will require tiling |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 397 | # Create a landscape image (1920x1080, ~16:9 aspect ratio) |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 416 | # Create an extremely wide image (3000x500) |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 435 | # Create an extremely tall image (500x3000) |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 372 | # Create a large image that will require tiling |
| MEDIUM | tests/models/janus/test_processing_janus.py | 358 | # Create a simple text message for testing |
| MEDIUM | …modernbert_decoder/test_modeling_modernbert_decoder.py | 192 | # Create a longer input to test sliding window attention |
| MEDIUM | …odels/encoder_decoder/test_modeling_encoder_decoder.py | 787 | # Create a new attention mask that ignores padding, and test that the loss differs for this new attention mask |
| MEDIUM | tests/models/idefics/test_modeling_idefics.py | 180 | # Create a list of configs and inputs, to test 2 things: |
| MEDIUM | tests/models/moshi/test_tokenization_moshi.py | 219 | # Create a new mapping from the special tokens defined in the original tokenizer |
| MEDIUM | tests/models/csm/test_modeling_csm.py | 296 | # Creating a 4D mask where each of the last 3 tokens do not attend to each other. |
| MEDIUM | tests/models/csm/test_modeling_csm.py | 316 | # Creating a position_ids tensor. note the repeating figures in the end. |
| MEDIUM | tests/models/layoutxlm/test_tokenization_layoutxlm.py | 1443 | # Create a new mapping from the special tokens defined in the original tokenizer |
| 213 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | src/transformers/configuration_utils.py | 567 | Instantiate a [`PreTrainedConfig`] (or a derived class) from a pretrained model configuration. Args: |
| HIGH | src/transformers/pytorch_utils.py | 132 | This function chunks the `input_tensors` into smaller input tensor parts of size `chunk_size` over the dimension |
| HIGH | src/transformers/feature_extraction_utils.py | 297 | Instantiate a type of [`~feature_extraction_utils.FeatureExtractionMixin`] from a feature extractor, *e.g.* a |
| HIGH | src/transformers/tokenization_utils_base.py | 1114 | Add a dictionary of special tokens (eos, pad, cls, etc.) to the encoder and link them to class attributes. If |
| HIGH | src/transformers/tokenization_utils_base.py | 1219 | #TODO remove this from here! PreTrainedTOkeniuzerBase should be agnostic of AddedToken. Add a list of |
| HIGH | src/transformers/trainer_utils.py | 76 | Extract the base model from a PEFT-wrapped model. If the model is not a PEFT model, returns it unchanged. Othe |
| HIGH | src/transformers/image_processing_base.py | 95 | Instantiate a type of [`~image_processing_utils.ImageProcessingMixin`] from an image processor. Args: |
| HIGH | src/transformers/tokenization_python.py | 517 | Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added to |
| HIGH | src/transformers/tokenization_python.py | 1297 | Create a mask from the two sequences passed to be used in a sequence-pair classification task. This me |
| HIGH | src/transformers/dynamic_module_utils.py | 533 | Extracts a class from a module file, present in the local folder or repository of a model. <Tip warning={true} |
| HIGH | src/transformers/tokenization_utils_sentencepiece.py | 111 | Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added to |
| HIGH | src/transformers/video_processing_utils.py | 430 | Instantiate a type of [`~video_processing_utils.VideoProcessorBase`] from an video processor. Args: |
| HIGH | src/transformers/pipelines/__init__.py | 661 | Utility factory method to build a [`Pipeline`]. A pipeline consists of: - One or more components for |
| HIGH | src/transformers/utils/deprecation.py | 45 | Function or method decorator to notify users about deprecated keyword arguments, replacing them with a new name if |
| HIGH | src/transformers/utils/chat_template_utils.py | 247 | This function generates a JSON schema for a given function, based on its docstring and type hints. This is most |
| HIGH | src/transformers/utils/hub.py | 228 | Tries to locate a file in a local folder and repo, downloads and cache it if necessary. Args: path_or_ |
| HIGH | src/transformers/utils/hub.py | 302 | Tries to locate several files in a local folder and repo, downloads and cache them if necessary. Args: |
| HIGH | src/transformers/models/cohere/tokenization_cohere.py | 192 | Create a Command-R tool-use prompt. Once rendered, the prompt instructs the model to generate a list of actions |
| HIGH | src/transformers/models/cohere/tokenization_cohere.py | 304 | Create a Command-R grounded generation (aka RAG) prompt. Once rendered, the prompt instructs the model to gener |
| HIGH | src/transformers/models/mllama/processing_mllama.py | 35 | Generate a cross-attention token mask for image tokens in the input sequence. This function identifies the pos |
| HIGH | src/transformers/models/mllama/processing_mllama.py | 131 | Builds a string from the input prompt by adding `bos_token` if not already present. Args: prompt (`str |
| HIGH | src/transformers/models/clvp/modeling_clvp.py | 1368 | This method can be used to extract speech_embeds. The speech embeddings are obtained by applying the speech |
| HIGH | …/conditional_detr/image_processing_conditional_detr.py | 122 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | …ditional_detr/image_processing_pil_conditional_detr.py | 400 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | …s/models/maskformer/image_processing_pil_maskformer.py | 240 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | …rmers/models/maskformer/image_processing_maskformer.py | 89 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | …formers/models/markuplm/feature_extraction_markuplm.py | 99 | Main method to prepare for the model one or several HTML strings. Args: html_strings (`str |
| HIGH | …/transformers/models/eomt/image_processing_pil_eomt.py | 185 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | src/transformers/models/eomt/image_processing_eomt.py | 110 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | …formers/models/esm/openfold_utils/residue_constants.py | 603 | Maps the given sequence into a one-hot encoded matrix. Args: sequence: An amino acid sequence. mapping: |
| HIGH | src/transformers/models/auto/configuration_auto.py | 290 | Instantiate one of the configuration classes of the library from a pretrained model configuration. The |
| HIGH | src/transformers/models/auto/image_processing_auto.py | 210 | Loads the image processor configuration from a pretrained model image processor configuration. Args: p |
| HIGH | src/transformers/models/auto/video_processing_auto.py | 116 | Loads the video processor configuration from a pretrained model video processor configuration. Args: p |
| HIGH | src/transformers/models/auto/feature_extraction_auto.py | 133 | Loads the feature extractor configuration from a pretrained model feature extractor configuration. Args: |
| HIGH | src/transformers/models/auto/tokenization_auto.py | 481 | Loads the tokenizer configuration from a pretrained model tokenizer configuration. Args: pretrained_mo |
| HIGH | …/transformers/models/bertweet/tokenization_bertweet.py | 543 | Remove entities from text by converting them to their corresponding unicode character. Args: text: |
| HIGH | …formers/models/oneformer/image_processing_oneformer.py | 185 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | …ers/models/oneformer/image_processing_pil_oneformer.py | 263 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | …ers/models/mask2former/image_processing_mask2former.py | 121 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | …models/mask2former/image_processing_pil_mask2former.py | 245 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and |
| HIGH | src/transformers/models/tapas/tokenization_tapas.py | 2583 | Creates a function that can be used as a sort key or to compare the values. Maps to primitive types and finds the |
| HIGH | src/transformers/models/blip/modeling_blip.py | 1092 | Overrides *generate* function to be able to use the model as a conditional generator Parameters: |
| HIGH | …ransformers/models/timesformer/modeling_timesformer.py | 490 | Examples: ```python >>> import av >>> import numpy as np >>> from transformer |
| HIGH | …ransformers/models/timesformer/modeling_timesformer.py | 621 | labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image cl |
| HIGH | src/transformers/models/patchtst/modeling_patchtst.py | 1107 | Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requ |
| HIGH | src/transformers/models/patchtst/modeling_patchtst.py | 1244 | Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requ |
| HIGH | src/transformers/models/patchtst/modeling_patchtst.py | 1612 | Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requ |
| HIGH | src/transformers/models/vivit/modular_vivit.py | 172 | Examples: ```python >>> import av >>> import numpy as np >>> from transformer |
| HIGH | src/transformers/models/vivit/modular_vivit.py | 298 | labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image cl |
| HIGH | src/transformers/models/vivit/modeling_vivit.py | 343 | Examples: ```python >>> import av >>> import numpy as np >>> from transformer |
| HIGH | src/transformers/models/vivit/modeling_vivit.py | 469 | labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image cl |
| HIGH | …rmers/models/efficientloftr/modeling_efficientloftr.py | 896 | Copied from kornia library : kornia/geometry/subpix/dsnt.py:76 Compute the expectation of coordinate values usi |
| HIGH | src/transformers/models/x_clip/modeling_x_clip.py | 680 | Examples: ```python >>> import av >>> import torch >>> import numpy as np |
| HIGH | src/transformers/models/x_clip/modeling_x_clip.py | 1001 | return_loss (`bool`, *optional*): Whether or not to return the contrastive loss. Examples: |
| HIGH | src/transformers/models/x_clip/modeling_x_clip.py | 1156 | Examples: ```python >>> import av >>> import torch >>> import numpy as np |
| HIGH | src/transformers/models/x_clip/modular_x_clip.py | 293 | Examples: ```python >>> import av >>> import torch >>> import numpy as np |
| HIGH | src/transformers/models/x_clip/modular_x_clip.py | 565 | Examples: ```python >>> import av >>> import torch >>> import numpy as np |
| HIGH | src/transformers/models/x_clip/modular_x_clip.py | 661 | return_loss (`bool`, *optional*): Whether or not to return the contrastive loss. Examples: |
| HIGH | …ansformers/models/qwen2_5_omni/modular_qwen2_5_omni.py | 848 | Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation: |
| HIGH | …nsformers/models/qwen2_5_omni/modeling_qwen2_5_omni.py | 232 | Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation: |
| 14 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | benchmark/benchmarks_entrypoint.py | 445 | # Check if the file has a run_benchmark function |
| LOW | benchmark/benchmarks_entrypoint.py | 471 | # Check if the module has an updated run_benchmark function that accepts metrics_recorder |
| LOW | benchmark/benches/llama.py | 76 | # Check if required ML dependencies are available |
| LOW | benchmark_v2/framework/benchmark_runner.py | 297 | # Check if generation had the right number of tokens |
| LOW | tests/test_modeling_common.py | 1366 | # Set seed to ensure stable model initialization - avoids numerical issues (NaN) with some models |
| LOW | tests/test_modeling_common.py | 4740 | # Check if this given pattern matches any param or module (the value attributed to the pattern does not |
| LOW | tests/test_processing_common.py | 212 | # Check if there's a custom setup method for this specific attribute |
| LOW | tests/test_image_processing_common.py | 584 | # Check if torchvision backend is available |
| LOW | tests/test_image_processing_common.py | 595 | # Check if the file exists otherwise skip the test |
| LOW | tests/test_image_processing_common.py | 611 | # Check if committed before the cutoff date |
| LOW | tests/test_image_processing_common.py | 621 | # Check if this is a new model (added after 2024-01-01) based on git history |
| LOW | tests/test_video_processing_common.py | 346 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output |
| LOW | tests/test_tokenizers_backend_mixin.py | 411 | # Check if the special tokens have been kept (all_special_tokens returns strings) |
| LOW | tests/kernels/test_kernels.py | 123 | # Check if both modules have a 'forward' attribute |
| LOW | tests/kernels/test_kernels.py | 148 | # Check if both modules have a 'forward' attribute |
| LOW | tests/utils/test_offline.py | 219 | # Return output |
| LOW | tests/utils/test_cache_utils.py | 708 | # Check if cache config is passed through correctly |
| LOW | tests/utils/test_cache_utils.py | 718 | # Check if the exported model is configured with the `StaticCache` correctly |
| LOW | tests/models/udop/test_tokenization_udop.py | 1267 | # Check if the AddedToken / string format has been kept |
| LOW | tests/models/gpt_oss/test_modeling_gpt_oss.py | 200 | # Check if we have expected results for this configuration |
| LOW | tests/models/gpt_oss/test_modeling_gpt_oss.py | 401 | # Check if we have expected results for this configuration |
| LOW | …itional_detr/test_image_processing_conditional_detr.py | 326 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | …itional_detr/test_image_processing_conditional_detr.py | 449 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | tests/models/markuplm/test_tokenization_markuplm.py | 1272 | # Check if the AddedToken / string format has been kept |
| LOW | …s/video_llama_3/test_video_processing_video_llama_3.py | 329 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output |
| LOW | tests/models/colqwen2/test_modeling_colqwen2.py | 331 | # Check if the maximum scores per row are in the diagonal of the matrix score |
| LOW | tests/models/colqwen2/test_modeling_colqwen2.py | 386 | # Check if the maximum scores per row are in the diagonal of the matrix score |
| LOW | tests/models/eomt/test_image_processing_eomt.py | 272 | # Set longest_edge to None to test for semantic segmentatiom. |
| LOW | tests/models/rt_detr/test_image_processing_rt_detr.py | 328 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | …grounding_dino/test_image_processing_grounding_dino.py | 320 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | …grounding_dino/test_image_processing_grounding_dino.py | 496 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | tests/models/layoutlmv2/test_tokenization_layoutlmv2.py | 1311 | # Check if the AddedToken / string format has been kept |
| LOW | tests/models/layoutlmv3/test_tokenization_layoutlmv3.py | 1359 | # Check if the AddedToken / string format has been kept |
| LOW | tests/models/colpali/test_modeling_colpali.py | 273 | # Check if the maximum scores per row are in the diagonal of the matrix score |
| LOW | …formable_detr/test_image_processing_deformable_detr.py | 335 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | …formable_detr/test_image_processing_deformable_detr.py | 458 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | tests/models/paligemma/test_modeling_paligemma.py | 320 | # Check if pad tokens are properly masked |
| LOW | tests/models/moshi/test_tokenization_moshi.py | 246 | # Check if the AddedToken / string format has been kept |
| LOW | tests/models/smolvlm/test_video_processing_smolvlm.py | 133 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output |
| LOW | tests/models/layoutxlm/test_tokenization_layoutxlm.py | 1470 | # Check if the AddedToken / string format has been kept |
| LOW | tests/models/yolos/test_image_processing_yolos.py | 365 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | tests/models/yolos/test_image_processing_yolos.py | 488 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | tests/models/qwen2_vl/test_video_processing_qwen2_vl.py | 320 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output |
| LOW | tests/models/detr/test_image_processing_detr.py | 393 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | tests/models/detr/test_image_processing_detr.py | 515 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width |
| LOW | …/models/colmodernvbert/test_modeling_colmodernvbert.py | 247 | # Check if the maximum scores per row are in the diagonal of the matrix score |
| LOW | tests/models/whisper/test_modeling_whisper.py | 501 | # Check if beam_indices and sequences_scores are in the output |
| LOW | tests/models/whisper/test_modeling_whisper.py | 2110 | # Set model to training mode to enable SpecAugment |
| LOW | tests/repo_utils/test_check_copies.py | 449 | # Check if the model link is synchronized. |
| LOW | tests/trainer/trainer_test_utils.py | 582 | if log[key] != log[key]: # Check if the value is NaN |
| LOW | tests/trainer/test_trainer_checkpointing.py | 270 | # Check if it works for a simple language modeling example |
| LOW | tests/trainer/test_trainer_checkpointing.py | 954 | # Check if the model weights file exists in the final checkpoint directory. |
| LOW | tests/trainer/test_trainer.py | 434 | # Check if model weights have been updated |
| LOW | tests/generation/test_utils.py | 2943 | "# Calculate the sum\nresult = num1 + num2\n\n# Print the result\nprint(result)\n```\n" |
| LOW | utils/check_docstrings.py | 841 | # Check if docstring starts and ends on the same line |
| LOW | utils/check_docstrings.py | 855 | # Check if it's named "auto_docstring" |
| LOW | utils/check_docstrings.py | 1214 | # Check if this arg has placeholders |
| LOW | utils/check_docstrings.py | 1471 | # Check if this method is inside a processor class |
| LOW | utils/check_docstrings.py | 1476 | # Check if class inherits from ModelOutput, ProcessorMixin, or PreTrainedConfig |
| LOW | utils/check_docstrings.py | 1784 | # Check if any fields are missing or need removal |
| 180 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | benchmark/benchmarks_entrypoint.py | 374 | except Exception as e: |
| LOW | benchmark/benchmarks_entrypoint.py | 392 | except Exception as e: |
| LOW | benchmark/benchmarks_entrypoint.py | 454 | except Exception as e: |
| LOW | benchmark/benchmarks_entrypoint.py | 486 | except Exception as e: |
| LOW | benchmark/benchmarks_entrypoint.py | 499 | except Exception as e: |
| MEDIUM | benchmark/benchmarks_entrypoint.py | 367 | def import_from_path(module_name, file_path): |
| LOW | benchmark/benches/llama.py | 94 | except Exception as e: |
| LOW | benchmark/benches/llama.py | 345 | except Exception as e: |
| LOW | …rk_v2/benchmark_scripts/continuous_batching_overall.py | 235 | except Exception as e: |
| LOW | benchmark_v2/framework/hardware_metrics.py | 46 | except Exception: |
| LOW | benchmark_v2/framework/hardware_metrics.py | 202 | except Exception: |
| LOW | benchmark_v2/framework/hardware_metrics.py | 221 | except Exception as e: |
| LOW | benchmark_v2/framework/hardware_metrics.py | 231 | except Exception as e: |
| LOW | benchmark_v2/framework/hardware_metrics.py | 236 | except Exception as e: |
| LOW | benchmark_v2/framework/hardware_metrics.py | 242 | except Exception as e: |
| LOW | benchmark_v2/framework/hardware_metrics.py | 289 | except Exception: |
| LOW | benchmark_v2/framework/benchmark_runner.py | 365 | except Exception as e: |
| LOW | benchmark_v2/framework/benchmark_config.py | 45 | except Exception as _: |
| LOW | tests/test_tokenization_common.py | 294 | except Exception: |
| LOW | tests/test_tokenization_common.py | 2786 | except Exception as e: |
| LOW | tests/test_tokenization_common.py | 2893 | except Exception as e: |
| LOW | tests/test_modeling_common.py | 2307 | except Exception as e: |
| LOW | tests/test_modeling_common.py | 2421 | except Exception as e: |
| LOW | tests/test_modeling_common.py | 280 | except Exception as _: |
| LOW | tests/test_modeling_common.py | 2530 | except Exception as e: |
| LOW | tests/test_modeling_common.py | 4240 | except Exception as e: |
| LOW | tests/test_modeling_common.py | 4296 | except Exception as e: |
| LOW | tests/test_modeling_common.py | 5719 | except Exception as e: |
| LOW | tests/test_processing_common.py | 226 | except Exception as e: |
| LOW | tests/test_processing_common.py | 592 | except Exception: |
| LOW | tests/test_processing_common.py | 623 | except Exception: |
| LOW | tests/test_processing_common.py | 663 | except Exception: |
| LOW | tests/test_processing_common.py | 695 | except Exception: |
| MEDIUM | tests/test_image_processing_common.py | 590 | def _is_old_model_by_commit_date(model_type, date_cutoff=(2025, 9, 1)): |
| LOW | tests/test_image_processing_common.py | 615 | except Exception: |
| LOW | tests/test_pipeline_mixin.py | 376 | except Exception: |
| LOW | tests/test_pipeline_mixin.py | 403 | except Exception: |
| LOW | tests/test_sentencepiece_backend_mixin.py | 139 | except Exception: |
| LOW | tests/test_tokenizers_backend_mixin.py | 63 | except Exception as e: |
| LOW | tests/test_tokenizers_backend_mixin.py | 485 | except Exception as e: |
| LOW | tests/kernels/test_kernels.py | 396 | except Exception as e: |
| LOW | tests/kernels/test_kernels.py | 400 | except Exception as e: |
| LOW | tests/kernels/test_kernels.py | 77 | except Exception as e: |
| LOW | tests/kernels/test_kernels.py | 87 | except Exception as e: |
| LOW | tests/kernels/test_kernels.py | 415 | except Exception as e: |
| LOW | tests/kernels/test_kernels.py | 419 | except Exception as e: |
| LOW | tests/kernels/test_kernels.py | 436 | except Exception as e: |
| LOW | …pelines/test_pipelines_automatic_speech_recognition.py | 1817 | except Exception: |
| LOW | tests/utils/test_auto_docstring.py | 726 | except Exception: |
| LOW | …v2_tokenizer/test_modeling_higgs_audio_v2_tokenizer.py | 228 | except Exception: |
| LOW | …v2_tokenizer/test_modeling_higgs_audio_v2_tokenizer.py | 233 | except Exception: |
| LOW | tests/models/marian/test_modeling_marian.py | 351 | except Exception: |
| LOW | tests/models/mvp/test_modeling_mvp.py | 490 | except Exception: |
| LOW | tests/models/led/test_modeling_led.py | 471 | except Exception: |
| LOW | tests/models/pegasus_x/test_modeling_pegasus_x.py | 546 | except Exception: |
| LOW | tests/models/rag/test_modeling_rag.py | 76 | except Exception: |
| LOW | tests/models/wav2vec2/test_modeling_wav2vec2.py | 126 | except Exception: |
| LOW | tests/models/pegasus/test_modeling_pegasus.py | 296 | except Exception: |
| LOW | tests/models/bart/test_modeling_bart.py | 513 | except Exception: |
| LOW | tests/models/plbart/test_modeling_plbart.py | 312 | except Exception: |
| 229 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | benchmark_v2/framework/benchmark_runner.py | 101 | torch._inductor.codecache.TritonFuture._compile_cache.clear() |
| CRITICAL | tests/models/fsmt/test_modeling_fsmt.py | 260 | model.base_model.decoder.output_projection.weight.data_ptr(), |
| CRITICAL | tests/models/fsmt/test_modeling_fsmt.py | 276 | model.base_model.decoder.output_projection.weight.data_ptr(), |
| CRITICAL | tests/models/mbart/test_modeling_mbart.py | 344 | model.base_model.decoder.embed_tokens.weight.data_ptr(), |
| CRITICAL | tests/models/mbart/test_modeling_mbart.py | 345 | model.base_model.encoder.embed_tokens.weight.data_ptr(), |
| CRITICAL | tests/models/mbart/test_modeling_mbart.py | 327 | model.base_model.decoder.embed_tokens.weight.data_ptr(), |
| CRITICAL | tests/models/mbart/test_modeling_mbart.py | 328 | model.base_model.encoder.embed_tokens.weight.data_ptr(), |
| CRITICAL | tests/generation/test_continuous_batching.py | 97 | torch._inductor.codecache.TritonFuture._compile_cache.clear() |
| CRITICAL | utils/check_repo.py | 1362 | model_types = list(transformers.models.auto.configuration_auto.CONFIG_MAPPING_NAMES.keys()) |
| CRITICAL | src/transformers/trainer.py | 2198 | kwargs.update({"dtype": self.accelerator.state.deepspeed_plugin.hf_ds_config.dtype()}) |
| CRITICAL | src/transformers/tokenization_mistral_common.py | 593 | return self.tokenizer.instruct_tokenizer.tokenizer._model.piece_to_id(piece) |
| CRITICAL | …ransformers/models/marian/convert_marian_to_pytorch.py | 626 | model.lm_head.weight.data = model.model.decoder.embed_tokens.weight.data.clone() |
| CRITICAL | …s/models/conditional_detr/modeling_conditional_detr.py | 1784 | object_queries_position_embeddings = self.conditional_detr.model.query_position_embeddings.weight.unsqueeze( |
| CRITICAL | …_vl_hybrid/convert_deepseek_vl_hybrid_weights_to_hf.py | 74 | r"vision_model.vision_tower_low.vision_tower.attn_pool.mlp.fc(\d+).(weight|bias)": r"model.vision_model.visio |
| CRITICAL | …ers/models/clip/convert_clip_original_pytorch_to_hf.py | 92 | hf_model.visual_projection.weight.data = pt_model.visual.proj.data.T.contiguous() |
| CRITICAL | src/transformers/models/rwkv/modeling_rwkv.py | 630 | block.attention.output.weight.SCB.div_(2 ** int(block_id // self.config.rescale_every)) |
| CRITICAL | src/transformers/models/rwkv/modeling_rwkv.py | 631 | block.feed_forward.value.weight.SCB.div_(2 ** int(block_id // self.config.rescale_every)) |
| CRITICAL | …rmers/models/seamless_m4t_v2/convert_fairseq2_to_hf.py | 284 | original_model.model.t2u_model.decoder_frontend.char_tokenizer.model.index_to_token(i): i for i in range(10904) |
| CRITICAL | src/transformers/models/detr/modeling_detr.py | 1575 | object_queries_position_embeddings = self.detr.model.query_position_embeddings.weight.unsqueeze(0).repeat( |
| CRITICAL | src/transformers/integrations/mxfp4.py | 233 | module.gate_up_proj_precision_config.weight_scale.storage.layout.unswizzle_data( |
| CRITICAL | src/transformers/integrations/mxfp4.py | 244 | module.down_proj_precision_config.weight_scale.storage.layout.unswizzle_data( |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | pyproject.toml | 106 | # Using default settings for comprehensive type checking |
| MEDIUM | benchmark/benchmarks_entrypoint.py | 250 | # Create comprehensive summary using pandas operations |
| MEDIUM | benchmark/benchmarks_entrypoint.py | 301 | # Export the comprehensive summary |
| MEDIUM | tests/test_tokenization_common.py | 323 | # Default comprehensive test string covering various edge cases |
| MEDIUM | tests/test_modeling_common.py | 710 | # Note: for all mixins that utilize the Hub in some way, we should ensure that |
| LOW | tests/tensor_parallel/test_tensor_parallel.py | 324 | # so just use a SimpleNamespace to test that the attribute is updated correctly. |
| LOW | tests/pipelines/test_pipelines_common.py | 211 | # If dtype is NOT specified in the pipeline constructor, the property should just return |
| LOW | tests/pipelines/test_pipelines_common.py | 216 | # If underlying model doesn't have dtype property, simply return None |
| LOW | tests/utils/test_modeling_utils.py | 2863 | # a KeyError; they should simply return False. |
| MEDIUM | tests/utils/test_auto_docstring.py | 688 | # Relative metric; robust across CI vs local. Catches serious regressions. |
| MEDIUM | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 537 | ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) at |
| MEDIUM | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 537 | ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) at |
| MEDIUM | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 539 | ARTICLE_MAGNET = r"""it is well known that the classical magnetoresistance ( mr ) in metals or semiconductors wi |
| LOW | tests/models/clvp/test_modeling_clvp.py | 450 | # the testing for text encoder stays standard because we just pass the text tokens here. |
| LOW | tests/models/modernvbert/test_modeling_modernvbert.py | 145 | # For simplicity just set the last n tokens to the image token |
| MEDIUM | tests/models/led/test_modeling_led.py | 544 | ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) at |
| MEDIUM | tests/models/led/test_modeling_led.py | 544 | ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) at |
| MEDIUM | tests/models/led/test_modeling_led.py | 546 | ARTICLE_MAGNET = r"""it is well known that the classical magnetoresistance ( mr ) in metals or semiconductors wi |
| MEDIUM | …els/gemma4_assistant/test_modeling_gemma4_assistant.py | 109 | ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers |
| MEDIUM | tests/models/gemma4/test_modeling_gemma4.py | 766 | ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers |
| MEDIUM | tests/models/gemma4/test_modeling_gemma4.py | 791 | ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers |
| LOW | tests/models/bloom/test_modeling_bloom.py | 224 | # TODO change the script (or just add skip) when building the env with tokenizers 0.12.0 |
| LOW | tests/models/lfm2_vl/test_modeling_lfm2_vl.py | 138 | # For simplicity just set the last n tokens to the image token |
| MEDIUM | tests/models/paligemma/test_modeling_paligemma.py | 576 | # this is a supplementary test to ensure paligemma fine-tuning that relies on token_type_ids is robust to future |
| LOW | tests/models/idefics3/test_modeling_idefics3.py | 150 | # For simplicity just set the last n tokens to the image token |
| LOW | tests/models/smolvlm/test_modeling_smolvlm.py | 152 | # For simplicity just set the last n tokens to the image token |
| LOW | tests/models/idefics2/test_modeling_idefics2.py | 160 | # For simplicity just set the last n tokens to the image token |
| LOW | …/models/colmodernvbert/test_modeling_colmodernvbert.py | 140 | # For simplicity just set the first n tokens to the image token |
| MEDIUM | tests/models/whisper/test_processing_whisper.py | 171 | """Test using the old processing functions used in the ASR pipeline, but that serves as a BC reference.""" |
| LOW | tests/generation/test_utils.py | 2568 | # In this case, we simply call recursively the function on both internal caches |
| LOW | tests/generation/test_utils.py | 2658 | # In this case, we simply call recursively the function on both internal caches |
| MEDIUM | tests/generation/test_logits_process.py | 758 | # scores = 0 to facilitate checks |
| LOW | utils/check_docstrings.py | 547 | # Default None are not written, we just set `*optional*`. If there is default that is not None specified in the |
| MEDIUM | utils/get_test_reports.py | 137 | """Command-line interface for running test suite with comprehensive reporting. Check handle_suite for more details. |
| MEDIUM | utils/create_dummy_models.py | 369 | # New method that is more robust to get checkpoints! |
| LOW | utils/notification_service.py | 169 | # `dicts_to_sum` uses `dicts_to_sum` which requires a non empty dictionary. Let's just add an empty entry. |
| LOW | utils/check_inits.py | 119 | # If this is a traditional init, just return. |
| MEDIUM | src/transformers/tokenization_utils_base.py | 3213 | # To make this more robust, we could do a diff and find the longest common subsequence, but this is |
| MEDIUM | src/transformers/testing_utils.py | 3471 | # TODO: check simply with the name is not robust. |
| LOW | src/transformers/testing_utils.py | 3716 | # If the target callable is not called within a test, simply call it without modification. |
| LOW | src/transformers/testing_utils.py | 3793 | # We simply add "self" as the expression despite it might not be the actual argument name. |
| LOW | src/transformers/modeling_utils.py | 5026 | # fragmentation issues) simply use the pool of 4 GiB unused memory that is available. In those cases, it's b |
| MEDIUM | src/transformers/modeling_utils.py | 4825 | """Adds the `_is_hf_initialized` flag on parameters that will be tied, in order to avoid initializing them |
| LOW | src/transformers/trainer.py | 1749 | # if loss is nan or inf simply add the average of previous logged losses |
| LOW | src/transformers/masking_utils.py | 839 | # If the mask is already 4D, simply return as-is (it was already prepared, or it is custom) |
| LOW | src/transformers/trainer_pt_utils.py | 385 | # Check if we have something to add, if not just return |
| MEDIUM | src/transformers/pipelines/text_to_audio.py | 206 | # ensure dict output to facilitate postprocessing |
| MEDIUM | …transformers/pipelines/automatic_speech_recognition.py | 667 | # Simply cast from pyctcdecode format to wav2vec2 format to leverage |
| MEDIUM | src/transformers/pipelines/mask_generation.py | 218 | # Consider using a more robust method for distinguishing model types here. |
| LOW | src/transformers/utils/chat_parsing_utils.py | 83 | # If the schema has a const, we just return that value and do absolutely nothing else |
| LOW | src/transformers/utils/output_capturing.py | 108 | # If it's None or not a key we want to capture, simply return, the hook is inactive |
| MEDIUM | …/transformers/models/metaclip_2/modeling_metaclip_2.py | 506 | # Use robust pooling like CLIP - finds the first EOS token position per sequence |
| MEDIUM | …c/transformers/models/metaclip_2/modular_metaclip_2.py | 277 | # Use robust pooling like CLIP - finds the first EOS token position per sequence |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 169 | # As the feature map size is fixed, we can just return the pre-computed embeddings. |
| LOW | src/transformers/models/clvp/modeling_clvp.py | 495 | # We can probably just use the multi-head attention module of PyTorch >=1.1.0 |
| LOW | src/transformers/models/vilt/image_processing_vilt.py | 226 | # If no padding, just return the processed images |
| LOW | src/transformers/models/electra/modeling_electra.py | 727 | # We can probably just use the multi-head attention module of PyTorch >=1.1.0 |
| LOW | src/transformers/models/led/modeling_led.py | 371 | # the case hidden_states.size(1) == window_overlap * 2 can also simply return hidden_states.unsqueeze(1), but th |
| LOW | src/transformers/models/led/modeling_led.py | 1320 | # simply use `global_attention_mask` as `attention_mask` |
| MEDIUM | src/transformers/models/auto/tokenization_auto.py | 671 | # First, let's see whether the tokenizer_type is passed so that we can leverage it |
| 36 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/utils/test_cache_utils.py | 1214 | # Step 0 : multi-token prefill |
| LOW | tests/utils/test_cache_utils.py | 1226 | # Step 1 : multi-token update crossing the window boundary |
| LOW | tests/quantization/bnb/test_mixed_int8.py | 904 | # Step 1: freeze all parameters |
| LOW | tests/quantization/bnb/test_mixed_int8.py | 925 | # Step 2: add adapters |
| LOW | tests/quantization/bnb/test_mixed_int8.py | 932 | # Step 3: dummy batch |
| LOW | tests/quantization/bnb/test_mixed_int8.py | 935 | # Step 4: Check if the gradient is not None |
| LOW | tests/quantization/bnb/test_4bit.py | 631 | # Step 1: freeze all parameters |
| LOW | tests/quantization/bnb/test_4bit.py | 651 | # Step 2: add adapters |
| LOW | tests/quantization/bnb/test_4bit.py | 658 | # Step 3: dummy batch |
| LOW | tests/quantization/bnb/test_4bit.py | 661 | # Step 4: Check if the gradient is not None |
| LOW | …iner/distributed/test_trainer_distributed_deepspeed.py | 1139 | # Step 1: Run with SP enabled |
| LOW | …iner/distributed/test_trainer_distributed_deepspeed.py | 1160 | # Step 2: Run without SP |
| LOW | …s/trainer/distributed/test_trainer_distributed_fsdp.py | 593 | # Step 1: Run with CP enabled (cp_size=2) |
| LOW | …s/trainer/distributed/test_trainer_distributed_fsdp.py | 605 | # Step 2: Run without CP (FSDP with num_processes=1, no parallelism_config) |
| LOW | tests/generation/test_paged_attention.py | 23 | "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orange |
| LOW | tests/generation/test_paged_attention.py | 31 | "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orange |
| LOW | .github/workflows/circleci-failure-summary-comment.yml | 76 | # Step 1: Get CircleCI check suite ID |
| LOW | .github/workflows/circleci-failure-summary-comment.yml | 84 | # Step 2: Get check runs from the CircleCI suite |
| LOW | .github/workflows/circleci-failure-summary-comment.yml | 89 | # Step 3: Extract workflow ID from the "run_tests" check run |
| LOW | .github/workflows/circleci-failure-summary-comment.yml | 93 | # Step 4: Get all jobs in the workflow |
| LOW | .github/workflows/circleci-failure-summary-comment.yml | 98 | # Step 5: Extract collection_job details |
| LOW | .github/workflows/circleci-failure-summary-comment.yml | 115 | # Step 6: Get artifacts list |
| LOW | .github/workflows/circleci-failure-summary-comment.yml | 123 | # Step 7: Download failure_summary.json specifically |
| LOW | src/transformers/feature_extraction_utils.py | 518 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style |
| LOW | src/transformers/image_processing_base.py | 323 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style |
| LOW | src/transformers/video_processing_utils.py | 665 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style |
| LOW | …ls/ernie4_5_vl_moe/video_processing_ernie4_5_vl_moe.py | 220 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style |
| LOW | src/transformers/models/nllb_moe/modeling_nllb_moe.py | 192 | `bitsandbytes` `Linear8bitLt` layers does not support manual casting Therefore we need to check if they are an |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 2851 | # Step 1: Handle initial conditioning frames |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 2863 | # Step 2: Get memory frames and concatenate their features |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 2873 | # Step 3: Get and process object pointers |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 2889 | # Step 4: Concatenate all retrieved memories and their positional embeddings |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 2893 | # Step 5: Forward through the memory attention mechanism |
| LOW | …sformers/models/edgetam_video/modular_edgetam_video.py | 1080 | # Step 1: Handle initial conditioning frames |
| LOW | …sformers/models/edgetam_video/modular_edgetam_video.py | 1092 | # Step 2: Get memory frames and concatenate their features |
| LOW | …sformers/models/edgetam_video/modular_edgetam_video.py | 1102 | # Step 3: Get and process object pointers |
| LOW | …sformers/models/edgetam_video/modular_edgetam_video.py | 1118 | # Step 4: Concatenate all retrieved memories and their positional embeddings |
| LOW | …sformers/models/edgetam_video/modular_edgetam_video.py | 1122 | # Step 5: Forward through the memory attention mechanism |
| LOW | …/transformers/models/nemotron_h/modeling_nemotron_h.py | 506 | # Step 2: Compute M, equivalent to applying attention mask to weights |
| LOW | …/transformers/models/nemotron_h/modeling_nemotron_h.py | 510 | # Step 3: Compute Y_diag (apply to values) |
| LOW | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 231 | # Step 1: Aspect-ratio-preserving resize |
| LOW | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 241 | # Step 2: Rescale pixel values from [0, 255] to [0, 1] |
| LOW | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 245 | # Step 3: Identity normalization because Gemma4 was trained with pixels in [0, 1] |
| LOW | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 249 | # Step 4: Patchify the image |
| LOW | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 255 | # Step 5: Compute position IDs |
| LOW | …/transformers/models/gemma4/image_processing_gemma4.py | 173 | # Step 1: Aspect-ratio-preserving resize |
| LOW | …/transformers/models/gemma4/image_processing_gemma4.py | 183 | # Step 2: Rescale pixel values (typically to [0, 1]) and optionally identity normalize |
| LOW | …/transformers/models/gemma4/image_processing_gemma4.py | 186 | # Step 3: Patchify the image |
| LOW | …/transformers/models/gemma4/image_processing_gemma4.py | 193 | # Step 5: Compute position IDs |
| LOW | src/transformers/models/auto/image_processing_auto.py | 298 | # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy style |
| LOW | src/transformers/models/auto/video_processing_auto.py | 213 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style |
| LOW | src/transformers/models/auto/feature_extraction_auto.py | 221 | # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy style |
| LOW | src/transformers/models/zamba2/modeling_zamba2.py | 794 | # Step 2: Compute M, equivalent to applying attention mask to weights |
| LOW | src/transformers/models/zamba2/modeling_zamba2.py | 798 | # Step 3: Compute Y_diag (apply to values) |
| LOW | src/transformers/models/zamba2/modular_zamba2.py | 582 | # Step 2: Compute M, equivalent to applying attention mask to weights |
| LOW | src/transformers/models/zamba2/modular_zamba2.py | 586 | # Step 3: Compute Y_diag (apply to values) |
| LOW | …/transformers/models/sam3_video/modeling_sam3_video.py | 291 | # Step 1: Update the object id mapping (note that it must be done after Step 0, |
| LOW | …/transformers/models/sam3_video/modeling_sam3_video.py | 305 | # Step 2: For per-object tensor storage, we shift their obj_idx in the dict keys. |
| LOW | …/transformers/models/sam3_video/modeling_sam3_video.py | 1483 | # Step 1: add new objects from FA detection to SAM2 inference states |
| LOW | …/transformers/models/sam3_video/modeling_sam3_video.py | 1496 | # Step 2: remove from SAM2 inference states those objects removed by heuristics |
| 28 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/utils/test_model_output.py | 155 | '[1, {"type": "tests.utils.test_model_output.ModelOutputTest", "context": "[\\"a\\", \\"c\\"]", "children_sp |
| HIGH | tests/utils/test_chat_parsing_utils.py | 507 | 'null_value:null,number_value:1,string_value:<|"|>foo<|"|>,' |
| HIGH | utils/check_import_complexity.py | 67 | self._tracer.push(self._fullname) |
| HIGH | .circleci/create_circleci_config.py | 73 | {"run": "pip install requests || true"}, |
| HIGH | .circleci/create_circleci_config.py | 75 | "run": """while [[ $(curl --location --request GET "https://circleci.com/api/v2/workflow/$CIRCLE |
| HIGH | .circleci/create_circleci_config.py | 78 | "run": "python utils/process_circleci_workflow_test_reports.py --workflow_id $CIRCLE_WORKFLOW_ID |
| HIGH | .circleci/create_circleci_config.py | 182 | {"run": "apt-get update && apt-get install -y curl"}, |
| HIGH | .circleci/create_circleci_config.py | 195 | "command": """du -h -d 1 "$(pip -V | cut -d ' ' -f 4 | sed 's/pip//g')" | grep -vE "dist-info|_distu |
| HIGH | .circleci/create_circleci_config.py | 201 | "command": """pip list --format=freeze | tee installed.txt || true""", |
| HIGH | .circleci/create_circleci_config.py | 222 | "command": f"TESTS=$(circleci tests split --split-by=timings {self.job_name}_test_list.txt) && echo |
| HIGH | .circleci/create_circleci_config.py | 232 | "command": "cp -r /test_data/* . 2>/dev/null || true; python3 utils/fetch_hub_objects_for_ci.py", |
| HIGH | .circleci/create_circleci_config.py | 238 | "command": 'curl -L -o huggingface-cache.tar.gz https://huggingface.co/datasets/hf-internal-testing/ |
| HIGH | src/transformers/quantizers/quantizer_fp_quant.py | 54 | "Using `fp_quant` with real quantization requires a **Blackwell GPU** and qutlass: `git clone https://gi |
| HIGH | src/transformers/models/auto/auto_factory.py | 246 | # Check both `quantization_config` being present and also not null, |
| HIGH | src/transformers/models/auto/auto_factory.py | 400 | # Check both `quantization_config` being present and also not null, |
| HIGH | src/transformers/models/xlm/tokenization_xlm.py | 305 | logger.error("1. git clone git@github.com:neubig/kytea.git && cd kytea") |
| HIGH | src/transformers/models/xlm/tokenization_xlm.py | 308 | logger.error("4. make && make install") |
| HIGH | src/transformers/models/xlm/tokenization_xlm.py | 381 | git clone git@github.com:neubig/kytea.git && cd kytea autoreconf -i ./configure --prefix=$HOME/local |
| HIGH | src/transformers/models/xlm/tokenization_xlm.py | 382 | make && make install pip install kytea |
| HIGH | …/transformers/models/flaubert/tokenization_flaubert.py | 304 | logger.error("1. git clone git@github.com:neubig/kytea.git && cd kytea") |
| HIGH | …/transformers/models/flaubert/tokenization_flaubert.py | 307 | logger.error("4. make && make install") |
| HIGH | src/transformers/integrations/executorch.py | 219 | # If `layer_types` is not specified explicitly in the config or `sliding_window` is null, |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_modeling_common.py | 4715 | # If none of the config and subconfigs have a tp_plan, then skip (otherwise we should make sure to respect the p |
| LOW | tests/models/whisper/test_modeling_whisper.py | 109 | # make sure to use correct index if a batch was removed |
| LOW | utils/check_docstrings.py | 387 | # below, make sure to add a comment explaining why. |
| LOW | src/transformers/core_model_loading.py | 247 | # We squeeze each chunk here as well to make sure to give them their original shape |
| LOW | src/transformers/core_model_loading.py | 1416 | # so we need to make sure to load the tensor with the same dtype from the checkpoint |
| LOW | src/transformers/trainer.py | 1867 | # After training we make sure to retrieve back the original forward pass method |
| LOW | …ers/models/ernie4_5_vl_moe/modeling_ernie4_5_vl_moe.py | 1663 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …mers/models/ernie4_5_vl_moe/modular_ernie4_5_vl_moe.py | 1205 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/laguna/modeling_laguna.py | 746 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/gpt_oss/modeling_gpt_oss.py | 682 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/olmoe/modeling_olmoe.py | 695 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/clvp/configuration_clvp.py | 81 | # make sure to have the config_type be either "text_config" or "speech_config" |
| LOW | …/transformers/models/qwen3_next/modeling_qwen3_next.py | 1178 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/mellum/modeling_mellum.py | 723 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/mixtral/modeling_mixtral.py | 670 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/mixtral/modular_mixtral.py | 416 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …/transformers/models/minimax_m2/modeling_minimax_m2.py | 678 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …mers/models/colqwen2/convert_colqwen2_weights_to_hf.py | 17 | Don't forget to manually upload the processor-related files to the HF model repository |
| LOW | …mers/models/colqwen2/convert_colqwen2_weights_to_hf.py | 180 | Don't forget to manually upload the processor-related files to the HF model repository |
| LOW | src/transformers/models/jetmoe/modeling_jetmoe.py | 814 | loss += self.aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/jetmoe/modular_jetmoe.py | 581 | loss += self.aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …/transformers/models/granitemoe/modeling_granitemoe.py | 719 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …c/transformers/models/granitemoe/modular_granitemoe.py | 304 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …pas/convert_tapas_original_tf_checkpoint_to_pytorch.py | 174 | # If you want to convert a checkpoint that uses absolute position embeddings, make sure to set reset_position_index_ |
| LOW | …ata2vec_text_original_pytorch_checkpoint_to_pytorch.py | 39 | # IMPORTANT: In order for this script to run, please make sure to download the dictionary: `dict.txt` from wget https:// |
| LOW | src/transformers/models/flex_olmo/modeling_flex_olmo.py | 688 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …/transformers/models/layoutlmv2/modeling_layoutlmv2.py | 1078 | >>> boxes = data["bboxes"] # make sure to normalize your bounding boxes |
| LOW | …s/models/granitemoehybrid/modeling_granitemoehybrid.py | 1400 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/minimax/modeling_minimax.py | 879 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/jamba/modeling_jamba.py | 933 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/phimoe/modeling_phimoe.py | 862 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/voxtral/processing_voxtral.py | 313 | # make sure to remove from text_kwargs and audio_kwargs |
| LOW | src/transformers/models/siglip/modeling_siglip.py | 511 | >>> # important: make sure to set padding="max_length" as that's how the model was trained |
| LOW | src/transformers/models/siglip/modeling_siglip.py | 695 | >>> # important: make sure to set padding="max_length" as that's how the model was trained |
| LOW | src/transformers/models/doge/modular_doge.py | 636 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/doge/modeling_doge.py | 805 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …ransformers/models/qwen3_5_moe/modeling_qwen3_5_moe.py | 1892 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …ransformers/models/qwen3_5_moe/modeling_qwen3_5_moe.py | 2050 | ) # make sure to reside in the same device |
| LOW | src/transformers/models/dbrx/modular_dbrx.py | 536 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/dbrx/modeling_dbrx.py | 748 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …ransformers/models/deepseek_v4/modeling_deepseek_v4.py | 1488 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …nsformers/models/ernie4_5_moe/modeling_ernie4_5_moe.py | 729 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/siglip2/modeling_siglip2.py | 627 | >>> # important: make sure to set padding="max_length" as that's how the model was trained |
| LOW | src/transformers/models/siglip2/modeling_siglip2.py | 760 | >>> # important: make sure to set padding="max_length" as that's how the model was trained |
| LOW | src/transformers/models/glm4v_moe/modular_glm4v_moe.py | 399 | ) # make sure to reside in the same device |
| LOW | src/transformers/models/glm4v_moe/modeling_glm4v_moe.py | 1654 | ) # make sure to reside in the same device |
| LOW | …ansformers/models/qwen3_vl_moe/modular_qwen3_vl_moe.py | 444 | ) # make sure to reside in the same device |
| LOW | …nsformers/models/qwen3_vl_moe/modeling_qwen3_vl_moe.py | 1617 | ) # make sure to reside in the same device |
| LOW | …s/models/granitemoeshared/modeling_granitemoeshared.py | 788 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …ormers/models/qwen3_omni_moe/modular_qwen3_omni_moe.py | 1392 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …ormers/models/qwen3_omni_moe/modular_qwen3_omni_moe.py | 1825 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …rmers/models/qwen3_omni_moe/modeling_qwen3_omni_moe.py | 2238 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …rmers/models/qwen3_omni_moe/modeling_qwen3_omni_moe.py | 3149 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | …convert_fsmt_original_pytorch_checkpoint_to_pytorch.py | 15 | # Note: if you intend to run this script make sure you look under scripts/fsmt/ |
| LOW | src/transformers/models/fsmt/modeling_fsmt.py | 106 | (don't forget to install sacrebleu: `pip install sacrebleu`) |
| LOW | src/transformers/models/qwen2_moe/modeling_qwen2_moe.py | 707 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/whisper/generation_whisper.py | 906 | # output tokens from the list of dicts. If we use batch size > 1, we make sure to pad the output |
| LOW | src/transformers/models/whisper/generation_whisper.py | 588 | >>> # make sure to NOT truncate the input audio, to return the `attention_mask` and to pad to the longest audio |
| LOW | src/transformers/models/qwen3_moe/modeling_qwen3_moe.py | 699 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| LOW | src/transformers/models/qwen3_moe/modular_qwen3_moe.py | 173 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device |
| 4 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/pipelines/test_pipelines_fill_mask.py | 169 | dummy_str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit," * 100 |
| LOW | tests/pipelines/test_pipelines_fill_mask.py | 169 | dummy_str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit," * 100 |
| LOW | tests/models/solar_open/test_modeling_solar_open.py | 101 | "Lorem ipsum dolor sit amet", |
| LOW | tests/models/solar_open/test_modeling_solar_open.py | 101 | "Lorem ipsum dolor sit amet", |
| LOW | tests/models/solar_open/test_modeling_solar_open.py | 108 | "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shell |
| LOW | tests/models/solar_open/test_modeling_solar_open.py | 108 | "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shell |
| LOW | tests/models/solar_open/test_modeling_solar_open.py | 112 | "Lorem ipsum dolor sit amet=√=√ 치수=√ 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shelley |
| LOW | tests/models/solar_open/test_modeling_solar_open.py | 112 | "Lorem ipsum dolor sit amet=√=√ 치수=√ 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shelley |
| LOW | tests/models/donut/test_processing_donut.py | 29 | "name": "John Doe", |
| LOW | …ts/models/markuplm/test_feature_extraction_markuplm.py | 94 | expected_nodes = [['sample document', 'Goog', 'This is one header', 'This is a another Header', 'Travel from', ' |
| LOW | tests/models/lfm2_moe/test_modeling_lfm2_moe.py | 195 | prompts = ["Who are you?", "Complete the text: Lorem ipsum dolor ", "The Meji Restoration in Japan ended"] |
| LOW | tests/models/lfm2_moe/test_modeling_lfm2_moe.py | 201 | "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum.", |
| LOW | tests/models/lfm2_moe/test_modeling_lfm2_moe.py | 206 | "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum dolor", |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | docs/source/en/model_output_tracing.md | 48 | # Captures second output as requested (index=1) |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/utils/test_auto_docstring.py | 218 | f.write("def helper(): pass") |
| LOW | tests/cli/test_serve.py | 1877 | async def handle_request(_body, _request_id): |
| LOW | src/transformers/utils/deprecation.py | 85 | def my_function(do_reduce_labels): |
| LOW | src/transformers/utils/deprecation.py | 95 | def my_function(max_size): |
| LOW | src/transformers/utils/generic.py | 732 | def my_function(arg1, arg2, **kwargs): |
| LOW | src/transformers/cli/serving/transcription.py | 85 | async def handle_request(self, request: Request) -> JSONResponse | StreamingResponse: |
| LOW | src/transformers/cli/serving/chat_completion.py | 123 | async def handle_request(self, body: dict, request_id: str) -> StreamingResponse | JSONResponse: |
| LOW | src/transformers/cli/serving/completion.py | 77 | async def handle_request(self, body: dict, request_id: str) -> "StreamingResponse | JSONResponse": |
| LOW | src/transformers/cli/serving/response.py | 367 | async def handle_request(self, body: dict, request_id: str) -> StreamingResponse | JSONResponse: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/generation/test_flash_attention_parity.py | 15 | # Usage: |
| LOW | utils/compare_test_runs.py | 79 | # Example usage: |
| LOW | …mples/quantization/custom_quantization_int8_example.py | 227 | # Example usage |
| LOW | examples/pytorch/continuous_batching.py | 315 | # Example usage: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | src/transformers/models/glpn/modeling_glpn.py | 483 | |
| MEDIUM | src/transformers/models/glpn/modeling_glpn.py | 484 |