🤗 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.
This report summarizes scanner evidence for huggingface/transformers, a Python project with 167,119 GitHub stars. SynthScan examined 2,090,977 lines of code across 6524 source files, recording 37646 pattern matches distributed across 27 syntactic categories. The legacy adjusted pattern signal is 31.6 (High pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 24414 finding(s).
Are imports declared and package/API names verified? 3599 finding(s).
Are wrappers, guards, and repeated structures necessary? 26859 finding(s).
Which changes need focused human review? 37646 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 37646 distinct pattern matches across 27 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_tokenization_common.py | 0 | when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each seque | STRING |
| HIGH | tests/models/udop/test_tokenization_udop.py | 0 | when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each seque | STRING |
| HIGH | tests/models/markuplm/test_tokenization_markuplm.py | 0 | when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each seque | STRING |
| HIGH | tests/models/layoutlmv2/test_tokenization_layoutlmv2.py | 0 | when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each seque | STRING |
| HIGH | tests/models/layoutlmv3/test_tokenization_layoutlmv3.py | 0 | when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each seque | STRING |
| HIGH | tests/models/layoutxlm/test_tokenization_layoutxlm.py | 0 | when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each seque | STRING |
| HIGH | tests/test_tokenization_common.py | 0 | test that passing pad_token when creating a tokenizer works correctly. | STRING |
| HIGH | tests/models/udop/test_tokenization_udop.py | 0 | test that passing pad_token when creating a tokenizer works correctly. | STRING |
| HIGH | tests/models/layoutxlm/test_tokenization_layoutxlm.py | 0 | test that passing pad_token when creating a tokenizer works correctly. | STRING |
| HIGH | tests/test_modeling_common.py | 0 | tests that the model supports batching and that the output is nearly the same for the same input in different batch size | STRING |
| HIGH | tests/models/dab_detr/test_modeling_dab_detr.py | 0 | tests that the model supports batching and that the output is nearly the same for the same input in different batch size | STRING |
| HIGH | tests/models/omdet_turbo/test_modeling_omdet_turbo.py | 0 | tests that the model supports batching and that the output is nearly the same for the same input in different batch size | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | tests/models/sam_hq/test_modeling_sam_hq.py | 0 | tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by | STRING |
| HIGH | …s/instructblipvideo/test_modeling_instructblipvideo.py | 0 | tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by | STRING |
| HIGH | tests/test_tensor_parallel_mixin.py | 0 | the model tester instance (e.g., causallmmodeltester). | STRING |
| HIGH | tests/test_fsdp_mixin.py | 0 | the model tester instance (e.g., causallmmodeltester). | STRING |
| HIGH | tests/test_training_mixin.py | 0 | the model tester instance (e.g., causallmmodeltester). | STRING |
| HIGH | tests/test_processing_common.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | tests/models/mllama/test_processing_mllama.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | …/models/video_llama_3/test_processing_video_llama_3.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | tests/models/gemma3/test_processing_gemma3.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | tests/models/inkling/test_processing_inkling.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | tests/models/gemma4/test_processing_gemma4.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | …s/embedding_gemma2/test_processing_embedding_gemma2.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | …odels/gemma4_unified/test_processing_gemma4_unified.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | tests/models/lfm2_vl/test_processing_lfm2_vl.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | tests/models/smolvlm/test_processing_smolvlm.py | 0 | this function prepares a list of pil images for testing | STRING |
| HIGH | tests/test_processing_common.py | 0 | tests that sub-processor is called correctly when passing each modality input to the processor. this test verifies that | STRING |
| HIGH | …ts/models/qwen2_5_omni/test_processing_qwen2_5_omni.py | 0 | tests that sub-processor is called correctly when passing each modality input to the processor. this test verifies that | STRING |
| HIGH | …odels/qwen3_omni_moe/test_processing_qwen3_omni_moe.py | 0 | tests that sub-processor is called correctly when passing each modality input to the processor. this test verifies that | STRING |
| HIGH | tests/test_image_processing_common.py | 0 | this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifi | STRING |
| HIGH | tests/models/mllama/test_image_processing_mllama.py | 0 | this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifi | STRING |
| HIGH | tests/models/aria/test_image_processing_aria.py | 0 | this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifi | STRING |
| HIGH | tests/models/idefics3/test_image_processing_idefics3.py | 0 | this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifi | STRING |
| HIGH | tests/models/smolvlm/test_image_processing_smolvlm.py | 0 | this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifi | STRING |
| HIGH | tests/test_video_processing_common.py | 0 | this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifi | STRING |
| HIGH | tests/test_image_processing_common.py | 0 | test that explicitly setting an attribute to none is preserved through save/load. | STRING |
| HIGH | tests/test_video_processing_common.py | 0 | test that explicitly setting an attribute to none is preserved through save/load. | STRING |
| HIGH | tests/models/mllama/test_image_processing_mllama.py | 0 | test that explicitly setting an attribute to none is preserved through save/load. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| HIGH | tests/models/kimi_k25/test_video_processing_kimi_k25.py | 0 | tests that the processor can work with nested list where each video is a list of arrays. | STRING |
| HIGH | …s/minimax_m3_vl/test_video_processing_minimax_m3_vl.py | 0 | tests that the processor can work with nested list where each video is a list of arrays. | STRING |
| 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. | STRING |
| HIGH | …cohere_compass/test_video_processing_cohere_compass.py | 0 | tests that the processor can work with nested list where each video is a list of arrays. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| HIGH | …ts/models/glm5_next/test_video_processing_glm5_next.py | 0 | tests that the processor can work with nested list where each video is a list of arrays. | STRING |
| 6676 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | conftest.py | 109 | def _with_tmpdir_cache_fallback(fn): | CODE |
| LOW | conftest.py | 305 | def pytest_collection_modifyitems(items): | CODE |
| LOW | benchmark/benchmarks_entrypoint.py | 146 | def collect_device_measurements(self, benchmark_id: str, cpu_util, mem_megabytes, gpu_util, gpu_mem_megabytes): | CODE |
| LOW | benchmark/benchmarks_entrypoint.py | 179 | def collect_model_measurements(self, benchmark_id: str, measurements: dict[str, float]): | CODE |
| LOW | benchmark/benchmarks_entrypoint.py | 378 | def create_database_connection(): | CODE |
| LOW | benchmark/benchmarks_entrypoint.py | 397 | def create_global_metrics_recorder( | CODE |
| LOW | benchmark/benches/llama.py | 143 | def multinomial_sample_one_no_sync(probs_sort): # Does multinomial sampling without a cuda synchronization | CODE |
| LOW | …rk_v2/benchmark_scripts/continuous_batching_overall.py | 84 | def _build_lighteval_inputs_scorer( | CODE |
| LOW | benchmark_v2/framework/hardware_metrics.py | 29 | def get_device_name_and_memory_total() -> tuple[str, float]: | CODE |
| LOW | benchmark_v2/framework/benchmark_runner.py | 59 | def compact_json_numeric_arrays(data: dict): | CODE |
| LOW | benchmark_v2/framework/data_classes.py | 39 | def equalize_lengths_and_collate(stats: dict[str, dict[str, str]]) -> dict[str, str]: | CODE |
| LOW | tests/test_tokenization_common.py | 135 | def merge_model_tokenizer_mappings( | CODE |
| LOW | tests/test_tokenization_common.py | 475 | def get_extracted_tokenizer_from_sentencepiece(self, reference_tokenizer=None): | CODE |
| LOW | tests/test_tokenization_common.py | 495 | def tokenizer_integration_test_util( | CODE |
| LOW | tests/test_tokenization_common.py | 565 | def assert_padded_input_match(self, input_r: list, input_p: list, max_length: int, pad_token_id: int): | CODE |
| LOW | tests/test_tokenization_common.py | 575 | def assert_batch_padded_input_match( | CODE |
| LOW | tests/test_tokenization_common.py | 602 | def convert_batch_to_list_format(batch_encode_plus_sequences): | CODE |
| LOW | tests/test_tokenization_common.py | 611 | def test_tokenize_special_tokens(self): | CODE |
| LOW | tests/test_tokenization_common.py | 631 | def test_model_input_names_signature(self): | CODE |
| LOW | tests/test_tokenization_common.py | 642 | def test_tokenizer_store_full_signature(self): | CODE |
| LOW | tests/test_tokenization_common.py | 659 | def test_tokenizers_common_properties(self): | CODE |
| LOW | tests/test_tokenization_common.py | 691 | def test_tokenizers_common_ids_setters(self): | CODE |
| LOW | tests/test_tokenization_common.py | 724 | def test_save_and_load_tokenizer(self): | CODE |
| LOW | tests/test_tokenization_common.py | 855 | def test_integration_from_extractor(self): | CODE |
| LOW | tests/test_tokenization_common.py | 886 | def test_internal_consistency(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1007 | def test_chat_template_empty_conversation(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1015 | def test_chat_template_save_loading(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1057 | def test_chat_template_batched(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1131 | def test_chat_template_return_assistant_tokens_mask(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1324 | def test_chat_template_return_assistant_tokens_mask_truncated(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1435 | def test_continue_final_message(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1463 | def test_continue_final_message_with_trim(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1493 | def test_continue_final_message_with_decoy_earlier_message(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1518 | def test_continue_final_message_string_and_reasoning(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1566 | def test_chat_template_dict_saving(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1601 | def test_chat_template_dict_saving_rejects_path_traversal(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1618 | def test_chat_template_file_priority(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1631 | def test_number_of_added_tokens(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1643 | def test_maximum_encoding_length_single_input(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1733 | def test_maximum_encoding_length_pair_input(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1991 | def test_special_tokens_mask_input_pairs(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2014 | def test_padding_side_in_kwargs(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2031 | def test_truncation_side_in_kwargs(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2048 | def test_encode_basic_padding(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2077 | def test_right_and_left_truncation(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2131 | def test_padding_to_multiple_of(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2163 | def test_padding_with_attention_mask(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2181 | def test_encode_plus_with_padding(self, use_padding_as_call_kwarg: bool): | CODE |
| LOW | tests/test_tokenization_common.py | 2306 | def test_conversion_reversible(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2344 | def test_batch_encode_plus_batch_sequence_length(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2392 | def test_batch_encode_plus_padding(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2506 | def _check_no_pad_token_padding(self, tokenizer, sequences): | CODE |
| LOW | tests/test_tokenization_common.py | 2560 | def test_batch_encode_dynamic_overflowing(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2623 | def test_added_tokens_serialization(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2650 | def test_tokenizer_initialization_with_conflicting_key(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2685 | def test_pad_token_initialization(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2718 | def test_bos_token_with_add_bos_token_true(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2735 | def test_bos_token_with_add_bos_token_false(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2829 | def test_add_tokens_tokenizer(self): | CODE |
| LOW⚡ | tests/test_modeling_common.py | 2013 | def test_training_gradient_checkpointing(self): | CODE |
| 15091 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | conftest.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | conftest.py | 241 | _wrapped_hf_hub_download._ci_fallback_wrapped = True | COMMENT |
| LOW | setup.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | benchmark/benchmark.py | 1 | # Copyright 2024 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | benchmark/benchmarks_entrypoint.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | benchmark/benches/llama.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | benchmark_v2/run_benchmarks.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | tests/test_tokenization_common.py | 1 | # Copyright 2019 HuggingFace Inc. | COMMENT |
| LOW | tests/test_modeling_common.py | 1 | # Copyright 2019 HuggingFace Inc. | COMMENT |
| LOW | tests/test_configuration_common.py | 1 | # Copyright 2019 HuggingFace Inc. | COMMENT |
| LOW | tests/multimodal_tester.py | 1 | # Copyright 2026 HuggingFace Inc. | COMMENT |
| LOW | tests/test_tensor_parallel_mixin.py | 1 | # | COMMENT |
| LOW | tests/test_monkey_patching.py | 1 | # Copyright 2026 The HuggingFace Inc. team. | COMMENT |
| LOW | tests/test_processing_common.py | 1 | # Copyright 2024 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/test_processing_common.py | 181 | if cls.tiny_model_id is not None: | COMMENT |
| LOW | tests/test_backbone_common.py | 1 | # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/test_image_processing_common.py | 1 | # Copyright 2023 HuggingFace Inc. | COMMENT |
| LOW | tests/causal_lm_tester.py | 1 | # Copyright 2025 HuggingFace Inc. | COMMENT |
| LOW | tests/test_executorch.py | 1 | # Copyright 2025 HuggingFace Inc. | COMMENT |
| LOW | tests/test_feature_extraction_common.py | 1 | # Copyright 2021 HuggingFace Inc. | COMMENT |
| LOW | tests/alm_tester.py | 1 | # Copyright 2026 HuggingFace Inc. | COMMENT |
| LOW | tests/test_fsdp_mixin.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/test_video_processing_common.py | 1 | # Copyright 2025 HuggingFace Inc. | COMMENT |
| LOW | tests/test_pipeline_mixin.py | 1 | # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/test_tokenization_mistral_common.py | 1 | # Copyright 2025 Mistral AI and The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/test_memory_cleanup_mixin.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/vlm_tester.py | 1 | # Copyright 2026 HuggingFace Inc. | COMMENT |
| LOW | tests/test_training_mixin.py | 1 | # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/test_sequence_feature_extraction_common.py | 1 | # Copyright 2021 HuggingFace Inc. | COMMENT |
| LOW | tests/test_image_transforms.py | 1 | # Copyright 2022 HuggingFace Inc. | COMMENT |
| LOW | tests/kernels/test_utils.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/kernels/test_sonicmoe.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/kernels/test_deepgemm.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/kernels/test_kernels.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/kernels/test_finegrained_fp8.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/tensor_parallel/test_tensor_parallel.py | 1 | # Copyright 2024 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/peft_integration/test_peft_integration.py | 1 | # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/exporters/test_utils.py | 1 | # Copyright 2026 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/exporters/test_runtime.py | 1 | # Copyright 2026 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/exporters/test_export.py | 1 | # Copyright 2026 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/exporters/test_export.py | 61 | # to the model name so the "why" travels with the entry. | COMMENT |
| LOW | tests/optimization/test_greedy_lr.py | 1 | # Copyright 2026 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/optimization/test_optimization.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/conftest_tests/test_cache_fallback.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | …s/pipelines/test_pipelines_image_feature_extraction.py | 1 | # Copyright 2024 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_object_detection.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_common.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_text_classification.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_token_classification.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_image_text_to_text.py | 1 | # Copyright 2024 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_zero_shot.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_depth_estimation.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_mask_generation.py | 1 | # Copyright 2023 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_text_generation.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_text_to_audio.py | 1 | # Copyright 2023 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_feature_extraction.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | …ipelines/test_pipelines_document_question_answering.py | 1 | # Copyright 2022 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | …pelines/test_pipelines_automatic_speech_recognition.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_image_classification.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | …pipelines/test_pipelines_zero_shot_object_detection.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| 4317 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmark_v2/framework/benchmark_config.py | 19 | CODE | |
| LOW | tests/test_tokenization_common.py | 85 | CODE | |
| LOW | tests/test_tokenization_common.py | 85 | CODE | |
| LOW | …pipelines/test_pipelines_zero_shot_object_detection.py | 35 | CODE | |
| LOW | tests/utils/test_import_utils.py | 361 | CODE | |
| LOW | tests/utils/test_file_utils.py | 23 | CODE | |
| LOW | tests/models/mistral4/__init__.py | 17 | CODE | |
| LOW | tests/models/mistral4/__init__.py | 17 | CODE | |
| LOW | tests/models/opt/test_modeling_opt.py | 21 | CODE | |
| LOW | tests/models/fsmt/test_modeling_fsmt.py | 19 | CODE | |
| LOW | tests/tokenization/test_tokenization_utils.py | 348 | CODE | |
| LOW | utils/check_import_complexity.py | 27 | CODE | |
| LOW | …amples/modular-transformers/modular_switch_function.py | 2 | CODE | |
| LOW | src/transformers/configuration_utils.py | 17 | CODE | |
| LOW | src/transformers/image_utils.py | 38 | CODE | |
| LOW | src/transformers/image_utils.py | 38 | CODE | |
| LOW | src/transformers/image_utils.py | 38 | CODE | |
| LOW | src/transformers/image_utils.py | 38 | CODE | |
| LOW | src/transformers/image_utils.py | 38 | CODE | |
| LOW | src/transformers/image_utils.py | 38 | CODE | |
| LOW | src/transformers/modeling_rope_utils.py | 31 | CODE | |
| LOW | src/transformers/pytorch_utils.py | 14 | CODE | |
| LOW | src/transformers/image_processing_outputs.py | 20 | CODE | |
| LOW | src/transformers/_typing.py | 16 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 36 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 39 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 41 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 42 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 43 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 44 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 45 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 46 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 47 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 48 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 48 | CODE | |
| LOW | src/transformers/trainer_seq2seq.py | 49 | CODE | |
| LOW | src/transformers/feature_extraction_utils.py | 47 | CODE | |
| LOW | src/transformers/tokenization_utils_base.py | 21 | CODE | |
| LOW | src/transformers/core_model_loading.py | 16 | CODE | |
| LOW | src/transformers/safetensors_conversion.py | 3 | CODE | |
| LOW | src/transformers/processing_utils.py | 83 | CODE | |
| LOW | src/transformers/processing_utils.py | 88 | CODE | |
| LOW | src/transformers/trainer_optimizer.py | 18 | CODE | |
| LOW | src/transformers/optimization.py | 16 | CODE | |
| LOW | src/transformers/__init__.py | 30 | CODE | |
| LOW | src/transformers/__init__.py | 31 | CODE | |
| LOW | src/transformers/__init__.py | 31 | CODE | |
| LOW | src/transformers/__init__.py | 31 | CODE | |
| LOW | src/transformers/__init__.py | 31 | CODE | |
| LOW | src/transformers/__init__.py | 31 | CODE | |
| LOW | src/transformers/__init__.py | 31 | CODE | |
| LOW | src/transformers/__init__.py | 46 | CODE | |
| LOW | src/transformers/__init__.py | 47 | CODE | |
| LOW | src/transformers/__init__.py | 49 | CODE | |
| LOW | src/transformers/__init__.py | 50 | CODE | |
| LOW | src/transformers/__init__.py | 53 | CODE | |
| LOW | src/transformers/__init__.py | 495 | CODE | |
| LOW | src/transformers/__init__.py | 495 | CODE | |
| LOW | src/transformers/__init__.py | 496 | CODE | |
| LOW | src/transformers/__init__.py | 497 | CODE | |
| 3454 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmark_v2/framework/benchmark_config.py | 61 | CODE | |
| LOW | tests/test_image_processing_common.py | 259 | CODE | |
| LOW | tests/causal_lm_tester.py | 167 | CODE | |
| LOW | tests/kernels/test_utils.py | 85 | CODE | |
| LOW | tests/kernels/test_utils.py | 116 | CODE | |
| LOW | tests/utils/test_auto_docstring.py | 250 | CODE | |
| LOW | tests/models/metaclip_2/test_modeling_metaclip_2.py | 67 | CODE | |
| LOW | tests/models/metaclip_2/test_modeling_metaclip_2.py | 294 | CODE | |
| LOW | …nie4_5_vl_moe/test_video_processing_ernie4_5_vl_moe.py | 36 | CODE | |
| LOW | tests/models/solar_open/test_modeling_solar_open.py | 41 | CODE | |
| LOW | tests/models/nllb_moe/test_modeling_nllb_moe.py | 45 | CODE | |
| LOW | tests/models/sew_d/test_modeling_sew_d.py | 49 | CODE | |
| LOW | …s/table_transformer/test_modeling_table_transformer.py | 44 | CODE | |
| LOW | tests/models/bark/test_modeling_bark.py | 64 | CODE | |
| LOW | tests/models/bark/test_modeling_bark.py | 197 | CODE | |
| LOW | tests/models/bark/test_modeling_bark.py | 330 | CODE | |
| LOW | tests/models/convnextv2/test_modeling_convnextv2.py | 44 | CODE | |
| LOW | tests/models/vitpose/test_modeling_vitpose.py | 46 | CODE | |
| LOW | tests/models/mlcd/test_modeling_mlcd.py | 40 | CODE | |
| LOW | tests/models/pixtral/test_modeling_pixtral.py | 39 | CODE | |
| LOW | tests/models/xcodec2/test_modeling_xcodec2.py | 43 | CODE | |
| LOW | tests/models/glpn/test_modeling_glpn.py | 48 | CODE | |
| LOW | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 79 | CODE | |
| LOW | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 581 | CODE | |
| LOW | tests/models/biogpt/test_modeling_biogpt.py | 41 | CODE | |
| LOW | tests/models/visual_bert/test_modeling_visual_bert.py | 43 | CODE | |
| LOW | …odels/video_llava/test_video_processing_video_llava.py | 30 | CODE | |
| LOW | tests/models/video_llava/test_modeling_video_llava.py | 56 | CODE | |
| LOW | tests/models/cohere/test_modeling_cohere.py | 46 | CODE | |
| LOW | tests/models/udop/test_modeling_udop.py | 47 | CODE | |
| LOW | tests/models/udop/test_modeling_udop.py | 417 | CODE | |
| LOW | tests/models/blip_2/test_modeling_blip_2.py | 78 | CODE | |
| LOW | tests/models/blip_2/test_modeling_blip_2.py | 229 | CODE | |
| LOW | tests/models/blip_2/test_modeling_blip_2.py | 308 | CODE | |
| LOW | tests/models/blip_2/test_modeling_blip_2.py | 622 | CODE | |
| LOW | tests/models/flava/test_modeling_flava.py | 68 | CODE | |
| LOW | tests/models/flava/test_modeling_flava.py | 321 | CODE | |
| LOW | tests/models/flava/test_modeling_flava.py | 467 | CODE | |
| LOW | tests/models/flava/test_modeling_flava.py | 740 | CODE | |
| LOW | tests/models/albert/test_modeling_albert.py | 43 | CODE | |
| LOW | tests/models/videoprism/test_modeling_videoprism.py | 91 | CODE | |
| LOW | tests/models/videoprism/test_modeling_videoprism.py | 358 | CODE | |
| LOW | …/models/cohere2_vision/test_modeling_cohere2_vision.py | 53 | CODE | |
| LOW | tests/models/videomae/test_modeling_videomae.py | 61 | CODE | |
| LOW | tests/models/videomae/test_video_processing_videomae.py | 33 | CODE | |
| LOW | tests/models/vits/test_modeling_vits.py | 69 | CODE | |
| LOW | tests/models/olmoe/test_modeling_olmoe.py | 48 | CODE | |
| LOW | …/models/speech_to_text/test_modeling_speech_to_text.py | 71 | CODE | |
| LOW | …eech_to_text/test_feature_extraction_speech_to_text.py | 37 | CODE | |
| LOW | tests/models/aimv2/test_modeling_aimv2.py | 65 | CODE | |
| LOW | tests/models/aimv2/test_modeling_aimv2.py | 222 | CODE | |
| LOW | …s_transformer/test_modeling_time_series_transformer.py | 51 | CODE | |
| LOW | tests/models/mllama/test_image_processing_mllama.py | 46 | CODE | |
| LOW | tests/models/omdet_turbo/test_modeling_omdet_turbo.py | 54 | CODE | |
| LOW | tests/models/clvp/test_feature_extraction_clvp.py | 43 | CODE | |
| LOW | tests/models/clvp/test_modeling_clvp.py | 52 | CODE | |
| LOW | tests/models/clvp/test_modeling_clvp.py | 193 | CODE | |
| LOW | tests/models/m2m_100/test_modeling_m2m_100.py | 68 | CODE | |
| LOW | …pp_ocrv6_small_det/test_modeling_pp_ocrv6_small_det.py | 49 | CODE | |
| LOW | tests/models/olmo2/test_modeling_olmo2.py | 49 | CODE | |
| 2015 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmark/benchmarks_entrypoint.py | 310 | logger = logging.getLogger(__name__) | CODE |
| LOW | benchmark_v2/framework/benchmark_config.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/pipelines/test_pipelines_common.py | 68 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/sagemaker/scripts/pytorch/run_ddp.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | …agemaker/scripts/pytorch/run_glue_model_parallelism.py | 59 | logger = logging.getLogger(__name__) | CODE |
| LOW | utils/github_utils.py | 40 | logger = logging.getLogger(__name__) | CODE |
| LOW | utils/get_ci_error_statistics.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | utils/get_previous_daily_ci.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/3D_parallel.py | 67 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/scheduler/run_greedy.py | 50 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/3d_parallel_checks.py | 68 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/3d_parallel_checks.py | 765 | def update_model_parameters(model: nn.Module) -> None: | CODE |
| LOW | examples/pytorch/question-answering/run_qa.py | 53 | logger = logging.getLogger(__name__) | CODE |
| LOW | …mples/pytorch/question-answering/run_qa_beam_search.py | 52 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/question-answering/utils_qa.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/question-answering/run_seq2seq_qa.py | 51 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/text-generation/run_generation.py | 63 | logger = logging.getLogger(__name__) | CODE |
| LOW | …torch/audio-classification/run_audio_classification.py | 52 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/translation/run_translation.py | 72 | logger = logging.getLogger(__name__) | CODE |
| LOW | …rch/semantic-segmentation/run_semantic_segmentation.py | 59 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/summarization/run_summarization.py | 73 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/image-pretraining/run_mae.py | 49 | logger = logging.getLogger(__name__) | CODE |
| LOW | …amples/pytorch/image-pretraining/run_mim_no_trainer.py | 63 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/image-pretraining/run_mim.py | 54 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/text-classification/run_glue.py | 80 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/text-classification/run_xnli.py | 67 | logger = logging.getLogger(__name__) | CODE |
| LOW | …ples/pytorch/text-classification/run_classification.py | 67 | logger = logging.getLogger(__name__) | CODE |
| LOW | …torch/image-classification/run_image_classification.py | 66 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/language-modeling/run_clm.py | 74 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/language-modeling/run_plm.py | 66 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/language-modeling/run_fim.py | 77 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/language-modeling/run_mlm.py | 73 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/token-classification/run_ner.py | 64 | logger = logging.getLogger(__name__) | CODE |
| LOW | …mples/pytorch/object-detection/run_object_detection.py | 58 | logger = logging.getLogger(__name__) | CODE |
| LOW | …torch/speech-recognition/run_speech_recognition_ctc.py | 69 | logger = logging.getLogger(__name__) | CODE |
| LOW | …h/speech-recognition/run_speech_recognition_seq2seq.py | 68 | logger = logging.getLogger(__name__) | CODE |
| LOW | …eech-recognition/run_speech_recognition_ctc_adapter.py | 72 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/contrastive-image-text/run_clip.py | 61 | logger = logging.getLogger(__name__) | CODE |
| LOW | …e-segmentation/run_instance_segmentation_no_trainer.py | 63 | logger = logging.getLogger(__name__) | CODE |
| LOW | …rch/instance-segmentation/run_instance_segmentation.py | 56 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/pytorch/multiple-choice/run_swag.py | 60 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | src/transformers/_typing.py | 162 | def set_output_embeddings(self, value: Any) -> None: ... | CODE |
| LOW⚡ | src/transformers/_typing.py | 163 | def set_input_embeddings(self, value: Any) -> None: ... | CODE |
| LOW | src/transformers/testing_utils.py | 4809 | def _update_peak(self) -> None: | STRING |
| LOW | src/transformers/trainer_optimizer.py | 51 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/transformers/training_args_seq2seq.py | 24 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/transformers/trainer.py | 1176 | def _set_signature_columns_if_needed(self) -> None: | CODE |
| LOW | src/transformers/utils/logging.py | 196 | def set_verbosity(verbosity: int) -> None: | CODE |
| LOW | src/transformers/utils/network_logging.py | 160 | def set_shared_dir(self, shared_dir: str) -> None: | CODE |
| LOW | src/transformers/utils/network_logging.py | 483 | __all__ = [ | CODE |
| LOW | …/transformers/utils/chat_parsing/response_templates.py | 241 | __all__ = ["ResponseTemplate", "ResponseTemplateField", "load_response_template"] | CODE |
| LOW | src/transformers/utils/chat_parsing/__init__.py | 20 | __all__ = ["ResponseParser", "parse_response"] | CODE |
| LOW | src/transformers/utils/chat_parsing/content_parsers.py | 243 | __all__ = [ | CODE |
| LOW | src/transformers/models/dots1/configuration_dots1.py | 130 | __all__ = ["Dots1Config"] | STRING |
| LOW | src/transformers/models/dots1/modular_dots1.py | 266 | __all__ = [ | CODE |
| LOW | src/transformers/models/dots1/modeling_dots1.py | 614 | __all__ = ["Dots1PreTrainedModel", "Dots1Model", "Dots1ForCausalLM"] | CODE |
| LOW | …sformers/models/metaclip_2/configuration_metaclip_2.py | 240 | __all__ = ["MetaClip2Config", "MetaClip2TextConfig", "MetaClip2VisionConfig"] | CODE |
| LOW | …/transformers/models/metaclip_2/modeling_metaclip_2.py | 1160 | __all__ = [ | STRING |
| LOW | …c/transformers/models/metaclip_2/modular_metaclip_2.py | 618 | __all__ = [ | CODE |
| LOW | …s/models/ernie4_5_vl_moe/processing_ernie4_5_vl_moe.py | 179 | __all__ = ["Ernie4_5_VLMoeProcessor"] | CODE |
| 1927 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_tensor_parallel_mixin.py | 46 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 48 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 69 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 71 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 484 | # ============================================================ | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 486 | # ============================================================ | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 497 | # ============================================================ | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 499 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/test_processing_common.py | 1072 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tests/test_processing_common.py | 1075 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tests/test_fsdp_mixin.py | 62 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_fsdp_mixin.py | 64 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_fsdp_mixin.py | 85 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_fsdp_mixin.py | 87 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_fsdp_mixin.py | 196 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | tests/test_fsdp_mixin.py | 198 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_fsdp_mixin.py | 334 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_fsdp_mixin.py | 336 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_fsdp_mixin.py | 591 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_fsdp_mixin.py | 593 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_pipeline_mixin.py | 410 | # --------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_training_mixin.py | 42 | # ============================================================ | COMMENT |
| MEDIUM | tests/test_training_mixin.py | 44 | # ============================================================ | COMMENT |
| MEDIUM | tests/test_training_mixin.py | 61 | # ============================================================ | COMMENT |
| MEDIUM | tests/test_training_mixin.py | 63 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/test_training_mixin.py | 77 | # ============================================================ | COMMENT |
| MEDIUM⚡ | tests/test_training_mixin.py | 79 | # ============================================================ | COMMENT |
| MEDIUM | tests/kernels/test_deepgemm.py | 249 | # ── Capturing fake DeepGEMM bundle ───────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/kernels/test_deepgemm.py | 374 | # ── deepgemm_fp8_fp4_linear ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/kernels/test_deepgemm.py | 456 | # ── deepgemm_bf16_experts_forward ────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/kernels/test_deepgemm.py | 527 | # ── deepgemm_fp8_fp4_experts_forward ─────────────────────────────────────── | COMMENT |
| MEDIUM | tests/kernels/test_deepgemm.py | 561 | # ── deepgemm_fp8_fp4_megamoe_experts_forward ─────────────────────────────── | COMMENT |
| MEDIUM | tests/kernels/test_finegrained_fp8.py | 193 | # ── finegrained_fp8_linear ──────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/kernels/test_finegrained_fp8.py | 222 | # ── fp8_batched_mm_experts_forward ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/kernels/test_finegrained_fp8.py | 290 | # ── fp8_grouped_mm_experts_forward ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 75 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 77 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 173 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 175 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 222 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 224 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 261 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 264 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_runtime.py | 85 | # ──────────────────── torch.export (Dynamo) ──────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_runtime.py | 151 | # ──────────────────────── ONNX Runtime ──────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 54 | # ──────────────────────────── skip lists ──────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 487 | # ──────────────────────────── ONNX optimization toggles ──────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 633 | # ──────────────────────────── helpers ──────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 854 | # ──────────────────────────── mixins ──────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 1016 | # ──────────────────── torch.export tests ───────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 1050 | # ──────────────────────── ONNX tests ───────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 1086 | # ──────────────────── OpenVINO tests ───────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 1118 | # ──────────────────── ExecuTorch tests ─────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 1208 | # ──────────────────── torch.export tests ───────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 1251 | # ──────────────────────── ONNX tests ───────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 1288 | # ──────────────────── OpenVINO tests ───────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 1320 | # ──────────────────── ExecuTorch tests ─────────────────────── | COMMENT |
| MEDIUM | tests/utils/test_auto_docstring.py | 819 | # --------------------------------------------------------------------------- | STRING |
| MEDIUM | tests/utils/test_auto_docstring.py | 821 | # --------------------------------------------------------------------------- | STRING |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 191 | # ------------------------ | COMMENT |
| 446 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | conftest.py | 67 | CODE | |
| LOW | benchmark/benchmark.py | 60 | CODE | |
| LOW | benchmark_v2/framework/hardware_metrics.py | 160 | CODE | |
| LOW | benchmark_v2/framework/benchmark_runner.py | 82 | CODE | |
| LOW | benchmark_v2/framework/benchmark_runner.py | 445 | CODE | |
| LOW | benchmark_v2/framework/data_classes.py | 21 | CODE | |
| LOW | benchmark_v2/framework/benchmark_config.py | 271 | CODE | |
| LOW | tests/test_tokenization_common.py | 135 | CODE | |
| LOW | tests/test_tokenization_common.py | 225 | CODE | |
| LOW | tests/test_tokenization_common.py | 1131 | CODE | |
| LOW | tests/test_tokenization_common.py | 1324 | CODE | |
| LOW | tests/test_tokenization_common.py | 1643 | CODE | |
| LOW | tests/test_tokenization_common.py | 1733 | CODE | |
| LOW | tests/test_tokenization_common.py | 2623 | CODE | |
| LOW | tests/test_modeling_common.py | 166 | CODE | |
| LOW | tests/test_modeling_common.py | 567 | CODE | |
| LOW | tests/test_modeling_common.py | 764 | CODE | |
| LOW | tests/test_modeling_common.py | 935 | CODE | |
| LOW | tests/test_modeling_common.py | 971 | CODE | |
| LOW | tests/test_modeling_common.py | 1159 | CODE | |
| LOW | tests/test_modeling_common.py | 1524 | CODE | |
| LOW | tests/test_modeling_common.py | 1660 | CODE | |
| LOW | tests/test_modeling_common.py | 1778 | CODE | |
| LOW | tests/test_modeling_common.py | 1899 | CODE | |
| LOW | tests/test_modeling_common.py | 2309 | CODE | |
| LOW | tests/test_modeling_common.py | 2388 | CODE | |
| LOW | tests/test_modeling_common.py | 2570 | CODE | |
| LOW | tests/test_modeling_common.py | 2768 | CODE | |
| LOW | tests/test_modeling_common.py | 2794 | CODE | |
| LOW | tests/test_modeling_common.py | 2840 | CODE | |
| LOW | tests/test_modeling_common.py | 2915 | CODE | |
| LOW | tests/test_modeling_common.py | 2973 | CODE | |
| LOW | tests/test_modeling_common.py | 3239 | CODE | |
| LOW | tests/test_modeling_common.py | 3282 | CODE | |
| LOW | tests/test_modeling_common.py | 3320 | CODE | |
| LOW | tests/test_modeling_common.py | 3366 | CODE | |
| LOW | tests/test_modeling_common.py | 3410 | CODE | |
| LOW | tests/test_modeling_common.py | 3512 | CODE | |
| LOW | tests/test_modeling_common.py | 3731 | CODE | |
| LOW | tests/test_modeling_common.py | 3791 | CODE | |
| LOW | tests/test_modeling_common.py | 3828 | CODE | |
| LOW | tests/test_modeling_common.py | 3912 | CODE | |
| LOW | tests/test_modeling_common.py | 4003 | CODE | |
| LOW | tests/test_modeling_common.py | 4065 | CODE | |
| LOW | tests/test_modeling_common.py | 4155 | CODE | |
| LOW | tests/test_modeling_common.py | 4431 | CODE | |
| LOW | tests/test_modeling_common.py | 4655 | CODE | |
| LOW | tests/test_modeling_common.py | 4698 | CODE | |
| LOW | tests/test_modeling_common.py | 4823 | CODE | |
| LOW | tests/test_modeling_common.py | 4890 | CODE | |
| LOW | tests/test_modeling_common.py | 5328 | CODE | |
| LOW | tests/test_modeling_common.py | 5509 | CODE | |
| LOW | tests/test_modeling_common.py | 5651 | CODE | |
| LOW | tests/test_modeling_common.py | 5801 | CODE | |
| LOW | tests/test_modeling_common.py | 5901 | CODE | |
| LOW | tests/test_modeling_common.py | 5940 | CODE | |
| LOW | tests/test_modeling_common.py | 5970 | CODE | |
| LOW | tests/test_modeling_common.py | 1532 | CODE | |
| LOW | tests/test_modeling_common.py | 2980 | CODE | |
| LOW | tests/test_modeling_common.py | 4443 | CODE | |
| 1624 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | benchmark/benchmarks_entrypoint.py | 428 | # Create a global metrics recorder | COMMENT |
| MEDIUM | benchmark_v2/framework/data_classes.py | 150 | # Create a new instance and accumulate the data | COMMENT |
| MEDIUM | tests/test_monkey_patching.py | 155 | # Create a dummy module in transformers namespace for testing | COMMENT |
| MEDIUM | tests/test_tokenizers_backend_mixin.py | 383 | # Create a new mapping from the special tokens defined in the original tokenizer | COMMENT |
| MEDIUM⚡ | tests/test_training_mixin.py | 87 | # Create a deterministic sequence (not random, so model can learn it) | COMMENT |
| MEDIUM | tests/kernels/test_kernels.py | 857 | # Create a mock model on CUDA device | COMMENT |
| MEDIUM | tests/kernels/test_kernels.py | 892 | # Create a mock model | COMMENT |
| MEDIUM | tests/peft_integration/test_peft_integration.py | 1390 | # Create a temporary directory with a complete adapter model structure | COMMENT |
| MEDIUM⚡ | tests/optimization/test_greedy_lr.py | 193 | # Create a new scheduler and load state | COMMENT |
| MEDIUM | tests/pipelines/test_pipelines_common.py | 399 | # Create a temporary directory with a complete adapter model structure | COMMENT |
| MEDIUM | tests/utils/test_masking_utils.py | 331 | # Create a new input after the prefill | COMMENT |
| MEDIUM | tests/models/udop/test_tokenization_udop.py | 133 | # # Create a minimal mock tokenizer for the converter | COMMENT |
| MEDIUM | tests/models/udop/test_tokenization_udop.py | 1240 | # Create a new mapping from the special tokens defined in the original tokenizer | COMMENT |
| MEDIUM | tests/models/flava/test_modeling_flava.py | 1145 | # Create a clone of the input_ids tensor that will be its masked version | COMMENT |
| MEDIUM | tests/models/flava/test_modeling_flava.py | 1193 | # Create a clone of the input_ids tensor that will be its masked version | COMMENT |
| MEDIUM | …cohere2_vision/test_image_processing_cohere2_vision.py | 147 | # Create a 2:3 aspect ratio image (2 rows x 3 columns of patches) | COMMENT |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 379 | # Create a temp file that calls the worker | COMMENT |
| MEDIUM | tests/models/lighton_ocr/test_modeling_lighton_ocr.py | 466 | # Create a small config for fast testing | COMMENT |
| MEDIUM | …ts/models/superglue/test_image_processing_superglue.py | 373 | # Create a specific scenario with intentional padding issues | COMMENT |
| MEDIUM | …ts/models/superglue/test_image_processing_superglue.py | 392 | # Create a match that points to a padded keypoint in image 1 | COMMENT |
| MEDIUM | …ts/models/superglue/test_image_processing_superglue.py | 397 | # Create a valid match for comparison | COMMENT |
| MEDIUM | tests/models/markuplm/test_tokenization_markuplm.py | 1245 | # Create a new mapping from the special tokens defined in the original tokenizer | COMMENT |
| MEDIUM | tests/models/gemma3/test_modeling_gemma3.py | 394 | # Create a sequence of 13 tokens: 0..4 text, 5..11 image (7 tokens), 12 text | COMMENT |
| MEDIUM | tests/models/colqwen2/test_processing_colqwen2.py | 218 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/models/nemotron_h/test_modeling_nemotron_h.py | 821 | # Create a legacy config.json | COMMENT |
| MEDIUM | tests/models/gemma4/test_modeling_gemma4.py | 724 | # Create a sequence of 13 tokens: 0..4 text, 5..11 image (7 tokens), 12 text | COMMENT |
| MEDIUM | tests/models/auto/test_video_processing_auto.py | 87 | # Create a dummy config file with image_processor_type | COMMENT |
| MEDIUM | tests/models/auto/test_image_processing_auto.py | 103 | # Create a dummy config file with image_processor_type | COMMENT |
| MEDIUM | tests/models/auto/test_modeling_auto.py | 576 | # Create a temporary directory with a complete adapter model structure | COMMENT |
| MEDIUM | …ts/models/oneformer/test_image_processing_oneformer.py | 230 | # Create a temporary json file | COMMENT |
| MEDIUM | tests/models/layoutlmv2/test_tokenization_layoutlmv2.py | 1284 | # Create a new mapping from the special tokens defined in the original tokenizer | COMMENT |
| MEDIUM | tests/models/layoutlmv3/test_tokenization_layoutlmv3.py | 1330 | # Create a new mapping from the special tokens defined in the original tokenizer | COMMENT |
| MEDIUM | tests/models/colpali/test_processing_colpali.py | 211 | # Define the kwargs for each modality | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 235 | # Create a small image (256x256) | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 253 | # Create a small image that won't exceed the max_image_tokens threshold | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 269 | # Create a large image (2048x2048) | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 288 | # Create a large image that will require tiling | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 338 | # Create a landscape image (1920x1080, ~16:9 aspect ratio) | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 357 | # Create an extremely wide image (3000x500) | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 376 | # Create an extremely tall image (500x3000) | COMMENT |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 313 | # Create a large image that will require tiling | COMMENT |
| MEDIUM | tests/models/janus/test_processing_janus.py | 364 | # Create a simple text message for testing | COMMENT |
| MEDIUM⚡ | …modernbert_decoder/test_modeling_modernbert_decoder.py | 100 | # Create a longer input to test sliding window attention | COMMENT |
| 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 | COMMENT |
| MEDIUM | tests/models/idefics/test_modeling_idefics.py | 180 | # Create a list of configs and inputs, to test 2 things: | COMMENT |
| MEDIUM | tests/models/moshi/test_tokenization_moshi.py | 219 | # Create a new mapping from the special tokens defined in the original tokenizer | COMMENT |
| MEDIUM | tests/models/csm/test_modeling_csm.py | 300 | # Creating a 4D mask where each of the last 3 tokens do not attend to each other. | COMMENT |
| MEDIUM | tests/models/csm/test_modeling_csm.py | 320 | # Creating a position_ids tensor. note the repeating figures in the end. | COMMENT |
| MEDIUM | tests/models/layoutxlm/test_tokenization_layoutxlm.py | 1443 | # Create a new mapping from the special tokens defined in the original tokenizer | COMMENT |
| MEDIUM | tests/models/vitdet/test_modeling_vitdet.py | 296 | # Create a dummy input tensor with non-square spatial dimensions. | COMMENT |
| MEDIUM | tests/models/bartpho/test_tokenization_bartpho.py | 44 | # Create a temporary directory for this tokenizer | COMMENT |
| MEDIUM | …odels/colmodernvbert/test_processing_colmodernvbert.py | 195 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | …odels/bert_japanese/test_tokenization_bert_japanese.py | 47 | # Create a separate temp directory for the vocab file to avoid conflicts | COMMENT |
| MEDIUM | …odels/bert_japanese/test_tokenization_bert_japanese.py | 369 | # Create a separate temp directory for the vocab file to avoid conflicts | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_optimizers.py | 508 | # Create a mock optimizer class | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_optimizers.py | 517 | # Create a factory class (simulates Muon/Dion pattern) | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_optimizers.py | 574 | # Create a mock optimizer class | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_optimizers.py | 583 | # Create a factory class (simulates Muon/Dion pattern) | COMMENT |
| MEDIUM | tests/trainer/trainer_test_utils.py | 432 | # Create a datasets.Dataset | COMMENT |
| MEDIUM | tests/trainer/test_trainer_evaluation.py | 162 | # Create a dummy batch of inputs | COMMENT |
| 239 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | conftest.py | 63 | except OSError: | CODE |
| HIGH | conftest.py | 75 | except OSError: | CODE |
| HIGH | benchmark_v2/framework/benchmark_config.py | 22 | except ImportError: | CODE |
| HIGH | tests/causal_lm_tester.py | 89 | except ValueError: | CODE |
| HIGH | tests/test_memory_cleanup_mixin.py | 217 | except AttributeError: | CODE |
| HIGH | tests/exporters/test_export.py | 593 | except ImportError: | CODE |
| HIGH | tests/pipelines/test_pipelines_common.py | 1057 | except HfHubHTTPError: | CODE |
| HIGH | tests/utils/test_import_utils.py | 311 | except OSError: | CODE |
| HIGH | tests/utils/test_import_utils.py | 320 | except ImportError: | CODE |
| HIGH | tests/utils/test_testing_utils.py | 174 | except RuntimeError: | CODE |
| HIGH | tests/models/auto/test_tokenization_auto.py | 864 | except ValueError: | CODE |
| HIGH | tests/models/byt5/test_tokenization_byt5.py | 57 | except UnicodeDecodeError: | CODE |
| HIGH | tests/models/perceiver/test_tokenization_perceiver.py | 57 | except UnicodeDecodeError: | CODE |
| HIGH | tests/cli/test_serve.py | 84 | except Exception: # noqa: S110 | CODE |
| HIGH | tests/tokenization/test_tokenization_utils.py | 441 | except import_protobuf_decode_error(): | CODE |
| HIGH | utils/check_docstrings.py | 404 | except (OSError, SyntaxError): | CODE |
| HIGH | utils/checkers.py | 553 | except (OSError, ValueError, KeyError): | CODE |
| HIGH | utils/checkers.py | 572 | except OSError: | CODE |
| HIGH | utils/checkers.py | 262 | except OSError: | CODE |
| HIGH | utils/checkers.py | 140 | except (ValueError, TypeError): | CODE |
| HIGH | utils/check_config_docstrings.py | 86 | except (OSError, TypeError): | CODE |
| HIGH | utils/check_noisy_comments.py | 155 | except OSError: | CODE |
| HIGH | utils/fetch_hub_objects_for_ci.py | 261 | except shutil.SameFileError: | CODE |
| HIGH | utils/check_import_complexity.py | 180 | except ValueError: | CODE |
| HIGH | utils/check_repo.py | 1407 | except ImportError: | CODE |
| HIGH | …torch/speech-recognition/run_speech_recognition_ctc.py | 546 | except OSError: | CODE |
| HIGH | …eech-recognition/run_speech_recognition_ctc_adapter.py | 545 | except OSError: | CODE |
| HIGH | src/transformers/modeling_rope_utils.py | 168 | except ValueError: | CODE |
| HIGH | src/transformers/modeling_rope_utils.py | 232 | except ValueError: | CODE |
| HIGH | src/transformers/modeling_rope_utils.py | 314 | except ValueError: | CODE |
| HIGH | src/transformers/modeling_rope_utils.py | 405 | except ValueError: | CODE |
| HIGH | src/transformers/modeling_rope_utils.py | 538 | except ValueError: | CODE |
| HIGH | src/transformers/modeling_rope_utils.py | 627 | except ValueError: | CODE |
| HIGH | src/transformers/video_utils.py | 201 | except (IndexError, TypeError): | CODE |
| HIGH | src/transformers/testing_utils.py | 437 | except ImportError: | CODE |
| HIGH | src/transformers/core_model_loading.py | 1244 | except StopIteration: | CODE |
| HIGH | src/transformers/processing_utils.py | 1304 | except EntryNotFoundError: | CODE |
| HIGH | src/transformers/modelcard.py | 201 | except (httpx.HTTPError, HFValidationError, OfflineModeIsEnabled): | CODE |
| HIGH | …formers/convert_slow_tokenizers_checkpoints_to_fast.py | 43 | except AttributeError: | CODE |
| HIGH | src/transformers/dynamic_module_utils.py | 843 | except OSError: # no requirements.txt | CODE |
| HIGH | src/transformers/modeling_utils.py | 315 | except (OSError, ValueError): | CODE |
| HIGH | src/transformers/modeling_utils.py | 4885 | except AttributeError: | CODE |
| HIGH | src/transformers/modeling_utils.py | 4889 | except AttributeError: | CODE |
| HIGH | src/transformers/modeling_utils.py | 4798 | except AttributeError: | CODE |
| HIGH | src/transformers/trainer.py | 2316 | except (TypeError, AttributeError): | CODE |
| HIGH | src/transformers/exporters/utils.py | 228 | except (SystemError, KeyError): | CODE |
| HIGH | src/transformers/utils/auto_docstring.py | 4499 | except KeyError: | CODE |
| HIGH | src/transformers/utils/auto_docstring.py | 4501 | except ImportError: | CODE |
| HIGH | src/transformers/utils/hub.py | 161 | except (HfHubHTTPError, OfflineModeIsEnabled, httpx.NetworkError): | CODE |
| HIGH | src/transformers/utils/network_logging.py | 187 | except (OSError, json.JSONDecodeError): | CODE |
| HIGH | src/transformers/utils/network_logging.py | 83 | except httpx.ResponseNotRead: | CODE |
| HIGH | src/transformers/utils/import_utils.py | 1257 | except Exception: # noqa: S110 # we don't care about the Exception here: we just want to check availability | CODE |
| HIGH | src/transformers/utils/import_utils.py | 1285 | except Exception: # noqa: S110 # we don't care about the Exception here: we just want to check availability | CODE |
| HIGH | src/transformers/utils/import_utils.py | 2819 | except (ImportError, AttributeError): | CODE |
| HIGH | …s/models/ernie4_5_vl_moe/processing_ernie4_5_vl_moe.py | 65 | except SameFileError: # already exists which we allow (copy if needed) | CODE |
| HIGH | …ls/ernie4_5_vl_moe/video_processing_ernie4_5_vl_moe.py | 300 | except SameFileError: # already exists which we allow (copy if needed) | CODE |
| HIGH | …udio_v2_tokenizer/modeling_higgs_audio_v2_tokenizer.py | 122 | except (ValueError, AttributeError): | CODE |
| HIGH | src/transformers/models/auto/image_processing_auto.py | 658 | except ValueError: | CODE |
| HIGH | src/transformers/models/auto/video_processing_auto.py | 394 | except ValueError: | CODE |
| HIGH | src/transformers/models/auto/processing_auto.py | 314 | except ValueError: | CODE |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/transformers/configuration_utils.py | 791 | Instantiate a [`PreTrainedConfig`] (or a derived class) from a pretrained model configuration. Args: | STRING |
| HIGH | src/transformers/pytorch_utils.py | 130 | This function chunks the `input_tensors` into smaller input tensor parts of size `chunk_size` over the dimension | STRING |
| HIGH | src/transformers/feature_extraction_utils.py | 297 | Instantiate a type of [`~feature_extraction_utils.FeatureExtractionMixin`] from a feature extractor, *e.g.* a | STRING |
| HIGH | src/transformers/tokenization_utils_base.py | 1107 | Add a dictionary of special tokens (eos, pad, cls, etc.) to the encoder and link them to class attributes. If | STRING |
| HIGH | src/transformers/tokenization_utils_base.py | 1210 | #TODO remove this from here! PreTrainedTokenizerBase should be agnostic of AddedToken. Add a list of n | STRING |
| 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 | STRING |
| HIGH | src/transformers/image_processing_base.py | 95 | Instantiate a type of [`~image_processing_utils.ImageProcessingMixin`] from an image processor. Args: | STRING |
| 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 | STRING |
| HIGH | src/transformers/tokenization_python.py | 1301 | Create a mask from the two sequences passed to be used in a sequence-pair classification task. This me | STRING |
| HIGH | src/transformers/audio_utils.py | 475 | Map a language code or name to its canonical form, with validation. Accepts either a language code (e.g. ``"zh | STRING |
| HIGH | src/transformers/dynamic_module_utils.py | 528 | Extracts a class from a module file, present in the local folder or repository of a model. <Tip warning={true} | STRING |
| 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 | STRING |
| HIGH | src/transformers/video_processing_utils.py | 153 | Instantiate a type of [`~video_processing_utils.VideoProcessorBase`] from an video processor. Args: | STRING |
| HIGH | src/transformers/pipelines/__init__.py | 723 | Utility factory method to build a [`Pipeline`]. A pipeline consists of: - One or more components for | STRING |
| 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 | STRING |
| HIGH | src/transformers/utils/chat_template_utils.py | 253 | This function generates a JSON schema for a given function, based on its docstring and type hints. This is most | STRING |
| HIGH | src/transformers/utils/hub.py | 320 | Tries to locate a file in a local folder and repo, downloads and cache it if necessary. Args: path_or_ | STRING |
| HIGH | src/transformers/utils/hub.py | 393 | Tries to locate several files in a local folder and repo, downloads and cache them if necessary. Args: | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | src/transformers/models/clvp/modeling_clvp.py | 1367 | This method can be used to extract speech_embeds. The speech embeddings are obtained by applying the speech | STRING |
| HIGH | …/conditional_detr/image_processing_conditional_detr.py | 125 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and | STRING |
| HIGH | …ditional_detr/image_processing_pil_conditional_detr.py | 401 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and | STRING |
| HIGH | …s/models/maskformer/image_processing_pil_maskformer.py | 241 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and | STRING |
| HIGH | …rmers/models/maskformer/image_processing_maskformer.py | 90 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and | STRING |
| 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 | STRING |
| HIGH | …/transformers/models/eomt/image_processing_pil_eomt.py | 186 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and | STRING |
| 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 | STRING |
| 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: | STRING |
| HIGH | src/transformers/models/auto/configuration_auto.py | 304 | Instantiate one of the configuration classes of the library from a pretrained model configuration. The | STRING |
| HIGH | src/transformers/models/auto/image_processing_auto.py | 225 | Loads the image processor configuration from a pretrained model image processor configuration. Args: p | STRING |
| HIGH | src/transformers/models/auto/video_processing_auto.py | 152 | Loads the video processor configuration from a pretrained model video processor configuration. Args: p | STRING |
| HIGH | src/transformers/models/auto/feature_extraction_auto.py | 129 | Loads the feature extractor configuration from a pretrained model feature extractor configuration. Args: | STRING |
| HIGH | src/transformers/models/auto/tokenization_auto.py | 568 | Loads the tokenizer configuration from a pretrained model tokenizer configuration. Args: pretrained_mo | STRING |
| HIGH | …/transformers/models/bertweet/tokenization_bertweet.py | 543 | Remove entities from text by converting them to their corresponding unicode character. Args: text: | STRING |
| HIGH | …formers/models/oneformer/image_processing_oneformer.py | 171 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and | STRING |
| HIGH | …ers/models/oneformer/image_processing_pil_oneformer.py | 264 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and | STRING |
| HIGH | …ers/models/mask2former/image_processing_mask2former.py | 122 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and | STRING |
| HIGH | …models/mask2former/image_processing_pil_mask2former.py | 246 | Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and | STRING |
| 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 | STRING |
| HIGH | …s/models/diffusion_gemma/generation_diffusion_gemma.py | 559 | Generates text using the diffusion model. It contains an outer loop doing autoregressive generation of | STRING |
| HIGH | src/transformers/models/blip/modeling_blip.py | 1079 | Overrides *generate* function to be able to use the model as a conditional generator Parameters: | STRING |
| HIGH | …ransformers/models/timesformer/modeling_timesformer.py | 488 | Examples: ```python >>> import av >>> import numpy as np >>> from transformer | STRING |
| HIGH | …ransformers/models/timesformer/modeling_timesformer.py | 619 | Examples: ```python >>> import av >>> import torch >>> import numpy as np | STRING |
| HIGH | src/transformers/models/patchtst/modeling_patchtst.py | 1095 | Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requ | STRING |
| HIGH | src/transformers/models/patchtst/modeling_patchtst.py | 1232 | Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requ | STRING |
| HIGH | src/transformers/models/patchtst/modeling_patchtst.py | 1600 | Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requ | STRING |
| HIGH | src/transformers/models/vivit/modular_vivit.py | 172 | Examples: ```python >>> import av >>> import numpy as np >>> from transformer | STRING |
| HIGH | src/transformers/models/vivit/modular_vivit.py | 298 | Examples: ```python >>> import av >>> import numpy as np >>> import torch | STRING |
| HIGH | src/transformers/models/vivit/modeling_vivit.py | 343 | Examples: ```python >>> import av >>> import numpy as np >>> from transformer | STRING |
| HIGH | src/transformers/models/vivit/modeling_vivit.py | 469 | Examples: ```python >>> import av >>> import numpy as np >>> import torch | STRING |
| HIGH | …rmers/models/efficientloftr/modeling_efficientloftr.py | 862 | Copied from kornia library : kornia/geometry/subpix/dsnt.py:76 Compute the expectation of coordinate values usi | STRING |
| HIGH | src/transformers/models/x_clip/modeling_x_clip.py | 672 | Examples: ```python >>> import av >>> import torch >>> import numpy as np | STRING |
| HIGH | src/transformers/models/x_clip/modeling_x_clip.py | 993 | return_loss (`bool`, *optional*): Whether or not to return the contrastive loss. Examples: | STRING |
| HIGH | src/transformers/models/x_clip/modeling_x_clip.py | 1148 | Examples: ```python >>> import av >>> import torch >>> import numpy as np | STRING |
| HIGH | src/transformers/models/x_clip/modular_x_clip.py | 287 | Examples: ```python >>> import av >>> import torch >>> import numpy as np | STRING |
| HIGH | src/transformers/models/x_clip/modular_x_clip.py | 559 | Examples: ```python >>> import av >>> import torch >>> import numpy as np | STRING |
| HIGH | src/transformers/models/x_clip/modular_x_clip.py | 655 | return_loss (`bool`, *optional*): Whether or not to return the contrastive loss. Examples: | STRING |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmark/benchmarks_entrypoint.py | 374 | except Exception as e: | CODE |
| LOW | benchmark/benchmarks_entrypoint.py | 392 | except Exception as e: | CODE |
| LOW | benchmark/benchmarks_entrypoint.py | 454 | except Exception as e: | CODE |
| LOW | benchmark/benchmarks_entrypoint.py | 486 | except Exception as e: | CODE |
| LOW | benchmark/benchmarks_entrypoint.py | 499 | except Exception as e: | CODE |
| MEDIUM | benchmark/benchmarks_entrypoint.py | 367 | def import_from_path(module_name, file_path): | CODE |
| LOW | benchmark/benches/llama.py | 94 | except Exception as e: | CODE |
| LOW | benchmark/benches/llama.py | 345 | except Exception as e: | CODE |
| LOW | …rk_v2/benchmark_scripts/continuous_batching_overall.py | 274 | except Exception as e: | CODE |
| LOW | benchmark_v2/framework/hardware_metrics.py | 45 | except Exception: | CODE |
| LOW | benchmark_v2/framework/hardware_metrics.py | 178 | except Exception: | CODE |
| LOW⚡ | benchmark_v2/framework/hardware_metrics.py | 197 | except Exception as e: | CODE |
| LOW⚡ | benchmark_v2/framework/hardware_metrics.py | 207 | except Exception as e: | CODE |
| LOW⚡ | benchmark_v2/framework/hardware_metrics.py | 212 | except Exception as e: | CODE |
| LOW⚡ | benchmark_v2/framework/hardware_metrics.py | 218 | except Exception as e: | CODE |
| LOW | benchmark_v2/framework/hardware_metrics.py | 265 | except Exception: | CODE |
| LOW | benchmark_v2/framework/benchmark_runner.py | 367 | except Exception as e: | CODE |
| LOW | benchmark_v2/framework/benchmark_config.py | 46 | except Exception as _: | CODE |
| LOW | tests/test_tokenization_common.py | 294 | except Exception: | CODE |
| LOW | tests/test_tokenization_common.py | 2771 | except Exception as e: | CODE |
| LOW | tests/test_tokenization_common.py | 2886 | except Exception as e: | CODE |
| LOW⚡ | tests/test_modeling_common.py | 2578 | except Exception as e: | CODE |
| LOW⚡ | tests/test_modeling_common.py | 2692 | except Exception as e: | CODE |
| LOW | tests/test_modeling_common.py | 286 | except Exception as _: | CODE |
| LOW | tests/test_modeling_common.py | 2801 | except Exception as e: | CODE |
| LOW | tests/test_modeling_common.py | 6461 | except Exception as e: | CODE |
| LOW | tests/test_processing_common.py | 292 | except Exception as e: | CODE |
| LOW | tests/test_processing_common.py | 710 | except Exception: | CODE |
| LOW | tests/test_fsdp_mixin.py | 176 | except Exception as e: | CODE |
| LOW | tests/test_fsdp_mixin.py | 699 | except Exception: | CODE |
| LOW | tests/test_pipeline_mixin.py | 376 | except Exception: | CODE |
| LOW | tests/test_pipeline_mixin.py | 403 | except Exception: | CODE |
| LOW | tests/test_sentencepiece_backend_mixin.py | 139 | except Exception: | CODE |
| LOW | tests/test_tokenizers_backend_mixin.py | 63 | except Exception as e: | CODE |
| LOW | tests/test_tokenizers_backend_mixin.py | 485 | except Exception as e: | CODE |
| LOW⚡ | tests/kernels/test_kernels.py | 746 | except Exception as e: | CODE |
| LOW⚡ | tests/kernels/test_kernels.py | 750 | except Exception as e: | CODE |
| LOW⚡ | tests/kernels/test_kernels.py | 765 | except Exception as e: | CODE |
| LOW⚡ | tests/kernels/test_kernels.py | 769 | except Exception as e: | CODE |
| LOW | tests/exporters/test_export.py | 791 | except Exception: # non-tensor slot | CODE |
| LOW | …pelines/test_pipelines_automatic_speech_recognition.py | 1908 | except Exception: | CODE |
| LOW | tests/utils/test_auto_docstring.py | 872 | except Exception: | STRING |
| LOW | tests/utils/test_audio_utils.py | 1845 | except Exception as e: | CODE |
| LOW | tests/models/got_ocr2/test_processing_got_ocr2.py | 124 | except Exception: | CODE |
| LOW | tests/models/marian/test_modeling_marian.py | 351 | except Exception: | CODE |
| LOW | tests/models/mvp/test_modeling_mvp.py | 490 | except Exception: | CODE |
| LOW | tests/models/led/test_modeling_led.py | 471 | except Exception: | CODE |
| LOW | tests/models/pegasus_x/test_modeling_pegasus_x.py | 546 | except Exception: | CODE |
| LOW | tests/models/rag/test_modeling_rag.py | 76 | except Exception: | CODE |
| LOW | tests/models/wav2vec2/test_modeling_wav2vec2.py | 126 | except Exception: | CODE |
| LOW | tests/models/pegasus/test_modeling_pegasus.py | 296 | except Exception: | CODE |
| LOW | tests/models/bart/test_modeling_bart.py | 513 | except Exception: | CODE |
| LOW | tests/models/deepseek_v4/test_modeling_deepseek_v4.py | 561 | except Exception as e: | CODE |
| LOW | tests/models/plbart/test_modeling_plbart.py | 312 | except Exception: | CODE |
| LOW | tests/models/blenderbot/test_modeling_blenderbot.py | 270 | except Exception: | CODE |
| LOW | tests/models/csm/test_processing_csm.py | 104 | except Exception: | CODE |
| LOW | tests/models/opt/test_modeling_opt.py | 392 | except Exception: | CODE |
| LOW | …ts/models/qwen2_5_omni/test_processing_qwen2_5_omni.py | 138 | except Exception: | CODE |
| LOW | …odels/qwen3_omni_moe/test_processing_qwen3_omni_moe.py | 132 | except Exception: | CODE |
| LOW | …els/blenderbot_small/test_modeling_blenderbot_small.py | 275 | except Exception: | CODE |
| 259 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmark/benchmarks_entrypoint.py | 445 | # Check if the file has a run_benchmark function | COMMENT |
| LOW | benchmark/benchmarks_entrypoint.py | 471 | # Check if the module has an updated run_benchmark function that accepts metrics_recorder | COMMENT |
| LOW | benchmark/benches/llama.py | 76 | # Check if required ML dependencies are available | COMMENT |
| LOW | benchmark_v2/framework/benchmark_runner.py | 299 | # Check if generation had the right number of tokens | COMMENT |
| LOW | tests/test_modeling_common.py | 1407 | # Set seed to ensure stable model initialization - avoids numerical issues (NaN) with some models | COMMENT |
| LOW | tests/test_modeling_common.py | 4878 | # Check if this given pattern matches any param or module (the value attributed to the pattern does not | COMMENT |
| LOW | tests/test_processing_common.py | 278 | # Check if there's a custom setup method for this specific attribute | COMMENT |
| LOW | tests/test_image_processing_common.py | 900 | # Check if torchvision backend is available | COMMENT |
| LOW | tests/test_video_processing_common.py | 353 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output | COMMENT |
| LOW | tests/test_tokenizers_backend_mixin.py | 411 | # Check if the special tokens have been kept (all_special_tokens returns strings) | COMMENT |
| LOW | tests/kernels/test_kernels.py | 143 | # Check if both modules have a 'forward' attribute | COMMENT |
| LOW | tests/kernels/test_kernels.py | 168 | # Check if both modules have a 'forward' attribute | COMMENT |
| LOW | tests/utils/test_offline.py | 219 | # Return output | STRING |
| LOW | tests/utils/test_cache_utils.py | 1258 | # Check if cache config is passed through correctly | COMMENT |
| LOW | tests/utils/test_cache_utils.py | 1268 | # Check if the exported model is configured with the `StaticCache` correctly | COMMENT |
| LOW | tests/pipeline_parallel/test_pipeline_parallel.py | 194 | # Check if the model is split correctly | COMMENT |
| LOW | tests/models/udop/test_tokenization_udop.py | 1267 | # Check if the AddedToken / string format has been kept | COMMENT |
| LOW | tests/models/gpt_oss/test_modeling_gpt_oss.py | 244 | # Check if we have expected results for this configuration | COMMENT |
| LOW | tests/models/gpt_oss/test_modeling_gpt_oss.py | 486 | # Check if we have expected results for this configuration | STRING |
| LOW | …itional_detr/test_image_processing_conditional_detr.py | 248 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | …itional_detr/test_image_processing_conditional_detr.py | 371 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | tests/models/markuplm/test_tokenization_markuplm.py | 1272 | # Check if the AddedToken / string format has been kept | COMMENT |
| LOW | …s/video_llama_3/test_video_processing_video_llama_3.py | 346 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output | COMMENT |
| LOW | tests/models/colqwen2/test_modeling_colqwen2.py | 294 | # Check if the maximum scores per row are in the diagonal of the matrix score | COMMENT |
| LOW | tests/models/colqwen2/test_modeling_colqwen2.py | 349 | # Check if the maximum scores per row are in the diagonal of the matrix score | COMMENT |
| LOW | tests/models/eomt/test_image_processing_eomt.py | 246 | # Set longest_edge to None to test for semantic segmentatiom. | COMMENT |
| LOW | tests/models/rt_detr/test_image_processing_rt_detr.py | 278 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | tests/models/kimi_k25/test_video_processing_kimi_k25.py | 293 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output | COMMENT |
| LOW | …grounding_dino/test_image_processing_grounding_dino.py | 203 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | …grounding_dino/test_image_processing_grounding_dino.py | 379 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | tests/models/layoutlmv2/test_tokenization_layoutlmv2.py | 1311 | # Check if the AddedToken / string format has been kept | COMMENT |
| LOW | tests/models/layoutlmv3/test_tokenization_layoutlmv3.py | 1359 | # Check if the AddedToken / string format has been kept | COMMENT |
| LOW | tests/models/colpali/test_modeling_colpali.py | 273 | # Check if the maximum scores per row are in the diagonal of the matrix score | COMMENT |
| LOW | …formable_detr/test_image_processing_deformable_detr.py | 230 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | …formable_detr/test_image_processing_deformable_detr.py | 353 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | tests/models/paligemma/test_modeling_paligemma.py | 323 | # Check if pad tokens are properly masked | COMMENT |
| LOW | tests/models/moshi/test_tokenization_moshi.py | 246 | # Check if the AddedToken / string format has been kept | COMMENT |
| LOW | tests/models/smolvlm/test_video_processing_smolvlm.py | 150 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output | COMMENT |
| LOW | tests/models/layoutxlm/test_tokenization_layoutxlm.py | 1470 | # Check if the AddedToken / string format has been kept | COMMENT |
| LOW | tests/models/yolos/test_image_processing_yolos.py | 301 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | tests/models/yolos/test_image_processing_yolos.py | 424 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | tests/models/qwen2_vl/test_image_processing_qwen2_vl.py | 113 | # Check if class default was mutated | COMMENT |
| LOW | tests/models/qwen2_vl/test_video_processing_qwen2_vl.py | 334 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output | COMMENT |
| LOW | tests/models/detr/test_image_processing_detr.py | 312 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | tests/models/detr/test_image_processing_detr.py | 434 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | …/models/colmodernvbert/test_modeling_colmodernvbert.py | 243 | # Check if the maximum scores per row are in the diagonal of the matrix score | COMMENT |
| LOW | tests/models/whisper/test_modeling_whisper.py | 501 | # Check if beam_indices and sequences_scores are in the output | COMMENT |
| LOW | tests/models/whisper/test_modeling_whisper.py | 2050 | # Set model to training mode to enable SpecAugment | COMMENT |
| LOW | tests/repo_utils/test_check_copies.py | 449 | # Check if the model link is synchronized. | STRING |
| LOW | tests/trainer/trainer_test_utils.py | 582 | if log[key] != log[key]: # Check if the value is NaN | CODE |
| LOW | tests/trainer/test_trainer_checkpointing.py | 274 | # Check if it works for a simple language modeling example | COMMENT |
| LOW | tests/trainer/test_trainer_checkpointing.py | 1005 | # Check if the model weights file exists in the final checkpoint directory. | COMMENT |
| LOW⚡ | tests/trainer/test_trainer.py | 533 | # Check if model weights have been updated | COMMENT |
| LOW⚡ | tests/generation/test_utils.py | 3490 | "# Calculate the sum\nresult = num1 + num2\n\n# Print the result\nprint(result)\n```\n" | CODE |
| LOW⚡ | utils/check_docstrings.py | 836 | # Check if docstring starts and ends on the same line | COMMENT |
| LOW⚡ | utils/check_docstrings.py | 850 | # Check if it's named "auto_docstring" | COMMENT |
| LOW | utils/check_docstrings.py | 1197 | # Check if this arg has placeholders | COMMENT |
| LOW | utils/check_docstrings.py | 1442 | # Check if this method is inside a processor class | COMMENT |
| LOW | utils/check_docstrings.py | 1448 | # Check if class inherits from ModelOutput, ProcessorMixin, or PreTrainedConfig | COMMENT |
| LOW | utils/check_docstrings.py | 1758 | # Check if any fields are missing or need removal | COMMENT |
| 177 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | benchmark_v2/framework/benchmark_runner.py | 101 | torch._inductor.codecache.TritonFuture._compile_cache.clear() | CODE |
| CRITICAL | tests/peft_integration/test_peft_integration.py | 410 | model.classifier.modules_to_save.default.weight.fill_(sentinel) | CODE |
| CRITICAL | tests/models/neomme/test_modeling_neomme.py | 561 | model.model.embed_tokens.word_embeddings.weight.t() | CODE |
| CRITICAL | tests/models/fsmt/test_modeling_fsmt.py | 260 | model.base_model.decoder.output_projection.weight.data_ptr(), | CODE |
| CRITICAL⚡ | tests/models/fsmt/test_modeling_fsmt.py | 276 | model.base_model.decoder.output_projection.weight.data_ptr(), | CODE |
| CRITICAL⚡ | tests/models/mbart/test_modeling_mbart.py | 344 | model.base_model.decoder.embed_tokens.weight.data_ptr(), | CODE |
| CRITICAL⚡ | tests/models/mbart/test_modeling_mbart.py | 345 | model.base_model.encoder.embed_tokens.weight.data_ptr(), | CODE |
| CRITICAL | tests/models/mbart/test_modeling_mbart.py | 327 | model.base_model.decoder.embed_tokens.weight.data_ptr(), | CODE |
| CRITICAL | tests/models/mbart/test_modeling_mbart.py | 328 | model.base_model.encoder.embed_tokens.weight.data_ptr(), | CODE |
| CRITICAL | tests/generation/test_continuous_batching.py | 121 | torch._inductor.codecache.TritonFuture._compile_cache.clear() | CODE |
| CRITICAL | utils/check_repo.py | 1419 | model_types = list(transformers.models.auto.configuration_auto.CONFIG_MAPPING_NAMES.keys()) | CODE |
| CRITICAL | src/transformers/trainer.py | 2355 | kwargs.update({"dtype": self.accelerator.state.deepspeed_plugin.hf_ds_config.dtype()}) | CODE |
| CRITICAL | src/transformers/tokenization_mistral_common.py | 605 | return self.tokenizer.instruct_tokenizer.tokenizer._model.piece_to_id(piece) | CODE |
| CRITICAL | …ransformers/models/marian/convert_marian_to_pytorch.py | 626 | model.lm_head.weight.data = model.model.decoder.embed_tokens.weight.data.clone() | CODE |
| CRITICAL | …s/models/conditional_detr/modeling_conditional_detr.py | 1774 | object_queries_position_embeddings = self.conditional_detr.model.query_position_embeddings.weight.unsqueeze( | CODE |
| 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 | CODE |
| 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() | CODE |
| CRITICAL | src/transformers/models/rwkv/modeling_rwkv.py | 628 | block.attention.output.weight.SCB.div_(2 ** int(block_id // self.config.rescale_every)) | STRING |
| CRITICAL | src/transformers/models/rwkv/modeling_rwkv.py | 629 | block.feed_forward.value.weight.SCB.div_(2 ** int(block_id // self.config.rescale_every)) | STRING |
| 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) | CODE |
| CRITICAL | src/transformers/models/detr/modeling_detr.py | 1565 | object_queries_position_embeddings = self.detr.model.query_position_embeddings.weight.unsqueeze(0).repeat( | CODE |
| CRITICAL | src/transformers/integrations/mxfp4.py | 211 | module.gate_up_proj_precision_config.weight_scale.storage.layout.unswizzle_data( | CODE |
| CRITICAL | src/transformers/integrations/mxfp4.py | 222 | module.down_proj_precision_config.weight_scale.storage.layout.unswizzle_data( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/utils/test_cache_utils.py | 1761 | # Step 0 : multi-token prefill | COMMENT |
| LOW | tests/utils/test_cache_utils.py | 1773 | # Step 1 : multi-token update crossing the window boundary | COMMENT |
| LOW | tests/quantization/bnb/test_mixed_int8.py | 904 | # Step 1: freeze all parameters | STRING |
| LOW⚡ | tests/quantization/bnb/test_mixed_int8.py | 925 | # Step 2: add adapters | STRING |
| LOW⚡ | tests/quantization/bnb/test_mixed_int8.py | 932 | # Step 3: dummy batch | STRING |
| LOW⚡ | tests/quantization/bnb/test_mixed_int8.py | 935 | # Step 4: Check if the gradient is not None | STRING |
| LOW | tests/quantization/bnb/test_4bit.py | 631 | # Step 1: freeze all parameters | STRING |
| LOW⚡ | tests/quantization/bnb/test_4bit.py | 651 | # Step 2: add adapters | STRING |
| LOW⚡ | tests/quantization/bnb/test_4bit.py | 658 | # Step 3: dummy batch | STRING |
| LOW⚡ | tests/quantization/bnb/test_4bit.py | 661 | # Step 4: Check if the gradient is not None | STRING |
| LOW | …iner/distributed/test_trainer_distributed_deepspeed.py | 1139 | # Step 1: Run with SP enabled | COMMENT |
| LOW | …iner/distributed/test_trainer_distributed_deepspeed.py | 1160 | # Step 2: Run without SP | COMMENT |
| LOW | …s/trainer/distributed/test_trainer_distributed_fsdp.py | 593 | # Step 1: Run with CP enabled (cp_size=2) | COMMENT |
| LOW | …s/trainer/distributed/test_trainer_distributed_fsdp.py | 605 | # Step 2: Run without CP (FSDP with num_processes=1, no parallelism_config) | COMMENT |
| LOW | src/transformers/feature_extraction_utils.py | 534 | # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy style | COMMENT |
| LOW | src/transformers/image_processing_base.py | 339 | # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy style | COMMENT |
| LOW | src/transformers/video_processing_utils.py | 404 | # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy style | COMMENT |
| LOW | …ls/ernie4_5_vl_moe/video_processing_ernie4_5_vl_moe.py | 224 | # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy style | COMMENT |
| 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 | CODE |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2907 | # Step 2: Get memory frames and concatenate their features | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2917 | # Step 3: Get and process object pointers | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2933 | # Step 4: Concatenate all retrieved memories and their positional embeddings | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2937 | # Step 5: Forward through the memory attention mechanism | COMMENT |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 2895 | # Step 1: Handle initial conditioning frames | COMMENT |
| LOW | …sformers/models/edgetam_video/modular_edgetam_video.py | 1084 | # Step 1: Handle initial conditioning frames | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1096 | # Step 2: Get memory frames and concatenate their features | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1106 | # Step 3: Get and process object pointers | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1122 | # Step 4: Concatenate all retrieved memories and their positional embeddings | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1126 | # Step 5: Forward through the memory attention mechanism | COMMENT |
| LOW⚡ | src/transformers/models/gemma4/processing_gemma4.py | 304 | # Step 1: mel frames (matches feature_extraction_gemma4.py) | STRING |
| LOW⚡ | src/transformers/models/gemma4/processing_gemma4.py | 311 | # Step 2: SSCP subsampling. Two stride-2 Conv2d layers (kernel=3, pad=1) | STRING |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 231 | # Step 1: Aspect-ratio-preserving resize | COMMENT |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 241 | # Step 2: Rescale pixel values from [0, 255] to [0, 1] | COMMENT |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 245 | # Step 3: Identity normalization because Gemma4 was trained with pixels in [0, 1] | COMMENT |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 249 | # Step 4: Patchify the image | COMMENT |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 255 | # Step 5: Compute position IDs | COMMENT |
| LOW⚡ | …/transformers/models/gemma4/image_processing_gemma4.py | 230 | # Step 1: Aspect-ratio-preserving resize | COMMENT |
| LOW⚡ | …/transformers/models/gemma4/image_processing_gemma4.py | 240 | # Step 2: Rescale pixel values (typically to [0, 1]) and optionally identity normalize | COMMENT |
| LOW⚡ | …/transformers/models/gemma4/image_processing_gemma4.py | 243 | # Step 3: Patchify the image | COMMENT |
| LOW⚡ | …/transformers/models/gemma4/image_processing_gemma4.py | 250 | # Step 5: Compute position IDs | COMMENT |
| LOW | src/transformers/models/auto/image_processing_auto.py | 321 | # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy style | COMMENT |
| LOW | src/transformers/models/auto/video_processing_auto.py | 249 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style | COMMENT |
| LOW | src/transformers/models/auto/feature_extraction_auto.py | 217 | # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy style | COMMENT |
| LOW⚡ | …models/embedding_gemma2/processing_embedding_gemma2.py | 382 | # Step 1: mel frames (matches feature_extraction_embedding_gemma2.py) | STRING |
| LOW⚡ | …models/embedding_gemma2/processing_embedding_gemma2.py | 389 | # Step 2: SSCP subsampling. Two stride-2 Conv2d layers (kernel=3, pad=1) | STRING |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 798 | # Step 1: noise-dependent (single) conditioning | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 801 | # Step 2: normalize noisy coords | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 805 | # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream. | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 819 | # Step 4: add conditioned single repr | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 822 | # Step 5: token transformer | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 827 | # Step 6: token norm | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 830 | # Step 7: atom decoder | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 840 | # Step 8: denoised output; the fp32 noise-level scalars keep the coordinates fp32. | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 866 | # Step 1: noise-dependent (single) conditioning | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 869 | # Step 2: normalize noisy coords | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 873 | # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream. | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 887 | # Step 4: add conditioned single repr | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 890 | # Step 5: token transformer | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 895 | # Step 6: token norm | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 898 | # Step 7: atom decoder | COMMENT |
| 65 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/utils/test_cache_utils.py | 1761 | # Step 0 : multi-token prefill | COMMENT |
| LOW | tests/utils/test_cache_utils.py | 1773 | # Step 1 : multi-token update crossing the window boundary | COMMENT |
| LOW | tests/models/colqwen2/test_modeling_colqwen2.py | 155 | # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs. | COMMENT |
| LOW | tests/quantization/bnb/test_mixed_int8.py | 904 | # Step 1: freeze all parameters | STRING |
| LOW⚡ | tests/quantization/bnb/test_mixed_int8.py | 925 | # Step 2: add adapters | STRING |
| LOW⚡ | tests/quantization/bnb/test_mixed_int8.py | 932 | # Step 3: dummy batch | STRING |
| LOW⚡ | tests/quantization/bnb/test_mixed_int8.py | 935 | # Step 4: Check if the gradient is not None | STRING |
| LOW | tests/quantization/bnb/test_4bit.py | 631 | # Step 1: freeze all parameters | STRING |
| LOW⚡ | tests/quantization/bnb/test_4bit.py | 651 | # Step 2: add adapters | STRING |
| LOW⚡ | tests/quantization/bnb/test_4bit.py | 658 | # Step 3: dummy batch | STRING |
| LOW⚡ | tests/quantization/bnb/test_4bit.py | 661 | # Step 4: Check if the gradient is not None | STRING |
| LOW | …iner/distributed/test_trainer_distributed_deepspeed.py | 1139 | # Step 1: Run with SP enabled | COMMENT |
| LOW | …iner/distributed/test_trainer_distributed_deepspeed.py | 1160 | # Step 2: Run without SP | COMMENT |
| LOW | …s/trainer/distributed/test_trainer_distributed_fsdp.py | 593 | # Step 1: Run with CP enabled (cp_size=2) | COMMENT |
| LOW | …s/trainer/distributed/test_trainer_distributed_fsdp.py | 605 | # Step 2: Run without CP (FSDP with num_processes=1, no parallelism_config) | COMMENT |
| LOW⚡ | docs/source/en/model_doc/qwen3_asr.md | 286 | # Step 1: Transcribe | COMMENT |
| LOW⚡ | docs/source/en/model_doc/qwen3_asr.md | 295 | # Step 2: Prepare alignment inputs | COMMENT |
| LOW⚡ | docs/source/en/model_doc/qwen3_asr.md | 301 | # Step 3: Run forced aligner | COMMENT |
| LOW⚡ | docs/source/en/model_doc/qwen3_asr.md | 305 | # Step 4: Decode timestamps | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2907 | # Step 2: Get memory frames and concatenate their features | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2917 | # Step 3: Get and process object pointers | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2933 | # Step 4: Concatenate all retrieved memories and their positional embeddings | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2937 | # Step 5: Forward through the memory attention mechanism | COMMENT |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 2895 | # Step 1: Handle initial conditioning frames | COMMENT |
| LOW | …sformers/models/edgetam_video/modular_edgetam_video.py | 1084 | # Step 1: Handle initial conditioning frames | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1096 | # Step 2: Get memory frames and concatenate their features | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1106 | # Step 3: Get and process object pointers | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1122 | # Step 4: Concatenate all retrieved memories and their positional embeddings | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1126 | # Step 5: Forward through the memory attention mechanism | COMMENT |
| LOW | src/transformers/models/colqwen2/processing_colqwen2.py | 117 | # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs. | STRING |
| LOW | src/transformers/models/colqwen2/modular_colqwen2.py | 103 | # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs. | STRING |
| LOW⚡ | src/transformers/models/gemma4/processing_gemma4.py | 304 | # Step 1: mel frames (matches feature_extraction_gemma4.py) | STRING |
| LOW⚡ | src/transformers/models/gemma4/processing_gemma4.py | 311 | # Step 2: SSCP subsampling. Two stride-2 Conv2d layers (kernel=3, pad=1) | STRING |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 231 | # Step 1: Aspect-ratio-preserving resize | COMMENT |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 241 | # Step 2: Rescale pixel values from [0, 255] to [0, 1] | COMMENT |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 245 | # Step 3: Identity normalization because Gemma4 was trained with pixels in [0, 1] | COMMENT |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 249 | # Step 4: Patchify the image | COMMENT |
| LOW⚡ | …nsformers/models/gemma4/image_processing_pil_gemma4.py | 255 | # Step 5: Compute position IDs | COMMENT |
| LOW⚡ | …/transformers/models/gemma4/image_processing_gemma4.py | 230 | # Step 1: Aspect-ratio-preserving resize | COMMENT |
| LOW⚡ | …/transformers/models/gemma4/image_processing_gemma4.py | 240 | # Step 2: Rescale pixel values (typically to [0, 1]) and optionally identity normalize | COMMENT |
| LOW⚡ | …/transformers/models/gemma4/image_processing_gemma4.py | 243 | # Step 3: Patchify the image | COMMENT |
| LOW⚡ | …/transformers/models/gemma4/image_processing_gemma4.py | 250 | # Step 5: Compute position IDs | COMMENT |
| LOW⚡ | …models/embedding_gemma2/processing_embedding_gemma2.py | 382 | # Step 1: mel frames (matches feature_extraction_embedding_gemma2.py) | STRING |
| LOW⚡ | …models/embedding_gemma2/processing_embedding_gemma2.py | 389 | # Step 2: SSCP subsampling. Two stride-2 Conv2d layers (kernel=3, pad=1) | STRING |
| LOW | …a2vec_vision_original_pytorch_checkpoint_to_pytorch.py | 264 | # IMPORTANT: Note that for now we've only converted the down-stream | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 798 | # Step 1: noise-dependent (single) conditioning | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 801 | # Step 2: normalize noisy coords | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 805 | # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream. | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 819 | # Step 4: add conditioned single repr | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 822 | # Step 5: token transformer | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 827 | # Step 6: token norm | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 830 | # Step 7: atom decoder | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modular_esmfold2.py | 840 | # Step 8: denoised output; the fp32 noise-level scalars keep the coordinates fp32. | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 866 | # Step 1: noise-dependent (single) conditioning | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 869 | # Step 2: normalize noisy coords | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 873 | # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream. | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 887 | # Step 4: add conditioned single repr | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 890 | # Step 5: token transformer | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 895 | # Step 6: token norm | COMMENT |
| LOW⚡ | src/transformers/models/esmfold2/modeling_esmfold2.py | 898 | # Step 7: atom decoder | COMMENT |
| 63 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | pyproject.toml | 117 | # Using default settings for comprehensive type checking | COMMENT |
| MEDIUM | benchmark/benchmarks_entrypoint.py | 250 | # Create comprehensive summary using pandas operations | COMMENT |
| MEDIUM | benchmark/benchmarks_entrypoint.py | 301 | # Export the comprehensive summary | COMMENT |
| MEDIUM | tests/test_tokenization_common.py | 323 | # Default comprehensive test string covering various edge cases | COMMENT |
| MEDIUM | tests/test_modeling_common.py | 750 | # Note: for all mixins that utilize the Hub in some way, we should ensure that | COMMENT |
| MEDIUM | tests/test_processing_common.py | 194 | # TODO: make this more robust. We intentionally do NOT call _setup_test_attributes(full_processor) | COMMENT |
| LOW⚡ | tests/pipelines/test_pipelines_common.py | 368 | # If dtype is NOT specified in the pipeline constructor, the property should just return | COMMENT |
| LOW⚡ | tests/pipelines/test_pipelines_common.py | 373 | # If underlying model doesn't have dtype property, simply return None | COMMENT |
| LOW⚡ | tests/utils/test_modeling_utils.py | 3152 | # a KeyError; they should simply return False. | STRING |
| MEDIUM | tests/utils/test_auto_docstring.py | 834 | # Relative metric; robust across CI vs local. Catches serious regressions. | STRING |
| MEDIUM⚡ | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 538 | ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) at | CODE |
| MEDIUM⚡ | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 538 | ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) at | CODE |
| MEDIUM⚡ | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 540 | ARTICLE_MAGNET = r"""it is well known that the classical magnetoresistance ( mr ) in metals or semiconductors wi | CODE |
| LOW | tests/models/clvp/test_modeling_clvp.py | 447 | # the testing for text encoder stays standard because we just pass the text tokens here. | COMMENT |
| LOW | tests/models/got_ocr2/test_processing_got_ocr2.py | 31 | # just use higher `max_length` in tests | COMMENT |
| LOW | tests/models/modernvbert/test_modeling_modernvbert.py | 145 | # For simplicity just set the last n tokens to the image token | COMMENT |
| 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 | CODE |
| 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 | CODE |
| 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 | CODE |
| 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 | CODE |
| 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 | STRING |
| MEDIUM | …/models/gemma4_unified/test_modeling_gemma4_unified.py | 750 | ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers | CODE |
| MEDIUM | …/models/gemma4_unified/test_modeling_gemma4_unified.py | 774 | ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers | CODE |
| LOW | tests/models/lfm2_vl/test_modeling_lfm2_vl.py | 131 | # For simplicity just set the last n tokens to the image token | COMMENT |
| MEDIUM | tests/models/paligemma/test_modeling_paligemma.py | 562 | # this is a supplementary test to ensure paligemma fine-tuning that relies on token_type_ids is robust to future | COMMENT |
| MEDIUM⚡ | tests/models/esmc/test_tokenization_esmc.py | 39 | # The common harness space-joins vocab tokens, but ESMC has no space token (spaces map to | COMMENT |
| LOW | tests/models/idefics3/test_modeling_idefics3.py | 150 | # For simplicity just set the last n tokens to the image token | COMMENT |
| LOW | tests/models/smolvlm/test_modeling_smolvlm.py | 151 | # For simplicity just set the last n tokens to the image token | COMMENT |
| LOW | tests/models/idefics2/test_modeling_idefics2.py | 160 | # For simplicity just set the last n tokens to the image token | COMMENT |
| LOW⚡ | …/models/colmodernvbert/test_modeling_colmodernvbert.py | 140 | # For simplicity just set the first n tokens to the image token | COMMENT |
| MEDIUM | …ed_assistant/test_modeling_gemma4_unified_assistant.py | 109 | ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers | CODE |
| MEDIUM | tests/models/molmo2/test_processing_molmo2.py | 50 | # Override the chat template to support the "system" role used by the base test harness. | COMMENT |
| 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.""" | STRING |
| LOW⚡ | tests/generation/test_utils.py | 2913 | # In this case, we simply call recursively the function on both internal caches | COMMENT |
| LOW | tests/generation/test_utils.py | 3032 | # In this case, we simply call recursively the function on both internal caches | COMMENT |
| MEDIUM | tests/generation/test_logits_process.py | 783 | # scores = 0 to facilitate checks | COMMENT |
| LOW | utils/check_docstrings.py | 523 | # Default None are not written, we just set `*optional*`. If there is default that is not None specified in the | COMMENT |
| MEDIUM | utils/get_test_reports.py | 137 | """Command-line interface for running test suite with comprehensive reporting. Check handle_suite for more details. | STRING |
| MEDIUM | utils/create_dummy_models.py | 394 | # New method that is more robust to get checkpoints! | COMMENT |
| 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. | COMMENT |
| LOW | src/transformers/modeling_flash_attention_utils.py | 294 | # can never be used, so no need to build a processing function for it, just return a dict builder. | COMMENT |
| MEDIUM | src/transformers/tokenization_utils_base.py | 3216 | # To make this more robust, we could do a diff and find the longest common subsequence, but this is | COMMENT |
| MEDIUM | src/transformers/testing_utils.py | 3884 | # TODO: check simply with the name is not robust. | STRING |
| LOW | src/transformers/testing_utils.py | 4129 | # If the target callable is not called within a test, simply call it without modification. | STRING |
| LOW | src/transformers/testing_utils.py | 4208 | # We simply add "self" as the expression despite it might not be the actual argument name. | STRING |
| LOW | src/transformers/cache_utils.py | 1063 | # LinearAttention layer have no sequence length dimension, so simply return -1 here | COMMENT |
| LOW | src/transformers/modeling_utils.py | 5070 | # fragmentation issues) simply use the pool of 4 GiB unused memory that is available. In those cases, it's b | COMMENT |
| MEDIUM | src/transformers/modeling_utils.py | 4850 | """Adds the `_is_hf_initialized` flag on parameters that will be tied, in order to avoid initializing them | STRING |
| LOW | src/transformers/trainer.py | 1896 | # if loss is nan or inf simply add the average of previous logged losses | COMMENT |
| LOW | src/transformers/masking_utils.py | 796 | # If the mask is already 4D, simply return as-is (it was already prepared, or it is custom) | COMMENT |
| LOW | src/transformers/trainer_pt_utils.py | 383 | # Check if we have something to add, if not just return | COMMENT |
| LOW | src/transformers/modeling_layers.py | 407 | # Some models may subclass nn.Embedding directly, but here we do not want the added norm (note that we cannot si | COMMENT |
| MEDIUM | src/transformers/distributed/pipeline_parallel.py | 279 | # TODO(3outeille): very naive implementation to make it work seamless with generate(). | COMMENT |
| MEDIUM | …transformers/pipelines/automatic_speech_recognition.py | 707 | # Simply cast from pyctcdecode format to wav2vec2 format to leverage | COMMENT |
| MEDIUM | src/transformers/pipelines/mask_generation.py | 218 | # Consider using a more robust method for distinguishing model types here. | COMMENT |
| 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 | COMMENT |
| MEDIUM | …/transformers/models/metaclip_2/modeling_metaclip_2.py | 487 | # Use robust pooling like CLIP - finds the first EOS token position per sequence | COMMENT |
| MEDIUM | …c/transformers/models/metaclip_2/modular_metaclip_2.py | 223 | # Use robust pooling like CLIP - finds the first EOS token position per sequence | COMMENT |
| LOW | src/transformers/models/clvp/modeling_clvp.py | 496 | # We can probably just use the multi-head attention module of PyTorch >=1.1.0 | STRING |
| LOW | src/transformers/models/vilt/image_processing_vilt.py | 226 | # If no padding, just return the processed images | STRING |
| 44 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | CONTRIBUTING.md | 86 | 5. [Agentic contributions](#agentic-contributions) | CODE |
| MEDIUM | tests/models/rag/test_modeling_rag.py | 1 | # Copyright 2020, The RAG Authors and The HuggingFace Inc. team. | COMMENT |
| MEDIUM | tests/models/persimmon/test_modeling_persimmon.py | 61 | # "zero-shot": PersimmonForSequenceClassification, | COMMENT |
| MEDIUM | utils/modular_model_detector.py | 97 | # You can also change the embedding model for a larger/smaller one. | STRING |
| MEDIUM | docs/source/ja/pipeline_tutorial.md | 228 | >>> # This model is a `zero-shot-classification` model. | CODE |
| MEDIUM | docs/source/ja/tasks/idefics.md | 44 | - [Few-shot プロンプト](#few-shot-prompting) | CODE |
| MEDIUM | docs/source/ja/tasks/zero_shot_object_detection.md | 130 | ## Text-prompted zero-shot object detection by hand | COMMENT |
| MEDIUM | docs/source/ja/tasks/prompting.md | 277 | [Chain-of-thought](#chain-of-thought)。 | CODE |
| MEDIUM | docs/source/ja/tasks/prompting.md | 335 | * [Few-shot prompting](#few-shot-prompting) や [Chain-of-thought](#chain-of-thought) などの高度なテクニックを使用します。 | COMMENT |
| MEDIUM | docs/source/ja/tasks/prompting.md | 335 | * [Few-shot prompting](#few-shot-prompting) や [Chain-of-thought](#chain-of-thought) などの高度なテクニックを使用します。 | COMMENT |
| MEDIUM | docs/source/zh/pipeline_tutorial.md | 239 | >>> # This model is a `zero-shot-classification` model. | CODE |
| MEDIUM | docs/source/ar/_toctree.yml | 486 | # title: RAG | COMMENT |
| MEDIUM | docs/source/ar/chat_templating.md | 493 | # معالجة المحادثة والمستندات باستخدام قالب RAG، وإرجاع موترات PyTorch. | COMMENT |
| MEDIUM | docs/source/ar/pipeline_tutorial.md | 225 | >>> # هذا النموذج هو نموذج "zero-shot-classification". | CODE |
| MEDIUM | docs/source/hi/pipeline_tutorial.md | 253 | >>> # This model is a `zero-shot-classification` model. | CODE |
| MEDIUM | docs/source/ko/chat_extras.md | 17 | # 도구와 RAG[[Tools-and-RAG]] | COMMENT |
| MEDIUM | docs/source/ko/chat_extras.md | 243 | ## RAG[[RAG]] | COMMENT |
| MEDIUM | docs/source/ko/chat_templating.md | 477 | ## 고급: 검색 증강 생성[[advanced-retrieval-augmented-generation]] | COMMENT |
| MEDIUM | docs/source/ko/pipeline_tutorial.md | 218 | >>> # This model is a `zero-shot-classification` model. | CODE |
| MEDIUM | docs/source/ko/tasks/idefics.md | 32 | - [퓨샷 프롬프트](#few-shot-prompting) | CODE |
| MEDIUM | docs/source/ko/tasks/idefics.md | 158 | ## 퓨샷 프롬프트[[few-shot-prompting]] | COMMENT |
| MEDIUM | docs/source/ko/tasks/zero_shot_object_detection.md | 17 | # 제로샷(zero-shot) 객체 탐지[[zeroshot-object-detection]] | COMMENT |
| MEDIUM | docs/source/ko/tasks/zero_shot_object_detection.md | 46 | ## 제로샷(zero-shot) 객체 탐지 파이프라인[[zeroshot-object-detection-pipeline]] | COMMENT |
| MEDIUM | docs/source/ko/tasks/zero_shot_image_classification.md | 17 | # 제로샷(zero-shot) 이미지 분류[[zeroshot-image-classification]] | COMMENT |
| MEDIUM | docs/source/ko/tasks/zero_shot_image_classification.md | 43 | ## 제로샷(zero-shot) 이미지 분류 파이프라인[[zeroshot-image-classification-pipeline]] | COMMENT |
| MEDIUM | docs/source/ko/tasks/zero_shot_image_classification.md | 84 | ## 직접 제로샷(zero-shot) 이미지 분류하기[[zeroshot-image-classification-by-hand]] | COMMENT |
| MEDIUM | docs/source/ko/tasks/prompting.md | 242 | 추론은 대규모 언어 모델(LLM)에게 가장 어려운 작업 중 하나이며, 좋은 결과를 얻기 위해서는 종종 [생각의 사슬(Chain-of-thought, CoT)](#chain-of-thought)과 같은 고급 프롬프팅 | CODE |
| MEDIUM⚡ | docs/source/ko/tasks/prompting.md | 296 | * [퓨샷(Few-shot) 프롬프팅](#few-shot-prompting) 및 [생각의 사슬(Chain-of-thought, CoT)](#chain-of-thought) 같은 고급 기술을 사용해보세요. | COMMENT |
| MEDIUM⚡ | docs/source/ko/tasks/prompting.md | 296 | * [퓨샷(Few-shot) 프롬프팅](#few-shot-prompting) 및 [생각의 사슬(Chain-of-thought, CoT)](#chain-of-thought) 같은 고급 기술을 사용해보세요. | COMMENT |
| MEDIUM⚡ | docs/source/ko/tasks/prompting.md | 302 | ### 퓨샷(Few-shot) 프롬프팅 [[few-shot-prompting]] | COMMENT |
| MEDIUM | docs/source/ko/tasks/prompting.md | 339 | ### 생각의 사슬(Chain-of-thought, CoT) [[chain-of-thought]] | COMMENT |
| MEDIUM | docs/source/ko/model_doc/rag.md | 17 | # RAG(검색 증강 생성) [[rag]] | COMMENT |
| MEDIUM | docs/source/ko/model_doc/exaone4.md | 21 | **[EXAONE 4.0](https://github.com/LG-AI-EXAONE/EXAONE-4.0)** 모델군은 [EXAONE 3.5](https://github.com/LG-AI-EXAONE/EXAONE-3. | CODE |
| MEDIUM | docs/source/fr/tutoriel_pipeline.md | 223 | >>> # This model is a `zero-shot-classification` model. | CODE |
| MEDIUM | docs/source/es/pipeline_tutorial.md | 234 | >>> # This model is a `zero-shot-classification` model. | CODE |
| MEDIUM | docs/source/en/contributing.md | 86 | 5. [Agentic contributions](#agentic-contributions) | CODE |
| MEDIUM | docs/source/en/community_integrations/sglang.md | 19 | [SGLang](https://docs.sglang.ai) is a low-latency, high-throughput inference engine for large language models (LLMs). It | CODE |
| MEDIUM | docs/source/en/tasks/zero_shot_object_detection.md | 51 | >>> # Use any checkpoint from the hf.co/models?pipeline_tag=zero-shot-object-detection | CODE |
| MEDIUM | docs/source/en/tasks/zero_shot_object_detection.md | 127 | ## Text-prompted zero-shot object detection by hand | COMMENT |
| MEDIUM | docs/source/en/tasks/prompting.md | 69 | 8. Try other techniques like [few-shot](#few-shot-prompting) and [chain-of-thought](#chain-of-thought) to improve result | STRING |
| MEDIUM | docs/source/en/tasks/prompting.md | 69 | 8. Try other techniques like [few-shot](#few-shot-prompting) and [chain-of-thought](#chain-of-thought) to improve result | STRING |
| MEDIUM | docs/source/en/tasks/prompting.md | 169 | Like [few-shot](#few-shot-prompting) prompting, the downside of CoT is that it requires more effort to design a series o | CODE |
| MEDIUM | docs/source/en/model_doc/rag.md | 18 | # RAG | COMMENT |
| MEDIUM | docs/source/en/model_doc/exaone_moe.md | 22 | **[K-EXAONE](https://github.com/LG-AI-EXAONE/K-EXAONE)** model is a large-scale multilingual language model developed by | CODE |
| MEDIUM | docs/source/en/model_doc/exaone4.md | 22 | **[EXAONE 4.0](https://github.com/LG-AI-EXAONE/EXAONE-4.0)** model is the language model, which integrates a **Non-reaso | CODE |
| MEDIUM | docs/source/en/model_doc/mistral4.md | 82 | # Setting `skip_special_tokens=False` to visualize reasoning trace between [THINK] [/THINK] tags. | COMMENT |
| MEDIUM | docs/source/en/model_doc/muse_glimmer.md | 30 | [MuseGlimmer](https://research.meta.ai/blog/introducing-muse-glimmer-open-agentic-model) is a 30B multimodal model from | CODE |
| MEDIUM | docs/source/en/model_doc/muse_glimmer_assistant.md | 30 | [MuseGlimmerAssistant](https://research.meta.ai/blog/introducing-muse-glimmer-open-agentic-model) is the [DFlash](https: | CODE |
| MEDIUM | src/transformers/processing_utils.py | 509 | see the RAG section of the [chat templating guide](https://huggingface.co/docs/transformers/main/en/chat_templat | STRING |
| MEDIUM | src/transformers/models/rag/modeling_rag.py | 1 | # Copyright 2020, The RAG Authors and The HuggingFace Inc. team. | COMMENT |
| MEDIUM | src/transformers/models/rag/modeling_rag.py | 287 | >>> # initialize a RAG from two pretrained models. | CODE |
| MEDIUM | src/transformers/models/rag/modeling_rag.py | 513 | # encoder_outputs are pre-computed during RAG-token generation | COMMENT |
| MEDIUM | src/transformers/models/rag/modeling_rag.py | 1055 | # RAG-sequence marginalization | COMMENT |
| MEDIUM | src/transformers/models/rag/modeling_rag.py | 1219 | # RAG-token marginalization | COMMENT |
| MEDIUM | src/transformers/models/rag/modeling_rag.py | 1606 | # RAG should always use the legacy path even though the LM backbone (T5) uses new cache format | COMMENT |
| MEDIUM | src/transformers/models/rag/modeling_rag.py | 1607 | # because RAG expands input for doc-size internally. TODO: raushan, remove me when all models support | COMMENT |
| MEDIUM | src/transformers/models/rag/configuration_rag.py | 1 | # Copyright 2020, The RAG Authors and The HuggingFace Inc. team. | COMMENT |
| MEDIUM | src/transformers/models/rag/retrieval_rag.py | 1 | # Copyright 2020, The RAG Authors and The HuggingFace Inc. team. | COMMENT |
| MEDIUM | src/transformers/models/rag/retrieval_rag.py | 508 | # TODO(Patrick): if we train more RAG models, I want to put the input first to take advantage of effortless | STRING |
| MEDIUM | src/transformers/models/rag/tokenization_rag.py | 1 | # Copyright 2020, The RAG Authors and The HuggingFace Inc. team. | COMMENT |
| 6 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/utils/test_model_output.py | 155 | '[1, {"type": "tests.utils.test_model_output.ModelOutputTest", "context": "[\\"a\\", \\"c\\"]", "children_sp | CODE |
| HIGH | tests/utils/test_chat_parsing.py | 585 | 'null_value:null,number_value:1,string_value:<|"|>foo<|"|>,' | CODE |
| HIGH | utils/check_import_complexity.py | 67 | self._tracer.push(self._fullname) | CODE |
| HIGH⚡ | .circleci/create_circleci_config.py | 73 | {"run": "pip install requests || true"}, | CODE |
| HIGH⚡ | .circleci/create_circleci_config.py | 75 | "run": """while [[ $(curl --location --request GET "https://circleci.com/api/v2/workflow/$CIRCLE | CODE |
| HIGH⚡ | .circleci/create_circleci_config.py | 78 | "run": "python utils/process_circleci_workflow_test_reports.py --workflow_id $CIRCLE_WORKFLOW_ID | CODE |
| HIGH | .circleci/create_circleci_config.py | 190 | {"run": "apt-get update && apt-get install -y curl"}, | CODE |
| HIGH | .circleci/create_circleci_config.py | 203 | "command": """du -h -d 1 "$(pip -V | cut -d ' ' -f 4 | sed 's/pip//g')" | grep -vE "dist-info|_distu | CODE |
| HIGH | .circleci/create_circleci_config.py | 209 | "command": """pip list --format=freeze | tee installed.txt || true""", | CODE |
| HIGH⚡ | .circleci/create_circleci_config.py | 230 | "command": f"TESTS=$(circleci tests split --split-by=timings {self.job_name}_test_list.txt) && echo | CODE |
| HIGH⚡ | .circleci/create_circleci_config.py | 240 | "command": "cp -r /test_data/* . 2>/dev/null || true; python3 utils/fetch_hub_objects_for_ci.py", | CODE |
| HIGH⚡ | .circleci/create_circleci_config.py | 248 | "command": 'curl -L -o huggingface-cache.tar.gz https://huggingface.co/datasets/hf-internal- | CODE |
| 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 | CODE |
| HIGH | src/transformers/models/auto/auto_factory.py | 248 | # Check both `quantization_config` being present and also not null, | STRING |
| HIGH | src/transformers/models/auto/auto_factory.py | 406 | # Check both `quantization_config` being present and also not null, | COMMENT |
| HIGH | src/transformers/models/xlm/tokenization_xlm.py | 305 | logger.error("1. git clone git@github.com:neubig/kytea.git && cd kytea") | CODE |
| HIGH | src/transformers/models/xlm/tokenization_xlm.py | 308 | logger.error("4. make && make install") | CODE |
| 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 | STRING |
| HIGH | src/transformers/models/xlm/tokenization_xlm.py | 382 | make && make install pip install kytea | STRING |
| HIGH | …/transformers/models/flaubert/tokenization_flaubert.py | 304 | logger.error("1. git clone git@github.com:neubig/kytea.git && cd kytea") | CODE |
| HIGH | …/transformers/models/flaubert/tokenization_flaubert.py | 307 | logger.error("4. make && make install") | CODE |
| HIGH | src/transformers/integrations/executorch.py | 217 | # If `layer_types` is not specified explicitly in the config or `sliding_window` is null, | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_modeling_common.py | 4853 | # If none of the config and subconfigs have a tp_plan, then skip (otherwise we should make sure to respect the p | COMMENT |
| LOW | tests/models/whisper/test_modeling_whisper.py | 109 | # make sure to use correct index if a batch was removed | COMMENT |
| LOW | utils/check_docstrings.py | 363 | # below, make sure to add a comment explaining why. | COMMENT |
| LOW | src/transformers/core_model_loading.py | 323 | # We squeeze each chunk here as well to make sure to give them their original shape | COMMENT |
| LOW | src/transformers/core_model_loading.py | 1728 | # so we need to make sure to load the tensor with the same dtype from the checkpoint | STRING |
| LOW | src/transformers/trainer.py | 2015 | # After training we make sure to retrieve back the original forward pass method | COMMENT |
| LOW | …ers/models/ernie4_5_vl_moe/modeling_ernie4_5_vl_moe.py | 1638 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | …mers/models/ernie4_5_vl_moe/modular_ernie4_5_vl_moe.py | 1141 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/laguna/modeling_laguna.py | 725 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/gpt_oss/modeling_gpt_oss.py | 646 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/olmoe/modeling_olmoe.py | 655 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/clvp/configuration_clvp.py | 81 | # make sure to have the config_type be either "text_config" or "speech_config" | COMMENT |
| LOW | …/transformers/models/qwen3_next/modeling_qwen3_next.py | 1198 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/mellum/modeling_mellum.py | 684 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/mixtral/modeling_mixtral.py | 629 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/mixtral/modular_mixtral.py | 399 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …/transformers/models/minimax_m2/modeling_minimax_m2.py | 641 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …rmers/models/granitemoe_swa/modeling_granitemoe_swa.py | 744 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| 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 | STRING |
| 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 | CODE |
| LOW | src/transformers/models/glm5_next/modular_glm5_next.py | 1680 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/glm5_next/modeling_glm5_next.py | 2270 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/jetmoe/modeling_jetmoe.py | 786 | loss += self.aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/jetmoe/modular_jetmoe.py | 585 | loss += self.aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …/transformers/models/granitemoe/modeling_granitemoe.py | 630 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| 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 | CODE |
| LOW | …formers/models/minimax_m3_vl/modeling_minimax_m3_vl.py | 945 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| 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_ | COMMENT |
| 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:// | COMMENT |
| LOW | src/transformers/models/flex_olmo/modeling_flex_olmo.py | 653 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | …/transformers/models/layoutlmv2/modeling_layoutlmv2.py | 1064 | >>> boxes = data["bboxes"] # make sure to normalize your bounding boxes | CODE |
| LOW | …s/models/granitemoehybrid/modeling_granitemoehybrid.py | 1282 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/minimax/modeling_minimax.py | 858 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/jamba/modeling_jamba.py | 1054 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/phimoe/modeling_phimoe.py | 821 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/voxtral/processing_voxtral.py | 324 | # make sure to remove from text_kwargs and audio_kwargs | STRING |
| LOW | src/transformers/models/siglip/modeling_siglip.py | 507 | >>> # important: make sure to set padding="max_length" as that's how the model was trained | CODE |
| LOW | src/transformers/models/siglip/modeling_siglip.py | 691 | >>> # important: make sure to set padding="max_length" as that's how the model was trained | CODE |
| LOW | src/transformers/models/doge/modular_doge.py | 703 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/doge/modeling_doge.py | 789 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …ransformers/models/qwen3_5_moe/modeling_qwen3_5_moe.py | 1927 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …ransformers/models/qwen3_5_moe/modeling_qwen3_5_moe.py | 2084 | ) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/dbrx/modular_dbrx.py | 511 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/dbrx/modeling_dbrx.py | 692 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | …ransformers/models/deepseek_v4/modeling_deepseek_v4.py | 1526 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …nsformers/models/ernie4_5_moe/modeling_ernie4_5_moe.py | 694 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/siglip2/modeling_siglip2.py | 623 | >>> # important: make sure to set padding="max_length" as that's how the model was trained | CODE |
| LOW | src/transformers/models/siglip2/modeling_siglip2.py | 756 | >>> # important: make sure to set padding="max_length" as that's how the model was trained | CODE |
| LOW | src/transformers/models/glm4v_moe/modular_glm4v_moe.py | 415 | ) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/glm4v_moe/modeling_glm4v_moe.py | 1624 | ) # make sure to reside in the same device | CODE |
| LOW | …ansformers/models/qwen3_vl_moe/modular_qwen3_vl_moe.py | 440 | ) # make sure to reside in the same device | CODE |
| LOW | …nsformers/models/qwen3_vl_moe/modeling_qwen3_vl_moe.py | 1582 | ) # make sure to reside in the same device | CODE |
| LOW | …s/models/granitemoeshared/modeling_granitemoeshared.py | 696 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …ormers/models/qwen3_omni_moe/modular_qwen3_omni_moe.py | 1387 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | …ormers/models/qwen3_omni_moe/modular_qwen3_omni_moe.py | 1899 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | …rmers/models/qwen3_omni_moe/modeling_qwen3_omni_moe.py | 2228 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | …rmers/models/qwen3_omni_moe/modeling_qwen3_omni_moe.py | 3105 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/qwen4_exp/modeling_qwen4_exp.py | 1670 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/qwen4_exp/modeling_qwen4_exp.py | 2537 | ) # make sure to reside in the same device | CODE |
| 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/ | COMMENT |
| 8 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/pipelines/test_pipelines_fill_mask.py | 169 | dummy_str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit," * 100 | CODE |
| LOW | tests/pipelines/test_pipelines_fill_mask.py | 169 | dummy_str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit," * 100 | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 94 | "Lorem ipsum dolor sit amet", | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 94 | "Lorem ipsum dolor sit amet", | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 101 | "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shell | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 101 | "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shell | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 105 | "Lorem ipsum dolor sit amet=√=√ 치수=√ 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shelley | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 105 | "Lorem ipsum dolor sit amet=√=√ 치수=√ 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shelley | CODE |
| LOW | tests/models/donut/test_processing_donut.py | 37 | "name": "John Doe", | CODE |
| 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', ' | STRING |
| LOW | tests/models/xlnet/test_modeling_xlnet.py | 646 | # else offset+dummy_token when using cache | COMMENT |
| LOW | tests/models/xlnet/test_modeling_xlnet.py | 666 | # every token after consists of offset+dummy_token length when using cache | COMMENT |
| LOW⚡ | tests/models/lfm2_moe/test_modeling_lfm2_moe.py | 194 | prompts = ["Who are you?", "Complete the text: Lorem ipsum dolor ", "The Meji Restoration in Japan ended"] | CODE |
| LOW⚡ | tests/models/lfm2_moe/test_modeling_lfm2_moe.py | 199 | "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum.", | CODE |
| LOW⚡ | tests/models/lfm2_moe/test_modeling_lfm2_moe.py | 204 | "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum dolor", | CODE |
| LOW⚡ | tests/models/lfm2_moe/test_modeling_lfm2_moe.py | 209 | "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum dolor", | CODE |
| LOW | docs/source/ja/model_memory_anatomy.md | 38 | >>> dummy_data = { | CODE |
| LOW | docs/source/ja/model_memory_anatomy.md | 42 | >>> ds = Dataset.from_dict(dummy_data) | CODE |
| LOW | docs/source/ar/model_memory_anatomy.md | 22 | >>> dummy_data = { | CODE |
| LOW | docs/source/ar/model_memory_anatomy.md | 26 | >>> ds = Dataset.from_dict(dummy_data) | CODE |
| LOW | docs/source/ko/model_memory_anatomy.md | 39 | >>> dummy_data = { | CODE |
| LOW | docs/source/ko/model_memory_anatomy.md | 43 | >>> ds = Dataset.from_dict(dummy_data) | CODE |
| LOW | docs/source/es/model_memory_anatomy.md | 38 | >>> dummy_data = { | CODE |
| LOW | docs/source/es/model_memory_anatomy.md | 42 | >>> ds = Dataset.from_dict(dummy_data) | CODE |
| LOW | .github/workflows/self-comment-ci-amd.yml | 207 | - run: mkdir dummy_artifact && echo "placeholder" > dummy_artifact/placeholder.txt | CODE |
| LOW | src/transformers/exporters/exporter_openvino.py | 189 | decoder._input_signature = [node.name for node in graph_module.graph.nodes if node.op == "placeholder"] | CODE |
| LOW | src/transformers/exporters/exporter_openvino.py | 219 | if node.op == "placeholder" and isinstance(node.meta.get("val"), torch.Tensor) | CODE |
| LOW | src/transformers/exporters/exporter_openvino.py | 272 | placeholders = {node.name: node for node in graph_module.graph.nodes if node.op == "placeholder"} | CODE |
| LOW | src/transformers/exporters/exporter_openvino.py | 367 | if node.op == "placeholder" and node.name in leaf_names | CODE |
| LOW | src/transformers/exporters/exporter_openvino.py | 703 | if n.op == "output" or (n.op == "placeholder" and is_top_level): | CODE |
| LOW | src/transformers/exporters/exporter_executorch.py | 780 | if node.op != "placeholder": | CODE |
| LOW | src/transformers/exporters/exporter_executorch.py | 819 | placeholder_names = [node.name for node in exported_program.graph.nodes if node.op == "placeholder"] | CODE |
| LOW | src/transformers/exporters/exporter_executorch.py | 1202 | if feeder in erased or feeder.op in ("placeholder", "output") or feeder.users or feeder.is_impure(): | CODE |
| LOW | src/transformers/exporters/exporter_executorch.py | 1232 | if node.op != "placeholder" or not isinstance(node.target, str): | CODE |
| LOW⚡ | src/transformers/models/idefics/processing_idefics.py | 298 | fake_token = "<fake_token_around_image>" | STRING |
| LOW⚡ | src/transformers/models/idefics/processing_idefics.py | 304 | return image_token + fake_token | STRING |
| LOW⚡ | src/transformers/models/idefics/processing_idefics.py | 306 | return fake_token + image_token + fake_token | STRING |
| LOW⚡ | src/transformers/models/xlnet/modeling_xlnet.py | 1245 | dummy_token = torch.zeros((effective_batch_size, 1), dtype=torch.long, device=input_ids.device) | STRING |
| LOW⚡ | src/transformers/models/xlnet/modeling_xlnet.py | 1253 | input_ids = torch.cat([input_ids[:, -offset:], dummy_token], dim=1) | STRING |
| LOW⚡ | src/transformers/models/xlnet/modeling_xlnet.py | 1255 | input_ids = torch.cat([input_ids, dummy_token], dim=1) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/transformers/data/data_collator.py | 1241 | # (see documentation for `mems`), otherwise information may leak through due to reuse. In this implementatio | COMMENT |
| HIGH | src/transformers/data/data_collator.py | 1338 | # (see documentation for `mems`), otherwise information may leak through due to reuse. In this implementatio | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/source/en/model_output_tracing.md | 48 | # Captures second output as requested (index=1) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/utils/test_auto_docstring.py | 224 | f.write("def helper(): pass") | CODE |
| LOW | tests/cli/test_serve.py | 1926 | async def handle_request(_body, _request_id): | CODE |
| LOW | src/transformers/utils/deprecation.py | 85 | def my_function(do_reduce_labels): | STRING |
| LOW | src/transformers/utils/deprecation.py | 95 | def my_function(max_size): | STRING |
| LOW | src/transformers/utils/generic.py | 772 | def my_function(arg1, arg2, **kwargs): | STRING |
| LOW | src/transformers/cli/serving/transcription.py | 85 | async def handle_request(self, request: Request) -> JSONResponse | StreamingResponse: | CODE |
| LOW | src/transformers/cli/serving/chat_completion.py | 108 | async def handle_request(self, body: dict, request_id: str) -> StreamingResponse | JSONResponse: | CODE |
| LOW | src/transformers/cli/serving/completion.py | 77 | async def handle_request(self, body: dict, request_id: str) -> "StreamingResponse | JSONResponse": | CODE |
| LOW | src/transformers/cli/serving/response.py | 366 | async def handle_request(self, body: dict, request_id: str) -> StreamingResponse | JSONResponse: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | utils/check_repo.py | 261 | "MllamaTextModel", # Building part of bigger (tested) model. # TODO: add tests | CODE |
| LOW⚡ | utils/check_repo.py | 262 | "MllamaVisionModel", # Building part of bigger (tested) model. # TODO: add tests | CODE |
| LOW⚡ | utils/check_repo.py | 263 | "Llama4TextModel", # Building part of bigger (tested) model. # TODO: add tests | CODE |
| LOW⚡ | utils/check_repo.py | 264 | "Llama4VisionModel", # Building part of bigger (tested) model. # TODO: add tests | CODE |
| LOW | src/transformers/models/gemma4/processing_gemma4.py | 193 | # TODO: Add tests for audio-only processor inputs. | STRING |
| LOW | …models/embedding_gemma2/processing_embedding_gemma2.py | 271 | # TODO: Add tests for audio-only processor inputs. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/generation/test_flash_attention_parity.py | 15 | # Usage: | COMMENT |
| LOW | utils/compare_test_runs.py | 79 | # Example usage: | COMMENT |
| LOW | …mples/quantization/custom_quantization_int8_example.py | 227 | # Example usage | COMMENT |
| LOW | examples/pytorch/continuous_batching.py | 317 | # Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/transformers/models/glpn/modeling_glpn.py | 483 | CODE | |
| MEDIUM | src/transformers/models/glpn/modeling_glpn.py | 484 | CODE |