Repository Analysis

huggingface/transformers

🤗 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.

31.5 Strong AI signal View on GitHub

Analysis Overview

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).

31.5
Adjusted Score
31.5
Raw Score
100%
Time Factor
2026-07-14
Last Push
162.6K
Stars
Python
Language
2.0M
Lines of Code
6.2K
Files
35.6K
Pattern Hits
2026-07-14
Scan Date
1.05
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 21HIGH 6451MEDIUM 903LOW 28260

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 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.

Cross-File Repetition6350 hits · 31750 pts
SeverityFileLineSnippetContext
HIGHtests/test_tokenization_common.py0when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each sequeSTRING
HIGHtests/models/udop/test_tokenization_udop.py0when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each sequeSTRING
HIGHtests/models/markuplm/test_tokenization_markuplm.py0when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each sequeSTRING
HIGHtests/models/layoutlmv2/test_tokenization_layoutlmv2.py0when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each sequeSTRING
HIGHtests/models/layoutlmv3/test_tokenization_layoutlmv3.py0when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each sequeSTRING
HIGHtests/models/layoutxlm/test_tokenization_layoutxlm.py0when calling batch_encode with multiple sequences, it can return different number of overflowing encoding for each sequeSTRING
HIGHtests/test_tokenization_common.py0test that passing pad_token when creating a tokenizer works correctly.STRING
HIGHtests/models/udop/test_tokenization_udop.py0test that passing pad_token when creating a tokenizer works correctly.STRING
HIGHtests/models/layoutxlm/test_tokenization_layoutxlm.py0test that passing pad_token when creating a tokenizer works correctly.STRING
HIGHtests/test_modeling_common.py0tests that the model supports batching and that the output is nearly the same for the same input in different batch sizeSTRING
HIGHtests/models/dab_detr/test_modeling_dab_detr.py0tests that the model supports batching and that the output is nearly the same for the same input in different batch sizeSTRING
HIGHtests/models/omdet_turbo/test_modeling_omdet_turbo.py0tests that the model supports batching and that the output is nearly the same for the same input in different batch sizeSTRING
HIGHtests/test_modeling_common.py0tests the equivalence between the eager and flash attention implementations. this test is only for inference and runs wiSTRING
HIGHtests/models/sam3_tracker/test_modeling_sam3_tracker.py0tests the equivalence between the eager and flash attention implementations. this test is only for inference and runs wiSTRING
HIGHtests/models/sam2/test_modeling_sam2.py0tests the equivalence between the eager and flash attention implementations. this test is only for inference and runs wiSTRING
HIGHtests/test_modeling_common.py0tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by STRING
HIGHtests/models/blip_2/test_modeling_blip_2.py0tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by STRING
HIGHtests/models/sam/test_modeling_sam.py0tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by STRING
HIGHtests/models/sam3_tracker/test_modeling_sam3_tracker.py0tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by STRING
HIGHtests/models/instructblip/test_modeling_instructblip.py0tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by STRING
HIGHtests/models/sam2/test_modeling_sam2.py0tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by STRING
HIGHtests/models/sam_hq/test_modeling_sam_hq.py0tests 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.py0tests if composite models dispatch correctly on sdpa/eager when requested so when loading the model. this tests only by STRING
HIGHtests/test_processing_common.py0this function prepares a list of pil images for testingSTRING
HIGHtests/models/mllama/test_processing_mllama.py0this function prepares a list of pil images for testingSTRING
HIGH…/models/video_llama_3/test_processing_video_llama_3.py0this function prepares a list of pil images for testingSTRING
HIGHtests/models/gemma3/test_processing_gemma3.py0this function prepares a list of pil images for testingSTRING
HIGHtests/models/gemma4/test_processing_gemma4.py0this function prepares a list of pil images for testingSTRING
HIGH…odels/gemma4_unified/test_processing_gemma4_unified.py0this function prepares a list of pil images for testingSTRING
HIGHtests/models/lfm2_vl/test_processing_lfm2_vl.py0this function prepares a list of pil images for testingSTRING
HIGHtests/models/smolvlm/test_processing_smolvlm.py0this function prepares a list of pil images for testingSTRING
HIGHtests/test_processing_common.py0we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we theSTRING
HIGHtests/models/colqwen2/test_processing_colqwen2.py0we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we theSTRING
HIGHtests/models/colpali/test_processing_colpali.py0we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we theSTRING
HIGH…odels/colmodernvbert/test_processing_colmodernvbert.py0we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we theSTRING
HIGHtests/test_image_processing_common.py0this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifiSTRING
HIGHtests/models/mllama/test_image_processing_mllama.py0this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifiSTRING
HIGHtests/models/aria/test_image_processing_aria.py0this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifiSTRING
HIGHtests/models/idefics3/test_image_processing_idefics3.py0this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifiSTRING
HIGHtests/models/smolvlm/test_image_processing_smolvlm.py0this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifiSTRING
HIGHtests/test_video_processing_common.py0this function prepares a batch of videos: a list of list of pil images, or a list of list of numpy arrays if one specifiSTRING
HIGHtests/test_image_processing_common.py0test that explicitly setting an attribute to none is preserved through save/load.STRING
HIGHtests/test_video_processing_common.py0test that explicitly setting an attribute to none is preserved through save/load.STRING
HIGHtests/models/mllama/test_image_processing_mllama.py0test that explicitly setting an attribute to none is preserved through save/load.STRING
HIGHtests/causal_lm_tester.py0tests the frequency properties of the different rope scaling types on the model rope layer.STRING
HIGHtests/models/olmo3/test_modeling_olmo3.py0tests the frequency properties of the different rope scaling types on the model rope layer.STRING
HIGHtests/models/gemma3/test_modeling_gemma3.py0tests 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.py0tests the frequency properties of the different rope scaling types on the model rope layer.STRING
HIGHtests/models/gemma3n/test_modeling_gemma3n.py0tests the frequency properties of the different rope scaling types on the model rope layer.STRING
HIGH…modernbert_decoder/test_modeling_modernbert_decoder.py0tests the frequency properties of the different rope scaling types on the model rope layer.STRING
HIGHtests/models/eurobert/test_modeling_eurobert.py0tests the frequency properties of the different rope scaling types on the model rope layer.STRING
HIGHtests/test_video_processing_common.py0tests that the processor can work with nested list where each video is a list of arraysSTRING
HIGH…nie4_5_vl_moe/test_video_processing_ernie4_5_vl_moe.py0tests that the processor can work with nested list where each video is a list of arraysSTRING
HIGHtests/models/glm46v/test_video_processing_glm46v.py0tests that the processor can work with nested list where each video is a list of arraysSTRING
HIGH…s/video_llama_3/test_video_processing_video_llama_3.py0tests that the processor can work with nested list where each video is a list of arraysSTRING
HIGHtests/models/kimi_k25/test_video_processing_kimi_k25.py0tests that the processor can work with nested list where each video is a list of arraysSTRING
HIGHtests/models/glmga/test_video_processing_glmga.py0tests that the processor can work with nested list where each video is a list of arraysSTRING
HIGHtests/models/qwen2_vl/test_video_processing_qwen2_vl.py0tests that the processor can work with nested list where each video is a list of arraysSTRING
HIGHtests/models/glm4v/test_video_processing_glm4v.py0tests that the processor can work with nested list where each video is a list of arraysSTRING
HIGHtests/models/qwen3_vl/test_video_processing_qwen3_vl.py0tests that the processor can work with nested list where each video is a list of arraysSTRING
6290 more matches not shown…
Hyper-Verbose Identifiers14286 hits · 14186 pts
SeverityFileLineSnippetContext
LOWconftest.py45def _with_tmpdir_cache_fallback(fn):CODE
LOWconftest.py148def pytest_collection_modifyitems(items):CODE
LOWbenchmark/benchmarks_entrypoint.py146 def collect_device_measurements(self, benchmark_id: str, cpu_util, mem_megabytes, gpu_util, gpu_mem_megabytes):CODE
LOWbenchmark/benchmarks_entrypoint.py179 def collect_model_measurements(self, benchmark_id: str, measurements: dict[str, float]):CODE
LOWbenchmark/benchmarks_entrypoint.py378def create_database_connection():CODE
LOWbenchmark/benchmarks_entrypoint.py397def create_global_metrics_recorder(CODE
LOWbenchmark/benches/llama.py143 def multinomial_sample_one_no_sync(probs_sort): # Does multinomial sampling without a cuda synchronizationCODE
LOW…rk_v2/benchmark_scripts/continuous_batching_overall.py79def _build_lighteval_inputs_scorer(CODE
LOWbenchmark_v2/framework/hardware_metrics.py30def get_device_name_and_memory_total() -> tuple[str, float]:CODE
LOWbenchmark_v2/framework/benchmark_runner.py59def compact_json_numeric_arrays(data: dict):CODE
LOWbenchmark_v2/framework/data_classes.py39def equalize_lengths_and_collate(stats: dict[str, dict[str, str]]) -> dict[str, str]:CODE
LOWtests/test_tokenization_common.py135def merge_model_tokenizer_mappings(CODE
LOWtests/test_tokenization_common.py477 def get_extracted_tokenizer_from_sentencepiece(self, reference_tokenizer=None):CODE
LOWtests/test_tokenization_common.py497 def tokenizer_integration_test_util(CODE
LOWtests/test_tokenization_common.py567 def assert_padded_input_match(self, input_r: list, input_p: list, max_length: int, pad_token_id: int):CODE
LOWtests/test_tokenization_common.py577 def assert_batch_padded_input_match(CODE
LOWtests/test_tokenization_common.py604 def convert_batch_to_list_format(batch_encode_plus_sequences):CODE
LOWtests/test_tokenization_common.py613 def test_tokenize_special_tokens(self):CODE
LOWtests/test_tokenization_common.py633 def test_model_input_names_signature(self):CODE
LOWtests/test_tokenization_common.py644 def test_tokenizer_store_full_signature(self):CODE
LOWtests/test_tokenization_common.py661 def test_tokenizers_common_properties(self):CODE
LOWtests/test_tokenization_common.py693 def test_tokenizers_common_ids_setters(self):CODE
LOWtests/test_tokenization_common.py726 def test_save_and_load_tokenizer(self):CODE
LOWtests/test_tokenization_common.py859 def test_integration_from_extractor(self):CODE
LOWtests/test_tokenization_common.py892 def test_internal_consistency(self):CODE
LOWtests/test_tokenization_common.py1013 def test_chat_template_empty_conversation(self):CODE
LOWtests/test_tokenization_common.py1021 def test_chat_template_save_loading(self):CODE
LOWtests/test_tokenization_common.py1063 def test_chat_template_batched(self):CODE
LOWtests/test_tokenization_common.py1137 def test_chat_template_return_assistant_tokens_mask(self):CODE
LOWtests/test_tokenization_common.py1330 def test_chat_template_return_assistant_tokens_mask_truncated(self):CODE
LOWtests/test_tokenization_common.py1441 def test_continue_final_message(self):CODE
LOWtests/test_tokenization_common.py1469 def test_continue_final_message_with_trim(self):CODE
LOWtests/test_tokenization_common.py1499 def test_continue_final_message_with_decoy_earlier_message(self):CODE
LOWtests/test_tokenization_common.py1524 def test_continue_final_message_string_and_reasoning(self):CODE
LOWtests/test_tokenization_common.py1572 def test_chat_template_dict_saving(self):CODE
LOWtests/test_tokenization_common.py1603 def test_chat_template_dict_saving_rejects_path_traversal(self):CODE
LOWtests/test_tokenization_common.py1620 def test_chat_template_file_priority(self):CODE
LOWtests/test_tokenization_common.py1633 def test_number_of_added_tokens(self):CODE
LOWtests/test_tokenization_common.py1645 def test_maximum_encoding_length_single_input(self):CODE
LOWtests/test_tokenization_common.py1740 def test_maximum_encoding_length_pair_input(self):CODE
LOWtests/test_tokenization_common.py2013 def test_special_tokens_mask_input_pairs(self):CODE
LOWtests/test_tokenization_common.py2036 def test_padding_side_in_kwargs(self):CODE
LOWtests/test_tokenization_common.py2053 def test_truncation_side_in_kwargs(self):CODE
LOWtests/test_tokenization_common.py2070 def test_encode_basic_padding(self):CODE
LOWtests/test_tokenization_common.py2099 def test_right_and_left_truncation(self):CODE
LOWtests/test_tokenization_common.py2153 def test_padding_to_multiple_of(self):CODE
LOWtests/test_tokenization_common.py2185 def test_padding_with_attention_mask(self):CODE
LOWtests/test_tokenization_common.py2203 def test_encode_plus_with_padding(self, use_padding_as_call_kwarg: bool):CODE
LOWtests/test_tokenization_common.py2328 def test_conversion_reversible(self):CODE
LOWtests/test_tokenization_common.py2366 def test_batch_encode_plus_batch_sequence_length(self):CODE
LOWtests/test_tokenization_common.py2414 def test_batch_encode_plus_padding(self):CODE
LOWtests/test_tokenization_common.py2528 def _check_no_pad_token_padding(self, tokenizer, sequences):CODE
LOWtests/test_tokenization_common.py2582 def test_batch_encode_dynamic_overflowing(self):CODE
LOWtests/test_tokenization_common.py2645 def test_added_tokens_serialization(self):CODE
LOWtests/test_tokenization_common.py2672 def test_tokenizer_initialization_with_conflicting_key(self):CODE
LOWtests/test_tokenization_common.py2707 def test_pad_token_initialization(self):CODE
LOWtests/test_tokenization_common.py2740 def test_bos_token_with_add_bos_token_true(self):CODE
LOWtests/test_tokenization_common.py2757 def test_bos_token_with_add_bos_token_false(self):CODE
LOWtests/test_tokenization_common.py2843 def test_add_tokens_tokenizer(self):CODE
LOWtests/test_modeling_common.py1758 def test_training_gradient_checkpointing(self):CODE
14226 more matches not shown…
Over-Commented Block4072 hits · 3974 pts
SeverityFileLineSnippetContext
LOWconftest.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWconftest.py201COMMENT
LOWsetup.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOWbenchmark/benchmark.py1# Copyright 2024 The HuggingFace Team. All rights reserved.COMMENT
LOWbenchmark/benchmarks_entrypoint.py1# Copyright 2025 The HuggingFace Team. All rights reserved.COMMENT
LOWbenchmark/benches/llama.py1# Copyright 2025 The HuggingFace Team. All rights reserved.COMMENT
LOWbenchmark_v2/run_benchmarks.py1#!/usr/bin/env python3COMMENT
LOWtests/test_tokenization_common.py1# Copyright 2019 HuggingFace Inc.COMMENT
LOWtests/test_modeling_common.py1# Copyright 2019 HuggingFace Inc.COMMENT
LOWtests/test_configuration_common.py1# Copyright 2019 HuggingFace Inc.COMMENT
LOWtests/multimodal_tester.py1# Copyright 2026 HuggingFace Inc.COMMENT
LOWtests/test_tensor_parallel_mixin.py1#COMMENT
LOWtests/test_monkey_patching.py1# Copyright 2026 The HuggingFace Inc. team.COMMENT
LOWtests/test_processing_common.py1# Copyright 2024 The HuggingFace Inc. team. All rights reserved.COMMENT
LOWtests/test_backbone_common.py1# Copyright 2023 The HuggingFace Inc. team. All rights reserved.COMMENT
LOWtests/test_image_processing_common.py1# Copyright 2023 HuggingFace Inc.COMMENT
LOWtests/causal_lm_tester.py1# Copyright 2025 HuggingFace Inc.COMMENT
LOWtests/test_executorch.py1# Copyright 2025 HuggingFace Inc.COMMENT
LOWtests/test_feature_extraction_common.py1# Copyright 2021 HuggingFace Inc.COMMENT
LOWtests/alm_tester.py1# Copyright 2026 HuggingFace Inc.COMMENT
LOWtests/test_video_processing_common.py1# Copyright 2025 HuggingFace Inc.COMMENT
LOWtests/test_pipeline_mixin.py1# Copyright 2023 The HuggingFace Inc. team. All rights reserved.COMMENT
LOWtests/test_tokenization_mistral_common.py1# Copyright 2025 Mistral AI and The HuggingFace Inc. team. All rights reserved.COMMENT
LOWtests/vlm_tester.py1# Copyright 2026 HuggingFace Inc.COMMENT
LOWtests/test_training_mixin.py1# Copyright 2023 The HuggingFace Inc. team. All rights reserved.COMMENT
LOWtests/test_sequence_feature_extraction_common.py1# Copyright 2021 HuggingFace Inc.COMMENT
LOWtests/test_image_transforms.py1# Copyright 2022 HuggingFace Inc.COMMENT
LOWtests/kernels/test_kernels.py1# Copyright 2025 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/tensor_parallel/test_tensor_parallel.py1# Copyright 2024 The HuggingFace Inc. team. All rights reserved.COMMENT
LOWtests/peft_integration/test_peft_integration.py1# Copyright 2023 The HuggingFace Inc. team. All rights reserved.COMMENT
LOWtests/exporters/test_utils.py1# Copyright 2026 The HuggingFace Inc. team. All rights reserved.COMMENT
LOWtests/exporters/test_export.py1# Copyright 2026 The HuggingFace Inc. team. All rights reserved.COMMENT
LOWtests/exporters/test_export.py41 torch_device,COMMENT
LOWtests/optimization/test_greedy_lr.py1# Copyright 2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/optimization/test_optimization.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOW…s/pipelines/test_pipelines_image_feature_extraction.py1# Copyright 2024 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_object_detection.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_common.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_text_classification.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_token_classification.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_image_text_to_text.py1# Copyright 2024 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_zero_shot.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_depth_estimation.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_mask_generation.py1# Copyright 2023 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_text_generation.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_text_to_audio.py1# Copyright 2023 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_feature_extraction.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOW…ipelines/test_pipelines_document_question_answering.py1# Copyright 2022 The HuggingFace Team. All rights reserved.COMMENT
LOW…pelines/test_pipelines_automatic_speech_recognition.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_image_classification.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOW…pipelines/test_pipelines_zero_shot_object_detection.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOW…lines/test_pipelines_zero_shot_image_classification.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOW…lines/test_pipelines_zero_shot_image_classification.py41COMMENT
LOW…s/pipelines/test_pipelines_table_question_answering.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_image_segmentation.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOW…lines/test_pipelines_zero_shot_audio_classification.py1# Copyright 2023 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_keypoint_matching.py1# Copyright 2025 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_fill_mask.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_audio_classification.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/pipelines/test_pipelines_video_classification.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
4012 more matches not shown…
Unused Imports3311 hits · 2698 pts
SeverityFileLineSnippetContext
LOWbenchmark_v2/framework/benchmark_config.py17CODE
LOWtests/test_tokenization_common.py85CODE
LOWtests/test_tokenization_common.py85CODE
LOW…ipelines/test_pipelines_document_question_answering.py43CODE
LOW…pipelines/test_pipelines_zero_shot_object_detection.py35CODE
LOWtests/utils/test_file_utils.py23CODE
LOWtests/models/mistral4/__init__.py17CODE
LOWtests/models/mistral4/__init__.py17CODE
LOWtests/models/opt/test_modeling_opt.py20CODE
LOWtests/models/fsmt/test_modeling_fsmt.py19CODE
LOWtests/tokenization/test_tokenization_utils.py302CODE
LOWutils/check_import_complexity.py27CODE
LOW…amples/modular-transformers/modular_switch_function.py2CODE
LOWsrc/transformers/image_utils.py36CODE
LOWsrc/transformers/image_utils.py36CODE
LOWsrc/transformers/image_utils.py36CODE
LOWsrc/transformers/image_utils.py36CODE
LOWsrc/transformers/image_utils.py36CODE
LOWsrc/transformers/image_utils.py36CODE
LOWsrc/transformers/modeling_rope_utils.py31CODE
LOWsrc/transformers/pytorch_utils.py14CODE
LOWsrc/transformers/image_processing_outputs.py20CODE
LOWsrc/transformers/_typing.py16CODE
LOWsrc/transformers/trainer_seq2seq.py36CODE
LOWsrc/transformers/trainer_seq2seq.py39CODE
LOWsrc/transformers/trainer_seq2seq.py41CODE
LOWsrc/transformers/trainer_seq2seq.py42CODE
LOWsrc/transformers/trainer_seq2seq.py43CODE
LOWsrc/transformers/trainer_seq2seq.py44CODE
LOWsrc/transformers/trainer_seq2seq.py45CODE
LOWsrc/transformers/trainer_seq2seq.py46CODE
LOWsrc/transformers/trainer_seq2seq.py47CODE
LOWsrc/transformers/trainer_seq2seq.py48CODE
LOWsrc/transformers/trainer_seq2seq.py48CODE
LOWsrc/transformers/trainer_seq2seq.py49CODE
LOWsrc/transformers/feature_extraction_utils.py47CODE
LOWsrc/transformers/tokenization_utils_base.py21CODE
LOWsrc/transformers/core_model_loading.py16CODE
LOWsrc/transformers/safetensors_conversion.py4CODE
LOWsrc/transformers/processing_utils.py81CODE
LOWsrc/transformers/processing_utils.py86CODE
LOWsrc/transformers/trainer_optimizer.py18CODE
LOWsrc/transformers/optimization.py16CODE
LOWsrc/transformers/__init__.py30CODE
LOWsrc/transformers/__init__.py31CODE
LOWsrc/transformers/__init__.py31CODE
LOWsrc/transformers/__init__.py31CODE
LOWsrc/transformers/__init__.py31CODE
LOWsrc/transformers/__init__.py31CODE
LOWsrc/transformers/__init__.py31CODE
LOWsrc/transformers/__init__.py46CODE
LOWsrc/transformers/__init__.py47CODE
LOWsrc/transformers/__init__.py49CODE
LOWsrc/transformers/__init__.py50CODE
LOWsrc/transformers/__init__.py53CODE
LOWsrc/transformers/__init__.py493CODE
LOWsrc/transformers/__init__.py493CODE
LOWsrc/transformers/__init__.py494CODE
LOWsrc/transformers/__init__.py495CODE
LOWsrc/transformers/__init__.py496CODE
3251 more matches not shown…
AI Structural Patterns2159 hits · 2032 pts
SeverityFileLineSnippetContext
LOWbenchmark_v2/framework/benchmark_config.py59CODE
LOWtests/causal_lm_tester.py167CODE
LOWtests/utils/test_auto_docstring.py244CODE
LOWtests/models/metaclip_2/test_modeling_metaclip_2.py69CODE
LOWtests/models/metaclip_2/test_modeling_metaclip_2.py296CODE
LOW…nie4_5_vl_moe/test_image_processing_ernie4_5_vl_moe.py38CODE
LOW…nie4_5_vl_moe/test_video_processing_ernie4_5_vl_moe.py36CODE
LOW…odels/ernie4_5_vl_moe/test_modeling_ernie4_5_vl_moe.py58CODE
LOWtests/models/solar_open/test_modeling_solar_open.py41CODE
LOWtests/models/nllb_moe/test_modeling_nllb_moe.py45CODE
LOWtests/models/sew_d/test_modeling_sew_d.py48CODE
LOW…s/table_transformer/test_modeling_table_transformer.py44CODE
LOWtests/models/bark/test_modeling_bark.py63CODE
LOWtests/models/bark/test_modeling_bark.py196CODE
LOWtests/models/bark/test_modeling_bark.py329CODE
LOWtests/models/convnextv2/test_modeling_convnextv2.py44CODE
LOWtests/models/llama4/test_image_processing_llama4.py24CODE
LOWtests/models/vitpose/test_image_processing_vitpose.py36CODE
LOWtests/models/vitpose/test_modeling_vitpose.py46CODE
LOWtests/models/mlcd/test_modeling_mlcd.py42CODE
LOWtests/models/pixtral/test_image_processing_pixtral.py40CODE
LOWtests/models/pixtral/test_modeling_pixtral.py37CODE
LOWtests/models/xcodec2/test_modeling_xcodec2.py43CODE
LOWtests/models/glpn/test_modeling_glpn.py48CODE
LOWtests/models/glpn/test_image_processing_glpn.py34CODE
LOW…odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py78CODE
LOW…odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py580CODE
LOWtests/models/biogpt/test_modeling_biogpt.py41CODE
LOWtests/models/visual_bert/test_modeling_visual_bert.py43CODE
LOW…odels/video_llava/test_video_processing_video_llava.py30CODE
LOWtests/models/video_llava/test_modeling_video_llava.py56CODE
LOWtests/models/cohere/test_modeling_cohere.py46CODE
LOWtests/models/udop/test_modeling_udop.py47CODE
LOWtests/models/udop/test_modeling_udop.py410CODE
LOWtests/models/blip_2/test_modeling_blip_2.py78CODE
LOWtests/models/blip_2/test_modeling_blip_2.py229CODE
LOWtests/models/blip_2/test_modeling_blip_2.py308CODE
LOWtests/models/blip_2/test_modeling_blip_2.py610CODE
LOWtests/models/flava/test_image_processing_flava.py47CODE
LOWtests/models/flava/test_modeling_flava.py70CODE
LOWtests/models/flava/test_modeling_flava.py323CODE
LOWtests/models/flava/test_modeling_flava.py469CODE
LOWtests/models/flava/test_modeling_flava.py742CODE
LOWtests/models/albert/test_modeling_albert.py43CODE
LOWtests/models/videoprism/test_modeling_videoprism.py91CODE
LOWtests/models/videoprism/test_modeling_videoprism.py358CODE
LOW…/models/cohere2_vision/test_modeling_cohere2_vision.py51CODE
LOW…cohere2_vision/test_image_processing_cohere2_vision.py33CODE
LOWtests/models/videomae/test_modeling_videomae.py61CODE
LOWtests/models/videomae/test_video_processing_videomae.py33CODE
LOWtests/models/videomae/test_image_processing_videomae.py34CODE
LOWtests/models/vits/test_modeling_vits.py69CODE
LOWtests/models/olmoe/test_modeling_olmoe.py48CODE
LOW…/models/speech_to_text/test_modeling_speech_to_text.py71CODE
LOW…eech_to_text/test_feature_extraction_speech_to_text.py37CODE
LOWtests/models/aimv2/test_modeling_aimv2.py67CODE
LOWtests/models/aimv2/test_modeling_aimv2.py224CODE
LOW…s_transformer/test_modeling_time_series_transformer.py51CODE
LOWtests/models/mllama/test_image_processing_mllama.py36CODE
LOWtests/models/mllama/test_image_processing_mllama.py89CODE
2099 more matches not shown…
Modern Structural Boilerplate1846 hits · 1522 pts
SeverityFileLineSnippetContext
LOWbenchmark/benchmarks_entrypoint.py310logger = logging.getLogger(__name__)CODE
LOWbenchmark_v2/framework/benchmark_config.py23logger = logging.getLogger(__name__)CODE
LOWtests/pipelines/test_pipelines_common.py67logger = logging.getLogger(__name__)CODE
LOWtests/sagemaker/scripts/pytorch/run_ddp.py8logger = logging.getLogger(__name__)CODE
LOW…agemaker/scripts/pytorch/run_glue_model_parallelism.py59logger = logging.getLogger(__name__)CODE
LOWutils/get_ci_error_statistics.py14logger = logging.getLogger(__name__)CODE
LOWexamples/3D_parallel.py67logger = logging.getLogger(__name__)CODE
LOWexamples/scheduler/run_greedy.py50logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/3d_parallel_checks.py68logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/3d_parallel_checks.py765def update_model_parameters(model: nn.Module) -> None:CODE
LOWexamples/pytorch/question-answering/run_qa.py53logger = logging.getLogger(__name__)CODE
LOW…mples/pytorch/question-answering/run_qa_beam_search.py52logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/question-answering/utils_qa.py27logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/question-answering/run_seq2seq_qa.py51logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/text-generation/run_generation.py63logger = logging.getLogger(__name__)CODE
LOW…torch/audio-classification/run_audio_classification.py52logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/translation/run_translation.py72logger = logging.getLogger(__name__)CODE
LOW…rch/semantic-segmentation/run_semantic_segmentation.py59logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/summarization/run_summarization.py73logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/image-pretraining/run_mae.py49logger = logging.getLogger(__name__)CODE
LOW…amples/pytorch/image-pretraining/run_mim_no_trainer.py63logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/image-pretraining/run_mim.py54logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/text-classification/run_glue.py80logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/text-classification/run_xnli.py67logger = logging.getLogger(__name__)CODE
LOW…ples/pytorch/text-classification/run_classification.py67logger = logging.getLogger(__name__)CODE
LOW…torch/image-classification/run_image_classification.py66logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/language-modeling/run_clm.py74logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/language-modeling/run_plm.py66logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/language-modeling/run_fim.py77logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/language-modeling/run_mlm.py73logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/token-classification/run_ner.py64logger = logging.getLogger(__name__)CODE
LOW…mples/pytorch/object-detection/run_object_detection.py58logger = logging.getLogger(__name__)CODE
LOW…torch/speech-recognition/run_speech_recognition_ctc.py69logger = logging.getLogger(__name__)CODE
LOW…h/speech-recognition/run_speech_recognition_seq2seq.py68logger = logging.getLogger(__name__)CODE
LOW…eech-recognition/run_speech_recognition_ctc_adapter.py72logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/contrastive-image-text/run_clip.py61logger = logging.getLogger(__name__)CODE
LOW…e-segmentation/run_instance_segmentation_no_trainer.py63logger = logging.getLogger(__name__)CODE
LOW…rch/instance-segmentation/run_instance_segmentation.py56logger = logging.getLogger(__name__)CODE
LOWexamples/pytorch/multiple-choice/run_swag.py60logger = logging.getLogger(__name__)CODE
LOWsrc/transformers/_typing.py164 def set_output_embeddings(self, value: Any) -> None: ...CODE
LOWsrc/transformers/_typing.py165 def set_input_embeddings(self, value: Any) -> None: ...CODE
LOWsrc/transformers/testing_utils.py4423 def _update_peak(self) -> None:STRING
LOWsrc/transformers/trainer_optimizer.py51logger = logging.getLogger(__name__)CODE
LOWsrc/transformers/training_args_seq2seq.py24logger = logging.getLogger(__name__)CODE
LOWsrc/transformers/trainer.py1076 def _set_signature_columns_if_needed(self) -> None:CODE
LOWsrc/transformers/utils/logging.py196def set_verbosity(verbosity: int) -> None:CODE
LOWsrc/transformers/utils/network_logging.py160 def set_shared_dir(self, shared_dir: str) -> None:CODE
LOWsrc/transformers/utils/network_logging.py483__all__ = [CODE
LOW…/transformers/utils/chat_parsing/response_templates.py233__all__ = ["ResponseTemplate", "ResponseTemplateField", "load_response_template"]CODE
LOWsrc/transformers/utils/chat_parsing/__init__.py20__all__ = ["ResponseParser", "parse_response"]CODE
LOWsrc/transformers/utils/chat_parsing/content_parsers.py234__all__ = [CODE
LOWsrc/transformers/models/dots1/configuration_dots1.py129__all__ = ["Dots1Config"]STRING
LOWsrc/transformers/models/dots1/modular_dots1.py209__all__ = [CODE
LOWsrc/transformers/models/dots1/modeling_dots1.py642__all__ = ["Dots1PreTrainedModel", "Dots1Model", "Dots1ForCausalLM"]CODE
LOW…sformers/models/metaclip_2/configuration_metaclip_2.py247__all__ = ["MetaClip2Config", "MetaClip2TextConfig", "MetaClip2VisionConfig"]CODE
LOW…/transformers/models/metaclip_2/modeling_metaclip_2.py1177__all__ = [STRING
LOW…c/transformers/models/metaclip_2/modular_metaclip_2.py618__all__ = [CODE
LOW…s/models/ernie4_5_vl_moe/processing_ernie4_5_vl_moe.py249__all__ = ["Ernie4_5_VLMoeProcessor"]CODE
LOW…ls/ernie4_5_vl_moe/image_processing_ernie4_5_vl_moe.py246__all__ = ["Ernie4_5_VL_MoeImageProcessor", "Ernie4_5_VLMoeImageProcessor"]STRING
LOW…ers/models/ernie4_5_vl_moe/modeling_ernie4_5_vl_moe.py1938__all__ = [STRING
1786 more matches not shown…
Decorative Section Separators471 hits · 1498 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_tensor_parallel_mixin.py39# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py41# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py61# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py63# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py452 # ============================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py454 # ============================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py465 # ============================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py467 # ============================================================COMMENT
MEDIUMtests/test_pipeline_mixin.py410 # ---------------------------------------------------------COMMENT
MEDIUMtests/test_training_mixin.py42 # ============================================================COMMENT
MEDIUMtests/test_training_mixin.py44 # ============================================================COMMENT
MEDIUMtests/test_training_mixin.py61 # ============================================================COMMENT
MEDIUMtests/test_training_mixin.py63 # ============================================================COMMENT
MEDIUMtests/test_training_mixin.py77 # ============================================================COMMENT
MEDIUMtests/test_training_mixin.py79 # ============================================================COMMENT
MEDIUMtests/exporters/test_utils.py74# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py76# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py172# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py174# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py221# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py223# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py260# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py263# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py45# ──────────────────────────── skip lists ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py261# ──────────────────────────── ONNX optimization toggles ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py315# ──────────────────────────── helpers ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py358# ──────────────────────────── mixins ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py460 # ──────────────────── torch.export tests ─────────────────────COMMENT
MEDIUMtests/exporters/test_export.py492 # ──────────────────────── ONNX tests ─────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py523 # ──────────────────── ExecuTorch tests ───────────────────────COMMENT
MEDIUMtests/exporters/test_export.py583 # ──────────────────── torch.export tests ─────────────────────COMMENT
MEDIUMtests/exporters/test_export.py615 # ──────────────────────── ONNX tests ─────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py647 # ──────────────────── ExecuTorch tests ───────────────────────COMMENT
MEDIUMtests/utils/test_auto_docstring.py673# ---------------------------------------------------------------------------STRING
MEDIUMtests/utils/test_auto_docstring.py675# ---------------------------------------------------------------------------STRING
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py154# ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py156# ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py292 # ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py294 # ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py261 # ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py263 # ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py444 # ------------------------STRING
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py446 # ------------------------STRING
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py457 # ------------------------STRING
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py459 # ------------------------STRING
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py334 # ------------------------STRING
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py336 # ------------------------STRING
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py372 # ------------------------STRING
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py374 # ------------------------STRING
MEDIUMtests/heterogeneity/test_configuration_utils.py47# ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/heterogeneity/test_configuration_utils.py49# ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/heterogeneity/test_configuration_utils.py27# ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/heterogeneity/test_configuration_utils.py29# ──────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/trainer/test_trainer_callback.py234 # -------------------------------------------------------------------------COMMENT
MEDIUMtests/trainer/test_trainer_callback.py236 # -------------------------------------------------------------------------COMMENT
MEDIUMtests/trainer/test_trainer_callback.py320 # -------------------------------------------------------------------------COMMENT
MEDIUMtests/trainer/test_trainer_callback.py322 # -------------------------------------------------------------------------COMMENT
MEDIUMtests/trainer/test_trainer_callback.py441 # -------------------------------------------------------------------------COMMENT
MEDIUMtests/trainer/test_trainer_callback.py443 # -------------------------------------------------------------------------COMMENT
MEDIUMtests/trainer/test_trainer_callback.py56# =============================================================================COMMENT
411 more matches not shown…
Deep Nesting1671 hits · 1490 pts
SeverityFileLineSnippetContext
LOWbenchmark/benchmark.py60CODE
LOWbenchmark_v2/framework/hardware_metrics.py184CODE
LOWbenchmark_v2/framework/benchmark_runner.py82CODE
LOWbenchmark_v2/framework/benchmark_runner.py443CODE
LOWbenchmark_v2/framework/data_classes.py21CODE
LOWbenchmark_v2/framework/benchmark_config.py254CODE
LOWtests/test_tokenization_common.py135CODE
LOWtests/test_tokenization_common.py225CODE
LOWtests/test_tokenization_common.py1137CODE
LOWtests/test_tokenization_common.py1330CODE
LOWtests/test_tokenization_common.py1645CODE
LOWtests/test_tokenization_common.py1740CODE
LOWtests/test_tokenization_common.py2645CODE
LOWtests/test_modeling_common.py163CODE
LOWtests/test_modeling_common.py561CODE
LOWtests/test_modeling_common.py739CODE
LOWtests/test_modeling_common.py910CODE
LOWtests/test_modeling_common.py946CODE
LOWtests/test_modeling_common.py1134CODE
LOWtests/test_modeling_common.py1499CODE
LOWtests/test_modeling_common.py1645CODE
LOWtests/test_modeling_common.py2054CODE
LOWtests/test_modeling_common.py2133CODE
LOWtests/test_modeling_common.py2315CODE
LOWtests/test_modeling_common.py2513CODE
LOWtests/test_modeling_common.py2539CODE
LOWtests/test_modeling_common.py2583CODE
LOWtests/test_modeling_common.py2656CODE
LOWtests/test_modeling_common.py2714CODE
LOWtests/test_modeling_common.py3004CODE
LOWtests/test_modeling_common.py3047CODE
LOWtests/test_modeling_common.py3085CODE
LOWtests/test_modeling_common.py3131CODE
LOWtests/test_modeling_common.py3175CODE
LOWtests/test_modeling_common.py3277CODE
LOWtests/test_modeling_common.py3496CODE
LOWtests/test_modeling_common.py3556CODE
LOWtests/test_modeling_common.py3593CODE
LOWtests/test_modeling_common.py3675CODE
LOWtests/test_modeling_common.py3762CODE
LOWtests/test_modeling_common.py3824CODE
LOWtests/test_modeling_common.py3923CODE
LOWtests/test_modeling_common.py4402CODE
LOWtests/test_modeling_common.py4445CODE
LOWtests/test_modeling_common.py4570CODE
LOWtests/test_modeling_common.py4638CODE
LOWtests/test_modeling_common.py5075CODE
LOWtests/test_modeling_common.py5236CODE
LOWtests/test_modeling_common.py5377CODE
LOWtests/test_modeling_common.py5510CODE
LOWtests/test_modeling_common.py5585CODE
LOWtests/test_modeling_common.py1507CODE
LOWtests/test_modeling_common.py2721CODE
LOWtests/test_modeling_common.py2726CODE
LOWtests/test_modeling_common.py3387CODE
LOWtests/test_configuration_common.py94CODE
LOWtests/test_configuration_common.py187CODE
LOWtests/test_tensor_parallel_mixin.py158CODE
LOWtests/test_tensor_parallel_mixin.py219CODE
LOWtests/test_processing_common.py346CODE
1611 more matches not shown…
Self-Referential Comments296 hits · 786 pts
SeverityFileLineSnippetContext
MEDIUMbenchmark/benchmarks_entrypoint.py428 # Create a global metrics recorderCOMMENT
MEDIUMbenchmark_v2/framework/data_classes.py150 # Create a new instance and accumulate the dataCOMMENT
MEDIUMtests/test_monkey_patching.py155 # Create a dummy module in transformers namespace for testingCOMMENT
MEDIUMtests/test_processing_common.py1148 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/test_processing_common.py1171 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/test_processing_common.py1306 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/test_processing_common.py1497 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/test_processing_common.py1520 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/test_tokenizers_backend_mixin.py383 # Create a new mapping from the special tokens defined in the original tokenizerCOMMENT
MEDIUMtests/test_training_mixin.py87 # Create a deterministic sequence (not random, so model can learn it)COMMENT
MEDIUMtests/kernels/test_kernels.py689 # Create a mock model on CUDA deviceCOMMENT
MEDIUMtests/kernels/test_kernels.py724 # Create a mock modelCOMMENT
MEDIUMtests/peft_integration/test_peft_integration.py1289 # Create a temporary directory with a complete adapter model structureCOMMENT
MEDIUMtests/optimization/test_greedy_lr.py193 # Create a new scheduler and load stateCOMMENT
MEDIUMtests/pipelines/test_pipelines_common.py322 # Create a temporary directory with a complete adapter model structureCOMMENT
MEDIUMtests/utils/test_masking_utils.py254 # Create a new input after the prefillCOMMENT
MEDIUMtests/models/udop/test_tokenization_udop.py133 # # Create a minimal mock tokenizer for the converterCOMMENT
MEDIUMtests/models/udop/test_tokenization_udop.py1240 # Create a new mapping from the special tokens defined in the original tokenizerCOMMENT
MEDIUMtests/models/flava/test_modeling_flava.py1147 # Create a clone of the input_ids tensor that will be its masked versionCOMMENT
MEDIUMtests/models/flava/test_modeling_flava.py1195 # Create a clone of the input_ids tensor that will be its masked versionCOMMENT
MEDIUM…cohere2_vision/test_image_processing_cohere2_vision.py208 # Create a 2:3 aspect ratio image (2 rows x 3 columns of patches)COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py303 # Create a temp file that calls the workerCOMMENT
MEDIUMtests/models/lighton_ocr/test_modeling_lighton_ocr.py507 # Create a small config for fast testingCOMMENT
MEDIUM…ts/models/superglue/test_image_processing_superglue.py410 # Create a specific scenario with intentional padding issuesCOMMENT
MEDIUM…ts/models/superglue/test_image_processing_superglue.py429 # Create a match that points to a padded keypoint in image 1COMMENT
MEDIUM…ts/models/superglue/test_image_processing_superglue.py434 # Create a valid match for comparisonCOMMENT
MEDIUMtests/models/pix2struct/test_processing_pix2struct.py167 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/pix2struct/test_processing_pix2struct.py196 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/markuplm/test_tokenization_markuplm.py1245 # Create a new mapping from the special tokens defined in the original tokenizerCOMMENT
MEDIUMtests/models/gemma3/test_modeling_gemma3.py439 # Create a sequence of 13 tokens: 0..4 text, 5..11 image (7 tokens), 12 textCOMMENT
MEDIUMtests/models/colqwen2/test_processing_colqwen2.py242 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/colqwen2/test_processing_colqwen2.py262 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/nemotron_h/test_modeling_nemotron_h.py798 # Create a legacy config.jsonCOMMENT
MEDIUMtests/models/gemma4/test_modeling_gemma4.py613 # Create a sequence of 13 tokens: 0..4 text, 5..11 image (7 tokens), 12 textCOMMENT
MEDIUMtests/models/auto/test_video_processing_auto.py85 # Create a dummy config file with image_processor_typeCOMMENT
MEDIUMtests/models/auto/test_image_processing_auto.py103 # Create a dummy config file with image_processor_typeCOMMENT
MEDIUMtests/models/auto/test_modeling_auto.py576 # Create a temporary directory with a complete adapter model structureCOMMENT
MEDIUMtests/models/kosmos2_5/test_processor_kosmos2_5.py199 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/kosmos2_5/test_processor_kosmos2_5.py228 # Define the kwargs for each modalityCOMMENT
MEDIUM…ts/models/oneformer/test_image_processing_oneformer.py338 # Create a temporary json fileCOMMENT
MEDIUMtests/models/layoutlmv2/test_tokenization_layoutlmv2.py1284 # Create a new mapping from the special tokens defined in the original tokenizerCOMMENT
MEDIUMtests/models/layoutlmv3/test_tokenization_layoutlmv3.py1330 # Create a new mapping from the special tokens defined in the original tokenizerCOMMENT
MEDIUMtests/models/kosmos2/test_processing_kosmos2.py412 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/kosmos2/test_processing_kosmos2.py438 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/colpali/test_processing_colpali.py247 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/colpali/test_processing_colpali.py267 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/lfm2_vl/test_image_processing_lfm2_vl.py294 # Create a small image (256x256)COMMENT
MEDIUMtests/models/lfm2_vl/test_image_processing_lfm2_vl.py312 # Create a small image that won't exceed the max_image_tokens thresholdCOMMENT
MEDIUMtests/models/lfm2_vl/test_image_processing_lfm2_vl.py328 # Create a large image (2048x2048)COMMENT
MEDIUMtests/models/lfm2_vl/test_image_processing_lfm2_vl.py347 # Create a large image that will require tilingCOMMENT
MEDIUMtests/models/lfm2_vl/test_image_processing_lfm2_vl.py397 # Create a landscape image (1920x1080, ~16:9 aspect ratio)COMMENT
MEDIUMtests/models/lfm2_vl/test_image_processing_lfm2_vl.py416 # Create an extremely wide image (3000x500)COMMENT
MEDIUMtests/models/lfm2_vl/test_image_processing_lfm2_vl.py435 # Create an extremely tall image (500x3000)COMMENT
MEDIUMtests/models/lfm2_vl/test_image_processing_lfm2_vl.py372 # Create a large image that will require tilingCOMMENT
MEDIUMtests/models/janus/test_processing_janus.py362 # Create a simple text message for testingCOMMENT
MEDIUM…modernbert_decoder/test_modeling_modernbert_decoder.py192 # Create a longer input to test sliding window attentionCOMMENT
MEDIUM…odels/encoder_decoder/test_modeling_encoder_decoder.py787 # Create a new attention mask that ignores padding, and test that the loss differs for this new attention maskCOMMENT
MEDIUMtests/models/idefics/test_modeling_idefics.py180 # Create a list of configs and inputs, to test 2 things:COMMENT
MEDIUMtests/models/moshi/test_tokenization_moshi.py219 # Create a new mapping from the special tokens defined in the original tokenizerCOMMENT
MEDIUMtests/models/csm/test_modeling_csm.py296 # Creating a 4D mask where each of the last 3 tokens do not attend to each other.COMMENT
236 more matches not shown…
Docstring Block Structure75 hits · 375 pts
SeverityFileLineSnippetContext
HIGHsrc/transformers/configuration_utils.py603 Instantiate a [`PreTrainedConfig`] (or a derived class) from a pretrained model configuration. Args: STRING
HIGHsrc/transformers/pytorch_utils.py132 This function chunks the `input_tensors` into smaller input tensor parts of size `chunk_size` over the dimension STRING
HIGHsrc/transformers/feature_extraction_utils.py297 Instantiate a type of [`~feature_extraction_utils.FeatureExtractionMixin`] from a feature extractor, *e.g.* a STRING
HIGHsrc/transformers/tokenization_utils_base.py1118 Add a dictionary of special tokens (eos, pad, cls, etc.) to the encoder and link them to class attributes. If STRING
HIGHsrc/transformers/tokenization_utils_base.py1223 #TODO remove this from here! PreTrainedTOkeniuzerBase should be agnostic of AddedToken. Add a list of STRING
HIGHsrc/transformers/trainer_utils.py76 Extract the base model from a PEFT-wrapped model. If the model is not a PEFT model, returns it unchanged. OtheSTRING
HIGHsrc/transformers/image_processing_base.py95 Instantiate a type of [`~image_processing_utils.ImageProcessingMixin`] from an image processor. Args: STRING
HIGHsrc/transformers/tokenization_python.py517 Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added toSTRING
HIGHsrc/transformers/tokenization_python.py1302 Create a mask from the two sequences passed to be used in a sequence-pair classification task. This meSTRING
HIGHsrc/transformers/dynamic_module_utils.py529 Extracts a class from a module file, present in the local folder or repository of a model. <Tip warning={true}STRING
HIGHsrc/transformers/tokenization_utils_sentencepiece.py111 Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added toSTRING
HIGHsrc/transformers/video_processing_utils.py430 Instantiate a type of [`~video_processing_utils.VideoProcessorBase`] from an video processor. Args: STRING
HIGHsrc/transformers/pipelines/__init__.py691 Utility factory method to build a [`Pipeline`]. A pipeline consists of: - One or more components for STRING
HIGHsrc/transformers/utils/deprecation.py45 Function or method decorator to notify users about deprecated keyword arguments, replacing them with a new name if STRING
HIGHsrc/transformers/utils/chat_template_utils.py247 This function generates a JSON schema for a given function, based on its docstring and type hints. This is mostSTRING
HIGHsrc/transformers/utils/hub.py243 Tries to locate a file in a local folder and repo, downloads and cache it if necessary. Args: path_or_STRING
HIGHsrc/transformers/utils/hub.py317 Tries to locate several files in a local folder and repo, downloads and cache them if necessary. Args: STRING
HIGHsrc/transformers/models/cohere/tokenization_cohere.py192Create a Command-R tool-use prompt. Once rendered, the prompt instructs the model to generate a list of actionsSTRING
HIGHsrc/transformers/models/cohere/tokenization_cohere.py304Create a Command-R grounded generation (aka RAG) prompt. Once rendered, the prompt instructs the model to generSTRING
HIGHsrc/transformers/models/mllama/processing_mllama.py35 Generate a cross-attention token mask for image tokens in the input sequence. This function identifies the posSTRING
HIGHsrc/transformers/models/mllama/processing_mllama.py131 Builds a string from the input prompt by adding `bos_token` if not already present. Args: prompt (`strSTRING
HIGHsrc/transformers/models/clvp/modeling_clvp.py1363 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.py123 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.py401 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.py241 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.py90 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.py99 Main method to prepare for the model one or several HTML strings. Args: html_strings (`strSTRING
HIGH…/transformers/models/eomt/image_processing_pil_eomt.py186 Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and STRING
HIGHsrc/transformers/models/eomt/image_processing_eomt.py110 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.py603Maps the given sequence into a one-hot encoded matrix. Args: sequence: An amino acid sequence. mapping:STRING
HIGHsrc/transformers/models/auto/configuration_auto.py292 Instantiate one of the configuration classes of the library from a pretrained model configuration. TheSTRING
HIGHsrc/transformers/models/auto/image_processing_auto.py216 Loads the image processor configuration from a pretrained model image processor configuration. Args: pSTRING
HIGHsrc/transformers/models/auto/video_processing_auto.py118 Loads the video processor configuration from a pretrained model video processor configuration. Args: pSTRING
HIGHsrc/transformers/models/auto/feature_extraction_auto.py114 Loads the feature extractor configuration from a pretrained model feature extractor configuration. Args: STRING
HIGHsrc/transformers/models/auto/tokenization_auto.py534 Loads the tokenizer configuration from a pretrained model tokenizer configuration. Args: pretrained_moSTRING
HIGH…/transformers/models/bertweet/tokenization_bertweet.py543 Remove entities from text by converting them to their corresponding unicode character. Args: text: STRING
HIGH…formers/models/oneformer/image_processing_oneformer.py171 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.py264 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.py122 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.py246 Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and STRING
HIGHsrc/transformers/models/tapas/tokenization_tapas.py2583 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.py559 Generates text using the diffusion model. It contains an outer loop doing autoregressive generation ofSTRING
HIGHsrc/transformers/models/blip/modeling_blip.py1081 Overrides *generate* function to be able to use the model as a conditional generator Parameters: STRING
HIGH…ransformers/models/timesformer/modeling_timesformer.py488 Examples: ```python >>> import av >>> import numpy as np >>> from transformerSTRING
HIGH…ransformers/models/timesformer/modeling_timesformer.py619 labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image clSTRING
HIGHsrc/transformers/models/patchtst/modeling_patchtst.py1097 Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requSTRING
HIGHsrc/transformers/models/patchtst/modeling_patchtst.py1234 Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requSTRING
HIGHsrc/transformers/models/patchtst/modeling_patchtst.py1602 Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requSTRING
HIGHsrc/transformers/models/vivit/modular_vivit.py172 Examples: ```python >>> import av >>> import numpy as np >>> from transformerSTRING
HIGHsrc/transformers/models/vivit/modular_vivit.py298 labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image clSTRING
HIGHsrc/transformers/models/vivit/modeling_vivit.py343 Examples: ```python >>> import av >>> import numpy as np >>> from transformerSTRING
HIGHsrc/transformers/models/vivit/modeling_vivit.py469 labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the image clSTRING
HIGH…rmers/models/efficientloftr/modeling_efficientloftr.py885 Copied from kornia library : kornia/geometry/subpix/dsnt.py:76 Compute the expectation of coordinate values usiSTRING
HIGHsrc/transformers/models/x_clip/modeling_x_clip.py674 Examples: ```python >>> import av >>> import torch >>> import numpy as np STRING
HIGHsrc/transformers/models/x_clip/modeling_x_clip.py995 return_loss (`bool`, *optional*): Whether or not to return the contrastive loss. Examples:STRING
HIGHsrc/transformers/models/x_clip/modeling_x_clip.py1150 Examples: ```python >>> import av >>> import torch >>> import numpy as np STRING
HIGHsrc/transformers/models/x_clip/modular_x_clip.py287 Examples: ```python >>> import av >>> import torch >>> import numpy as np STRING
HIGHsrc/transformers/models/x_clip/modular_x_clip.py559 Examples: ```python >>> import av >>> import torch >>> import numpy as np STRING
HIGHsrc/transformers/models/x_clip/modular_x_clip.py655 return_loss (`bool`, *optional*): Whether or not to return the contrastive loss. Examples:STRING
HIGH…ansformers/models/qwen2_5_omni/modular_qwen2_5_omni.py846 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:STRING
15 more matches not shown…
Redundant / Tautological Comments242 hits · 306 pts
SeverityFileLineSnippetContext
LOWbenchmark/benchmarks_entrypoint.py445 # Check if the file has a run_benchmark functionCOMMENT
LOWbenchmark/benchmarks_entrypoint.py471 # Check if the module has an updated run_benchmark function that accepts metrics_recorderCOMMENT
LOWbenchmark/benches/llama.py76 # Check if required ML dependencies are availableCOMMENT
LOWbenchmark_v2/framework/benchmark_runner.py297 # Check if generation had the right number of tokensCOMMENT
LOWtests/test_modeling_common.py1382 # Set seed to ensure stable model initialization - avoids numerical issues (NaN) with some modelsCOMMENT
LOWtests/test_modeling_common.py4625 # Check if this given pattern matches any param or module (the value attributed to the pattern does not COMMENT
LOWtests/test_processing_common.py244 # Check if there's a custom setup method for this specific attributeCOMMENT
LOWtests/test_image_processing_common.py583 # Check if torchvision backend is availableCOMMENT
LOWtests/test_video_processing_common.py346 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOWtests/test_tokenizers_backend_mixin.py411 # Check if the special tokens have been kept (all_special_tokens returns strings)COMMENT
LOWtests/kernels/test_kernels.py152 # Check if both modules have a 'forward' attributeCOMMENT
LOWtests/kernels/test_kernels.py177 # Check if both modules have a 'forward' attributeCOMMENT
LOWtests/utils/test_offline.py219 # Return outputSTRING
LOWtests/utils/test_cache_utils.py853 # Check if cache config is passed through correctlyCOMMENT
LOWtests/utils/test_cache_utils.py863 # Check if the exported model is configured with the `StaticCache` correctlyCOMMENT
LOWtests/models/udop/test_tokenization_udop.py1267 # Check if the AddedToken / string format has been keptCOMMENT
LOWtests/models/gpt_oss/test_modeling_gpt_oss.py203 # Check if we have expected results for this configurationCOMMENT
LOWtests/models/gpt_oss/test_modeling_gpt_oss.py404 # Check if we have expected results for this configurationSTRING
LOW…itional_detr/test_image_processing_conditional_detr.py355 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOW…itional_detr/test_image_processing_conditional_detr.py478 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOWtests/models/markuplm/test_tokenization_markuplm.py1272 # Check if the AddedToken / string format has been keptCOMMENT
LOW…s/video_llama_3/test_video_processing_video_llama_3.py329 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOWtests/models/colqwen2/test_modeling_colqwen2.py336 # Check if the maximum scores per row are in the diagonal of the matrix scoreCOMMENT
LOWtests/models/colqwen2/test_modeling_colqwen2.py391 # Check if the maximum scores per row are in the diagonal of the matrix scoreCOMMENT
LOWtests/models/eomt/test_image_processing_eomt.py305 # Set longest_edge to None to test for semantic segmentatiom.COMMENT
LOWtests/models/rt_detr/test_image_processing_rt_detr.py328 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOWtests/models/kimi_k25/test_video_processing_kimi_k25.py280 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOW…grounding_dino/test_image_processing_grounding_dino.py320 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOW…grounding_dino/test_image_processing_grounding_dino.py496 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOWtests/models/layoutlmv2/test_tokenization_layoutlmv2.py1311 # Check if the AddedToken / string format has been keptCOMMENT
LOWtests/models/layoutlmv3/test_tokenization_layoutlmv3.py1359 # Check if the AddedToken / string format has been keptCOMMENT
LOWtests/models/colpali/test_modeling_colpali.py273 # Check if the maximum scores per row are in the diagonal of the matrix scoreCOMMENT
LOW…formable_detr/test_image_processing_deformable_detr.py335 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOW…formable_detr/test_image_processing_deformable_detr.py458 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOWtests/models/paligemma/test_modeling_paligemma.py323 # Check if pad tokens are properly maskedCOMMENT
LOWtests/models/moshi/test_tokenization_moshi.py246 # Check if the AddedToken / string format has been keptCOMMENT
LOWtests/models/smolvlm/test_video_processing_smolvlm.py150 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOWtests/models/layoutxlm/test_tokenization_layoutxlm.py1470 # Check if the AddedToken / string format has been keptCOMMENT
LOWtests/models/yolos/test_image_processing_yolos.py365 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOWtests/models/yolos/test_image_processing_yolos.py488 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOWtests/models/qwen2_vl/test_video_processing_qwen2_vl.py320 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOWtests/models/detr/test_image_processing_detr.py422 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOWtests/models/detr/test_image_processing_detr.py544 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOW…/models/colmodernvbert/test_modeling_colmodernvbert.py247 # Check if the maximum scores per row are in the diagonal of the matrix scoreCOMMENT
LOWtests/models/whisper/test_modeling_whisper.py501 # Check if beam_indices and sequences_scores are in the outputCOMMENT
LOWtests/models/whisper/test_modeling_whisper.py2110 # Set model to training mode to enable SpecAugmentCOMMENT
LOWtests/repo_utils/test_check_copies.py449 # Check if the model link is synchronized.STRING
LOWtests/trainer/trainer_test_utils.py582 if log[key] != log[key]: # Check if the value is NaNCODE
LOWtests/trainer/test_trainer_checkpointing.py270 # Check if it works for a simple language modeling exampleCOMMENT
LOWtests/trainer/test_trainer_checkpointing.py955 # Check if the model weights file exists in the final checkpoint directory.COMMENT
LOWtests/trainer/test_trainer.py436 # Check if model weights have been updatedCOMMENT
LOWtests/generation/test_utils.py3217 "# Calculate the sum\nresult = num1 + num2\n\n# Print the result\nprint(result)\n```\n"CODE
LOWutils/check_docstrings.py860 # Check if docstring starts and ends on the same lineCOMMENT
LOWutils/check_docstrings.py874 # Check if it's named "auto_docstring"COMMENT
LOWutils/check_docstrings.py1233 # Check if this arg has placeholdersCOMMENT
LOWutils/check_docstrings.py1478 # Check if this method is inside a processor classCOMMENT
LOWutils/check_docstrings.py1483 # Check if class inherits from ModelOutput, ProcessorMixin, or PreTrainedConfigCOMMENT
LOWutils/check_docstrings.py1791 # Check if any fields are missing or need removalCOMMENT
LOWutils/create_dummy_models.py1269 # Check if there is any tokenizer (prefer fast version if any)COMMENT
LOWutils/check_inits.py150 # Check if the backend declaration is inside a try block:COMMENT
182 more matches not shown…
Excessive Try-Catch Wrapping300 hits · 299 pts
SeverityFileLineSnippetContext
LOWbenchmark/benchmarks_entrypoint.py374 except Exception as e:CODE
LOWbenchmark/benchmarks_entrypoint.py392 except Exception as e:CODE
LOWbenchmark/benchmarks_entrypoint.py454 except Exception as e:CODE
LOWbenchmark/benchmarks_entrypoint.py486 except Exception as e:CODE
LOWbenchmark/benchmarks_entrypoint.py499 except Exception as e:CODE
MEDIUMbenchmark/benchmarks_entrypoint.py367def import_from_path(module_name, file_path):CODE
LOWbenchmark/benches/llama.py94 except Exception as e:CODE
LOWbenchmark/benches/llama.py345 except Exception as e:CODE
LOW…rk_v2/benchmark_scripts/continuous_batching_overall.py263 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py46 except Exception:CODE
LOWbenchmark_v2/framework/hardware_metrics.py202 except Exception:CODE
LOWbenchmark_v2/framework/hardware_metrics.py221 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py231 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py236 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py242 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py289 except Exception:CODE
LOWbenchmark_v2/framework/benchmark_runner.py365 except Exception as e:CODE
LOWbenchmark_v2/framework/benchmark_config.py44 except Exception as _:CODE
LOWtests/test_tokenization_common.py294 except Exception:CODE
LOWtests/test_tokenization_common.py2793 except Exception as e:CODE
LOWtests/test_tokenization_common.py2900 except Exception as e:CODE
LOWtests/test_modeling_common.py2323 except Exception as e:CODE
LOWtests/test_modeling_common.py2437 except Exception as e:CODE
LOWtests/test_modeling_common.py283 except Exception as _:CODE
LOWtests/test_modeling_common.py2546 except Exception as e:CODE
LOWtests/test_modeling_common.py5646 except Exception as e:CODE
LOWtests/test_processing_common.py258 except Exception as e:CODE
LOWtests/test_processing_common.py639 except Exception:CODE
LOWtests/test_processing_common.py670 except Exception:CODE
LOWtests/test_processing_common.py710 except Exception:CODE
LOWtests/test_processing_common.py742 except Exception:CODE
LOWtests/test_pipeline_mixin.py376 except Exception:CODE
LOWtests/test_pipeline_mixin.py403 except Exception:CODE
LOWtests/test_sentencepiece_backend_mixin.py139 except Exception:CODE
LOWtests/test_tokenizers_backend_mixin.py63 except Exception as e:CODE
LOWtests/test_tokenizers_backend_mixin.py485 except Exception as e:CODE
LOWtests/kernels/test_kernels.py566 except Exception as e:CODE
LOWtests/kernels/test_kernels.py570 except Exception as e:CODE
LOWtests/kernels/test_kernels.py585 except Exception as e:CODE
LOWtests/kernels/test_kernels.py589 except Exception as e:CODE
LOWtests/kernels/test_kernels.py82 except Exception as e:CODE
LOWtests/kernels/test_kernels.py92 except Exception as e:CODE
LOWtests/kernels/test_kernels.py632 except Exception as e:CODE
LOW…pelines/test_pipelines_automatic_speech_recognition.py1817 except Exception:CODE
LOWtests/utils/test_auto_docstring.py726 except Exception:STRING
LOWtests/utils/test_audio_utils.py1839 except Exception as e:CODE
LOW…v2_tokenizer/test_modeling_higgs_audio_v2_tokenizer.py228 except Exception:CODE
LOW…v2_tokenizer/test_modeling_higgs_audio_v2_tokenizer.py233 except Exception:CODE
LOWtests/models/marian/test_modeling_marian.py351 except Exception:CODE
LOWtests/models/mvp/test_modeling_mvp.py490 except Exception:CODE
LOWtests/models/led/test_modeling_led.py471 except Exception:CODE
LOWtests/models/pegasus_x/test_modeling_pegasus_x.py546 except Exception:CODE
LOWtests/models/rag/test_modeling_rag.py76 except Exception:CODE
LOWtests/models/wav2vec2/test_modeling_wav2vec2.py126 except Exception:CODE
LOWtests/models/pegasus/test_modeling_pegasus.py296 except Exception:CODE
LOWtests/models/bart/test_modeling_bart.py513 except Exception:CODE
LOWtests/models/deepseek_v4/test_modeling_deepseek_v4.py578 except Exception as e:CODE
LOWtests/models/plbart/test_modeling_plbart.py312 except Exception:CODE
LOWtests/models/blenderbot/test_modeling_blenderbot.py270 except Exception:CODE
LOWtests/models/opt/test_modeling_opt.py349 except Exception:CODE
240 more matches not shown…
Hallucination Indicators21 hits · 220 pts
SeverityFileLineSnippetContext
CRITICALbenchmark_v2/framework/benchmark_runner.py101 torch._inductor.codecache.TritonFuture._compile_cache.clear()CODE
CRITICALtests/models/fsmt/test_modeling_fsmt.py260 model.base_model.decoder.output_projection.weight.data_ptr(),CODE
CRITICALtests/models/fsmt/test_modeling_fsmt.py276 model.base_model.decoder.output_projection.weight.data_ptr(),CODE
CRITICALtests/models/mbart/test_modeling_mbart.py344 model.base_model.decoder.embed_tokens.weight.data_ptr(),CODE
CRITICALtests/models/mbart/test_modeling_mbart.py345 model.base_model.encoder.embed_tokens.weight.data_ptr(),CODE
CRITICALtests/models/mbart/test_modeling_mbart.py327 model.base_model.decoder.embed_tokens.weight.data_ptr(),CODE
CRITICALtests/models/mbart/test_modeling_mbart.py328 model.base_model.encoder.embed_tokens.weight.data_ptr(),CODE
CRITICALtests/generation/test_continuous_batching.py104 torch._inductor.codecache.TritonFuture._compile_cache.clear()CODE
CRITICALutils/check_repo.py1383 model_types = list(transformers.models.auto.configuration_auto.CONFIG_MAPPING_NAMES.keys())CODE
CRITICALsrc/transformers/trainer.py2205 kwargs.update({"dtype": self.accelerator.state.deepspeed_plugin.hf_ds_config.dtype()})CODE
CRITICALsrc/transformers/tokenization_mistral_common.py592 return self.tokenizer.instruct_tokenizer.tokenizer._model.piece_to_id(piece)CODE
CRITICAL…ransformers/models/marian/convert_marian_to_pytorch.py626 model.lm_head.weight.data = model.model.decoder.embed_tokens.weight.data.clone()CODE
CRITICAL…s/models/conditional_detr/modeling_conditional_detr.py1766 object_queries_position_embeddings = self.conditional_detr.model.query_position_embeddings.weight.unsqueeze(CODE
CRITICAL…_vl_hybrid/convert_deepseek_vl_hybrid_weights_to_hf.py74 r"vision_model.vision_tower_low.vision_tower.attn_pool.mlp.fc(\d+).(weight|bias)": r"model.vision_model.visioCODE
CRITICAL…ers/models/clip/convert_clip_original_pytorch_to_hf.py92 hf_model.visual_projection.weight.data = pt_model.visual.proj.data.T.contiguous()CODE
CRITICALsrc/transformers/models/rwkv/modeling_rwkv.py628 block.attention.output.weight.SCB.div_(2 ** int(block_id // self.config.rescale_every))STRING
CRITICALsrc/transformers/models/rwkv/modeling_rwkv.py629 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.py284 original_model.model.t2u_model.decoder_frontend.char_tokenizer.model.index_to_token(i): i for i in range(10904)CODE
CRITICALsrc/transformers/models/detr/modeling_detr.py1557 object_queries_position_embeddings = self.detr.model.query_position_embeddings.weight.unsqueeze(0).repeat(CODE
CRITICALsrc/transformers/integrations/mxfp4.py210 module.gate_up_proj_precision_config.weight_scale.storage.layout.unswizzle_data(CODE
CRITICALsrc/transformers/integrations/mxfp4.py221 module.down_proj_precision_config.weight_scale.storage.layout.unswizzle_data(CODE
Verbosity Indicators115 hits · 197 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_cache_utils.py1359 # Step 0 : multi-token prefillCOMMENT
LOWtests/utils/test_cache_utils.py1371 # Step 1 : multi-token update crossing the window boundaryCOMMENT
LOWtests/quantization/bnb/test_mixed_int8.py904 # Step 1: freeze all parametersSTRING
LOWtests/quantization/bnb/test_mixed_int8.py925 # Step 2: add adaptersSTRING
LOWtests/quantization/bnb/test_mixed_int8.py932 # Step 3: dummy batchSTRING
LOWtests/quantization/bnb/test_mixed_int8.py935 # Step 4: Check if the gradient is not NoneSTRING
LOWtests/quantization/bnb/test_4bit.py631 # Step 1: freeze all parametersSTRING
LOWtests/quantization/bnb/test_4bit.py651 # Step 2: add adaptersSTRING
LOWtests/quantization/bnb/test_4bit.py658 # Step 3: dummy batchSTRING
LOWtests/quantization/bnb/test_4bit.py661 # Step 4: Check if the gradient is not NoneSTRING
LOW…iner/distributed/test_trainer_distributed_deepspeed.py1139 # Step 1: Run with SP enabledCOMMENT
LOW…iner/distributed/test_trainer_distributed_deepspeed.py1160 # Step 2: Run without SPCOMMENT
LOW…s/trainer/distributed/test_trainer_distributed_fsdp.py593 # Step 1: Run with CP enabled (cp_size=2)COMMENT
LOW…s/trainer/distributed/test_trainer_distributed_fsdp.py605 # Step 2: Run without CP (FSDP with num_processes=1, no parallelism_config)COMMENT
LOWtests/generation/test_paged_attention.py23 "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orangeCODE
LOWtests/generation/test_paged_attention.py31 "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orangeCODE
LOWsrc/transformers/feature_extraction_utils.py518 # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy styleCOMMENT
LOWsrc/transformers/image_processing_base.py323 # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy styleCOMMENT
LOWsrc/transformers/video_processing_utils.py665 # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy styleCOMMENT
LOW…ls/ernie4_5_vl_moe/video_processing_ernie4_5_vl_moe.py220 # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy styleCOMMENT
LOWsrc/transformers/models/nllb_moe/modeling_nllb_moe.py192 `bitsandbytes` `Linear8bitLt` layers does not support manual casting Therefore we need to check if they are anCODE
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2854 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2864 # Step 3: Get and process object pointersCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2880 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2884 # Step 5: Forward through the memory attention mechanismCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2842 # Step 1: Handle initial conditioning framesCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1080 # Step 1: Handle initial conditioning framesCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1092 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1102 # Step 3: Get and process object pointersCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1118 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1122 # Step 5: Forward through the memory attention mechanismCOMMENT
LOW…/transformers/models/nemotron_h/modeling_nemotron_h.py533 # Step 2: Compute M, equivalent to applying attention mask to weightsCOMMENT
LOW…/transformers/models/nemotron_h/modeling_nemotron_h.py537 # Step 3: Compute Y_diag (apply to values)COMMENT
LOWsrc/transformers/models/gemma4/processing_gemma4.py277 # Step 1: mel frames (matches feature_extraction_gemma4.py)STRING
LOWsrc/transformers/models/gemma4/processing_gemma4.py284 # Step 2: SSCP subsampling. Two stride-2 Conv2d layers (kernel=3, pad=1)STRING
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py231 # Step 1: Aspect-ratio-preserving resizeCOMMENT
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py241 # Step 2: Rescale pixel values from [0, 255] to [0, 1]COMMENT
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py245 # Step 3: Identity normalization because Gemma4 was trained with pixels in [0, 1]COMMENT
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py249 # Step 4: Patchify the imageCOMMENT
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py255 # Step 5: Compute position IDsCOMMENT
LOW…/transformers/models/gemma4/image_processing_gemma4.py230 # Step 1: Aspect-ratio-preserving resizeCOMMENT
LOW…/transformers/models/gemma4/image_processing_gemma4.py240 # Step 2: Rescale pixel values (typically to [0, 1]) and optionally identity normalizeCOMMENT
LOW…/transformers/models/gemma4/image_processing_gemma4.py243 # Step 3: Patchify the imageCOMMENT
LOW…/transformers/models/gemma4/image_processing_gemma4.py250 # Step 5: Compute position IDsCOMMENT
LOWsrc/transformers/models/auto/image_processing_auto.py304 # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy styleCOMMENT
LOWsrc/transformers/models/auto/video_processing_auto.py215 # not all of these are nested. We need to check if it was saved recebtly as nested or if it is legacy styleCOMMENT
LOWsrc/transformers/models/auto/feature_extraction_auto.py202 # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy styleCOMMENT
LOWsrc/transformers/models/zamba2/modeling_zamba2.py821 # Step 2: Compute M, equivalent to applying attention mask to weightsCOMMENT
LOWsrc/transformers/models/zamba2/modeling_zamba2.py825 # Step 3: Compute Y_diag (apply to values)COMMENT
LOWsrc/transformers/models/zamba2/modular_zamba2.py609 # Step 2: Compute M, equivalent to applying attention mask to weightsCOMMENT
LOWsrc/transformers/models/zamba2/modular_zamba2.py613 # Step 3: Compute Y_diag (apply to values)COMMENT
LOW…s/deepseek_ocr2/convert_deepseek_ocr2_weights_to_hf.py220 # Step 1: Download the original checkpointSTRING
LOW…s/deepseek_ocr2/convert_deepseek_ocr2_weights_to_hf.py223 # Step 2: Convert to native transformers formatSTRING
LOW…rmers/models/gemma4_unified/modeling_gemma4_unified.py825 # Step 1: Patch embedding (LN → Dense → LN)COMMENT
LOW…rmers/models/gemma4_unified/modeling_gemma4_unified.py832 # Step 2: Add factorized positional embeddings + LNCOMMENT
LOW…rmers/models/gemma4_unified/modeling_gemma4_unified.py840 # Step 3: Base multimodal embedder (RMSNorm → Dense)COMMENT
LOW…dels/gemma4_unified/video_processing_gemma4_unified.py301 # Step 1: Aspect-ratio-preserving resizeCOMMENT
LOW…dels/gemma4_unified/video_processing_gemma4_unified.py310 # Step 2: Rescale pixel values (typically to [0, 1]) and optionally identity normalizeCOMMENT
LOW…dels/gemma4_unified/video_processing_gemma4_unified.py313 # Step 3: Patchify into teacher-size patches (16px)COMMENT
LOW…dels/gemma4_unified/video_processing_gemma4_unified.py319 # Step 4: Compute teacher-level position IDsCOMMENT
55 more matches not shown…
Structural Annotation Overuse113 hits · 197 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_cache_utils.py1359 # Step 0 : multi-token prefillCOMMENT
LOWtests/utils/test_cache_utils.py1371 # Step 1 : multi-token update crossing the window boundaryCOMMENT
LOWtests/models/colqwen2/test_modeling_colqwen2.py155 # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs.COMMENT
LOWtests/quantization/bnb/test_mixed_int8.py904 # Step 1: freeze all parametersSTRING
LOWtests/quantization/bnb/test_mixed_int8.py925 # Step 2: add adaptersSTRING
LOWtests/quantization/bnb/test_mixed_int8.py932 # Step 3: dummy batchSTRING
LOWtests/quantization/bnb/test_mixed_int8.py935 # Step 4: Check if the gradient is not NoneSTRING
LOWtests/quantization/bnb/test_4bit.py631 # Step 1: freeze all parametersSTRING
LOWtests/quantization/bnb/test_4bit.py651 # Step 2: add adaptersSTRING
LOWtests/quantization/bnb/test_4bit.py658 # Step 3: dummy batchSTRING
LOWtests/quantization/bnb/test_4bit.py661 # Step 4: Check if the gradient is not NoneSTRING
LOW…iner/distributed/test_trainer_distributed_deepspeed.py1139 # Step 1: Run with SP enabledCOMMENT
LOW…iner/distributed/test_trainer_distributed_deepspeed.py1160 # Step 2: Run without SPCOMMENT
LOW…s/trainer/distributed/test_trainer_distributed_fsdp.py593 # Step 1: Run with CP enabled (cp_size=2)COMMENT
LOW…s/trainer/distributed/test_trainer_distributed_fsdp.py605 # Step 2: Run without CP (FSDP with num_processes=1, no parallelism_config)COMMENT
LOWtests/generation/test_paged_attention.py23 "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orangeCODE
LOWtests/generation/test_paged_attention.py31 "orange.\n\n## Step 1: Identify the key characteristics of the fruit\nThe fruit is described as being orangeCODE
LOWdocs/source/en/model_doc/qwen3_asr.md259# Step 1: TranscribeCOMMENT
LOWdocs/source/en/model_doc/qwen3_asr.md268# Step 2: Prepare alignment inputsCOMMENT
LOWdocs/source/en/model_doc/qwen3_asr.md274# Step 3: Run forced alignerCOMMENT
LOWdocs/source/en/model_doc/qwen3_asr.md278# Step 4: Decode timestampsCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2854 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2864 # Step 3: Get and process object pointersCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2880 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2884 # Step 5: Forward through the memory attention mechanismCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2842 # Step 1: Handle initial conditioning framesCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1080 # Step 1: Handle initial conditioning framesCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1092 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1102 # Step 3: Get and process object pointersCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1118 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1122 # Step 5: Forward through the memory attention mechanismCOMMENT
LOWsrc/transformers/models/colqwen2/processing_colqwen2.py136 # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs.STRING
LOWsrc/transformers/models/colqwen2/modular_colqwen2.py134 # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs.STRING
LOW…/transformers/models/nemotron_h/modeling_nemotron_h.py533 # Step 2: Compute M, equivalent to applying attention mask to weightsCOMMENT
LOW…/transformers/models/nemotron_h/modeling_nemotron_h.py537 # Step 3: Compute Y_diag (apply to values)COMMENT
LOWsrc/transformers/models/gemma4/processing_gemma4.py277 # Step 1: mel frames (matches feature_extraction_gemma4.py)STRING
LOWsrc/transformers/models/gemma4/processing_gemma4.py284 # Step 2: SSCP subsampling. Two stride-2 Conv2d layers (kernel=3, pad=1)STRING
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py231 # Step 1: Aspect-ratio-preserving resizeCOMMENT
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py241 # Step 2: Rescale pixel values from [0, 255] to [0, 1]COMMENT
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py245 # Step 3: Identity normalization because Gemma4 was trained with pixels in [0, 1]COMMENT
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py249 # Step 4: Patchify the imageCOMMENT
LOW…nsformers/models/gemma4/image_processing_pil_gemma4.py255 # Step 5: Compute position IDsCOMMENT
LOW…/transformers/models/gemma4/image_processing_gemma4.py230 # Step 1: Aspect-ratio-preserving resizeCOMMENT
LOW…/transformers/models/gemma4/image_processing_gemma4.py240 # Step 2: Rescale pixel values (typically to [0, 1]) and optionally identity normalizeCOMMENT
LOW…/transformers/models/gemma4/image_processing_gemma4.py243 # Step 3: Patchify the imageCOMMENT
LOW…/transformers/models/gemma4/image_processing_gemma4.py250 # Step 5: Compute position IDsCOMMENT
LOWsrc/transformers/models/zamba2/modeling_zamba2.py821 # Step 2: Compute M, equivalent to applying attention mask to weightsCOMMENT
LOWsrc/transformers/models/zamba2/modeling_zamba2.py825 # Step 3: Compute Y_diag (apply to values)COMMENT
LOWsrc/transformers/models/zamba2/modular_zamba2.py609 # Step 2: Compute M, equivalent to applying attention mask to weightsCOMMENT
LOWsrc/transformers/models/zamba2/modular_zamba2.py613 # Step 3: Compute Y_diag (apply to values)COMMENT
LOW…a2vec_vision_original_pytorch_checkpoint_to_pytorch.py264 # IMPORTANT: Note that for now we've only converted the down-streamCOMMENT
LOW…s/deepseek_ocr2/convert_deepseek_ocr2_weights_to_hf.py220 # Step 1: Download the original checkpointSTRING
LOW…s/deepseek_ocr2/convert_deepseek_ocr2_weights_to_hf.py223 # Step 2: Convert to native transformers formatSTRING
LOW…rmers/models/gemma4_unified/modeling_gemma4_unified.py825 # Step 1: Patch embedding (LN → Dense → LN)COMMENT
LOW…rmers/models/gemma4_unified/modeling_gemma4_unified.py832 # Step 2: Add factorized positional embeddings + LNCOMMENT
LOW…rmers/models/gemma4_unified/modeling_gemma4_unified.py840 # Step 3: Base multimodal embedder (RMSNorm → Dense)COMMENT
LOW…dels/gemma4_unified/video_processing_gemma4_unified.py301 # Step 1: Aspect-ratio-preserving resizeCOMMENT
LOW…dels/gemma4_unified/video_processing_gemma4_unified.py310 # Step 2: Rescale pixel values (typically to [0, 1]) and optionally identity normalizeCOMMENT
LOW…dels/gemma4_unified/video_processing_gemma4_unified.py313 # Step 3: Patchify into teacher-size patches (16px)COMMENT
LOW…dels/gemma4_unified/video_processing_gemma4_unified.py319 # Step 4: Compute teacher-level position IDsCOMMENT
53 more matches not shown…
AI Slop Vocabulary100 hits · 173 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml106# Using default settings for comprehensive type checkingCOMMENT
MEDIUMbenchmark/benchmarks_entrypoint.py250 # Create comprehensive summary using pandas operationsCOMMENT
MEDIUMbenchmark/benchmarks_entrypoint.py301 # Export the comprehensive summaryCOMMENT
MEDIUMtests/test_tokenization_common.py323 # Default comprehensive test string covering various edge casesCOMMENT
MEDIUMtests/test_modeling_common.py725 # Note: for all mixins that utilize the Hub in some way, we should ensure thatCOMMENT
MEDIUMtests/test_processing_common.py160 # TODO: make this more robust. We intentionally do NOT call _setup_test_attributes(full_processor)COMMENT
LOWtests/tensor_parallel/test_tensor_parallel.py324 # so just use a SimpleNamespace to test that the attribute is updated correctly.COMMENT
LOWtests/pipelines/test_pipelines_common.py291 # If dtype is NOT specified in the pipeline constructor, the property should just returnCOMMENT
LOWtests/pipelines/test_pipelines_common.py296 # If underlying model doesn't have dtype property, simply return NoneCOMMENT
LOWtests/utils/test_modeling_utils.py3056 # a KeyError; they should simply return False.STRING
MEDIUMtests/utils/test_auto_docstring.py688 # Relative metric; robust across CI vs local. Catches serious regressions.STRING
MEDIUM…odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py537 ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) atCODE
MEDIUM…odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py537 ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) atCODE
MEDIUM…odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py539 ARTICLE_MAGNET = r"""it is well known that the classical magnetoresistance ( mr ) in metals or semiconductors wiCODE
LOWtests/models/clvp/test_modeling_clvp.py447 # the testing for text encoder stays standard because we just pass the text tokens here.COMMENT
LOWtests/models/modernvbert/test_modeling_modernvbert.py145 # For simplicity just set the last n tokens to the image tokenCOMMENT
MEDIUMtests/models/led/test_modeling_led.py544 ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) atCODE
MEDIUMtests/models/led/test_modeling_led.py544 ARTICLE_LEP = r"""the lep experiments at the resonance of @xmath1-boson have tested the standard model ( sm ) atCODE
MEDIUMtests/models/led/test_modeling_led.py546 ARTICLE_MAGNET = r"""it is well known that the classical magnetoresistance ( mr ) in metals or semiconductors wiCODE
MEDIUM…els/gemma4_assistant/test_modeling_gemma4_assistant.py109 ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers CODE
MEDIUMtests/models/gemma4/test_modeling_gemma4.py817 ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers CODE
LOWtests/models/bloom/test_modeling_bloom.py224 # TODO change the script (or just add skip) when building the env with tokenizers 0.12.0STRING
MEDIUM…/models/gemma4_unified/test_modeling_gemma4_unified.py743 ("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.py767 ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers CODE
LOWtests/models/lfm2_vl/test_modeling_lfm2_vl.py138 # For simplicity just set the last n tokens to the image tokenCOMMENT
MEDIUMtests/models/paligemma/test_modeling_paligemma.py579 # this is a supplementary test to ensure paligemma fine-tuning that relies on token_type_ids is robust to futureCOMMENT
LOWtests/models/idefics3/test_modeling_idefics3.py150 # For simplicity just set the last n tokens to the image tokenCOMMENT
LOWtests/models/smolvlm/test_modeling_smolvlm.py152 # For simplicity just set the last n tokens to the image tokenCOMMENT
LOWtests/models/idefics2/test_modeling_idefics2.py160 # For simplicity just set the last n tokens to the image tokenCOMMENT
LOW…/models/colmodernvbert/test_modeling_colmodernvbert.py140 # For simplicity just set the first n tokens to the image tokenCOMMENT
MEDIUM…ed_assistant/test_modeling_gemma4_unified_assistant.py109 ("cuda", (8, 6)): ['## The Algorithmic Mind\n\nA tapestry of data, vast and deep,\nWhere silent numbers CODE
MEDIUMtests/models/whisper/test_processing_whisper.py171 """Test using the old processing functions used in the ASR pipeline, but that serves as a BC reference."""STRING
LOWtests/generation/test_utils.py2662 # In this case, we simply call recursively the function on both internal cachesCOMMENT
LOWtests/generation/test_utils.py2752 # In this case, we simply call recursively the function on both internal cachesCOMMENT
MEDIUMtests/generation/test_logits_process.py758 # scores = 0 to facilitate checksCOMMENT
LOWutils/check_docstrings.py547 # Default None are not written, we just set `*optional*`. If there is default that is not None specified in theCOMMENT
MEDIUMutils/get_test_reports.py137 """Command-line interface for running test suite with comprehensive reporting. Check handle_suite for more details.STRING
MEDIUMutils/create_dummy_models.py369 # New method that is more robust to get checkpoints!COMMENT
LOWutils/notification_service.py169 # `dicts_to_sum` uses `dicts_to_sum` which requires a non empty dictionary. Let's just add an empty entry.COMMENT
LOWutils/check_inits.py119 # If this is a traditional init, just return.COMMENT
MEDIUMsrc/transformers/tokenization_utils_base.py3228 # To make this more robust, we could do a diff and find the longest common subsequence, but this isCOMMENT
MEDIUMsrc/transformers/testing_utils.py3534 # TODO: check simply with the name is not robust.STRING
LOWsrc/transformers/testing_utils.py3779 # If the target callable is not called within a test, simply call it without modification.STRING
LOWsrc/transformers/testing_utils.py3856 # We simply add "self" as the expression despite it might not be the actual argument name.STRING
LOWsrc/transformers/cache_utils.py896 # LinearAttention layer have no sequence length dimension, so simply return -1 hereCOMMENT
LOWsrc/transformers/modeling_utils.py5158 # fragmentation issues) simply use the pool of 4 GiB unused memory that is available. In those cases, it's bCOMMENT
MEDIUMsrc/transformers/modeling_utils.py4947 """Adds the `_is_hf_initialized` flag on parameters that will be tied, in order to avoid initializing themSTRING
LOWsrc/transformers/trainer.py1754 # if loss is nan or inf simply add the average of previous logged lossesCOMMENT
LOWsrc/transformers/masking_utils.py817 # If the mask is already 4D, simply return as-is (it was already prepared, or it is custom)COMMENT
LOWsrc/transformers/trainer_pt_utils.py385 # Check if we have something to add, if not just returnCOMMENT
MEDIUMsrc/transformers/pipelines/text_to_audio.py206 # ensure dict output to facilitate postprocessingCOMMENT
MEDIUM…transformers/pipelines/automatic_speech_recognition.py668 # Simply cast from pyctcdecode format to wav2vec2 format to leverageCOMMENT
MEDIUMsrc/transformers/pipelines/mask_generation.py218 # Consider using a more robust method for distinguishing model types here.COMMENT
LOWsrc/transformers/utils/chat_parsing_utils.py83 # If the schema has a const, we just return that value and do absolutely nothing elseCOMMENT
LOWsrc/transformers/utils/output_capturing.py108 # If it's None or not a key we want to capture, simply return, the hook is inactiveCOMMENT
MEDIUM…/transformers/models/metaclip_2/modeling_metaclip_2.py498 # Use robust pooling like CLIP - finds the first EOS token position per sequenceCOMMENT
MEDIUM…c/transformers/models/metaclip_2/modular_metaclip_2.py223 # Use robust pooling like CLIP - finds the first EOS token position per sequenceCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py161 # As the feature map size is fixed, we can just return the pre-computed embeddings.STRING
LOWsrc/transformers/models/clvp/modeling_clvp.py496 # We can probably just use the multi-head attention module of PyTorch >=1.1.0STRING
LOWsrc/transformers/models/vilt/image_processing_vilt.py226 # If no padding, just return the processed imagesSTRING
40 more matches not shown…
Modern AI Meta-Vocabulary66 hits · 166 pts
SeverityFileLineSnippetContext
MEDIUMCONTRIBUTING.md865. [Agentic contributions](#agentic-contributions)CODE
MEDIUMtests/models/rag/test_modeling_rag.py1# Copyright 2020, The RAG Authors and The HuggingFace Inc. team.COMMENT
MEDIUMtests/models/persimmon/test_modeling_persimmon.py61 # "zero-shot": PersimmonForSequenceClassification,COMMENT
MEDIUMutils/modular_model_detector.py97# You can also change the embedding model for a larger/smaller one.STRING
MEDIUMdocs/source/ja/pipeline_tutorial.md228>>> # This model is a `zero-shot-classification` model.CODE
MEDIUMdocs/source/ja/tasks/idefics.md44 - [Few-shot プロンプト](#few-shot-prompting)CODE
MEDIUMdocs/source/ja/tasks/zero_shot_object_detection.md130## Text-prompted zero-shot object detection by handCOMMENT
MEDIUMdocs/source/ja/tasks/prompting.md277[Chain-of-thought](#chain-of-thought)。CODE
MEDIUMdocs/source/ja/tasks/prompting.md335* [Few-shot prompting](#few-shot-prompting) や [Chain-of-thought](#chain-of-thought) などの高度なテクニックを使用します。COMMENT
MEDIUMdocs/source/ja/tasks/prompting.md335* [Few-shot prompting](#few-shot-prompting) や [Chain-of-thought](#chain-of-thought) などの高度なテクニックを使用します。COMMENT
MEDIUMdocs/source/zh/pipeline_tutorial.md239>>> # This model is a `zero-shot-classification` model.CODE
MEDIUMdocs/source/ar/_toctree.yml490# title: RAGCOMMENT
MEDIUMdocs/source/ar/chat_templating.md493# معالجة المحادثة والمستندات باستخدام قالب RAG، وإرجاع موترات PyTorch.COMMENT
MEDIUMdocs/source/ar/pipeline_tutorial.md225>>> # هذا النموذج هو نموذج "zero-shot-classification".CODE
MEDIUMdocs/source/hi/pipeline_tutorial.md253>>> # This model is a `zero-shot-classification` model.CODE
MEDIUMdocs/source/ko/chat_extras.md17# 도구와 RAG[[Tools-and-RAG]]COMMENT
MEDIUMdocs/source/ko/chat_extras.md243## RAG[[RAG]]COMMENT
MEDIUMdocs/source/ko/chat_templating.md477## 고급: 검색 증강 생성[[advanced-retrieval-augmented-generation]]COMMENT
MEDIUMdocs/source/ko/pipeline_tutorial.md218>>> # This model is a `zero-shot-classification` model.CODE
MEDIUMdocs/source/ko/tasks/idefics.md32 - [퓨샷 프롬프트](#few-shot-prompting)CODE
MEDIUMdocs/source/ko/tasks/idefics.md158## 퓨샷 프롬프트[[few-shot-prompting]]COMMENT
MEDIUMdocs/source/ko/tasks/zero_shot_object_detection.md17# 제로샷(zero-shot) 객체 탐지[[zeroshot-object-detection]]COMMENT
MEDIUMdocs/source/ko/tasks/zero_shot_object_detection.md46## 제로샷(zero-shot) 객체 탐지 파이프라인[[zeroshot-object-detection-pipeline]]COMMENT
MEDIUMdocs/source/ko/tasks/zero_shot_image_classification.md17# 제로샷(zero-shot) 이미지 분류[[zeroshot-image-classification]]COMMENT
MEDIUMdocs/source/ko/tasks/zero_shot_image_classification.md43## 제로샷(zero-shot) 이미지 분류 파이프라인[[zeroshot-image-classification-pipeline]]COMMENT
MEDIUMdocs/source/ko/tasks/zero_shot_image_classification.md84## 직접 제로샷(zero-shot) 이미지 분류하기[[zeroshot-image-classification-by-hand]]COMMENT
MEDIUMdocs/source/ko/tasks/prompting.md242추론은 대규모 언어 모델(LLM)에게 가장 어려운 작업 중 하나이며, 좋은 결과를 얻기 위해서는 종종 [생각의 사슬(Chain-of-thought, CoT)](#chain-of-thought)과 같은 고급 프롬프팅 CODE
MEDIUMdocs/source/ko/tasks/prompting.md296* [퓨샷(Few-shot) 프롬프팅](#few-shot-prompting) 및 [생각의 사슬(Chain-of-thought, CoT)](#chain-of-thought) 같은 고급 기술을 사용해보세요.COMMENT
MEDIUMdocs/source/ko/tasks/prompting.md296* [퓨샷(Few-shot) 프롬프팅](#few-shot-prompting) 및 [생각의 사슬(Chain-of-thought, CoT)](#chain-of-thought) 같은 고급 기술을 사용해보세요.COMMENT
MEDIUMdocs/source/ko/tasks/prompting.md302### 퓨샷(Few-shot) 프롬프팅 [[few-shot-prompting]]COMMENT
MEDIUMdocs/source/ko/tasks/prompting.md339### 생각의 사슬(Chain-of-thought, CoT) [[chain-of-thought]]COMMENT
MEDIUMdocs/source/ko/model_doc/rag.md17# RAG(검색 증강 생성) [[rag]]COMMENT
MEDIUMdocs/source/ko/model_doc/exaone4.md21**[EXAONE 4.0](https://github.com/LG-AI-EXAONE/EXAONE-4.0)** 모델군은 [EXAONE 3.5](https://github.com/LG-AI-EXAONE/EXAONE-3.CODE
MEDIUMdocs/source/fr/tutoriel_pipeline.md223>>> # This model is a `zero-shot-classification` model.CODE
MEDIUMdocs/source/es/pipeline_tutorial.md234>>> # This model is a `zero-shot-classification` model.CODE
MEDIUMdocs/source/en/contributing.md865. [Agentic contributions](#agentic-contributions)CODE
MEDIUMdocs/source/en/community_integrations/sglang.md19[SGLang](https://docs.sglang.ai) is a low-latency, high-throughput inference engine for large language models (LLMs). ItCODE
MEDIUMdocs/source/en/tasks/idefics.md44 - [Few-shot prompting](#few-shot-prompting)CODE
MEDIUMdocs/source/en/tasks/zero_shot_object_detection.md51>>> # Use any checkpoint from the hf.co/models?pipeline_tag=zero-shot-object-detectionCODE
MEDIUMdocs/source/en/tasks/zero_shot_object_detection.md127## Text-prompted zero-shot object detection by handCOMMENT
MEDIUMdocs/source/en/tasks/prompting.md698. Try other techniques like [few-shot](#few-shot) and [chain-of-thought](#chain-of-thought) to improve results.STRING
MEDIUMdocs/source/en/tasks/prompting.md698. Try other techniques like [few-shot](#few-shot) and [chain-of-thought](#chain-of-thought) to improve results.STRING
MEDIUMdocs/source/en/tasks/prompting.md169Like [few-shot](#few-shot) prompting, the downside of CoT is that it requires more effort to design a series of prompts CODE
MEDIUMdocs/source/en/model_doc/rag.md18# RAGCOMMENT
MEDIUMdocs/source/en/model_doc/exaone_moe.md22**[K-EXAONE](https://github.com/LG-AI-EXAONE/K-EXAONE)** model is a large-scale multilingual language model developed byCODE
MEDIUMdocs/source/en/model_doc/exaone4.md22**[EXAONE 4.0](https://github.com/LG-AI-EXAONE/EXAONE-4.0)** model is the language model, which integrates a **Non-reasoCODE
MEDIUMdocs/source/en/model_doc/mistral4.md82# Setting `skip_special_tokens=False` to visualize reasoning trace between [THINK] [/THINK] tags.COMMENT
MEDIUMsrc/transformers/processing_utils.py495 see the RAG section of the [chat templating guide](https://huggingface.co/docs/transformers/main/en/chat_templatSTRING
MEDIUMsrc/transformers/models/rag/modeling_rag.py1# Copyright 2020, The RAG Authors and The HuggingFace Inc. team.COMMENT
MEDIUMsrc/transformers/models/rag/modeling_rag.py287 >>> # initialize a RAG from two pretrained models.CODE
MEDIUMsrc/transformers/models/rag/modeling_rag.py513 # encoder_outputs are pre-computed during RAG-token generationCOMMENT
MEDIUMsrc/transformers/models/rag/modeling_rag.py1055 # RAG-sequence marginalizationCOMMENT
MEDIUMsrc/transformers/models/rag/modeling_rag.py1219 # RAG-token marginalizationCOMMENT
MEDIUMsrc/transformers/models/rag/modeling_rag.py1606 # RAG should always use the legacy path even though the LM backbone (T5) uses new cache formatCOMMENT
MEDIUMsrc/transformers/models/rag/modeling_rag.py1607 # because RAG expands input for doc-size internally. TODO: raushan, remove me when all models supportCOMMENT
MEDIUMsrc/transformers/models/rag/configuration_rag.py1# Copyright 2020, The RAG Authors and The HuggingFace Inc. team.COMMENT
MEDIUMsrc/transformers/models/rag/retrieval_rag.py1# Copyright 2020, The RAG Authors and The HuggingFace Inc. team.COMMENT
MEDIUMsrc/transformers/models/rag/retrieval_rag.py508 # TODO(Patrick): if we train more RAG models, I want to put the input first to take advantage of effortless STRING
MEDIUMsrc/transformers/models/rag/tokenization_rag.py1# Copyright 2020, The RAG Authors and The HuggingFace Inc. team.COMMENT
MEDIUM…models/x_clip/convert_x_clip_original_pytorch_to_hf.py238 # few shotCOMMENT
6 more matches not shown…
Cross-Language Confusion23 hits · 128 pts
SeverityFileLineSnippetContext
HIGHtests/utils/test_model_output.py155 '[1, {"type": "tests.utils.test_model_output.ModelOutputTest", "context": "[\\"a\\", \\"c\\"]", "children_spCODE
HIGHtests/utils/test_chat_parsing_utils.py513 'null_value:null,number_value:1,string_value:<|"|>foo<|"|>,'CODE
HIGHtests/utils/test_chat_parsing.py523 'null_value:null,number_value:1,string_value:<|"|>foo<|"|>,'CODE
HIGHutils/check_import_complexity.py67 self._tracer.push(self._fullname)CODE
HIGH.circleci/create_circleci_config.py73 {"run": "pip install requests || true"},CODE
HIGH.circleci/create_circleci_config.py75 "run": """while [[ $(curl --location --request GET "https://circleci.com/api/v2/workflow/$CIRCLECODE
HIGH.circleci/create_circleci_config.py78 "run": "python utils/process_circleci_workflow_test_reports.py --workflow_id $CIRCLE_WORKFLOW_IDCODE
HIGH.circleci/create_circleci_config.py182 {"run": "apt-get update && apt-get install -y curl"},CODE
HIGH.circleci/create_circleci_config.py195 "command": """du -h -d 1 "$(pip -V | cut -d ' ' -f 4 | sed 's/pip//g')" | grep -vE "dist-info|_distuCODE
HIGH.circleci/create_circleci_config.py201 "command": """pip list --format=freeze | tee installed.txt || true""",CODE
HIGH.circleci/create_circleci_config.py222 "command": f"TESTS=$(circleci tests split --split-by=timings {self.job_name}_test_list.txt) && echoCODE
HIGH.circleci/create_circleci_config.py232 "command": "cp -r /test_data/* . 2>/dev/null || true; python3 utils/fetch_hub_objects_for_ci.py",CODE
HIGH.circleci/create_circleci_config.py240 "command": 'curl -L -o huggingface-cache.tar.gz https://huggingface.co/datasets/hf-internal-CODE
HIGHsrc/transformers/quantizers/quantizer_fp_quant.py54 "Using `fp_quant` with real quantization requires a **Blackwell GPU** and qutlass: `git clone https://giCODE
HIGHsrc/transformers/models/auto/auto_factory.py243 # Check both `quantization_config` being present and also not null,STRING
HIGHsrc/transformers/models/auto/auto_factory.py397 # Check both `quantization_config` being present and also not null,COMMENT
HIGHsrc/transformers/models/xlm/tokenization_xlm.py305 logger.error("1. git clone git@github.com:neubig/kytea.git && cd kytea")CODE
HIGHsrc/transformers/models/xlm/tokenization_xlm.py308 logger.error("4. make && make install")CODE
HIGHsrc/transformers/models/xlm/tokenization_xlm.py381 git clone git@github.com:neubig/kytea.git && cd kytea autoreconf -i ./configure --prefix=$HOME/localSTRING
HIGHsrc/transformers/models/xlm/tokenization_xlm.py382 make && make install pip install kyteaSTRING
HIGH…/transformers/models/flaubert/tokenization_flaubert.py304 logger.error("1. git clone git@github.com:neubig/kytea.git && cd kytea")CODE
HIGH…/transformers/models/flaubert/tokenization_flaubert.py307 logger.error("4. make && make install")CODE
HIGHsrc/transformers/integrations/executorch.py219 # If `layer_types` is not specified explicitly in the config or `sliding_window` is null,COMMENT
Slop Phrases63 hits · 59 pts
SeverityFileLineSnippetContext
LOWtests/test_modeling_common.py4600 # If none of the config and subconfigs have a tp_plan, then skip (otherwise we should make sure to respect the pCOMMENT
LOWtests/models/whisper/test_modeling_whisper.py109 # make sure to use correct index if a batch was removedCOMMENT
LOWutils/check_docstrings.py387# below, make sure to add a comment explaining why.COMMENT
LOWsrc/transformers/core_model_loading.py252 # We squeeze each chunk here as well to make sure to give them their original shapeCOMMENT
LOWsrc/transformers/core_model_loading.py1609 # so we need to make sure to load the tensor with the same dtype from the checkpointSTRING
LOWsrc/transformers/trainer.py1872 # After training we make sure to retrieve back the original forward pass methodCOMMENT
LOW…ers/models/ernie4_5_vl_moe/modeling_ernie4_5_vl_moe.py1657 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOW…mers/models/ernie4_5_vl_moe/modular_ernie4_5_vl_moe.py1211 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/laguna/modeling_laguna.py752 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/gpt_oss/modeling_gpt_oss.py682 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/olmoe/modeling_olmoe.py695 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/clvp/configuration_clvp.py81 # make sure to have the config_type be either "text_config" or "speech_config"COMMENT
LOW…/transformers/models/qwen3_next/modeling_qwen3_next.py1170 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/mellum/modeling_mellum.py723 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/mixtral/modeling_mixtral.py670 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/mixtral/modular_mixtral.py416 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…/transformers/models/minimax_m2/modeling_minimax_m2.py677 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…mers/models/colqwen2/convert_colqwen2_weights_to_hf.py17Don't forget to manually upload the processor-related files to the HF model repositorySTRING
LOW…mers/models/colqwen2/convert_colqwen2_weights_to_hf.py180 Don't forget to manually upload the processor-related files to the HF model repositoryCODE
LOWsrc/transformers/models/jetmoe/modeling_jetmoe.py814 loss += self.aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/jetmoe/modular_jetmoe.py581 loss += self.aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…/transformers/models/granitemoe/modeling_granitemoe.py669 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…c/transformers/models/granitemoe/modular_granitemoe.py304 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…formers/models/minimax_m3_vl/modeling_minimax_m3_vl.py970 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…pas/convert_tapas_original_tf_checkpoint_to_pytorch.py174 # 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.py39# IMPORTANT: In order for this script to run, please make sure to download the dictionary: `dict.txt` from wget https://COMMENT
LOWsrc/transformers/models/flex_olmo/modeling_flex_olmo.py694 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOW…/transformers/models/layoutlmv2/modeling_layoutlmv2.py1078 >>> boxes = data["bboxes"] # make sure to normalize your bounding boxesCODE
LOW…s/models/granitemoehybrid/modeling_granitemoehybrid.py1352 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/minimax/modeling_minimax.py881 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/jamba/modeling_jamba.py929 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/phimoe/modeling_phimoe.py863 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/voxtral/processing_voxtral.py313 # make sure to remove from text_kwargs and audio_kwargsSTRING
LOWsrc/transformers/models/siglip/modeling_siglip.py509 >>> # important: make sure to set padding="max_length" as that's how the model was trainedCODE
LOWsrc/transformers/models/siglip/modeling_siglip.py693 >>> # important: make sure to set padding="max_length" as that's how the model was trainedCODE
LOWsrc/transformers/models/doge/modular_doge.py636 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/doge/modeling_doge.py805 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…ransformers/models/qwen3_5_moe/modeling_qwen3_5_moe.py1879 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…ransformers/models/qwen3_5_moe/modeling_qwen3_5_moe.py2036 ) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/dbrx/modular_dbrx.py536 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/dbrx/modeling_dbrx.py748 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOW…ransformers/models/deepseek_v4/modeling_deepseek_v4.py1512 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…nsformers/models/ernie4_5_moe/modeling_ernie4_5_moe.py729 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/siglip2/modeling_siglip2.py625 >>> # important: make sure to set padding="max_length" as that's how the model was trainedCODE
LOWsrc/transformers/models/siglip2/modeling_siglip2.py758 >>> # important: make sure to set padding="max_length" as that's how the model was trainedCODE
LOWsrc/transformers/models/glm4v_moe/modular_glm4v_moe.py401 ) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/glm4v_moe/modeling_glm4v_moe.py1636 ) # make sure to reside in the same deviceCODE
LOW…ansformers/models/qwen3_vl_moe/modular_qwen3_vl_moe.py444 ) # make sure to reside in the same deviceCODE
LOW…nsformers/models/qwen3_vl_moe/modeling_qwen3_vl_moe.py1607 ) # make sure to reside in the same deviceCODE
LOW…s/models/granitemoeshared/modeling_granitemoeshared.py734 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…ormers/models/qwen3_omni_moe/modular_qwen3_omni_moe.py1407 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOW…ormers/models/qwen3_omni_moe/modular_qwen3_omni_moe.py1840 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOW…rmers/models/qwen3_omni_moe/modeling_qwen3_omni_moe.py2195 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…rmers/models/qwen3_omni_moe/modeling_qwen3_omni_moe.py3106 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOW…convert_fsmt_original_pytorch_checkpoint_to_pytorch.py15# Note: if you intend to run this script make sure you look under scripts/fsmt/COMMENT
LOWsrc/transformers/models/fsmt/modeling_fsmt.py106(don't forget to install sacrebleu: `pip install sacrebleu`)STRING
LOWsrc/transformers/models/qwen2_moe/modeling_qwen2_moe.py707 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/whisper/generation_whisper.py906 # output tokens from the list of dicts. If we use batch size > 1, we make sure to pad the outputCOMMENT
LOWsrc/transformers/models/whisper/generation_whisper.py588 >>> # make sure to NOT truncate the input audio, to return the `attention_mask` and to pad to the longest audioSTRING
LOWsrc/transformers/models/qwen3_moe/modeling_qwen3_moe.py699 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
3 more matches not shown…
Fake / Example Data31 hits · 34 pts
SeverityFileLineSnippetContext
LOWtests/pipelines/test_pipelines_fill_mask.py169 dummy_str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit," * 100CODE
LOWtests/pipelines/test_pipelines_fill_mask.py169 dummy_str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit," * 100CODE
LOWtests/models/solar_open/test_modeling_solar_open.py101 "Lorem ipsum dolor sit amet",CODE
LOWtests/models/solar_open/test_modeling_solar_open.py101 "Lorem ipsum dolor sit amet",CODE
LOWtests/models/solar_open/test_modeling_solar_open.py108 "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley ShellCODE
LOWtests/models/solar_open/test_modeling_solar_open.py108 "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley ShellCODE
LOWtests/models/solar_open/test_modeling_solar_open.py112 "Lorem ipsum dolor sit amet=√=√ 치수=√ 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shelley CODE
LOWtests/models/solar_open/test_modeling_solar_open.py112 "Lorem ipsum dolor sit amet=√=√ 치수=√ 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shelley CODE
LOWtests/models/donut/test_processing_donut.py37 "name": "John Doe",CODE
LOW…ts/models/markuplm/test_feature_extraction_markuplm.py94 expected_nodes = [['sample document', 'Goog', 'This is one header', 'This is a another Header', 'Travel from', 'STRING
LOWtests/models/xlnet/test_modeling_xlnet.py646 # else offset+dummy_token when using cacheCOMMENT
LOWtests/models/xlnet/test_modeling_xlnet.py666 # every token after consists of offset+dummy_token length when using cacheCOMMENT
LOWtests/models/lfm2_moe/test_modeling_lfm2_moe.py204 prompts = ["Who are you?", "Complete the text: Lorem ipsum dolor ", "The Meji Restoration in Japan ended"]CODE
LOWtests/models/lfm2_moe/test_modeling_lfm2_moe.py210 "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum.",CODE
LOWtests/models/lfm2_moe/test_modeling_lfm2_moe.py215 "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum dolor",CODE
LOWdocs/source/ja/model_memory_anatomy.md38>>> dummy_data = {CODE
LOWdocs/source/ja/model_memory_anatomy.md42>>> ds = Dataset.from_dict(dummy_data)CODE
LOWdocs/source/ar/model_memory_anatomy.md22>>> dummy_data = {CODE
LOWdocs/source/ar/model_memory_anatomy.md26>>> ds = Dataset.from_dict(dummy_data)CODE
LOWdocs/source/ko/model_memory_anatomy.md39>>> dummy_data = {CODE
LOWdocs/source/ko/model_memory_anatomy.md43>>> ds = Dataset.from_dict(dummy_data)CODE
LOWdocs/source/es/model_memory_anatomy.md38>>> dummy_data = {CODE
LOWdocs/source/es/model_memory_anatomy.md42>>> ds = Dataset.from_dict(dummy_data)CODE
LOWsrc/transformers/exporters/exporter_executorch.py577 if node.op != "placeholder":CODE
LOWsrc/transformers/exporters/exporter_executorch.py768 if node.op != "placeholder" or not isinstance(node.target, str):CODE
LOWsrc/transformers/models/idefics/processing_idefics.py296 fake_token = "<fake_token_around_image>"STRING
LOWsrc/transformers/models/idefics/processing_idefics.py302 return image_token + fake_tokenSTRING
LOWsrc/transformers/models/idefics/processing_idefics.py304 return fake_token + image_token + fake_tokenSTRING
LOWsrc/transformers/models/xlnet/modeling_xlnet.py1241 dummy_token = torch.zeros((effective_batch_size, 1), dtype=torch.long, device=input_ids.device)STRING
LOWsrc/transformers/models/xlnet/modeling_xlnet.py1249 input_ids = torch.cat([input_ids[:, -offset:], dummy_token], dim=1)STRING
LOWsrc/transformers/models/xlnet/modeling_xlnet.py1251 input_ids = torch.cat([input_ids, dummy_token], dim=1)STRING
AI Response Leakage2 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsrc/transformers/data/data_collator.py1239 # (see documentation for `mems`), otherwise information may leak through due to reuse. In this implementatioCOMMENT
HIGHsrc/transformers/data/data_collator.py1336 # (see documentation for `mems`), otherwise information may leak through due to reuse. In this implementatioCOMMENT
TODO Padding6 hits · 8 pts
SeverityFileLineSnippetContext
LOWutils/check_repo.py253 "MllamaTextModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOWutils/check_repo.py254 "MllamaVisionModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOWutils/check_repo.py255 "Llama4TextModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOWutils/check_repo.py256 "Llama4VisionModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOWsrc/transformers/models/gemma4/processing_gemma4.py193 # TODO: Add tests for audio-only processor inputs.STRING
LOW…ormers/generation/continuous_batching/cache_manager.py544 # TODO: implement thisCOMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHdocs/source/en/model_output_tracing.md48 # Captures second output as requested (index=1)COMMENT
Overly Generic Function Names9 hits · 7 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_auto_docstring.py218 f.write("def helper(): pass")CODE
LOWtests/cli/test_serve.py1875 async def handle_request(_body, _request_id):CODE
LOWsrc/transformers/utils/deprecation.py85 def my_function(do_reduce_labels):STRING
LOWsrc/transformers/utils/deprecation.py95 def my_function(max_size):STRING
LOWsrc/transformers/utils/generic.py740 def my_function(arg1, arg2, **kwargs):STRING
LOWsrc/transformers/cli/serving/transcription.py85 async def handle_request(self, request: Request) -> JSONResponse | StreamingResponse:CODE
LOWsrc/transformers/cli/serving/chat_completion.py109 async def handle_request(self, body: dict, request_id: str) -> StreamingResponse | JSONResponse:CODE
LOWsrc/transformers/cli/serving/completion.py77 async def handle_request(self, body: dict, request_id: str) -> "StreamingResponse | JSONResponse":CODE
LOWsrc/transformers/cli/serving/response.py367 async def handle_request(self, body: dict, request_id: str) -> StreamingResponse | JSONResponse:CODE
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/generation/test_flash_attention_parity.py15# Usage:COMMENT
LOWutils/compare_test_runs.py79# Example usage:COMMENT
LOW…mples/quantization/custom_quantization_int8_example.py227# Example usageCOMMENT
LOWexamples/pytorch/continuous_batching.py317# Example usage:COMMENT
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMsrc/transformers/models/glpn/modeling_glpn.py483CODE
MEDIUMsrc/transformers/models/glpn/modeling_glpn.py484CODE