🤗 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 presents the forensic synthetic code analysis of huggingface/transformers, a Python project with 162,577 GitHub stars. SynthScan v2.0 examined 1,973,805 lines of code across 6176 source files, recording 35635 pattern matches distributed across 26 syntactic categories. The overall adjusted score of 31.5 places this repository in the Strong AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 35635 distinct pattern matches across 26 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| 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_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/gemma4/test_processing_gemma4.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 | we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the | STRING |
| HIGH | tests/models/colqwen2/test_processing_colqwen2.py | 0 | we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the | STRING |
| HIGH | tests/models/colpali/test_processing_colpali.py | 0 | we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the | STRING |
| HIGH | …odels/colmodernvbert/test_processing_colmodernvbert.py | 0 | we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the | 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/causal_lm_tester.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. | STRING |
| HIGH | tests/models/olmo3/test_modeling_olmo3.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. | STRING |
| HIGH | tests/models/gemma3/test_modeling_gemma3.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. | STRING |
| HIGH | …ts/models/mimo_v2_flash/test_modeling_mimo_v2_flash.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. | STRING |
| HIGH | tests/models/gemma3n/test_modeling_gemma3n.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. | STRING |
| HIGH | …modernbert_decoder/test_modeling_modernbert_decoder.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. | STRING |
| HIGH | tests/models/eurobert/test_modeling_eurobert.py | 0 | tests the frequency properties of the different rope scaling types on the model rope layer. | 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 | 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 | 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 |
| 6290 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | conftest.py | 45 | def _with_tmpdir_cache_fallback(fn): | CODE |
| LOW | conftest.py | 148 | 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 | 79 | def _build_lighteval_inputs_scorer( | CODE |
| LOW | benchmark_v2/framework/hardware_metrics.py | 30 | 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 | 477 | def get_extracted_tokenizer_from_sentencepiece(self, reference_tokenizer=None): | CODE |
| LOW | tests/test_tokenization_common.py | 497 | def tokenizer_integration_test_util( | CODE |
| LOW | tests/test_tokenization_common.py | 567 | def assert_padded_input_match(self, input_r: list, input_p: list, max_length: int, pad_token_id: int): | CODE |
| LOW | tests/test_tokenization_common.py | 577 | def assert_batch_padded_input_match( | CODE |
| LOW | tests/test_tokenization_common.py | 604 | def convert_batch_to_list_format(batch_encode_plus_sequences): | CODE |
| LOW | tests/test_tokenization_common.py | 613 | def test_tokenize_special_tokens(self): | CODE |
| LOW | tests/test_tokenization_common.py | 633 | def test_model_input_names_signature(self): | CODE |
| LOW | tests/test_tokenization_common.py | 644 | def test_tokenizer_store_full_signature(self): | CODE |
| LOW | tests/test_tokenization_common.py | 661 | def test_tokenizers_common_properties(self): | CODE |
| LOW | tests/test_tokenization_common.py | 693 | def test_tokenizers_common_ids_setters(self): | CODE |
| LOW | tests/test_tokenization_common.py | 726 | def test_save_and_load_tokenizer(self): | CODE |
| LOW | tests/test_tokenization_common.py | 859 | def test_integration_from_extractor(self): | CODE |
| LOW | tests/test_tokenization_common.py | 892 | def test_internal_consistency(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1013 | def test_chat_template_empty_conversation(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1021 | def test_chat_template_save_loading(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1063 | def test_chat_template_batched(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1137 | def test_chat_template_return_assistant_tokens_mask(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1330 | def test_chat_template_return_assistant_tokens_mask_truncated(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1441 | def test_continue_final_message(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1469 | def test_continue_final_message_with_trim(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1499 | def test_continue_final_message_with_decoy_earlier_message(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1524 | def test_continue_final_message_string_and_reasoning(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1572 | def test_chat_template_dict_saving(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1603 | def test_chat_template_dict_saving_rejects_path_traversal(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1620 | def test_chat_template_file_priority(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1633 | def test_number_of_added_tokens(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1645 | def test_maximum_encoding_length_single_input(self): | CODE |
| LOW | tests/test_tokenization_common.py | 1740 | def test_maximum_encoding_length_pair_input(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2013 | def test_special_tokens_mask_input_pairs(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2036 | def test_padding_side_in_kwargs(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2053 | def test_truncation_side_in_kwargs(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2070 | def test_encode_basic_padding(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2099 | def test_right_and_left_truncation(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2153 | def test_padding_to_multiple_of(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2185 | def test_padding_with_attention_mask(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2203 | def test_encode_plus_with_padding(self, use_padding_as_call_kwarg: bool): | CODE |
| LOW | tests/test_tokenization_common.py | 2328 | def test_conversion_reversible(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2366 | def test_batch_encode_plus_batch_sequence_length(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2414 | def test_batch_encode_plus_padding(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2528 | def _check_no_pad_token_padding(self, tokenizer, sequences): | CODE |
| LOW | tests/test_tokenization_common.py | 2582 | def test_batch_encode_dynamic_overflowing(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2645 | def test_added_tokens_serialization(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2672 | def test_tokenizer_initialization_with_conflicting_key(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2707 | def test_pad_token_initialization(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2740 | def test_bos_token_with_add_bos_token_true(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2757 | def test_bos_token_with_add_bos_token_false(self): | CODE |
| LOW | tests/test_tokenization_common.py | 2843 | def test_add_tokens_tokenizer(self): | CODE |
| LOW⚡ | tests/test_modeling_common.py | 1758 | def test_training_gradient_checkpointing(self): | CODE |
| 14226 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 | 201 | 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_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_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/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_kernels.py | 1 | # Copyright 2025 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_export.py | 1 | # Copyright 2026 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | tests/exporters/test_export.py | 41 | torch_device, | 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 | …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 |
| LOW | …lines/test_pipelines_zero_shot_image_classification.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | …lines/test_pipelines_zero_shot_image_classification.py | 41 | COMMENT | |
| LOW | …s/pipelines/test_pipelines_table_question_answering.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_image_segmentation.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | …lines/test_pipelines_zero_shot_audio_classification.py | 1 | # Copyright 2023 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_keypoint_matching.py | 1 | # Copyright 2025 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_fill_mask.py | 1 | # Copyright 2020 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_audio_classification.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| LOW | tests/pipelines/test_pipelines_video_classification.py | 1 | # Copyright 2021 The HuggingFace Team. All rights reserved. | COMMENT |
| 4012 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmark_v2/framework/benchmark_config.py | 17 | CODE | |
| LOW | tests/test_tokenization_common.py | 85 | CODE | |
| LOW | tests/test_tokenization_common.py | 85 | CODE | |
| LOW | …ipelines/test_pipelines_document_question_answering.py | 43 | CODE | |
| LOW | …pipelines/test_pipelines_zero_shot_object_detection.py | 35 | 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 | 20 | CODE | |
| LOW | tests/models/fsmt/test_modeling_fsmt.py | 19 | CODE | |
| LOW | tests/tokenization/test_tokenization_utils.py | 302 | CODE | |
| LOW | utils/check_import_complexity.py | 27 | CODE | |
| LOW | …amples/modular-transformers/modular_switch_function.py | 2 | CODE | |
| LOW | src/transformers/image_utils.py | 36 | CODE | |
| LOW | src/transformers/image_utils.py | 36 | CODE | |
| LOW | src/transformers/image_utils.py | 36 | CODE | |
| LOW | src/transformers/image_utils.py | 36 | CODE | |
| LOW | src/transformers/image_utils.py | 36 | CODE | |
| LOW | src/transformers/image_utils.py | 36 | 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 | 4 | CODE | |
| LOW | src/transformers/processing_utils.py | 81 | CODE | |
| LOW | src/transformers/processing_utils.py | 86 | 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 | 493 | CODE | |
| LOW | src/transformers/__init__.py | 493 | CODE | |
| LOW | src/transformers/__init__.py | 494 | CODE | |
| LOW | src/transformers/__init__.py | 495 | CODE | |
| LOW | src/transformers/__init__.py | 496 | CODE | |
| 3251 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmark_v2/framework/benchmark_config.py | 59 | CODE | |
| LOW | tests/causal_lm_tester.py | 167 | CODE | |
| LOW | tests/utils/test_auto_docstring.py | 244 | CODE | |
| LOW | tests/models/metaclip_2/test_modeling_metaclip_2.py | 69 | CODE | |
| LOW | tests/models/metaclip_2/test_modeling_metaclip_2.py | 296 | CODE | |
| LOW | …nie4_5_vl_moe/test_image_processing_ernie4_5_vl_moe.py | 38 | CODE | |
| LOW | …nie4_5_vl_moe/test_video_processing_ernie4_5_vl_moe.py | 36 | CODE | |
| LOW | …odels/ernie4_5_vl_moe/test_modeling_ernie4_5_vl_moe.py | 58 | 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 | 48 | CODE | |
| LOW | …s/table_transformer/test_modeling_table_transformer.py | 44 | CODE | |
| LOW | tests/models/bark/test_modeling_bark.py | 63 | CODE | |
| LOW | tests/models/bark/test_modeling_bark.py | 196 | CODE | |
| LOW | tests/models/bark/test_modeling_bark.py | 329 | CODE | |
| LOW | tests/models/convnextv2/test_modeling_convnextv2.py | 44 | CODE | |
| LOW | tests/models/llama4/test_image_processing_llama4.py | 24 | CODE | |
| LOW | tests/models/vitpose/test_image_processing_vitpose.py | 36 | CODE | |
| LOW | tests/models/vitpose/test_modeling_vitpose.py | 46 | CODE | |
| LOW | tests/models/mlcd/test_modeling_mlcd.py | 42 | CODE | |
| LOW | tests/models/pixtral/test_image_processing_pixtral.py | 40 | CODE | |
| LOW | tests/models/pixtral/test_modeling_pixtral.py | 37 | CODE | |
| LOW | tests/models/xcodec2/test_modeling_xcodec2.py | 43 | CODE | |
| LOW | tests/models/glpn/test_modeling_glpn.py | 48 | CODE | |
| LOW | tests/models/glpn/test_image_processing_glpn.py | 34 | CODE | |
| LOW | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 78 | CODE | |
| LOW | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 580 | 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 | 410 | 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 | 610 | CODE | |
| LOW | tests/models/flava/test_image_processing_flava.py | 47 | CODE | |
| LOW | tests/models/flava/test_modeling_flava.py | 70 | CODE | |
| LOW | tests/models/flava/test_modeling_flava.py | 323 | CODE | |
| LOW | tests/models/flava/test_modeling_flava.py | 469 | CODE | |
| LOW | tests/models/flava/test_modeling_flava.py | 742 | 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 | 51 | CODE | |
| LOW | …cohere2_vision/test_image_processing_cohere2_vision.py | 33 | 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/videomae/test_image_processing_videomae.py | 34 | 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 | 67 | CODE | |
| LOW | tests/models/aimv2/test_modeling_aimv2.py | 224 | CODE | |
| LOW | …s_transformer/test_modeling_time_series_transformer.py | 51 | CODE | |
| LOW | tests/models/mllama/test_image_processing_mllama.py | 36 | CODE | |
| LOW | tests/models/mllama/test_image_processing_mllama.py | 89 | CODE | |
| 2099 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 | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | tests/pipelines/test_pipelines_common.py | 67 | 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/get_ci_error_statistics.py | 14 | 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 | 164 | def set_output_embeddings(self, value: Any) -> None: ... | CODE |
| LOW⚡ | src/transformers/_typing.py | 165 | def set_input_embeddings(self, value: Any) -> None: ... | CODE |
| LOW | src/transformers/testing_utils.py | 4423 | 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 | 1076 | 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 | 233 | __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 | 234 | __all__ = [ | CODE |
| LOW | src/transformers/models/dots1/configuration_dots1.py | 129 | __all__ = ["Dots1Config"] | STRING |
| LOW | src/transformers/models/dots1/modular_dots1.py | 209 | __all__ = [ | CODE |
| LOW | src/transformers/models/dots1/modeling_dots1.py | 642 | __all__ = ["Dots1PreTrainedModel", "Dots1Model", "Dots1ForCausalLM"] | CODE |
| LOW | …sformers/models/metaclip_2/configuration_metaclip_2.py | 247 | __all__ = ["MetaClip2Config", "MetaClip2TextConfig", "MetaClip2VisionConfig"] | CODE |
| LOW | …/transformers/models/metaclip_2/modeling_metaclip_2.py | 1177 | __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 | 249 | __all__ = ["Ernie4_5_VLMoeProcessor"] | CODE |
| LOW | …ls/ernie4_5_vl_moe/image_processing_ernie4_5_vl_moe.py | 246 | __all__ = ["Ernie4_5_VL_MoeImageProcessor", "Ernie4_5_VLMoeImageProcessor"] | STRING |
| LOW | …ers/models/ernie4_5_vl_moe/modeling_ernie4_5_vl_moe.py | 1938 | __all__ = [ | STRING |
| 1786 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_tensor_parallel_mixin.py | 39 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 41 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 61 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 63 | # ============================================================================= | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 452 | # ============================================================ | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 454 | # ============================================================ | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 465 | # ============================================================ | COMMENT |
| MEDIUM | tests/test_tensor_parallel_mixin.py | 467 | # ============================================================ | 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/exporters/test_utils.py | 74 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 76 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 172 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 174 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 221 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 223 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 260 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/exporters/test_utils.py | 263 | # ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 45 | # ──────────────────────────── skip lists ──────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 261 | # ──────────────────────────── ONNX optimization toggles ──────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 315 | # ──────────────────────────── helpers ──────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 358 | # ──────────────────────────── mixins ──────────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 460 | # ──────────────────── torch.export tests ───────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 492 | # ──────────────────────── ONNX tests ───────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 523 | # ──────────────────── ExecuTorch tests ─────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 583 | # ──────────────────── torch.export tests ───────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 615 | # ──────────────────────── ONNX tests ───────────────────────── | COMMENT |
| MEDIUM | tests/exporters/test_export.py | 647 | # ──────────────────── ExecuTorch tests ─────────────────────── | COMMENT |
| MEDIUM | tests/utils/test_auto_docstring.py | 673 | # --------------------------------------------------------------------------- | STRING |
| MEDIUM | tests/utils/test_auto_docstring.py | 675 | # --------------------------------------------------------------------------- | STRING |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 154 | # ------------------------ | COMMENT |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 156 | # ------------------------ | COMMENT |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 292 | # ------------------------ | COMMENT |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 294 | # ------------------------ | COMMENT |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 261 | # ------------------------ | COMMENT |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 263 | # ------------------------ | COMMENT |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 444 | # ------------------------ | STRING |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 446 | # ------------------------ | STRING |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 457 | # ------------------------ | STRING |
| MEDIUM⚡ | tests/models/gpt_oss/test_modeling_gpt_oss.py | 459 | # ------------------------ | STRING |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 334 | # ------------------------ | STRING |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 336 | # ------------------------ | STRING |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 372 | # ------------------------ | STRING |
| MEDIUM | tests/models/gpt_oss/test_modeling_gpt_oss.py | 374 | # ------------------------ | STRING |
| MEDIUM⚡ | tests/heterogeneity/test_configuration_utils.py | 47 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/heterogeneity/test_configuration_utils.py | 49 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/heterogeneity/test_configuration_utils.py | 27 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/heterogeneity/test_configuration_utils.py | 29 | # ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_callback.py | 234 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_callback.py | 236 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_callback.py | 320 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_callback.py | 322 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_callback.py | 441 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/trainer/test_trainer_callback.py | 443 | # ------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/trainer/test_trainer_callback.py | 56 | # ============================================================================= | COMMENT |
| 411 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmark/benchmark.py | 60 | CODE | |
| LOW | benchmark_v2/framework/hardware_metrics.py | 184 | CODE | |
| LOW | benchmark_v2/framework/benchmark_runner.py | 82 | CODE | |
| LOW | benchmark_v2/framework/benchmark_runner.py | 443 | CODE | |
| LOW | benchmark_v2/framework/data_classes.py | 21 | CODE | |
| LOW | benchmark_v2/framework/benchmark_config.py | 254 | CODE | |
| LOW | tests/test_tokenization_common.py | 135 | CODE | |
| LOW | tests/test_tokenization_common.py | 225 | CODE | |
| LOW | tests/test_tokenization_common.py | 1137 | CODE | |
| LOW | tests/test_tokenization_common.py | 1330 | CODE | |
| LOW | tests/test_tokenization_common.py | 1645 | CODE | |
| LOW | tests/test_tokenization_common.py | 1740 | CODE | |
| LOW | tests/test_tokenization_common.py | 2645 | CODE | |
| LOW | tests/test_modeling_common.py | 163 | CODE | |
| LOW | tests/test_modeling_common.py | 561 | CODE | |
| LOW | tests/test_modeling_common.py | 739 | CODE | |
| LOW | tests/test_modeling_common.py | 910 | CODE | |
| LOW | tests/test_modeling_common.py | 946 | CODE | |
| LOW | tests/test_modeling_common.py | 1134 | CODE | |
| LOW | tests/test_modeling_common.py | 1499 | CODE | |
| LOW | tests/test_modeling_common.py | 1645 | CODE | |
| LOW | tests/test_modeling_common.py | 2054 | CODE | |
| LOW | tests/test_modeling_common.py | 2133 | CODE | |
| LOW | tests/test_modeling_common.py | 2315 | CODE | |
| LOW | tests/test_modeling_common.py | 2513 | CODE | |
| LOW | tests/test_modeling_common.py | 2539 | CODE | |
| LOW | tests/test_modeling_common.py | 2583 | CODE | |
| LOW | tests/test_modeling_common.py | 2656 | CODE | |
| LOW | tests/test_modeling_common.py | 2714 | CODE | |
| LOW | tests/test_modeling_common.py | 3004 | CODE | |
| LOW | tests/test_modeling_common.py | 3047 | CODE | |
| LOW | tests/test_modeling_common.py | 3085 | CODE | |
| LOW | tests/test_modeling_common.py | 3131 | CODE | |
| LOW | tests/test_modeling_common.py | 3175 | CODE | |
| LOW | tests/test_modeling_common.py | 3277 | CODE | |
| LOW | tests/test_modeling_common.py | 3496 | CODE | |
| LOW | tests/test_modeling_common.py | 3556 | CODE | |
| LOW | tests/test_modeling_common.py | 3593 | CODE | |
| LOW | tests/test_modeling_common.py | 3675 | CODE | |
| LOW | tests/test_modeling_common.py | 3762 | CODE | |
| LOW | tests/test_modeling_common.py | 3824 | CODE | |
| LOW | tests/test_modeling_common.py | 3923 | CODE | |
| LOW | tests/test_modeling_common.py | 4402 | CODE | |
| LOW | tests/test_modeling_common.py | 4445 | CODE | |
| LOW | tests/test_modeling_common.py | 4570 | CODE | |
| LOW | tests/test_modeling_common.py | 4638 | CODE | |
| LOW | tests/test_modeling_common.py | 5075 | CODE | |
| LOW | tests/test_modeling_common.py | 5236 | CODE | |
| LOW | tests/test_modeling_common.py | 5377 | CODE | |
| LOW | tests/test_modeling_common.py | 5510 | CODE | |
| LOW | tests/test_modeling_common.py | 5585 | CODE | |
| LOW | tests/test_modeling_common.py | 1507 | CODE | |
| LOW | tests/test_modeling_common.py | 2721 | CODE | |
| LOW | tests/test_modeling_common.py | 2726 | CODE | |
| LOW | tests/test_modeling_common.py | 3387 | CODE | |
| LOW | tests/test_configuration_common.py | 94 | CODE | |
| LOW | tests/test_configuration_common.py | 187 | CODE | |
| LOW | tests/test_tensor_parallel_mixin.py | 158 | CODE | |
| LOW | tests/test_tensor_parallel_mixin.py | 219 | CODE | |
| LOW | tests/test_processing_common.py | 346 | CODE | |
| 1611 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_processing_common.py | 1148 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/test_processing_common.py | 1171 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/test_processing_common.py | 1306 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/test_processing_common.py | 1497 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/test_processing_common.py | 1520 | # Define the kwargs for each modality | 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 | 689 | # Create a mock model on CUDA device | COMMENT |
| MEDIUM | tests/kernels/test_kernels.py | 724 | # Create a mock model | COMMENT |
| MEDIUM | tests/peft_integration/test_peft_integration.py | 1289 | # 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 | 322 | # Create a temporary directory with a complete adapter model structure | COMMENT |
| MEDIUM | tests/utils/test_masking_utils.py | 254 | # 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 | 1147 | # Create a clone of the input_ids tensor that will be its masked version | COMMENT |
| MEDIUM | tests/models/flava/test_modeling_flava.py | 1195 | # Create a clone of the input_ids tensor that will be its masked version | COMMENT |
| MEDIUM | …cohere2_vision/test_image_processing_cohere2_vision.py | 208 | # 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 | 303 | # Create a temp file that calls the worker | COMMENT |
| MEDIUM | tests/models/lighton_ocr/test_modeling_lighton_ocr.py | 507 | # Create a small config for fast testing | COMMENT |
| MEDIUM | …ts/models/superglue/test_image_processing_superglue.py | 410 | # Create a specific scenario with intentional padding issues | COMMENT |
| MEDIUM | …ts/models/superglue/test_image_processing_superglue.py | 429 | # Create a match that points to a padded keypoint in image 1 | COMMENT |
| MEDIUM | …ts/models/superglue/test_image_processing_superglue.py | 434 | # Create a valid match for comparison | COMMENT |
| MEDIUM | tests/models/pix2struct/test_processing_pix2struct.py | 167 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/models/pix2struct/test_processing_pix2struct.py | 196 | # Define the kwargs for each modality | 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 | 439 | # 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 | 242 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/models/colqwen2/test_processing_colqwen2.py | 262 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/models/nemotron_h/test_modeling_nemotron_h.py | 798 | # Create a legacy config.json | COMMENT |
| MEDIUM | tests/models/gemma4/test_modeling_gemma4.py | 613 | # 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 | 85 | # 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 | tests/models/kosmos2_5/test_processor_kosmos2_5.py | 199 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/models/kosmos2_5/test_processor_kosmos2_5.py | 228 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | …ts/models/oneformer/test_image_processing_oneformer.py | 338 | # 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/kosmos2/test_processing_kosmos2.py | 412 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/models/kosmos2/test_processing_kosmos2.py | 438 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/models/colpali/test_processing_colpali.py | 247 | # Define the kwargs for each modality | COMMENT |
| MEDIUM | tests/models/colpali/test_processing_colpali.py | 267 | # Define the kwargs for each modality | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 294 | # Create a small image (256x256) | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 312 | # Create a small image that won't exceed the max_image_tokens threshold | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 328 | # Create a large image (2048x2048) | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 347 | # Create a large image that will require tiling | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 397 | # Create a landscape image (1920x1080, ~16:9 aspect ratio) | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 416 | # Create an extremely wide image (3000x500) | COMMENT |
| MEDIUM⚡ | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 435 | # Create an extremely tall image (500x3000) | COMMENT |
| MEDIUM | tests/models/lfm2_vl/test_image_processing_lfm2_vl.py | 372 | # Create a large image that will require tiling | COMMENT |
| MEDIUM | tests/models/janus/test_processing_janus.py | 362 | # Create a simple text message for testing | COMMENT |
| MEDIUM⚡ | …modernbert_decoder/test_modeling_modernbert_decoder.py | 192 | # 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 | 296 | # Creating a 4D mask where each of the last 3 tokens do not attend to each other. | COMMENT |
| 236 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/transformers/configuration_utils.py | 603 | Instantiate a [`PreTrainedConfig`] (or a derived class) from a pretrained model configuration. Args: | STRING |
| HIGH | src/transformers/pytorch_utils.py | 132 | This function chunks the `input_tensors` into smaller input tensor parts of size `chunk_size` over the dimension | 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 | 1118 | 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 | 1223 | #TODO remove this from here! PreTrainedTOkeniuzerBase should be agnostic of AddedToken. Add a list of | 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 | 1302 | Create a mask from the two sequences passed to be used in a sequence-pair classification task. This me | STRING |
| HIGH | src/transformers/dynamic_module_utils.py | 529 | 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 | 430 | Instantiate a type of [`~video_processing_utils.VideoProcessorBase`] from an video processor. Args: | STRING |
| HIGH | src/transformers/pipelines/__init__.py | 691 | 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 | 247 | 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 | 243 | 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 | 317 | 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 | 1363 | 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 | 123 | 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 | 292 | 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 | 216 | Loads the image processor configuration from a pretrained model image processor configuration. Args: p | STRING |
| HIGH | src/transformers/models/auto/video_processing_auto.py | 118 | Loads the video processor configuration from a pretrained model video processor configuration. Args: p | STRING |
| HIGH | src/transformers/models/auto/feature_extraction_auto.py | 114 | Loads the feature extractor configuration from a pretrained model feature extractor configuration. Args: | STRING |
| HIGH | src/transformers/models/auto/tokenization_auto.py | 534 | 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 | 1081 | 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 | labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image cl | STRING |
| HIGH | src/transformers/models/patchtst/modeling_patchtst.py | 1097 | Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requ | STRING |
| HIGH | src/transformers/models/patchtst/modeling_patchtst.py | 1234 | Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requ | STRING |
| HIGH | src/transformers/models/patchtst/modeling_patchtst.py | 1602 | 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 | labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image cl | 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 | labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image cl | STRING |
| HIGH | …rmers/models/efficientloftr/modeling_efficientloftr.py | 885 | 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 | 674 | Examples: ```python >>> import av >>> import torch >>> import numpy as np | STRING |
| HIGH | src/transformers/models/x_clip/modeling_x_clip.py | 995 | return_loss (`bool`, *optional*): Whether or not to return the contrastive loss. Examples: | STRING |
| HIGH | src/transformers/models/x_clip/modeling_x_clip.py | 1150 | 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 |
| HIGH | …ansformers/models/qwen2_5_omni/modular_qwen2_5_omni.py | 846 | Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation: | STRING |
| 15 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 | 297 | # Check if generation had the right number of tokens | COMMENT |
| LOW | tests/test_modeling_common.py | 1382 | # Set seed to ensure stable model initialization - avoids numerical issues (NaN) with some models | COMMENT |
| LOW | tests/test_modeling_common.py | 4625 | # 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 | 244 | # Check if there's a custom setup method for this specific attribute | COMMENT |
| LOW | tests/test_image_processing_common.py | 583 | # Check if torchvision backend is available | COMMENT |
| LOW | tests/test_video_processing_common.py | 346 | # 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 | 152 | # Check if both modules have a 'forward' attribute | COMMENT |
| LOW | tests/kernels/test_kernels.py | 177 | # 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 | 853 | # Check if cache config is passed through correctly | COMMENT |
| LOW | tests/utils/test_cache_utils.py | 863 | # Check if the exported model is configured with the `StaticCache` 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 | 203 | # Check if we have expected results for this configuration | COMMENT |
| LOW | tests/models/gpt_oss/test_modeling_gpt_oss.py | 404 | # Check if we have expected results for this configuration | STRING |
| LOW | …itional_detr/test_image_processing_conditional_detr.py | 355 | # 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 | 478 | # 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 | 329 | # Set sampling to True. Video frames should be sampled with `num_frames` in the output | COMMENT |
| LOW | tests/models/colqwen2/test_modeling_colqwen2.py | 336 | # Check if the maximum scores per row are in the diagonal of the matrix score | COMMENT |
| LOW | tests/models/colqwen2/test_modeling_colqwen2.py | 391 | # 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 | 305 | # Set longest_edge to None to test for semantic segmentatiom. | COMMENT |
| LOW | tests/models/rt_detr/test_image_processing_rt_detr.py | 328 | # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, width | COMMENT |
| LOW | tests/models/kimi_k25/test_video_processing_kimi_k25.py | 280 | # 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 | 320 | # 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 | 496 | # 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 | 335 | # 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 | 458 | # 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 | 365 | # 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 | 488 | # 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_video_processing_qwen2_vl.py | 320 | # 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 | 422 | # 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 | 544 | # 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 | 247 | # 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 | 2110 | # 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 | 270 | # Check if it works for a simple language modeling example | COMMENT |
| LOW | tests/trainer/test_trainer_checkpointing.py | 955 | # Check if the model weights file exists in the final checkpoint directory. | COMMENT |
| LOW⚡ | tests/trainer/test_trainer.py | 436 | # Check if model weights have been updated | COMMENT |
| LOW⚡ | tests/generation/test_utils.py | 3217 | "# Calculate the sum\nresult = num1 + num2\n\n# Print the result\nprint(result)\n```\n" | CODE |
| LOW⚡ | utils/check_docstrings.py | 860 | # Check if docstring starts and ends on the same line | COMMENT |
| LOW⚡ | utils/check_docstrings.py | 874 | # Check if it's named "auto_docstring" | COMMENT |
| LOW | utils/check_docstrings.py | 1233 | # Check if this arg has placeholders | COMMENT |
| LOW | utils/check_docstrings.py | 1478 | # Check if this method is inside a processor class | COMMENT |
| LOW | utils/check_docstrings.py | 1483 | # Check if class inherits from ModelOutput, ProcessorMixin, or PreTrainedConfig | COMMENT |
| LOW | utils/check_docstrings.py | 1791 | # Check if any fields are missing or need removal | COMMENT |
| LOW | utils/create_dummy_models.py | 1269 | # Check if there is any tokenizer (prefer fast version if any) | COMMENT |
| LOW | utils/check_inits.py | 150 | # Check if the backend declaration is inside a try block: | COMMENT |
| 182 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 | 263 | except Exception as e: | CODE |
| LOW | benchmark_v2/framework/hardware_metrics.py | 46 | except Exception: | CODE |
| LOW | benchmark_v2/framework/hardware_metrics.py | 202 | except Exception: | CODE |
| LOW⚡ | benchmark_v2/framework/hardware_metrics.py | 221 | except Exception as e: | CODE |
| LOW⚡ | benchmark_v2/framework/hardware_metrics.py | 231 | except Exception as e: | CODE |
| LOW⚡ | benchmark_v2/framework/hardware_metrics.py | 236 | except Exception as e: | CODE |
| LOW⚡ | benchmark_v2/framework/hardware_metrics.py | 242 | except Exception as e: | CODE |
| LOW | benchmark_v2/framework/hardware_metrics.py | 289 | except Exception: | CODE |
| LOW | benchmark_v2/framework/benchmark_runner.py | 365 | except Exception as e: | CODE |
| LOW | benchmark_v2/framework/benchmark_config.py | 44 | except Exception as _: | CODE |
| LOW | tests/test_tokenization_common.py | 294 | except Exception: | CODE |
| LOW | tests/test_tokenization_common.py | 2793 | except Exception as e: | CODE |
| LOW | tests/test_tokenization_common.py | 2900 | except Exception as e: | CODE |
| LOW⚡ | tests/test_modeling_common.py | 2323 | except Exception as e: | CODE |
| LOW⚡ | tests/test_modeling_common.py | 2437 | except Exception as e: | CODE |
| LOW | tests/test_modeling_common.py | 283 | except Exception as _: | CODE |
| LOW | tests/test_modeling_common.py | 2546 | except Exception as e: | CODE |
| LOW | tests/test_modeling_common.py | 5646 | except Exception as e: | CODE |
| LOW | tests/test_processing_common.py | 258 | except Exception as e: | CODE |
| LOW | tests/test_processing_common.py | 639 | except Exception: | CODE |
| LOW | tests/test_processing_common.py | 670 | except Exception: | CODE |
| LOW | tests/test_processing_common.py | 710 | except Exception: | CODE |
| LOW | tests/test_processing_common.py | 742 | 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 | 566 | except Exception as e: | CODE |
| LOW⚡ | tests/kernels/test_kernels.py | 570 | except Exception as e: | CODE |
| LOW⚡ | tests/kernels/test_kernels.py | 585 | except Exception as e: | CODE |
| LOW⚡ | tests/kernels/test_kernels.py | 589 | except Exception as e: | CODE |
| LOW | tests/kernels/test_kernels.py | 82 | except Exception as e: | CODE |
| LOW | tests/kernels/test_kernels.py | 92 | except Exception as e: | CODE |
| LOW | tests/kernels/test_kernels.py | 632 | except Exception as e: | CODE |
| LOW | …pelines/test_pipelines_automatic_speech_recognition.py | 1817 | except Exception: | CODE |
| LOW | tests/utils/test_auto_docstring.py | 726 | except Exception: | STRING |
| LOW | tests/utils/test_audio_utils.py | 1839 | except Exception as e: | CODE |
| LOW | …v2_tokenizer/test_modeling_higgs_audio_v2_tokenizer.py | 228 | except Exception: | CODE |
| LOW | …v2_tokenizer/test_modeling_higgs_audio_v2_tokenizer.py | 233 | 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 | 578 | 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/opt/test_modeling_opt.py | 349 | except Exception: | CODE |
| 240 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/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 | 104 | torch._inductor.codecache.TritonFuture._compile_cache.clear() | CODE |
| CRITICAL | utils/check_repo.py | 1383 | model_types = list(transformers.models.auto.configuration_auto.CONFIG_MAPPING_NAMES.keys()) | CODE |
| CRITICAL | src/transformers/trainer.py | 2205 | kwargs.update({"dtype": self.accelerator.state.deepspeed_plugin.hf_ds_config.dtype()}) | CODE |
| CRITICAL | src/transformers/tokenization_mistral_common.py | 592 | 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 | 1766 | 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 | 1557 | object_queries_position_embeddings = self.detr.model.query_position_embeddings.weight.unsqueeze(0).repeat( | CODE |
| CRITICAL | src/transformers/integrations/mxfp4.py | 210 | module.gate_up_proj_precision_config.weight_scale.storage.layout.unswizzle_data( | CODE |
| CRITICAL | src/transformers/integrations/mxfp4.py | 221 | module.down_proj_precision_config.weight_scale.storage.layout.unswizzle_data( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/utils/test_cache_utils.py | 1359 | # Step 0 : multi-token prefill | COMMENT |
| LOW | tests/utils/test_cache_utils.py | 1371 | # 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⚡ | tests/generation/test_paged_attention.py | 23 | "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orange | CODE |
| LOW⚡ | tests/generation/test_paged_attention.py | 31 | "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orange | CODE |
| LOW | src/transformers/feature_extraction_utils.py | 518 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style | COMMENT |
| LOW | src/transformers/image_processing_base.py | 323 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style | COMMENT |
| LOW | src/transformers/video_processing_utils.py | 665 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style | COMMENT |
| LOW | …ls/ernie4_5_vl_moe/video_processing_ernie4_5_vl_moe.py | 220 | # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy style | 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 | 2854 | # Step 2: Get memory frames and concatenate their features | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2864 | # Step 3: Get and process object pointers | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2880 | # Step 4: Concatenate all retrieved memories and their positional embeddings | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2884 | # Step 5: Forward through the memory attention mechanism | COMMENT |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 2842 | # Step 1: Handle initial conditioning frames | COMMENT |
| LOW | …sformers/models/edgetam_video/modular_edgetam_video.py | 1080 | # Step 1: Handle initial conditioning frames | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1092 | # Step 2: Get memory frames and concatenate their features | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1102 | # Step 3: Get and process object pointers | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1118 | # Step 4: Concatenate all retrieved memories and their positional embeddings | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1122 | # Step 5: Forward through the memory attention mechanism | COMMENT |
| LOW⚡ | …/transformers/models/nemotron_h/modeling_nemotron_h.py | 533 | # Step 2: Compute M, equivalent to applying attention mask to weights | COMMENT |
| LOW⚡ | …/transformers/models/nemotron_h/modeling_nemotron_h.py | 537 | # Step 3: Compute Y_diag (apply to values) | COMMENT |
| LOW⚡ | src/transformers/models/gemma4/processing_gemma4.py | 277 | # Step 1: mel frames (matches feature_extraction_gemma4.py) | STRING |
| LOW⚡ | src/transformers/models/gemma4/processing_gemma4.py | 284 | # 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 | 304 | # 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 | 215 | # 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 | 202 | # 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/zamba2/modeling_zamba2.py | 821 | # Step 2: Compute M, equivalent to applying attention mask to weights | COMMENT |
| LOW⚡ | src/transformers/models/zamba2/modeling_zamba2.py | 825 | # Step 3: Compute Y_diag (apply to values) | COMMENT |
| LOW⚡ | src/transformers/models/zamba2/modular_zamba2.py | 609 | # Step 2: Compute M, equivalent to applying attention mask to weights | COMMENT |
| LOW⚡ | src/transformers/models/zamba2/modular_zamba2.py | 613 | # Step 3: Compute Y_diag (apply to values) | COMMENT |
| LOW⚡ | …s/deepseek_ocr2/convert_deepseek_ocr2_weights_to_hf.py | 220 | # Step 1: Download the original checkpoint | STRING |
| LOW⚡ | …s/deepseek_ocr2/convert_deepseek_ocr2_weights_to_hf.py | 223 | # Step 2: Convert to native transformers format | STRING |
| LOW⚡ | …rmers/models/gemma4_unified/modeling_gemma4_unified.py | 825 | # Step 1: Patch embedding (LN → Dense → LN) | COMMENT |
| LOW⚡ | …rmers/models/gemma4_unified/modeling_gemma4_unified.py | 832 | # Step 2: Add factorized positional embeddings + LN | COMMENT |
| LOW⚡ | …rmers/models/gemma4_unified/modeling_gemma4_unified.py | 840 | # Step 3: Base multimodal embedder (RMSNorm → Dense) | COMMENT |
| LOW⚡ | …dels/gemma4_unified/video_processing_gemma4_unified.py | 301 | # Step 1: Aspect-ratio-preserving resize | COMMENT |
| LOW⚡ | …dels/gemma4_unified/video_processing_gemma4_unified.py | 310 | # Step 2: Rescale pixel values (typically to [0, 1]) and optionally identity normalize | COMMENT |
| LOW⚡ | …dels/gemma4_unified/video_processing_gemma4_unified.py | 313 | # Step 3: Patchify into teacher-size patches (16px) | COMMENT |
| LOW⚡ | …dels/gemma4_unified/video_processing_gemma4_unified.py | 319 | # Step 4: Compute teacher-level position IDs | COMMENT |
| 55 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/utils/test_cache_utils.py | 1359 | # Step 0 : multi-token prefill | COMMENT |
| LOW | tests/utils/test_cache_utils.py | 1371 | # 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⚡ | tests/generation/test_paged_attention.py | 23 | "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orange | CODE |
| LOW⚡ | tests/generation/test_paged_attention.py | 31 | "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orange | CODE |
| LOW⚡ | docs/source/en/model_doc/qwen3_asr.md | 259 | # Step 1: Transcribe | COMMENT |
| LOW⚡ | docs/source/en/model_doc/qwen3_asr.md | 268 | # Step 2: Prepare alignment inputs | COMMENT |
| LOW⚡ | docs/source/en/model_doc/qwen3_asr.md | 274 | # Step 3: Run forced aligner | COMMENT |
| LOW⚡ | docs/source/en/model_doc/qwen3_asr.md | 278 | # Step 4: Decode timestamps | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2854 | # Step 2: Get memory frames and concatenate their features | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2864 | # Step 3: Get and process object pointers | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2880 | # Step 4: Concatenate all retrieved memories and their positional embeddings | COMMENT |
| LOW⚡ | …formers/models/edgetam_video/modeling_edgetam_video.py | 2884 | # Step 5: Forward through the memory attention mechanism | COMMENT |
| LOW | …formers/models/edgetam_video/modeling_edgetam_video.py | 2842 | # Step 1: Handle initial conditioning frames | COMMENT |
| LOW | …sformers/models/edgetam_video/modular_edgetam_video.py | 1080 | # Step 1: Handle initial conditioning frames | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1092 | # Step 2: Get memory frames and concatenate their features | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1102 | # Step 3: Get and process object pointers | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1118 | # Step 4: Concatenate all retrieved memories and their positional embeddings | COMMENT |
| LOW⚡ | …sformers/models/edgetam_video/modular_edgetam_video.py | 1122 | # Step 5: Forward through the memory attention mechanism | COMMENT |
| LOW | src/transformers/models/colqwen2/processing_colqwen2.py | 136 | # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs. | STRING |
| LOW | src/transformers/models/colqwen2/modular_colqwen2.py | 134 | # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs. | STRING |
| LOW⚡ | …/transformers/models/nemotron_h/modeling_nemotron_h.py | 533 | # Step 2: Compute M, equivalent to applying attention mask to weights | COMMENT |
| LOW⚡ | …/transformers/models/nemotron_h/modeling_nemotron_h.py | 537 | # Step 3: Compute Y_diag (apply to values) | COMMENT |
| LOW⚡ | src/transformers/models/gemma4/processing_gemma4.py | 277 | # Step 1: mel frames (matches feature_extraction_gemma4.py) | STRING |
| LOW⚡ | src/transformers/models/gemma4/processing_gemma4.py | 284 | # 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/zamba2/modeling_zamba2.py | 821 | # Step 2: Compute M, equivalent to applying attention mask to weights | COMMENT |
| LOW⚡ | src/transformers/models/zamba2/modeling_zamba2.py | 825 | # Step 3: Compute Y_diag (apply to values) | COMMENT |
| LOW⚡ | src/transformers/models/zamba2/modular_zamba2.py | 609 | # Step 2: Compute M, equivalent to applying attention mask to weights | COMMENT |
| LOW⚡ | src/transformers/models/zamba2/modular_zamba2.py | 613 | # Step 3: Compute Y_diag (apply to values) | COMMENT |
| LOW | …a2vec_vision_original_pytorch_checkpoint_to_pytorch.py | 264 | # IMPORTANT: Note that for now we've only converted the down-stream | COMMENT |
| LOW⚡ | …s/deepseek_ocr2/convert_deepseek_ocr2_weights_to_hf.py | 220 | # Step 1: Download the original checkpoint | STRING |
| LOW⚡ | …s/deepseek_ocr2/convert_deepseek_ocr2_weights_to_hf.py | 223 | # Step 2: Convert to native transformers format | STRING |
| LOW⚡ | …rmers/models/gemma4_unified/modeling_gemma4_unified.py | 825 | # Step 1: Patch embedding (LN → Dense → LN) | COMMENT |
| LOW⚡ | …rmers/models/gemma4_unified/modeling_gemma4_unified.py | 832 | # Step 2: Add factorized positional embeddings + LN | COMMENT |
| LOW⚡ | …rmers/models/gemma4_unified/modeling_gemma4_unified.py | 840 | # Step 3: Base multimodal embedder (RMSNorm → Dense) | COMMENT |
| LOW⚡ | …dels/gemma4_unified/video_processing_gemma4_unified.py | 301 | # Step 1: Aspect-ratio-preserving resize | COMMENT |
| LOW⚡ | …dels/gemma4_unified/video_processing_gemma4_unified.py | 310 | # Step 2: Rescale pixel values (typically to [0, 1]) and optionally identity normalize | COMMENT |
| LOW⚡ | …dels/gemma4_unified/video_processing_gemma4_unified.py | 313 | # Step 3: Patchify into teacher-size patches (16px) | COMMENT |
| LOW⚡ | …dels/gemma4_unified/video_processing_gemma4_unified.py | 319 | # Step 4: Compute teacher-level position IDs | COMMENT |
| 53 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | pyproject.toml | 106 | # 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 | 725 | # Note: for all mixins that utilize the Hub in some way, we should ensure that | COMMENT |
| MEDIUM | tests/test_processing_common.py | 160 | # TODO: make this more robust. We intentionally do NOT call _setup_test_attributes(full_processor) | COMMENT |
| LOW⚡ | tests/tensor_parallel/test_tensor_parallel.py | 324 | # so just use a SimpleNamespace to test that the attribute is updated correctly. | COMMENT |
| LOW⚡ | tests/pipelines/test_pipelines_common.py | 291 | # If dtype is NOT specified in the pipeline constructor, the property should just return | COMMENT |
| LOW⚡ | tests/pipelines/test_pipelines_common.py | 296 | # If underlying model doesn't have dtype property, simply return None | COMMENT |
| LOW⚡ | tests/utils/test_modeling_utils.py | 3056 | # a KeyError; they should simply return False. | STRING |
| MEDIUM | tests/utils/test_auto_docstring.py | 688 | # Relative metric; robust across CI vs local. Catches serious regressions. | STRING |
| MEDIUM⚡ | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 537 | ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) at | CODE |
| MEDIUM⚡ | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 537 | ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) at | CODE |
| MEDIUM⚡ | …odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py | 539 | ARTICLE_MAGNET = r"""it is well known that the classical magnetoresistance ( mr ) in metals or semiconductors wi | 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/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 |
| MEDIUM | tests/models/gemma4/test_modeling_gemma4.py | 817 | ("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 | 743 | ("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 | 767 | ("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 | 138 | # For simplicity just set the last n tokens to the image token | COMMENT |
| MEDIUM | tests/models/paligemma/test_modeling_paligemma.py | 579 | # this is a supplementary test to ensure paligemma fine-tuning that relies on token_type_ids is robust to future | 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 | 152 | # 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/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 | 2662 | # In this case, we simply call recursively the function on both internal caches | COMMENT |
| LOW | tests/generation/test_utils.py | 2752 | # In this case, we simply call recursively the function on both internal caches | COMMENT |
| MEDIUM | tests/generation/test_logits_process.py | 758 | # scores = 0 to facilitate checks | COMMENT |
| LOW | utils/check_docstrings.py | 547 | # Default None are not written, we just set `*optional*`. If there is default that is not None specified in the | 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 | 369 | # 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 | utils/check_inits.py | 119 | # If this is a traditional init, just return. | COMMENT |
| MEDIUM | src/transformers/tokenization_utils_base.py | 3228 | # 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 | 3534 | # TODO: check simply with the name is not robust. | STRING |
| LOW | src/transformers/testing_utils.py | 3779 | # If the target callable is not called within a test, simply call it without modification. | STRING |
| LOW | src/transformers/testing_utils.py | 3856 | # We simply add "self" as the expression despite it might not be the actual argument name. | STRING |
| LOW | src/transformers/cache_utils.py | 896 | # LinearAttention layer have no sequence length dimension, so simply return -1 here | COMMENT |
| LOW | src/transformers/modeling_utils.py | 5158 | # 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 | 4947 | """Adds the `_is_hf_initialized` flag on parameters that will be tied, in order to avoid initializing them | STRING |
| LOW | src/transformers/trainer.py | 1754 | # if loss is nan or inf simply add the average of previous logged losses | COMMENT |
| LOW | src/transformers/masking_utils.py | 817 | # 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 | 385 | # Check if we have something to add, if not just return | COMMENT |
| MEDIUM | src/transformers/pipelines/text_to_audio.py | 206 | # ensure dict output to facilitate postprocessing | COMMENT |
| MEDIUM | …transformers/pipelines/automatic_speech_recognition.py | 668 | # 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/chat_parsing_utils.py | 83 | # If the schema has a const, we just return that value and do absolutely nothing else | 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 | 498 | # 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 | …formers/models/edgetam_video/modeling_edgetam_video.py | 161 | # As the feature map size is fixed, we can just return the pre-computed embeddings. | STRING |
| 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 |
| 40 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 | 490 | # 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/idefics.md | 44 | - [Few-shot prompting](#few-shot-prompting) | 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) and [chain-of-thought](#chain-of-thought) to improve results. | STRING |
| MEDIUM | docs/source/en/tasks/prompting.md | 69 | 8. Try other techniques like [few-shot](#few-shot) and [chain-of-thought](#chain-of-thought) to improve results. | STRING |
| MEDIUM | docs/source/en/tasks/prompting.md | 169 | Like [few-shot](#few-shot) prompting, the downside of CoT is that it requires more effort to design a series of prompts | 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 | src/transformers/processing_utils.py | 495 | 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 |
| MEDIUM | …models/x_clip/convert_x_clip_original_pytorch_to_hf.py | 238 | # few shot | 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_utils.py | 513 | 'null_value:null,number_value:1,string_value:<|"|>foo<|"|>,' | CODE |
| HIGH | tests/utils/test_chat_parsing.py | 523 | '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 | 182 | {"run": "apt-get update && apt-get install -y curl"}, | CODE |
| HIGH | .circleci/create_circleci_config.py | 195 | "command": """du -h -d 1 "$(pip -V | cut -d ' ' -f 4 | sed 's/pip//g')" | grep -vE "dist-info|_distu | CODE |
| HIGH | .circleci/create_circleci_config.py | 201 | "command": """pip list --format=freeze | tee installed.txt || true""", | CODE |
| HIGH⚡ | .circleci/create_circleci_config.py | 222 | "command": f"TESTS=$(circleci tests split --split-by=timings {self.job_name}_test_list.txt) && echo | CODE |
| HIGH⚡ | .circleci/create_circleci_config.py | 232 | "command": "cp -r /test_data/* . 2>/dev/null || true; python3 utils/fetch_hub_objects_for_ci.py", | CODE |
| HIGH⚡ | .circleci/create_circleci_config.py | 240 | "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 | 243 | # Check both `quantization_config` being present and also not null, | STRING |
| HIGH | src/transformers/models/auto/auto_factory.py | 397 | # 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 | 219 | # 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 | 4600 | # 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 | 387 | # below, make sure to add a comment explaining why. | COMMENT |
| LOW | src/transformers/core_model_loading.py | 252 | # We squeeze each chunk here as well to make sure to give them their original shape | COMMENT |
| LOW | src/transformers/core_model_loading.py | 1609 | # so we need to make sure to load the tensor with the same dtype from the checkpoint | STRING |
| LOW | src/transformers/trainer.py | 1872 | # 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 | 1657 | 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 | 1211 | 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 | 752 | 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 | 682 | 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 | 695 | 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 | 1170 | 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 | 723 | 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 | 670 | 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 | 416 | 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 | 677 | 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/jetmoe/modeling_jetmoe.py | 814 | 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 | 581 | 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 | 669 | 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 | 970 | 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 | 694 | 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 | 1078 | >>> boxes = data["bboxes"] # make sure to normalize your bounding boxes | CODE |
| LOW | …s/models/granitemoehybrid/modeling_granitemoehybrid.py | 1352 | 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 | 881 | 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 | 929 | 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 | 863 | 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 | 313 | # make sure to remove from text_kwargs and audio_kwargs | STRING |
| LOW | src/transformers/models/siglip/modeling_siglip.py | 509 | >>> # 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 | 693 | >>> # 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 | 636 | 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 | 805 | 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 | 1879 | 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 | 2036 | ) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/dbrx/modular_dbrx.py | 536 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | src/transformers/models/dbrx/modeling_dbrx.py | 748 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| LOW | …ransformers/models/deepseek_v4/modeling_deepseek_v4.py | 1512 | 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 | 729 | 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 | 625 | >>> # 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 | 758 | >>> # 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 | 401 | ) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/glm4v_moe/modeling_glm4v_moe.py | 1636 | ) # make sure to reside in the same device | CODE |
| LOW | …ansformers/models/qwen3_vl_moe/modular_qwen3_vl_moe.py | 444 | ) # make sure to reside in the same device | CODE |
| LOW | …nsformers/models/qwen3_vl_moe/modeling_qwen3_vl_moe.py | 1607 | ) # make sure to reside in the same device | CODE |
| LOW | …s/models/granitemoeshared/modeling_granitemoeshared.py | 734 | 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 | 1407 | 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 | 1840 | 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 | 2195 | 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 | 3106 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | STRING |
| 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 |
| LOW | src/transformers/models/fsmt/modeling_fsmt.py | 106 | (don't forget to install sacrebleu: `pip install sacrebleu`) | STRING |
| LOW | src/transformers/models/qwen2_moe/modeling_qwen2_moe.py | 707 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| LOW | src/transformers/models/whisper/generation_whisper.py | 906 | # output tokens from the list of dicts. If we use batch size > 1, we make sure to pad the output | COMMENT |
| LOW | src/transformers/models/whisper/generation_whisper.py | 588 | >>> # make sure to NOT truncate the input audio, to return the `attention_mask` and to pad to the longest audio | STRING |
| LOW | src/transformers/models/qwen3_moe/modeling_qwen3_moe.py | 699 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| 3 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 | 101 | "Lorem ipsum dolor sit amet", | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 101 | "Lorem ipsum dolor sit amet", | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 108 | "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shell | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 108 | "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shell | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 112 | "Lorem ipsum dolor sit amet=√=√ 치수=√ 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shelley | CODE |
| LOW⚡ | tests/models/solar_open/test_modeling_solar_open.py | 112 | "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 | 204 | 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 | 210 | "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum.", | CODE |
| LOW⚡ | tests/models/lfm2_moe/test_modeling_lfm2_moe.py | 215 | "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 | src/transformers/exporters/exporter_executorch.py | 577 | if node.op != "placeholder": | CODE |
| LOW | src/transformers/exporters/exporter_executorch.py | 768 | if node.op != "placeholder" or not isinstance(node.target, str): | CODE |
| LOW⚡ | src/transformers/models/idefics/processing_idefics.py | 296 | fake_token = "<fake_token_around_image>" | STRING |
| LOW⚡ | src/transformers/models/idefics/processing_idefics.py | 302 | return image_token + fake_token | STRING |
| LOW⚡ | src/transformers/models/idefics/processing_idefics.py | 304 | return fake_token + image_token + fake_token | STRING |
| LOW⚡ | src/transformers/models/xlnet/modeling_xlnet.py | 1241 | dummy_token = torch.zeros((effective_batch_size, 1), dtype=torch.long, device=input_ids.device) | STRING |
| LOW⚡ | src/transformers/models/xlnet/modeling_xlnet.py | 1249 | input_ids = torch.cat([input_ids[:, -offset:], dummy_token], dim=1) | STRING |
| LOW⚡ | src/transformers/models/xlnet/modeling_xlnet.py | 1251 | input_ids = torch.cat([input_ids, dummy_token], dim=1) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/transformers/data/data_collator.py | 1239 | # (see documentation for `mems`), otherwise information may leak through due to reuse. In this implementatio | COMMENT |
| HIGH | src/transformers/data/data_collator.py | 1336 | # (see documentation for `mems`), otherwise information may leak through due to reuse. In this implementatio | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | utils/check_repo.py | 253 | "MllamaTextModel", # Building part of bigger (tested) model. # TODO: add tests | CODE |
| LOW⚡ | utils/check_repo.py | 254 | "MllamaVisionModel", # Building part of bigger (tested) model. # TODO: add tests | CODE |
| LOW⚡ | utils/check_repo.py | 255 | "Llama4TextModel", # Building part of bigger (tested) model. # TODO: add tests | CODE |
| LOW⚡ | utils/check_repo.py | 256 | "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 | …ormers/generation/continuous_batching/cache_manager.py | 544 | # TODO: implement this | 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 | 218 | f.write("def helper(): pass") | CODE |
| LOW | tests/cli/test_serve.py | 1875 | 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 | 740 | 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 | 109 | 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 | 367 | async def handle_request(self, body: dict, request_id: str) -> StreamingResponse | JSONResponse: | CODE |
| 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 |