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.7 Strong AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of huggingface/transformers, a Python project with 164,561 GitHub stars. SynthScan v2.0 examined 2,040,309 lines of code across 6357 source files, recording 37027 pattern matches distributed across 26 syntactic categories. The overall adjusted score of 31.7 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.7
Adjusted Score
31.7
Raw Score
100%
Time Factor
2026-08-28
Last Push
164.6K
Stars
Python
Language
2.0M
Lines of Code
6.4K
Files
37.0K
Pattern Hits
2026-08-29
Scan Date
1.06
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 6708MEDIUM 948LOW 29350

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 37027 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 Repetition6601 hits · 33005 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_tensor_parallel_mixin.py0the model tester instance (e.g., causallmmodeltester).STRING
HIGHtests/test_fsdp_mixin.py0the model tester instance (e.g., causallmmodeltester).STRING
HIGHtests/test_training_mixin.py0the model tester instance (e.g., causallmmodeltester).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/inkling/test_processing_inkling.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/test_video_processing_common.py0tests that the processor can work with nested list where each video is a list of arrays.STRING
HIGH…nie4_5_vl_moe/test_video_processing_ernie4_5_vl_moe.py0tests that the processor can work with nested list where each video is a list of arrays.STRING
HIGHtests/models/glm46v/test_video_processing_glm46v.py0tests that the processor can work with nested list where each video is a list of arrays.STRING
HIGH…s/video_llama_3/test_video_processing_video_llama_3.py0tests that the processor can work with nested list where each video is a list of arrays.STRING
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 arrays.STRING
HIGHtests/models/glmga/test_video_processing_glmga.py0tests that the processor can work with nested list where each video is a list of arrays.STRING
HIGH…cohere_compass/test_video_processing_cohere_compass.py0tests that the processor can work with nested list where each video is a list of arrays.STRING
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 arrays.STRING
HIGHtests/models/glm4v/test_video_processing_glm4v.py0tests that the processor can work with nested list where each video is a list of arrays.STRING
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 arrays.STRING
HIGH…ts/models/glm5_next/test_video_processing_glm5_next.py0tests that the processor can work with nested list where each video is a list of arrays.STRING
HIGHtests/vlm_tester.py0tests that vlms through an error with explicit message saying what is wrong when number of images doesn't match number oSTRING
6541 more matches not shown…
Hyper-Verbose Identifiers14924 hits · 14820 pts
SeverityFileLineSnippetContext
LOWconftest.py109def _with_tmpdir_cache_fallback(fn):CODE
LOWconftest.py302def 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.py80def _build_lighteval_inputs_scorer(CODE
LOWbenchmark_v2/framework/hardware_metrics.py29def 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.py475 def get_extracted_tokenizer_from_sentencepiece(self, reference_tokenizer=None):CODE
LOWtests/test_tokenization_common.py495 def tokenizer_integration_test_util(CODE
LOWtests/test_tokenization_common.py565 def assert_padded_input_match(self, input_r: list, input_p: list, max_length: int, pad_token_id: int):CODE
LOWtests/test_tokenization_common.py575 def assert_batch_padded_input_match(CODE
LOWtests/test_tokenization_common.py602 def convert_batch_to_list_format(batch_encode_plus_sequences):CODE
LOWtests/test_tokenization_common.py611 def test_tokenize_special_tokens(self):CODE
LOWtests/test_tokenization_common.py631 def test_model_input_names_signature(self):CODE
LOWtests/test_tokenization_common.py642 def test_tokenizer_store_full_signature(self):CODE
LOWtests/test_tokenization_common.py659 def test_tokenizers_common_properties(self):CODE
LOWtests/test_tokenization_common.py691 def test_tokenizers_common_ids_setters(self):CODE
LOWtests/test_tokenization_common.py724 def test_save_and_load_tokenizer(self):CODE
LOWtests/test_tokenization_common.py855 def test_integration_from_extractor(self):CODE
LOWtests/test_tokenization_common.py886 def test_internal_consistency(self):CODE
LOWtests/test_tokenization_common.py1007 def test_chat_template_empty_conversation(self):CODE
LOWtests/test_tokenization_common.py1015 def test_chat_template_save_loading(self):CODE
LOWtests/test_tokenization_common.py1057 def test_chat_template_batched(self):CODE
LOWtests/test_tokenization_common.py1131 def test_chat_template_return_assistant_tokens_mask(self):CODE
LOWtests/test_tokenization_common.py1324 def test_chat_template_return_assistant_tokens_mask_truncated(self):CODE
LOWtests/test_tokenization_common.py1435 def test_continue_final_message(self):CODE
LOWtests/test_tokenization_common.py1463 def test_continue_final_message_with_trim(self):CODE
LOWtests/test_tokenization_common.py1493 def test_continue_final_message_with_decoy_earlier_message(self):CODE
LOWtests/test_tokenization_common.py1518 def test_continue_final_message_string_and_reasoning(self):CODE
LOWtests/test_tokenization_common.py1566 def test_chat_template_dict_saving(self):CODE
LOWtests/test_tokenization_common.py1597 def test_chat_template_dict_saving_rejects_path_traversal(self):CODE
LOWtests/test_tokenization_common.py1614 def test_chat_template_file_priority(self):CODE
LOWtests/test_tokenization_common.py1627 def test_number_of_added_tokens(self):CODE
LOWtests/test_tokenization_common.py1639 def test_maximum_encoding_length_single_input(self):CODE
LOWtests/test_tokenization_common.py1729 def test_maximum_encoding_length_pair_input(self):CODE
LOWtests/test_tokenization_common.py1987 def test_special_tokens_mask_input_pairs(self):CODE
LOWtests/test_tokenization_common.py2010 def test_padding_side_in_kwargs(self):CODE
LOWtests/test_tokenization_common.py2027 def test_truncation_side_in_kwargs(self):CODE
LOWtests/test_tokenization_common.py2044 def test_encode_basic_padding(self):CODE
LOWtests/test_tokenization_common.py2073 def test_right_and_left_truncation(self):CODE
LOWtests/test_tokenization_common.py2127 def test_padding_to_multiple_of(self):CODE
LOWtests/test_tokenization_common.py2159 def test_padding_with_attention_mask(self):CODE
LOWtests/test_tokenization_common.py2177 def test_encode_plus_with_padding(self, use_padding_as_call_kwarg: bool):CODE
LOWtests/test_tokenization_common.py2302 def test_conversion_reversible(self):CODE
LOWtests/test_tokenization_common.py2340 def test_batch_encode_plus_batch_sequence_length(self):CODE
LOWtests/test_tokenization_common.py2388 def test_batch_encode_plus_padding(self):CODE
LOWtests/test_tokenization_common.py2502 def _check_no_pad_token_padding(self, tokenizer, sequences):CODE
LOWtests/test_tokenization_common.py2556 def test_batch_encode_dynamic_overflowing(self):CODE
LOWtests/test_tokenization_common.py2619 def test_added_tokens_serialization(self):CODE
LOWtests/test_tokenization_common.py2646 def test_tokenizer_initialization_with_conflicting_key(self):CODE
LOWtests/test_tokenization_common.py2681 def test_pad_token_initialization(self):CODE
LOWtests/test_tokenization_common.py2714 def test_bos_token_with_add_bos_token_true(self):CODE
LOWtests/test_tokenization_common.py2731 def test_bos_token_with_add_bos_token_false(self):CODE
LOWtests/test_tokenization_common.py2817 def test_add_tokens_tokenizer(self):CODE
LOWtests/test_modeling_common.py1911 def test_training_gradient_checkpointing(self):CODE
14864 more matches not shown…
Over-Commented Block4238 hits · 4136 pts
SeverityFileLineSnippetContext
LOWconftest.py1# Copyright 2020 The HuggingFace Team. All rights reserved.COMMENT
LOWconftest.py241 _wrapped_hf_hub_download._ci_fallback_wrapped = TrueCOMMENT
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_fsdp_mixin.py1# Copyright 2026 The HuggingFace Team. All rights reserved.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_utils.py1# Copyright 2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/kernels/test_sonicmoe.py1# Copyright 2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/kernels/test_deepgemm.py1# Copyright 2026 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/kernels/test_kernels.py1# Copyright 2025 The HuggingFace Team. All rights reserved.COMMENT
LOWtests/kernels/test_finegrained_fp8.py1# Copyright 2026 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_runtime.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 require_onnxscript,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
LOWtests/conftest_tests/test_cache_fallback.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
4178 more matches not shown…
Unused Imports3443 hits · 2812 pts
SeverityFileLineSnippetContext
LOWbenchmark_v2/framework/benchmark_config.py19CODE
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_import_utils.py296CODE
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.py330CODE
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.py82CODE
LOWsrc/transformers/processing_utils.py87CODE
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__.py494CODE
LOWsrc/transformers/__init__.py494CODE
LOWsrc/transformers/__init__.py495CODE
LOWsrc/transformers/__init__.py496CODE
3383 more matches not shown…
AI Structural Patterns2179 hits · 2050 pts
SeverityFileLineSnippetContext
LOWbenchmark_v2/framework/benchmark_config.py61CODE
LOWtests/test_image_processing_common.py183CODE
LOWtests/causal_lm_tester.py167CODE
LOWtests/kernels/test_utils.py73CODE
LOWtests/kernels/test_utils.py102CODE
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.py38CODE
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.py417CODE
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.py48CODE
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.py70CODE
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.py65CODE
LOWtests/models/aimv2/test_modeling_aimv2.py222CODE
2119 more matches not shown…
Modern Structural Boilerplate1920 hits · 1591 pts
SeverityFileLineSnippetContext
LOWbenchmark/benchmarks_entrypoint.py310logger = logging.getLogger(__name__)CODE
LOWbenchmark_v2/framework/benchmark_config.py25logger = 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/github_utils.py40logger = logging.getLogger(__name__)CODE
LOWutils/get_ci_error_statistics.py19logger = 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.py162 def set_output_embeddings(self, value: Any) -> None: ...CODE
LOWsrc/transformers/_typing.py163 def set_input_embeddings(self, value: Any) -> None: ...CODE
LOWsrc/transformers/testing_utils.py4728 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.py1091 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.py241__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.py243__all__ = [CODE
LOWsrc/transformers/models/dots1/configuration_dots1.py130__all__ = ["Dots1Config"]STRING
LOWsrc/transformers/models/dots1/modular_dots1.py210__all__ = [CODE
LOWsrc/transformers/models/dots1/modeling_dots1.py627__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.py1166__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.py179__all__ = ["Ernie4_5_VLMoeProcessor"]CODE
LOW…ls/ernie4_5_vl_moe/image_processing_ernie4_5_vl_moe.py266__all__ = ["Ernie4_5_VL_MoeImageProcessor", "Ernie4_5_VLMoeImageProcessor"]CODE
1860 more matches not shown…
Decorative Section Separators493 hits · 1567 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_tensor_parallel_mixin.py43# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py45# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py66# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py68# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py469 # ============================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py471 # ============================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py482 # ============================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py484 # ============================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py60# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py62# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py84# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py86# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py195# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py197# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py333# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py335# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py498# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py500# =============================================================================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/kernels/test_deepgemm.py249# ── Capturing fake DeepGEMM bundle ─────────────────────────────────────────────COMMENT
MEDIUMtests/kernels/test_deepgemm.py374 # ── deepgemm_fp8_fp4_linear ────────────────────────────────────────────────COMMENT
MEDIUMtests/kernels/test_deepgemm.py471 # ── deepgemm_bf16_experts_forward ──────────────────────────────────────────COMMENT
MEDIUMtests/kernels/test_deepgemm.py542 # ── deepgemm_fp8_fp4_experts_forward ───────────────────────────────────────COMMENT
MEDIUMtests/kernels/test_deepgemm.py576 # ── deepgemm_fp8_fp4_megamoe_experts_forward ───────────────────────────────COMMENT
MEDIUMtests/kernels/test_finegrained_fp8.py193 # ── finegrained_fp8_linear ────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/kernels/test_finegrained_fp8.py243 # ── fp8_batched_mm_experts_forward ──────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/kernels/test_finegrained_fp8.py311 # ── fp8_grouped_mm_experts_forward ────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py75# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py77# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py173# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py175# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py222# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py224# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py261# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_utils.py264# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtests/exporters/test_runtime.py85 # ──────────────────── torch.export (Dynamo) ────────────────────COMMENT
MEDIUMtests/exporters/test_runtime.py151 # ──────────────────────── ONNX Runtime ────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py50# ──────────────────────────── skip lists ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py323# ──────────────────────────── ONNX optimization toggles ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py402# ──────────────────────────── helpers ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py559# ──────────────────────────── mixins ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py667 # ──────────────────── torch.export tests ─────────────────────COMMENT
MEDIUMtests/exporters/test_export.py700 # ──────────────────────── ONNX tests ─────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py732 # ──────────────────── ExecuTorch tests ───────────────────────COMMENT
MEDIUMtests/exporters/test_export.py821 # ──────────────────── torch.export tests ─────────────────────COMMENT
MEDIUMtests/exporters/test_export.py857 # ──────────────────────── ONNX tests ─────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py894 # ──────────────────── ExecuTorch tests ───────────────────────COMMENT
MEDIUMtests/utils/test_auto_docstring.py769# ---------------------------------------------------------------------------STRING
MEDIUMtests/utils/test_auto_docstring.py771# ---------------------------------------------------------------------------STRING
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py174# ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py176# ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py345 # ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py347 # ------------------------COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py314 # ------------------------COMMENT
433 more matches not shown…
Deep Nesting1689 hits · 1502 pts
SeverityFileLineSnippetContext
LOWconftest.py67CODE
LOWbenchmark/benchmark.py60CODE
LOWbenchmark_v2/framework/hardware_metrics.py160CODE
LOWbenchmark_v2/framework/benchmark_runner.py82CODE
LOWbenchmark_v2/framework/benchmark_runner.py445CODE
LOWbenchmark_v2/framework/data_classes.py21CODE
LOWbenchmark_v2/framework/benchmark_config.py271CODE
LOWtests/test_tokenization_common.py135CODE
LOWtests/test_tokenization_common.py225CODE
LOWtests/test_tokenization_common.py1131CODE
LOWtests/test_tokenization_common.py1324CODE
LOWtests/test_tokenization_common.py1639CODE
LOWtests/test_tokenization_common.py1729CODE
LOWtests/test_tokenization_common.py2619CODE
LOWtests/test_modeling_common.py166CODE
LOWtests/test_modeling_common.py564CODE
LOWtests/test_modeling_common.py745CODE
LOWtests/test_modeling_common.py916CODE
LOWtests/test_modeling_common.py952CODE
LOWtests/test_modeling_common.py1140CODE
LOWtests/test_modeling_common.py1505CODE
LOWtests/test_modeling_common.py1651CODE
LOWtests/test_modeling_common.py1769CODE
LOWtests/test_modeling_common.py2207CODE
LOWtests/test_modeling_common.py2286CODE
LOWtests/test_modeling_common.py2468CODE
LOWtests/test_modeling_common.py2666CODE
LOWtests/test_modeling_common.py2692CODE
LOWtests/test_modeling_common.py2736CODE
LOWtests/test_modeling_common.py2809CODE
LOWtests/test_modeling_common.py2867CODE
LOWtests/test_modeling_common.py3157CODE
LOWtests/test_modeling_common.py3200CODE
LOWtests/test_modeling_common.py3238CODE
LOWtests/test_modeling_common.py3284CODE
LOWtests/test_modeling_common.py3328CODE
LOWtests/test_modeling_common.py3430CODE
LOWtests/test_modeling_common.py3649CODE
LOWtests/test_modeling_common.py3709CODE
LOWtests/test_modeling_common.py3746CODE
LOWtests/test_modeling_common.py3828CODE
LOWtests/test_modeling_common.py3919CODE
LOWtests/test_modeling_common.py3981CODE
LOWtests/test_modeling_common.py4080CODE
LOWtests/test_modeling_common.py4351CODE
LOWtests/test_modeling_common.py4570CODE
LOWtests/test_modeling_common.py4613CODE
LOWtests/test_modeling_common.py4738CODE
LOWtests/test_modeling_common.py4806CODE
LOWtests/test_modeling_common.py5244CODE
LOWtests/test_modeling_common.py5420CODE
LOWtests/test_modeling_common.py5562CODE
LOWtests/test_modeling_common.py5712CODE
LOWtests/test_modeling_common.py5787CODE
LOWtests/test_modeling_common.py1513CODE
LOWtests/test_modeling_common.py2874CODE
LOWtests/test_modeling_common.py4363CODE
LOWtests/test_modeling_common.py2879CODE
LOWtests/test_modeling_common.py3540CODE
LOWtests/test_configuration_common.py94CODE
1629 more matches not shown…
Self-Referential Comments317 hits · 848 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.py725 # Create a mock model on CUDA deviceCOMMENT
MEDIUMtests/kernels/test_kernels.py760 # Create a mock modelCOMMENT
MEDIUMtests/peft_integration/test_peft_integration.py1353 # 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.py255 # 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.py197 # Create a 2:3 aspect ratio image (2 rows x 3 columns of patches)COMMENT
MEDIUMtests/models/gpt_oss/test_modeling_gpt_oss.py356 # 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.py356 # 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.py738 # 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_processing_kosmos2_5.py199 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/kosmos2_5/test_processing_kosmos2_5.py228 # Define the kwargs for each modalityCOMMENT
MEDIUM…ts/models/oneformer/test_image_processing_oneformer.py276 # 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.py100 # 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.py300 # Creating a 4D mask where each of the last 3 tokens do not attend to each other.COMMENT
257 more matches not shown…
Docstring Block Structure82 hits · 410 pts
SeverityFileLineSnippetContext
HIGHsrc/transformers/configuration_utils.py629 Instantiate a [`PreTrainedConfig`] (or a derived class) from a pretrained model configuration. Args: STRING
HIGHsrc/transformers/pytorch_utils.py130 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.py1107 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.py1212 #TODO remove this from here! PreTrainedTokenizerBase should be agnostic of AddedToken. Add a list of nSTRING
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.py1301 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.py358 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.py244 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.py318 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.py1367 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.py304 Instantiate one of the configuration classes of the library from a pretrained model configuration. TheSTRING
HIGHsrc/transformers/models/auto/image_processing_auto.py218 Loads the image processor configuration from a pretrained model image processor configuration. Args: pSTRING
HIGHsrc/transformers/models/auto/video_processing_auto.py119 Loads the video processor configuration from a pretrained model video processor configuration. Args: pSTRING
HIGHsrc/transformers/models/auto/feature_extraction_auto.py118 Loads the feature extractor configuration from a pretrained model feature extractor configuration. Args: STRING
HIGHsrc/transformers/models/auto/tokenization_auto.py555 Loads the tokenizer configuration from a pretrained model tokenizer configuration. Args: pretrained_moSTRING
HIGH…/transformers/models/bertweet/tokenization_bertweet.py544 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.py1079 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.py1095 Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requSTRING
HIGHsrc/transformers/models/patchtst/modeling_patchtst.py1232 Parameters: past_values (`torch.Tensor` of shape `(bs, sequence_length, num_input_channels)`, *requSTRING
HIGHsrc/transformers/models/patchtst/modeling_patchtst.py1600 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.py869 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.py672 Examples: ```python >>> import av >>> import torch >>> import numpy as np STRING
HIGHsrc/transformers/models/x_clip/modeling_x_clip.py993 return_loss (`bool`, *optional*): Whether or not to return the contrastive loss. Examples:STRING
HIGHsrc/transformers/models/x_clip/modeling_x_clip.py1148 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.py855 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:STRING
22 more matches not shown…
Excessive Try-Catch Wrapping312 hits · 307 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.py264 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py45 except Exception:CODE
LOWbenchmark_v2/framework/hardware_metrics.py178 except Exception:CODE
LOWbenchmark_v2/framework/hardware_metrics.py197 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py207 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py212 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py218 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py265 except Exception:CODE
LOWbenchmark_v2/framework/benchmark_runner.py367 except Exception as e:CODE
LOWbenchmark_v2/framework/benchmark_config.py46 except Exception as _:CODE
LOWtests/test_tokenization_common.py294 except Exception:CODE
LOWtests/test_tokenization_common.py2767 except Exception as e:CODE
LOWtests/test_tokenization_common.py2874 except Exception as e:CODE
LOWtests/test_modeling_common.py2476 except Exception as e:CODE
LOWtests/test_modeling_common.py2590 except Exception as e:CODE
LOWtests/test_modeling_common.py286 except Exception as _:CODE
LOWtests/test_modeling_common.py2699 except Exception as e:CODE
LOWtests/test_modeling_common.py6109 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_fsdp_mixin.py175 except Exception as e:CODE
LOWtests/test_fsdp_mixin.py605 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.py602 except Exception as e:CODE
LOWtests/kernels/test_kernels.py606 except Exception as e:CODE
LOWtests/kernels/test_kernels.py621 except Exception as e:CODE
LOWtests/kernels/test_kernels.py625 except Exception as e:CODE
LOWtests/kernels/test_kernels.py84 except Exception as e:CODE
LOWtests/kernels/test_kernels.py94 except Exception as e:CODE
LOWtests/kernels/test_kernels.py668 except Exception as e:CODE
LOWtests/exporters/test_export.py496 except Exception: # non-tensor slotCODE
LOW…pelines/test_pipelines_automatic_speech_recognition.py1857 except Exception:CODE
LOWtests/utils/test_auto_docstring.py822 except Exception:STRING
LOWtests/utils/test_audio_utils.py1845 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.py567 except Exception as e:CODE
252 more matches not shown…
Redundant / Tautological Comments236 hits · 298 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.py299 # Check if generation had the right number of tokensCOMMENT
LOWtests/test_modeling_common.py1388 # Set seed to ensure stable model initialization - avoids numerical issues (NaN) with some modelsCOMMENT
LOWtests/test_modeling_common.py4793 # 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.py690 # 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.py154 # Check if both modules have a 'forward' attributeCOMMENT
LOWtests/kernels/test_kernels.py179 # Check if both modules have a 'forward' attributeCOMMENT
LOWtests/utils/test_offline.py219 # Return outputSTRING
LOWtests/utils/test_cache_utils.py906 # Check if cache config is passed through correctlyCOMMENT
LOWtests/utils/test_cache_utils.py916 # Check if the exported model is configured with the `StaticCache` correctlyCOMMENT
LOWtests/pipeline_parallel/test_pipeline_parallel.py194 # Check if the model is split 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.py224 # Check if we have expected results for this configurationCOMMENT
LOWtests/models/gpt_oss/test_modeling_gpt_oss.py460 # Check if we have expected results for this configurationSTRING
LOW…itional_detr/test_image_processing_conditional_detr.py305 # 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.py428 # 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.py284 # Set longest_edge to None to test for semantic segmentatiom.COMMENT
LOWtests/models/rt_detr/test_image_processing_rt_detr.py324 # 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.py271 # 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.py447 # 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.py289 # 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.py412 # 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.py358 # 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.py481 # 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.py372 # 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.py494 # 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.py2037 # 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.py271 # Check if it works for a simple language modeling exampleCOMMENT
LOWtests/trainer/test_trainer_checkpointing.py956 # Check if the model weights file exists in the final checkpoint directory.COMMENT
LOWtests/trainer/test_trainer.py497 # Check if model weights have been updatedCOMMENT
LOWtests/generation/test_utils.py3375 "# Calculate the sum\nresult = num1 + num2\n\n# Print the result\nprint(result)\n```\n"CODE
LOWutils/check_docstrings.py843 # Check if docstring starts and ends on the same lineCOMMENT
LOWutils/check_docstrings.py857 # Check if it's named "auto_docstring"COMMENT
LOWutils/check_docstrings.py1221 # Check if this arg has placeholdersCOMMENT
LOWutils/check_docstrings.py1466 # Check if this method is inside a processor classCOMMENT
LOWutils/check_docstrings.py1471 # Check if class inherits from ModelOutput, ProcessorMixin, or PreTrainedConfigCOMMENT
LOWutils/check_docstrings.py1779 # Check if any fields are missing or need removalCOMMENT
LOWutils/create_dummy_models.py1334 # Check if there is any tokenizer (prefer fast version if any)COMMENT
176 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.py106 torch._inductor.codecache.TritonFuture._compile_cache.clear()CODE
CRITICALutils/check_repo.py1409 model_types = list(transformers.models.auto.configuration_auto.CONFIG_MAPPING_NAMES.keys())CODE
CRITICALsrc/transformers/trainer.py2232 kwargs.update({"dtype": self.accelerator.state.deepspeed_plugin.hf_ds_config.dtype()})CODE
CRITICALsrc/transformers/tokenization_mistral_common.py593 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.py1779 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.py1570 object_queries_position_embeddings = self.detr.model.query_position_embeddings.weight.unsqueeze(0).repeat(CODE
CRITICALsrc/transformers/integrations/mxfp4.py211 module.gate_up_proj_precision_config.weight_scale.storage.layout.unswizzle_data(CODE
CRITICALsrc/transformers/integrations/mxfp4.py222 module.down_proj_precision_config.weight_scale.storage.layout.unswizzle_data(CODE
Verbosity Indicators126 hits · 214 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_cache_utils.py1412 # Step 0 : multi-token prefillCOMMENT
LOWtests/utils/test_cache_utils.py1424 # 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
LOWtests/generation/test_paged_attention.py43 "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 recently 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 recently as nested or if it is legacy styleCOMMENT
LOWsrc/transformers/video_processing_utils.py593 # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy styleCOMMENT
LOW…ls/ernie4_5_vl_moe/video_processing_ernie4_5_vl_moe.py215 # 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/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.py2867 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2877 # Step 3: Get and process object pointersCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2893 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2897 # Step 5: Forward through the memory attention mechanismCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2855 # 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/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.py306 # 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.py216 # 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.py206 # 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/esmfold2/modular_esmfold2.py798 # Step 1: noise-dependent (single) conditioningCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py801 # Step 2: normalize noisy coordsCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py805 # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream.COMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py819 # Step 4: add conditioned single reprCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py822 # Step 5: token transformerCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py827 # Step 6: token normCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py830 # Step 7: atom decoderCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py840 # Step 8: denoised output; the fp32 noise-level scalars keep the coordinates fp32.COMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py866 # Step 1: noise-dependent (single) conditioningCOMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py869 # Step 2: normalize noisy coordsCOMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py873 # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream.COMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py887 # Step 4: add conditioned single reprCOMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py890 # Step 5: token transformerCOMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py895 # Step 6: token normCOMMENT
66 more matches not shown…
Structural Annotation Overuse124 hits · 214 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_cache_utils.py1412 # Step 0 : multi-token prefillCOMMENT
LOWtests/utils/test_cache_utils.py1424 # 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
LOWtests/generation/test_paged_attention.py43 "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.md286# Step 1: TranscribeCOMMENT
LOWdocs/source/en/model_doc/qwen3_asr.md295# Step 2: Prepare alignment inputsCOMMENT
LOWdocs/source/en/model_doc/qwen3_asr.md301# Step 3: Run forced alignerCOMMENT
LOWdocs/source/en/model_doc/qwen3_asr.md305# Step 4: Decode timestampsCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2867 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2877 # Step 3: Get and process object pointersCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2893 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2897 # Step 5: Forward through the memory attention mechanismCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2855 # 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.py117 # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs.STRING
LOWsrc/transformers/models/colqwen2/modular_colqwen2.py103 # NOTE: The following adjustment ensures correct behavior with DDP on multiple GPUs.STRING
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
LOW…a2vec_vision_original_pytorch_checkpoint_to_pytorch.py264 # IMPORTANT: Note that for now we've only converted the down-streamCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py798 # Step 1: noise-dependent (single) conditioningCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py801 # Step 2: normalize noisy coordsCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py805 # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream.COMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py819 # Step 4: add conditioned single reprCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py822 # Step 5: token transformerCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py827 # Step 6: token normCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py830 # Step 7: atom decoderCOMMENT
LOWsrc/transformers/models/esmfold2/modular_esmfold2.py840 # Step 8: denoised output; the fp32 noise-level scalars keep the coordinates fp32.COMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py866 # Step 1: noise-dependent (single) conditioningCOMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py869 # Step 2: normalize noisy coordsCOMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py873 # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream.COMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py887 # Step 4: add conditioned single reprCOMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py890 # Step 5: token transformerCOMMENT
LOWsrc/transformers/models/esmfold2/modeling_esmfold2.py895 # Step 6: token normCOMMENT
64 more matches not shown…
AI Slop Vocabulary106 hits · 185 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml107# 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.py731 # 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/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.py3083 # a KeyError; they should simply return False.STRING
MEDIUMtests/utils/test_auto_docstring.py784 # 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/got_ocr2/test_processing_got_ocr2.py27 # just use higher `max_length` in testsCOMMENT
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
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.py742 ("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.py766 ("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.py133 # 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
MEDIUMtests/models/esmc/test_tokenization_esmc.py39 # The common harness space-joins vocab tokens, but ESMC has no space token (spaces map toCOMMENT
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.py2782 # In this case, we simply call recursively the function on both internal cachesCOMMENT
LOWtests/generation/test_utils.py2908 # In this case, we simply call recursively the function on both internal cachesCOMMENT
MEDIUMtests/generation/test_logits_process.py783 # scores = 0 to facilitate checksCOMMENT
LOWutils/check_docstrings.py530 # 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.py394 # 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
MEDIUMsrc/transformers/tokenization_utils_base.py3215 # To make this more robust, we could do a diff and find the longest common subsequence, but this isCOMMENT
MEDIUMsrc/transformers/testing_utils.py3839 # TODO: check simply with the name is not robust.STRING
LOWsrc/transformers/testing_utils.py4084 # If the target callable is not called within a test, simply call it without modification.STRING
LOWsrc/transformers/testing_utils.py4161 # We simply add "self" as the expression despite it might not be the actual argument name.STRING
LOWsrc/transformers/cache_utils.py999 # LinearAttention layer have no sequence length dimension, so simply return -1 hereCOMMENT
LOWsrc/transformers/modeling_utils.py5110 # fragmentation issues) simply use the pool of 4 GiB unused memory that is available. In those cases, it's bCOMMENT
MEDIUMsrc/transformers/modeling_utils.py4899 """Adds the `_is_hf_initialized` flag on parameters that will be tied, in order to avoid initializing themSTRING
LOWsrc/transformers/trainer.py1781 # if loss is nan or inf simply add the average of previous logged lossesCOMMENT
LOWsrc/transformers/masking_utils.py810 # If the mask is already 4D, simply return as-is (it was already prepared, or it is custom)COMMENT
LOWsrc/transformers/trainer_pt_utils.py384 # Check if we have something to add, if not just returnCOMMENT
MEDIUMsrc/transformers/distributed/pipeline_parallel.py278 # TODO(3outeille): very naive implementation to make it work seamless with generate().COMMENT
MEDIUMsrc/transformers/pipelines/text_to_audio.py217 # ensure dict output to facilitate postprocessingCOMMENT
MEDIUM…transformers/pipelines/automatic_speech_recognition.py703 # 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/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.py487 # 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
LOWsrc/transformers/models/electra/modeling_electra.py723 # We can probably just use the multi-head attention module of PyTorch >=1.1.0STRING
46 more matches not shown…
Modern AI Meta-Vocabulary67 hits · 168 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.yml486# 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/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
MEDIUMdocs/source/en/model_doc/muse_glimmer.md30[MuseGlimmer](https://research.meta.ai/blog/introducing-muse-glimmer-open-agentic-model) is a 30B multimodal model from CODE
MEDIUMdocs/source/en/model_doc/muse_glimmer_assistant.md30[MuseGlimmerAssistant](https://research.meta.ai/blog/introducing-muse-glimmer-open-agentic-model) is the [DFlash](https:CODE
MEDIUMsrc/transformers/processing_utils.py507 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
7 more matches not shown…
Cross-Language Confusion22 hits · 122 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.py585 '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.py190 {"run": "apt-get update && apt-get install -y curl"},CODE
HIGH.circleci/create_circleci_config.py203 "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.py209 "command": """pip list --format=freeze | tee installed.txt || true""",CODE
HIGH.circleci/create_circleci_config.py230 "command": f"TESTS=$(circleci tests split --split-by=timings {self.job_name}_test_list.txt) && echoCODE
HIGH.circleci/create_circleci_config.py240 "command": "cp -r /test_data/* . 2>/dev/null || true; python3 utils/fetch_hub_objects_for_ci.py",CODE
HIGH.circleci/create_circleci_config.py248 "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.py220 # If `layer_types` is not specified explicitly in the config or `sliding_window` is null,COMMENT
Slop Phrases69 hits · 64 pts
SeverityFileLineSnippetContext
LOWtests/test_modeling_common.py4768 # 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.py370# below, make sure to add a comment explaining why.COMMENT
LOWsrc/transformers/core_model_loading.py290 # We squeeze each chunk here as well to make sure to give them their original shapeCOMMENT
LOWsrc/transformers/core_model_loading.py1695 # so we need to make sure to load the tensor with the same dtype from the checkpointSTRING
LOWsrc/transformers/trainer.py1899 # 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.py1606 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.py1164 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.py735 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.py659 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.py671 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.py1211 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.py700 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.py645 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.py404 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.py657 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…rmers/models/granitemoe_swa/modeling_granitemoe_swa.py756 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/glm5_next/modular_glm5_next.py1664 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/glm5_next/modeling_glm5_next.py2199 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/jetmoe/modeling_jetmoe.py793 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.py644 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.py303 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.py956 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.py666 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.py1070 >>> boxes = data["bboxes"] # make sure to normalize your bounding boxesCODE
LOW…s/models/granitemoehybrid/modeling_granitemoehybrid.py1285 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.py862 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.py1050 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.py836 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.py324 # make sure to remove from text_kwargs and audio_kwargsSTRING
LOWsrc/transformers/models/siglip/modeling_siglip.py507 >>> # important: make sure to set padding="max_length" as that's how the model was trainedCODE
LOWsrc/transformers/models/siglip/modeling_siglip.py691 >>> # 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.py799 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.py1918 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.py2065 ) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/dbrx/modular_dbrx.py538 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.py730 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.py1491 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.py708 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.py623 >>> # important: make sure to set padding="max_length" as that's how the model was trainedCODE
LOWsrc/transformers/models/siglip2/modeling_siglip2.py756 >>> # 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.py1581 ) # make sure to reside in the same deviceCODE
LOW…ansformers/models/qwen3_vl_moe/modular_qwen3_vl_moe.py435 ) # make sure to reside in the same deviceCODE
LOW…nsformers/models/qwen3_vl_moe/modeling_qwen3_vl_moe.py1560 ) # make sure to reside in the same deviceCODE
LOW…s/models/granitemoeshared/modeling_granitemoeshared.py712 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.py1405 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.py1834 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.py2212 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.py3127 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/qwen4_exp/modeling_qwen4_exp.py1695 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/qwen4_exp/modeling_qwen4_exp.py2549 ) # make sure to reside in the same deviceCODE
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
9 more matches not shown…
Fake / Example Data34 hits · 37 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.py194 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.py199 "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum.",CODE
LOWtests/models/lfm2_moe/test_modeling_lfm2_moe.py204 "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum dolor",CODE
LOWtests/models/lfm2_moe/test_modeling_lfm2_moe.py209 "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.py818 if node.op != "placeholder":CODE
LOWsrc/transformers/exporters/exporter_executorch.py857 placeholder_names = [node.name for node in exported_program.graph.nodes if node.op == "placeholder"]CODE
LOWsrc/transformers/exporters/exporter_executorch.py1240 if feeder in erased or feeder.op in ("placeholder", "output") or feeder.users or feeder.is_impure():CODE
LOWsrc/transformers/exporters/exporter_executorch.py1270 if node.op != "placeholder" or not isinstance(node.target, str):CODE
LOWsrc/transformers/models/idefics/processing_idefics.py298 fake_token = "<fake_token_around_image>"STRING
LOWsrc/transformers/models/idefics/processing_idefics.py304 return image_token + fake_tokenSTRING
LOWsrc/transformers/models/idefics/processing_idefics.py306 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.py1241 # (see documentation for `mems`), otherwise information may leak through due to reuse. In this implementatioCOMMENT
HIGHsrc/transformers/data/data_collator.py1338 # (see documentation for `mems`), otherwise information may leak through due to reuse. In this implementatioCOMMENT
TODO Padding6 hits · 8 pts
SeverityFileLineSnippetContext
LOWutils/check_repo.py255 "MllamaTextModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOWutils/check_repo.py256 "MllamaVisionModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOWutils/check_repo.py257 "Llama4TextModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOWutils/check_repo.py258 "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.py546 # 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.py1960 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.py768 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.py108 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.py366 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