AI Slop Code RIsk Monitor

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.6 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for huggingface/transformers, a Python project with 167,119 GitHub stars. SynthScan examined 2,090,977 lines of code across 6524 source files, recording 37646 pattern matches distributed across 27 syntactic categories. The legacy adjusted pattern signal is 31.6 (High pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

31.6
Adjusted Signal
31.6
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
167.1K
Stars
Python
Language
2.1M
Lines of Code
6.5K
Files
37.6K
Pattern Hits
2026-10-12
Scan Date
1.07
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 45.1/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 24414 finding(s).

Hallucinated Dependency & Supply Chain Risk 7.5/100 · LOW

Are imports declared and package/API names verified? 3599 finding(s).

Agent Over-Engineering Ratio 72.9/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 26859 finding(s).

PR Review Velocity Impact 83.1/100 · CRITICAL

Which changes need focused human review? 37646 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 23HIGH 6927MEDIUM 945LOW 29751

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 37646 distinct pattern matches across 27 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Cross-File Repetition6736 hits · 33680 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…s/embedding_gemma2/test_processing_embedding_gemma2.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.py0tests that sub-processor is called correctly when passing each modality input to the processor. this test verifies that STRING
HIGH…ts/models/qwen2_5_omni/test_processing_qwen2_5_omni.py0tests that sub-processor is called correctly when passing each modality input to the processor. this test verifies that STRING
HIGH…odels/qwen3_omni_moe/test_processing_qwen3_omni_moe.py0tests that sub-processor is called correctly when passing each modality input to the processor. this test verifies that STRING
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
HIGH…s/minimax_m3_vl/test_video_processing_minimax_m3_vl.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
6676 more matches not shown…
Hyper-Verbose Identifiers15151 hits · 14984 pts
SeverityFileLineSnippetContext
LOWconftest.py109def _with_tmpdir_cache_fallback(fn):CODE
LOWconftest.py305def 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.py84def _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.py1601 def test_chat_template_dict_saving_rejects_path_traversal(self):CODE
LOWtests/test_tokenization_common.py1618 def test_chat_template_file_priority(self):CODE
LOWtests/test_tokenization_common.py1631 def test_number_of_added_tokens(self):CODE
LOWtests/test_tokenization_common.py1643 def test_maximum_encoding_length_single_input(self):CODE
LOWtests/test_tokenization_common.py1733 def test_maximum_encoding_length_pair_input(self):CODE
LOWtests/test_tokenization_common.py1991 def test_special_tokens_mask_input_pairs(self):CODE
LOWtests/test_tokenization_common.py2014 def test_padding_side_in_kwargs(self):CODE
LOWtests/test_tokenization_common.py2031 def test_truncation_side_in_kwargs(self):CODE
LOWtests/test_tokenization_common.py2048 def test_encode_basic_padding(self):CODE
LOWtests/test_tokenization_common.py2077 def test_right_and_left_truncation(self):CODE
LOWtests/test_tokenization_common.py2131 def test_padding_to_multiple_of(self):CODE
LOWtests/test_tokenization_common.py2163 def test_padding_with_attention_mask(self):CODE
LOWtests/test_tokenization_common.py2181 def test_encode_plus_with_padding(self, use_padding_as_call_kwarg: bool):CODE
LOWtests/test_tokenization_common.py2306 def test_conversion_reversible(self):CODE
LOWtests/test_tokenization_common.py2344 def test_batch_encode_plus_batch_sequence_length(self):CODE
LOWtests/test_tokenization_common.py2392 def test_batch_encode_plus_padding(self):CODE
LOWtests/test_tokenization_common.py2506 def _check_no_pad_token_padding(self, tokenizer, sequences):CODE
LOWtests/test_tokenization_common.py2560 def test_batch_encode_dynamic_overflowing(self):CODE
LOWtests/test_tokenization_common.py2623 def test_added_tokens_serialization(self):CODE
LOWtests/test_tokenization_common.py2650 def test_tokenizer_initialization_with_conflicting_key(self):CODE
LOWtests/test_tokenization_common.py2685 def test_pad_token_initialization(self):CODE
LOWtests/test_tokenization_common.py2718 def test_bos_token_with_add_bos_token_true(self):CODE
LOWtests/test_tokenization_common.py2735 def test_bos_token_with_add_bos_token_false(self):CODE
LOWtests/test_tokenization_common.py2829 def test_add_tokens_tokenizer(self):CODE
LOW⚡tests/test_modeling_common.py2013 def test_training_gradient_checkpointing(self):CODE
15091 more matches not shown…
Over-Commented Block4377 hits · 4270 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_processing_common.py181 if cls.tiny_model_id is not None: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/test_memory_cleanup_mixin.py1# Copyright 2026 The HuggingFace 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.py61# to the model name so the "why" travels with the entry.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
4317 more matches not shown…
Unused Imports3514 hits · 2868 pts
SeverityFileLineSnippetContext
LOWbenchmark_v2/framework/benchmark_config.py19CODE
LOWtests/test_tokenization_common.py85CODE
LOWtests/test_tokenization_common.py85CODE
LOW…pipelines/test_pipelines_zero_shot_object_detection.py35CODE
LOWtests/utils/test_import_utils.py361CODE
LOWtests/utils/test_file_utils.py23CODE
LOWtests/models/mistral4/__init__.py17CODE
LOWtests/models/mistral4/__init__.py17CODE
LOWtests/models/opt/test_modeling_opt.py21CODE
LOWtests/models/fsmt/test_modeling_fsmt.py19CODE
LOWtests/tokenization/test_tokenization_utils.py348CODE
LOWutils/check_import_complexity.py27CODE
LOW…amples/modular-transformers/modular_switch_function.py2CODE
LOWsrc/transformers/configuration_utils.py17CODE
LOWsrc/transformers/image_utils.py38CODE
LOWsrc/transformers/image_utils.py38CODE
LOWsrc/transformers/image_utils.py38CODE
LOWsrc/transformers/image_utils.py38CODE
LOWsrc/transformers/image_utils.py38CODE
LOWsrc/transformers/image_utils.py38CODE
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.py3CODE
LOWsrc/transformers/processing_utils.py83CODE
LOWsrc/transformers/processing_utils.py88CODE
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__.py495CODE
LOWsrc/transformers/__init__.py495CODE
LOWsrc/transformers/__init__.py496CODE
LOWsrc/transformers/__init__.py497CODE
3454 more matches not shown…
AI Structural Patterns2075 hits · 1952 pts
SeverityFileLineSnippetContext
LOWbenchmark_v2/framework/benchmark_config.py61CODE
LOWtests/test_image_processing_common.py259CODE
LOWtests/causal_lm_tester.py167CODE
LOWtests/kernels/test_utils.py85CODE
LOWtests/kernels/test_utils.py116CODE
LOWtests/utils/test_auto_docstring.py250CODE
LOWtests/models/metaclip_2/test_modeling_metaclip_2.py67CODE
LOWtests/models/metaclip_2/test_modeling_metaclip_2.py294CODE
LOW…nie4_5_vl_moe/test_video_processing_ernie4_5_vl_moe.py36CODE
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.py49CODE
LOW…s/table_transformer/test_modeling_table_transformer.py44CODE
LOWtests/models/bark/test_modeling_bark.py64CODE
LOWtests/models/bark/test_modeling_bark.py197CODE
LOWtests/models/bark/test_modeling_bark.py330CODE
LOWtests/models/convnextv2/test_modeling_convnextv2.py44CODE
LOWtests/models/vitpose/test_modeling_vitpose.py46CODE
LOWtests/models/mlcd/test_modeling_mlcd.py40CODE
LOWtests/models/pixtral/test_modeling_pixtral.py39CODE
LOWtests/models/xcodec2/test_modeling_xcodec2.py43CODE
LOWtests/models/glpn/test_modeling_glpn.py48CODE
LOW…odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py79CODE
LOW…odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py581CODE
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.py622CODE
LOWtests/models/flava/test_modeling_flava.py68CODE
LOWtests/models/flava/test_modeling_flava.py321CODE
LOWtests/models/flava/test_modeling_flava.py467CODE
LOWtests/models/flava/test_modeling_flava.py740CODE
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.py53CODE
LOWtests/models/videomae/test_modeling_videomae.py61CODE
LOWtests/models/videomae/test_video_processing_videomae.py33CODE
LOWtests/models/vits/test_modeling_vits.py69CODE
LOWtests/models/olmoe/test_modeling_olmoe.py48CODE
LOW…/models/speech_to_text/test_modeling_speech_to_text.py71CODE
LOW…eech_to_text/test_feature_extraction_speech_to_text.py37CODE
LOWtests/models/aimv2/test_modeling_aimv2.py65CODE
LOWtests/models/aimv2/test_modeling_aimv2.py222CODE
LOW…s_transformer/test_modeling_time_series_transformer.py51CODE
LOWtests/models/mllama/test_image_processing_mllama.py46CODE
LOWtests/models/omdet_turbo/test_modeling_omdet_turbo.py54CODE
LOWtests/models/clvp/test_feature_extraction_clvp.py43CODE
LOWtests/models/clvp/test_modeling_clvp.py52CODE
LOWtests/models/clvp/test_modeling_clvp.py193CODE
LOWtests/models/m2m_100/test_modeling_m2m_100.py68CODE
LOW…pp_ocrv6_small_det/test_modeling_pp_ocrv6_small_det.py49CODE
LOWtests/models/olmo2/test_modeling_olmo2.py49CODE
2015 more matches not shown…
Modern Structural Boilerplate1987 hits · 1646 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.py68logger = 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
LOWutils/get_previous_daily_ci.py9logger = 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
LOW⚡src/transformers/_typing.py162 def set_output_embeddings(self, value: Any) -> None: ...CODE
LOW⚡src/transformers/_typing.py163 def set_input_embeddings(self, value: Any) -> None: ...CODE
LOWsrc/transformers/testing_utils.py4809 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.py1176 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.py266__all__ = [CODE
LOWsrc/transformers/models/dots1/modeling_dots1.py614__all__ = ["Dots1PreTrainedModel", "Dots1Model", "Dots1ForCausalLM"]CODE
LOW…sformers/models/metaclip_2/configuration_metaclip_2.py240__all__ = ["MetaClip2Config", "MetaClip2TextConfig", "MetaClip2VisionConfig"]CODE
LOW…/transformers/models/metaclip_2/modeling_metaclip_2.py1160__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
1927 more matches not shown…
Decorative Section Separators506 hits · 1609 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_tensor_parallel_mixin.py46# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py48# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py69# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py71# =============================================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py484 # ============================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py486 # ============================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py497 # ============================================================COMMENT
MEDIUMtests/test_tensor_parallel_mixin.py499 # ============================================================COMMENT
MEDIUM⚡tests/test_processing_common.py1072 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_processing_common.py1075 # ------------------------------------------------------------------COMMENT
MEDIUMtests/test_fsdp_mixin.py62# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py64# =============================================================================COMMENT
MEDIUM⚡tests/test_fsdp_mixin.py85# =============================================================================COMMENT
MEDIUM⚡tests/test_fsdp_mixin.py87# =============================================================================COMMENT
MEDIUM⚡tests/test_fsdp_mixin.py196# =============================================================================COMMENT
MEDIUM⚡tests/test_fsdp_mixin.py198# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py334# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py336# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py591# =============================================================================COMMENT
MEDIUMtests/test_fsdp_mixin.py593# =============================================================================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
MEDIUM⚡tests/test_training_mixin.py77 # ============================================================COMMENT
MEDIUM⚡tests/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.py456 # ── deepgemm_bf16_experts_forward ──────────────────────────────────────────COMMENT
MEDIUMtests/kernels/test_deepgemm.py527 # ── deepgemm_fp8_fp4_experts_forward ───────────────────────────────────────COMMENT
MEDIUMtests/kernels/test_deepgemm.py561 # ── deepgemm_fp8_fp4_megamoe_experts_forward ───────────────────────────────COMMENT
MEDIUMtests/kernels/test_finegrained_fp8.py193 # ── finegrained_fp8_linear ────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/kernels/test_finegrained_fp8.py222 # ── fp8_batched_mm_experts_forward ──────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/kernels/test_finegrained_fp8.py290 # ── fp8_grouped_mm_experts_forward ────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/exporters/test_utils.py75# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/exporters/test_utils.py77# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/exporters/test_utils.py173# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/exporters/test_utils.py175# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/exporters/test_utils.py222# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/exporters/test_utils.py224# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/exporters/test_utils.py261# ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUM⚡tests/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.py54# ──────────────────────────── skip lists ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py487# ──────────────────────────── ONNX optimization toggles ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py633# ──────────────────────────── helpers ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py854# ──────────────────────────── mixins ────────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py1016 # ──────────────────── torch.export tests ─────────────────────COMMENT
MEDIUMtests/exporters/test_export.py1050 # ──────────────────────── ONNX tests ─────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py1086 # ──────────────────── OpenVINO tests ─────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py1118 # ──────────────────── ExecuTorch tests ───────────────────────COMMENT
MEDIUMtests/exporters/test_export.py1208 # ──────────────────── torch.export tests ─────────────────────COMMENT
MEDIUMtests/exporters/test_export.py1251 # ──────────────────────── ONNX tests ─────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py1288 # ──────────────────── OpenVINO tests ─────────────────────────COMMENT
MEDIUMtests/exporters/test_export.py1320 # ──────────────────── ExecuTorch tests ───────────────────────COMMENT
MEDIUMtests/utils/test_auto_docstring.py819# ---------------------------------------------------------------------------STRING
MEDIUMtests/utils/test_auto_docstring.py821# ---------------------------------------------------------------------------STRING
MEDIUM⚡tests/models/gpt_oss/test_modeling_gpt_oss.py191# ------------------------COMMENT
446 more matches not shown…
Deep Nesting1684 hits · 1488 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.py1643CODE
LOWtests/test_tokenization_common.py1733CODE
LOWtests/test_tokenization_common.py2623CODE
LOWtests/test_modeling_common.py166CODE
LOWtests/test_modeling_common.py567CODE
LOWtests/test_modeling_common.py764CODE
LOWtests/test_modeling_common.py935CODE
LOWtests/test_modeling_common.py971CODE
LOWtests/test_modeling_common.py1159CODE
LOWtests/test_modeling_common.py1524CODE
LOWtests/test_modeling_common.py1660CODE
LOWtests/test_modeling_common.py1778CODE
LOWtests/test_modeling_common.py1899CODE
LOWtests/test_modeling_common.py2309CODE
LOWtests/test_modeling_common.py2388CODE
LOWtests/test_modeling_common.py2570CODE
LOWtests/test_modeling_common.py2768CODE
LOWtests/test_modeling_common.py2794CODE
LOWtests/test_modeling_common.py2840CODE
LOWtests/test_modeling_common.py2915CODE
LOWtests/test_modeling_common.py2973CODE
LOWtests/test_modeling_common.py3239CODE
LOWtests/test_modeling_common.py3282CODE
LOWtests/test_modeling_common.py3320CODE
LOWtests/test_modeling_common.py3366CODE
LOWtests/test_modeling_common.py3410CODE
LOWtests/test_modeling_common.py3512CODE
LOWtests/test_modeling_common.py3731CODE
LOWtests/test_modeling_common.py3791CODE
LOWtests/test_modeling_common.py3828CODE
LOWtests/test_modeling_common.py3912CODE
LOWtests/test_modeling_common.py4003CODE
LOWtests/test_modeling_common.py4065CODE
LOWtests/test_modeling_common.py4155CODE
LOWtests/test_modeling_common.py4431CODE
LOWtests/test_modeling_common.py4655CODE
LOWtests/test_modeling_common.py4698CODE
LOWtests/test_modeling_common.py4823CODE
LOWtests/test_modeling_common.py4890CODE
LOWtests/test_modeling_common.py5328CODE
LOWtests/test_modeling_common.py5509CODE
LOWtests/test_modeling_common.py5651CODE
LOWtests/test_modeling_common.py5801CODE
LOWtests/test_modeling_common.py5901CODE
LOWtests/test_modeling_common.py5940CODE
LOWtests/test_modeling_common.py5970CODE
LOWtests/test_modeling_common.py1532CODE
LOWtests/test_modeling_common.py2980CODE
LOWtests/test_modeling_common.py4443CODE
1624 more matches not shown…
Self-Referential Comments299 hits · 792 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_tokenizers_backend_mixin.py383 # Create a new mapping from the special tokens defined in the original tokenizerCOMMENT
MEDIUM⚡tests/test_training_mixin.py87 # Create a deterministic sequence (not random, so model can learn it)COMMENT
MEDIUMtests/kernels/test_kernels.py857 # Create a mock model on CUDA deviceCOMMENT
MEDIUMtests/kernels/test_kernels.py892 # Create a mock modelCOMMENT
MEDIUMtests/peft_integration/test_peft_integration.py1390 # Create a temporary directory with a complete adapter model structureCOMMENT
MEDIUM⚡tests/optimization/test_greedy_lr.py193 # Create a new scheduler and load stateCOMMENT
MEDIUMtests/pipelines/test_pipelines_common.py399 # Create a temporary directory with a complete adapter model structureCOMMENT
MEDIUMtests/utils/test_masking_utils.py331 # 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.py1145 # Create a clone of the input_ids tensor that will be its masked versionCOMMENT
MEDIUMtests/models/flava/test_modeling_flava.py1193 # Create a clone of the input_ids tensor that will be its masked versionCOMMENT
MEDIUM…cohere2_vision/test_image_processing_cohere2_vision.py147 # Create a 2:3 aspect ratio image (2 rows x 3 columns of patches)COMMENT
MEDIUM⚡tests/models/gpt_oss/test_modeling_gpt_oss.py379 # Create a temp file that calls the workerCOMMENT
MEDIUMtests/models/lighton_ocr/test_modeling_lighton_ocr.py466 # Create a small config for fast testingCOMMENT
MEDIUM…ts/models/superglue/test_image_processing_superglue.py373 # Create a specific scenario with intentional padding issuesCOMMENT
MEDIUM…ts/models/superglue/test_image_processing_superglue.py392 # Create a match that points to a padded keypoint in image 1COMMENT
MEDIUM…ts/models/superglue/test_image_processing_superglue.py397 # Create a valid match for comparisonCOMMENT
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.py394 # Create a sequence of 13 tokens: 0..4 text, 5..11 image (7 tokens), 12 textCOMMENT
MEDIUMtests/models/colqwen2/test_processing_colqwen2.py218 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/models/nemotron_h/test_modeling_nemotron_h.py821 # Create a legacy config.jsonCOMMENT
MEDIUMtests/models/gemma4/test_modeling_gemma4.py724 # Create a sequence of 13 tokens: 0..4 text, 5..11 image (7 tokens), 12 textCOMMENT
MEDIUMtests/models/auto/test_video_processing_auto.py87 # 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
MEDIUM…ts/models/oneformer/test_image_processing_oneformer.py230 # 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/colpali/test_processing_colpali.py211 # Define the kwargs for each modalityCOMMENT
MEDIUM⚡tests/models/lfm2_vl/test_image_processing_lfm2_vl.py235 # Create a small image (256x256)COMMENT
MEDIUM⚡tests/models/lfm2_vl/test_image_processing_lfm2_vl.py253 # Create a small image that won't exceed the max_image_tokens thresholdCOMMENT
MEDIUM⚡tests/models/lfm2_vl/test_image_processing_lfm2_vl.py269 # Create a large image (2048x2048)COMMENT
MEDIUM⚡tests/models/lfm2_vl/test_image_processing_lfm2_vl.py288 # Create a large image that will require tilingCOMMENT
MEDIUM⚡tests/models/lfm2_vl/test_image_processing_lfm2_vl.py338 # Create a landscape image (1920x1080, ~16:9 aspect ratio)COMMENT
MEDIUM⚡tests/models/lfm2_vl/test_image_processing_lfm2_vl.py357 # Create an extremely wide image (3000x500)COMMENT
MEDIUM⚡tests/models/lfm2_vl/test_image_processing_lfm2_vl.py376 # Create an extremely tall image (500x3000)COMMENT
MEDIUMtests/models/lfm2_vl/test_image_processing_lfm2_vl.py313 # Create a large image that will require tilingCOMMENT
MEDIUMtests/models/janus/test_processing_janus.py364 # 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
MEDIUMtests/models/csm/test_modeling_csm.py320 # Creating a position_ids tensor. note the repeating figures in the end.COMMENT
MEDIUMtests/models/layoutxlm/test_tokenization_layoutxlm.py1443 # Create a new mapping from the special tokens defined in the original tokenizerCOMMENT
MEDIUMtests/models/vitdet/test_modeling_vitdet.py296 # Create a dummy input tensor with non-square spatial dimensions.COMMENT
MEDIUMtests/models/bartpho/test_tokenization_bartpho.py44 # Create a temporary directory for this tokenizerCOMMENT
MEDIUM…odels/colmodernvbert/test_processing_colmodernvbert.py195 # Define the kwargs for each modalityCOMMENT
MEDIUM…odels/bert_japanese/test_tokenization_bert_japanese.py47 # Create a separate temp directory for the vocab file to avoid conflictsCOMMENT
MEDIUM…odels/bert_japanese/test_tokenization_bert_japanese.py369 # Create a separate temp directory for the vocab file to avoid conflictsCOMMENT
MEDIUM⚡tests/trainer/test_trainer_optimizers.py508 # Create a mock optimizer classCOMMENT
MEDIUM⚡tests/trainer/test_trainer_optimizers.py517 # Create a factory class (simulates Muon/Dion pattern)COMMENT
MEDIUM⚡tests/trainer/test_trainer_optimizers.py574 # Create a mock optimizer classCOMMENT
MEDIUM⚡tests/trainer/test_trainer_optimizers.py583 # Create a factory class (simulates Muon/Dion pattern)COMMENT
MEDIUMtests/trainer/trainer_test_utils.py432 # Create a datasets.DatasetCOMMENT
MEDIUMtests/trainer/test_trainer_evaluation.py162 # Create a dummy batch of inputsCOMMENT
239 more matches not shown…
Empty Error Handlers83 hits · 415 pts
SeverityFileLineSnippetContext
HIGHconftest.py63except OSError:CODE
HIGHconftest.py75except OSError:CODE
HIGHbenchmark_v2/framework/benchmark_config.py22except ImportError:CODE
HIGHtests/causal_lm_tester.py89except ValueError:CODE
HIGHtests/test_memory_cleanup_mixin.py217except AttributeError:CODE
HIGHtests/exporters/test_export.py593except ImportError:CODE
HIGHtests/pipelines/test_pipelines_common.py1057except HfHubHTTPError:CODE
HIGHtests/utils/test_import_utils.py311except OSError:CODE
HIGHtests/utils/test_import_utils.py320except ImportError:CODE
HIGHtests/utils/test_testing_utils.py174except RuntimeError:CODE
HIGHtests/models/auto/test_tokenization_auto.py864except ValueError:CODE
HIGHtests/models/byt5/test_tokenization_byt5.py57except UnicodeDecodeError:CODE
HIGHtests/models/perceiver/test_tokenization_perceiver.py57except UnicodeDecodeError:CODE
HIGHtests/cli/test_serve.py84except Exception: # noqa: S110CODE
HIGHtests/tokenization/test_tokenization_utils.py441except import_protobuf_decode_error():CODE
HIGHutils/check_docstrings.py404except (OSError, SyntaxError):CODE
HIGHutils/checkers.py553except (OSError, ValueError, KeyError):CODE
HIGHutils/checkers.py572except OSError:CODE
HIGHutils/checkers.py262except OSError:CODE
HIGHutils/checkers.py140except (ValueError, TypeError):CODE
HIGHutils/check_config_docstrings.py86except (OSError, TypeError):CODE
HIGHutils/check_noisy_comments.py155except OSError:CODE
HIGHutils/fetch_hub_objects_for_ci.py261except shutil.SameFileError:CODE
HIGHutils/check_import_complexity.py180except ValueError:CODE
HIGHutils/check_repo.py1407except ImportError:CODE
HIGH…torch/speech-recognition/run_speech_recognition_ctc.py546except OSError:CODE
HIGH…eech-recognition/run_speech_recognition_ctc_adapter.py545except OSError:CODE
HIGHsrc/transformers/modeling_rope_utils.py168except ValueError:CODE
HIGHsrc/transformers/modeling_rope_utils.py232except ValueError:CODE
HIGHsrc/transformers/modeling_rope_utils.py314except ValueError:CODE
HIGHsrc/transformers/modeling_rope_utils.py405except ValueError:CODE
HIGHsrc/transformers/modeling_rope_utils.py538except ValueError:CODE
HIGHsrc/transformers/modeling_rope_utils.py627except ValueError:CODE
HIGHsrc/transformers/video_utils.py201except (IndexError, TypeError):CODE
HIGHsrc/transformers/testing_utils.py437except ImportError:CODE
HIGHsrc/transformers/core_model_loading.py1244except StopIteration:CODE
HIGHsrc/transformers/processing_utils.py1304except EntryNotFoundError:CODE
HIGHsrc/transformers/modelcard.py201except (httpx.HTTPError, HFValidationError, OfflineModeIsEnabled):CODE
HIGH…formers/convert_slow_tokenizers_checkpoints_to_fast.py43except AttributeError:CODE
HIGHsrc/transformers/dynamic_module_utils.py843except OSError: # no requirements.txtCODE
HIGHsrc/transformers/modeling_utils.py315except (OSError, ValueError):CODE
HIGHsrc/transformers/modeling_utils.py4885except AttributeError:CODE
HIGHsrc/transformers/modeling_utils.py4889except AttributeError:CODE
HIGHsrc/transformers/modeling_utils.py4798except AttributeError:CODE
HIGHsrc/transformers/trainer.py2316except (TypeError, AttributeError):CODE
HIGHsrc/transformers/exporters/utils.py228except (SystemError, KeyError):CODE
HIGHsrc/transformers/utils/auto_docstring.py4499except KeyError:CODE
HIGHsrc/transformers/utils/auto_docstring.py4501except ImportError:CODE
HIGHsrc/transformers/utils/hub.py161except (HfHubHTTPError, OfflineModeIsEnabled, httpx.NetworkError):CODE
HIGHsrc/transformers/utils/network_logging.py187except (OSError, json.JSONDecodeError):CODE
HIGHsrc/transformers/utils/network_logging.py83except httpx.ResponseNotRead:CODE
HIGHsrc/transformers/utils/import_utils.py1257except Exception: # noqa: S110 # we don't care about the Exception here: we just want to check availabilityCODE
HIGHsrc/transformers/utils/import_utils.py1285except Exception: # noqa: S110 # we don't care about the Exception here: we just want to check availabilityCODE
HIGHsrc/transformers/utils/import_utils.py2819except (ImportError, AttributeError):CODE
HIGH…s/models/ernie4_5_vl_moe/processing_ernie4_5_vl_moe.py65except SameFileError: # already exists which we allow (copy if needed)CODE
HIGH…ls/ernie4_5_vl_moe/video_processing_ernie4_5_vl_moe.py300except SameFileError: # already exists which we allow (copy if needed)CODE
HIGH…udio_v2_tokenizer/modeling_higgs_audio_v2_tokenizer.py122except (ValueError, AttributeError):CODE
HIGHsrc/transformers/models/auto/image_processing_auto.py658except ValueError:CODE
HIGHsrc/transformers/models/auto/video_processing_auto.py394except ValueError:CODE
HIGHsrc/transformers/models/auto/processing_auto.py314except ValueError:CODE
23 more matches not shown…
Docstring Block Structure83 hits · 415 pts
SeverityFileLineSnippetContext
HIGHsrc/transformers/configuration_utils.py791 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.py1210 #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/audio_utils.py475 Map a language code or name to its canonical form, with validation. Accepts either a language code (e.g. ``"zhSTRING
HIGHsrc/transformers/dynamic_module_utils.py528 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.py153 Instantiate a type of [`~video_processing_utils.VideoProcessorBase`] from an video processor. Args: STRING
HIGHsrc/transformers/pipelines/__init__.py723 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.py253 This function generates a JSON schema for a given function, based on its docstring and type hints. This is mostSTRING
HIGHsrc/transformers/utils/hub.py320 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.py393 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.py125 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.py225 Loads the image processor configuration from a pretrained model image processor configuration. Args: pSTRING
HIGHsrc/transformers/models/auto/video_processing_auto.py152 Loads the video processor configuration from a pretrained model video processor configuration. Args: pSTRING
HIGHsrc/transformers/models/auto/feature_extraction_auto.py129 Loads the feature extractor configuration from a pretrained model feature extractor configuration. Args: STRING
HIGHsrc/transformers/models/auto/tokenization_auto.py568 Loads the tokenizer configuration from a pretrained model tokenizer configuration. Args: pretrained_moSTRING
HIGH…/transformers/models/bertweet/tokenization_bertweet.py543 Remove entities from text by converting them to their corresponding unicode character. Args: text: STRING
HIGH…formers/models/oneformer/image_processing_oneformer.py171 Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and STRING
HIGH…ers/models/oneformer/image_processing_pil_oneformer.py264 Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and STRING
HIGH…ers/models/mask2former/image_processing_mask2former.py122 Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and STRING
HIGH…models/mask2former/image_processing_pil_mask2former.py246 Binarize the given masks using `object_mask_threshold`, it returns the associated values of `masks`, `scores` and STRING
HIGHsrc/transformers/models/tapas/tokenization_tapas.py2583 Creates a function that can be used as a sort key or to compare the values. Maps to primitive types and finds the STRING
HIGH…s/models/diffusion_gemma/generation_diffusion_gemma.py559 Generates text using the diffusion model. It contains an outer loop doing autoregressive generation ofSTRING
HIGHsrc/transformers/models/blip/modeling_blip.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 Examples: ```python >>> import av >>> import torch >>> import numpy as np STRING
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 Examples: ```python >>> import av >>> import numpy as np >>> import torch STRING
HIGHsrc/transformers/models/vivit/modeling_vivit.py343 Examples: ```python >>> import av >>> import numpy as np >>> from transformerSTRING
HIGHsrc/transformers/models/vivit/modeling_vivit.py469 Examples: ```python >>> import av >>> import numpy as np >>> import torch STRING
HIGH…rmers/models/efficientloftr/modeling_efficientloftr.py862 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
23 more matches not shown…
Excessive Try-Catch Wrapping319 hits · 315 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.py274 except Exception as e:CODE
LOWbenchmark_v2/framework/hardware_metrics.py45 except Exception:CODE
LOWbenchmark_v2/framework/hardware_metrics.py178 except Exception:CODE
LOW⚡benchmark_v2/framework/hardware_metrics.py197 except Exception as e:CODE
LOW⚡benchmark_v2/framework/hardware_metrics.py207 except Exception as e:CODE
LOW⚡benchmark_v2/framework/hardware_metrics.py212 except Exception as e:CODE
LOW⚡benchmark_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.py2771 except Exception as e:CODE
LOWtests/test_tokenization_common.py2886 except Exception as e:CODE
LOW⚡tests/test_modeling_common.py2578 except Exception as e:CODE
LOW⚡tests/test_modeling_common.py2692 except Exception as e:CODE
LOWtests/test_modeling_common.py286 except Exception as _:CODE
LOWtests/test_modeling_common.py2801 except Exception as e:CODE
LOWtests/test_modeling_common.py6461 except Exception as e:CODE
LOWtests/test_processing_common.py292 except Exception as e:CODE
LOWtests/test_processing_common.py710 except Exception:CODE
LOWtests/test_fsdp_mixin.py176 except Exception as e:CODE
LOWtests/test_fsdp_mixin.py699 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
LOW⚡tests/kernels/test_kernels.py746 except Exception as e:CODE
LOW⚡tests/kernels/test_kernels.py750 except Exception as e:CODE
LOW⚡tests/kernels/test_kernels.py765 except Exception as e:CODE
LOW⚡tests/kernels/test_kernels.py769 except Exception as e:CODE
LOWtests/exporters/test_export.py791 except Exception: # non-tensor slotCODE
LOW…pelines/test_pipelines_automatic_speech_recognition.py1908 except Exception:CODE
LOWtests/utils/test_auto_docstring.py872 except Exception:STRING
LOWtests/utils/test_audio_utils.py1845 except Exception as e:CODE
LOWtests/models/got_ocr2/test_processing_got_ocr2.py124 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.py561 except Exception as e:CODE
LOWtests/models/plbart/test_modeling_plbart.py312 except Exception:CODE
LOWtests/models/blenderbot/test_modeling_blenderbot.py270 except Exception:CODE
LOWtests/models/csm/test_processing_csm.py104 except Exception:CODE
LOWtests/models/opt/test_modeling_opt.py392 except Exception:CODE
LOW…ts/models/qwen2_5_omni/test_processing_qwen2_5_omni.py138 except Exception:CODE
LOW…odels/qwen3_omni_moe/test_processing_qwen3_omni_moe.py132 except Exception:CODE
LOW…els/blenderbot_small/test_modeling_blenderbot_small.py275 except Exception:CODE
259 more matches not shown…
Redundant / Tautological Comments237 hits · 304 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.py1407 # Set seed to ensure stable model initialization - avoids numerical issues (NaN) with some modelsCOMMENT
LOWtests/test_modeling_common.py4878 # Check if this given pattern matches any param or module (the value attributed to the pattern does not COMMENT
LOWtests/test_processing_common.py278 # Check if there's a custom setup method for this specific attributeCOMMENT
LOWtests/test_image_processing_common.py900 # Check if torchvision backend is availableCOMMENT
LOWtests/test_video_processing_common.py353 # 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.py143 # Check if both modules have a 'forward' attributeCOMMENT
LOWtests/kernels/test_kernels.py168 # Check if both modules have a 'forward' attributeCOMMENT
LOWtests/utils/test_offline.py219 # Return outputSTRING
LOWtests/utils/test_cache_utils.py1258 # Check if cache config is passed through correctlyCOMMENT
LOWtests/utils/test_cache_utils.py1268 # 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.py244 # Check if we have expected results for this configurationCOMMENT
LOWtests/models/gpt_oss/test_modeling_gpt_oss.py486 # Check if we have expected results for this configurationSTRING
LOW…itional_detr/test_image_processing_conditional_detr.py248 # 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.py371 # 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.py346 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOWtests/models/colqwen2/test_modeling_colqwen2.py294 # Check if the maximum scores per row are in the diagonal of the matrix scoreCOMMENT
LOWtests/models/colqwen2/test_modeling_colqwen2.py349 # Check if the maximum scores per row are in the diagonal of the matrix scoreCOMMENT
LOWtests/models/eomt/test_image_processing_eomt.py246 # Set longest_edge to None to test for semantic segmentatiom.COMMENT
LOWtests/models/rt_detr/test_image_processing_rt_detr.py278 # 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.py293 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOW…grounding_dino/test_image_processing_grounding_dino.py203 # 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.py379 # 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.py230 # 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.py353 # 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.py301 # 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.py424 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOWtests/models/qwen2_vl/test_image_processing_qwen2_vl.py113 # Check if class default was mutatedCOMMENT
LOWtests/models/qwen2_vl/test_video_processing_qwen2_vl.py334 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOWtests/models/detr/test_image_processing_detr.py312 # 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.py434 # Check if do_convert_annotations=False, then the annotations are not converted to centre_x, centre_y, widthCOMMENT
LOW…/models/colmodernvbert/test_modeling_colmodernvbert.py243 # 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.py2050 # 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.py274 # Check if it works for a simple language modeling exampleCOMMENT
LOWtests/trainer/test_trainer_checkpointing.py1005 # Check if the model weights file exists in the final checkpoint directory.COMMENT
LOW⚡tests/trainer/test_trainer.py533 # Check if model weights have been updatedCOMMENT
LOW⚡tests/generation/test_utils.py3490 "# Calculate the sum\nresult = num1 + num2\n\n# Print the result\nprint(result)\n```\n"CODE
LOW⚡utils/check_docstrings.py836 # Check if docstring starts and ends on the same lineCOMMENT
LOW⚡utils/check_docstrings.py850 # Check if it's named "auto_docstring"COMMENT
LOWutils/check_docstrings.py1197 # Check if this arg has placeholdersCOMMENT
LOWutils/check_docstrings.py1442 # Check if this method is inside a processor classCOMMENT
LOWutils/check_docstrings.py1448 # Check if class inherits from ModelOutput, ProcessorMixin, or PreTrainedConfigCOMMENT
LOWutils/check_docstrings.py1758 # Check if any fields are missing or need removalCOMMENT
177 more matches not shown…
Hallucination Indicators23 hits · 240 pts
SeverityFileLineSnippetContext
CRITICALbenchmark_v2/framework/benchmark_runner.py101 torch._inductor.codecache.TritonFuture._compile_cache.clear()CODE
CRITICALtests/peft_integration/test_peft_integration.py410 model.classifier.modules_to_save.default.weight.fill_(sentinel)CODE
CRITICALtests/models/neomme/test_modeling_neomme.py561 model.model.embed_tokens.word_embeddings.weight.t()CODE
CRITICALtests/models/fsmt/test_modeling_fsmt.py260 model.base_model.decoder.output_projection.weight.data_ptr(),CODE
CRITICAL⚡tests/models/fsmt/test_modeling_fsmt.py276 model.base_model.decoder.output_projection.weight.data_ptr(),CODE
CRITICAL⚡tests/models/mbart/test_modeling_mbart.py344 model.base_model.decoder.embed_tokens.weight.data_ptr(),CODE
CRITICAL⚡tests/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.py121 torch._inductor.codecache.TritonFuture._compile_cache.clear()CODE
CRITICALutils/check_repo.py1419 model_types = list(transformers.models.auto.configuration_auto.CONFIG_MAPPING_NAMES.keys())CODE
CRITICALsrc/transformers/trainer.py2355 kwargs.update({"dtype": self.accelerator.state.deepspeed_plugin.hf_ds_config.dtype()})CODE
CRITICALsrc/transformers/tokenization_mistral_common.py605 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.py1774 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.py1565 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 Indicators125 hits · 211 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_cache_utils.py1761 # Step 0 : multi-token prefillCOMMENT
LOWtests/utils/test_cache_utils.py1773 # Step 1 : multi-token update crossing the window boundaryCOMMENT
LOWtests/quantization/bnb/test_mixed_int8.py904 # Step 1: freeze all parametersSTRING
LOW⚡tests/quantization/bnb/test_mixed_int8.py925 # Step 2: add adaptersSTRING
LOW⚡tests/quantization/bnb/test_mixed_int8.py932 # Step 3: dummy batchSTRING
LOW⚡tests/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
LOW⚡tests/quantization/bnb/test_4bit.py651 # Step 2: add adaptersSTRING
LOW⚡tests/quantization/bnb/test_4bit.py658 # Step 3: dummy batchSTRING
LOW⚡tests/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
LOWsrc/transformers/feature_extraction_utils.py534 # 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.py339 # 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.py404 # 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.py224 # 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.py2907 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW⚡…formers/models/edgetam_video/modeling_edgetam_video.py2917 # Step 3: Get and process object pointersCOMMENT
LOW⚡…formers/models/edgetam_video/modeling_edgetam_video.py2933 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW⚡…formers/models/edgetam_video/modeling_edgetam_video.py2937 # Step 5: Forward through the memory attention mechanismCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2895 # Step 1: Handle initial conditioning framesCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1084 # Step 1: Handle initial conditioning framesCOMMENT
LOW⚡…sformers/models/edgetam_video/modular_edgetam_video.py1096 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW⚡…sformers/models/edgetam_video/modular_edgetam_video.py1106 # Step 3: Get and process object pointersCOMMENT
LOW⚡…sformers/models/edgetam_video/modular_edgetam_video.py1122 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW⚡…sformers/models/edgetam_video/modular_edgetam_video.py1126 # Step 5: Forward through the memory attention mechanismCOMMENT
LOW⚡src/transformers/models/gemma4/processing_gemma4.py304 # Step 1: mel frames (matches feature_extraction_gemma4.py)STRING
LOW⚡src/transformers/models/gemma4/processing_gemma4.py311 # 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.py321 # 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.py249 # 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.py217 # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy styleCOMMENT
LOW⚡…models/embedding_gemma2/processing_embedding_gemma2.py382 # Step 1: mel frames (matches feature_extraction_embedding_gemma2.py)STRING
LOW⚡…models/embedding_gemma2/processing_embedding_gemma2.py389 # Step 2: SSCP subsampling. Two stride-2 Conv2d layers (kernel=3, pad=1)STRING
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py798 # Step 1: noise-dependent (single) conditioningCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py801 # Step 2: normalize noisy coordsCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py805 # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream.COMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py819 # Step 4: add conditioned single reprCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py822 # Step 5: token transformerCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py827 # Step 6: token normCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py830 # Step 7: atom decoderCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py840 # Step 8: denoised output; the fp32 noise-level scalars keep the coordinates fp32.COMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py866 # Step 1: noise-dependent (single) conditioningCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py869 # Step 2: normalize noisy coordsCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py873 # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream.COMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py887 # Step 4: add conditioned single reprCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py890 # Step 5: token transformerCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py895 # Step 6: token normCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py898 # Step 7: atom decoderCOMMENT
65 more matches not shown…
Structural Annotation Overuse123 hits · 211 pts
SeverityFileLineSnippetContext
LOWtests/utils/test_cache_utils.py1761 # Step 0 : multi-token prefillCOMMENT
LOWtests/utils/test_cache_utils.py1773 # 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
LOW⚡tests/quantization/bnb/test_mixed_int8.py925 # Step 2: add adaptersSTRING
LOW⚡tests/quantization/bnb/test_mixed_int8.py932 # Step 3: dummy batchSTRING
LOW⚡tests/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
LOW⚡tests/quantization/bnb/test_4bit.py651 # Step 2: add adaptersSTRING
LOW⚡tests/quantization/bnb/test_4bit.py658 # Step 3: dummy batchSTRING
LOW⚡tests/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
LOW⚡docs/source/en/model_doc/qwen3_asr.md286# Step 1: TranscribeCOMMENT
LOW⚡docs/source/en/model_doc/qwen3_asr.md295# Step 2: Prepare alignment inputsCOMMENT
LOW⚡docs/source/en/model_doc/qwen3_asr.md301# Step 3: Run forced alignerCOMMENT
LOW⚡docs/source/en/model_doc/qwen3_asr.md305# Step 4: Decode timestampsCOMMENT
LOW⚡…formers/models/edgetam_video/modeling_edgetam_video.py2907 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW⚡…formers/models/edgetam_video/modeling_edgetam_video.py2917 # Step 3: Get and process object pointersCOMMENT
LOW⚡…formers/models/edgetam_video/modeling_edgetam_video.py2933 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW⚡…formers/models/edgetam_video/modeling_edgetam_video.py2937 # Step 5: Forward through the memory attention mechanismCOMMENT
LOW…formers/models/edgetam_video/modeling_edgetam_video.py2895 # Step 1: Handle initial conditioning framesCOMMENT
LOW…sformers/models/edgetam_video/modular_edgetam_video.py1084 # Step 1: Handle initial conditioning framesCOMMENT
LOW⚡…sformers/models/edgetam_video/modular_edgetam_video.py1096 # Step 2: Get memory frames and concatenate their featuresCOMMENT
LOW⚡…sformers/models/edgetam_video/modular_edgetam_video.py1106 # Step 3: Get and process object pointersCOMMENT
LOW⚡…sformers/models/edgetam_video/modular_edgetam_video.py1122 # Step 4: Concatenate all retrieved memories and their positional embeddingsCOMMENT
LOW⚡…sformers/models/edgetam_video/modular_edgetam_video.py1126 # 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
LOW⚡src/transformers/models/gemma4/processing_gemma4.py304 # Step 1: mel frames (matches feature_extraction_gemma4.py)STRING
LOW⚡src/transformers/models/gemma4/processing_gemma4.py311 # 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⚡…models/embedding_gemma2/processing_embedding_gemma2.py382 # Step 1: mel frames (matches feature_extraction_embedding_gemma2.py)STRING
LOW⚡…models/embedding_gemma2/processing_embedding_gemma2.py389 # Step 2: SSCP subsampling. Two stride-2 Conv2d layers (kernel=3, pad=1)STRING
LOW…a2vec_vision_original_pytorch_checkpoint_to_pytorch.py264 # IMPORTANT: Note that for now we've only converted the down-streamCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py798 # Step 1: noise-dependent (single) conditioningCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py801 # Step 2: normalize noisy coordsCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py805 # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream.COMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py819 # Step 4: add conditioned single reprCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py822 # Step 5: token transformerCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py827 # Step 6: token normCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py830 # Step 7: atom decoderCOMMENT
LOW⚡src/transformers/models/esmfold2/modular_esmfold2.py840 # Step 8: denoised output; the fp32 noise-level scalars keep the coordinates fp32.COMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py866 # Step 1: noise-dependent (single) conditioningCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py869 # Step 2: normalize noisy coordsCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py873 # Step 3: embed the normalized coords, then run the atom encoder on the coord-augmented stream.COMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py887 # Step 4: add conditioned single reprCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py890 # Step 5: token transformerCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py895 # Step 6: token normCOMMENT
LOW⚡src/transformers/models/esmfold2/modeling_esmfold2.py898 # Step 7: atom decoderCOMMENT
63 more matches not shown…
AI Slop Vocabulary104 hits · 186 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml117# 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.py750 # Note: for all mixins that utilize the Hub in some way, we should ensure thatCOMMENT
MEDIUMtests/test_processing_common.py194 # TODO: make this more robust. We intentionally do NOT call _setup_test_attributes(full_processor)COMMENT
LOW⚡tests/pipelines/test_pipelines_common.py368 # If dtype is NOT specified in the pipeline constructor, the property should just returnCOMMENT
LOW⚡tests/pipelines/test_pipelines_common.py373 # If underlying model doesn't have dtype property, simply return NoneCOMMENT
LOW⚡tests/utils/test_modeling_utils.py3152 # a KeyError; they should simply return False.STRING
MEDIUMtests/utils/test_auto_docstring.py834 # Relative metric; robust across CI vs local. Catches serious regressions.STRING
MEDIUM⚡…odels/bigbird_pegasus/test_modeling_bigbird_pegasus.py538 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.py538 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.py540 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.py31 # 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
MEDIUM⚡tests/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
MEDIUM⚡tests/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
MEDIUM⚡tests/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.py750 ("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.py774 ("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.py131 # For simplicity just set the last n tokens to the image tokenCOMMENT
MEDIUMtests/models/paligemma/test_modeling_paligemma.py562 # this is a supplementary test to ensure paligemma fine-tuning that relies on token_type_ids is robust to futureCOMMENT
MEDIUM⚡tests/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.py151 # 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/molmo2/test_processing_molmo2.py50 # Override the chat template to support the "system" role used by the base test harness.COMMENT
MEDIUM⚡tests/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
LOW⚡tests/generation/test_utils.py2913 # In this case, we simply call recursively the function on both internal cachesCOMMENT
LOWtests/generation/test_utils.py3032 # 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.py523 # 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
LOWsrc/transformers/modeling_flash_attention_utils.py294 # can never be used, so no need to build a processing function for it, just return a dict builder.COMMENT
MEDIUMsrc/transformers/tokenization_utils_base.py3216 # To make this more robust, we could do a diff and find the longest common subsequence, but this isCOMMENT
MEDIUMsrc/transformers/testing_utils.py3884 # TODO: check simply with the name is not robust.STRING
LOWsrc/transformers/testing_utils.py4129 # If the target callable is not called within a test, simply call it without modification.STRING
LOWsrc/transformers/testing_utils.py4208 # We simply add "self" as the expression despite it might not be the actual argument name.STRING
LOWsrc/transformers/cache_utils.py1063 # LinearAttention layer have no sequence length dimension, so simply return -1 hereCOMMENT
LOWsrc/transformers/modeling_utils.py5070 # fragmentation issues) simply use the pool of 4 GiB unused memory that is available. In those cases, it's bCOMMENT
MEDIUMsrc/transformers/modeling_utils.py4850 """Adds the `_is_hf_initialized` flag on parameters that will be tied, in order to avoid initializing themSTRING
LOWsrc/transformers/trainer.py1896 # if loss is nan or inf simply add the average of previous logged lossesCOMMENT
LOWsrc/transformers/masking_utils.py796 # If the mask is already 4D, simply return as-is (it was already prepared, or it is custom)COMMENT
LOWsrc/transformers/trainer_pt_utils.py383 # Check if we have something to add, if not just returnCOMMENT
LOWsrc/transformers/modeling_layers.py407 # Some models may subclass nn.Embedding directly, but here we do not want the added norm (note that we cannot siCOMMENT
MEDIUMsrc/transformers/distributed/pipeline_parallel.py279 # TODO(3outeille): very naive implementation to make it work seamless with generate().COMMENT
MEDIUM…transformers/pipelines/automatic_speech_recognition.py707 # 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
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
44 more matches not shown…
Modern AI Meta-Vocabulary66 hits · 166 pts
SeverityFileLineSnippetContext
MEDIUMCONTRIBUTING.md865. [Agentic contributions](#agentic-contributions)CODE
MEDIUMtests/models/rag/test_modeling_rag.py1# Copyright 2020, The RAG Authors and The HuggingFace Inc. team.COMMENT
MEDIUMtests/models/persimmon/test_modeling_persimmon.py61 # "zero-shot": PersimmonForSequenceClassification,COMMENT
MEDIUMutils/modular_model_detector.py97# You can also change the embedding model for a larger/smaller one.STRING
MEDIUMdocs/source/ja/pipeline_tutorial.md228>>> # This model is a `zero-shot-classification` model.CODE
MEDIUMdocs/source/ja/tasks/idefics.md44 - [Few-shot プロンプト](#few-shot-prompting)CODE
MEDIUMdocs/source/ja/tasks/zero_shot_object_detection.md130## Text-prompted zero-shot object detection by handCOMMENT
MEDIUMdocs/source/ja/tasks/prompting.md277[Chain-of-thought](#chain-of-thought)。CODE
MEDIUMdocs/source/ja/tasks/prompting.md335* [Few-shot prompting](#few-shot-prompting) や [Chain-of-thought](#chain-of-thought) などの高度なテクニックを使用します。COMMENT
MEDIUMdocs/source/ja/tasks/prompting.md335* [Few-shot prompting](#few-shot-prompting) や [Chain-of-thought](#chain-of-thought) などの高度なテクニックを使用します。COMMENT
MEDIUMdocs/source/zh/pipeline_tutorial.md239>>> # This model is a `zero-shot-classification` model.CODE
MEDIUMdocs/source/ar/_toctree.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
MEDIUM⚡docs/source/ko/tasks/prompting.md296* [퓨샷(Few-shot) 프롬프팅](#few-shot-prompting) 및 [생각의 사슬(Chain-of-thought, CoT)](#chain-of-thought) 같은 고급 기술을 사용해보세요.COMMENT
MEDIUM⚡docs/source/ko/tasks/prompting.md296* [퓨샷(Few-shot) 프롬프팅](#few-shot-prompting) 및 [생각의 사슬(Chain-of-thought, CoT)](#chain-of-thought) 같은 고급 기술을 사용해보세요.COMMENT
MEDIUM⚡docs/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-prompting) and [chain-of-thought](#chain-of-thought) to improve resultSTRING
MEDIUMdocs/source/en/tasks/prompting.md698. Try other techniques like [few-shot](#few-shot-prompting) and [chain-of-thought](#chain-of-thought) to improve resultSTRING
MEDIUMdocs/source/en/tasks/prompting.md169Like [few-shot](#few-shot-prompting) prompting, the downside of CoT is that it requires more effort to design a series oCODE
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.py509 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
6 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.py248 # Check both `quantization_config` being present and also not null,STRING
HIGHsrc/transformers/models/auto/auto_factory.py406 # 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.py217 # If `layer_types` is not specified explicitly in the config or `sliding_window` is null,COMMENT
Slop Phrases68 hits · 62 pts
SeverityFileLineSnippetContext
LOWtests/test_modeling_common.py4853 # 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.py363# below, make sure to add a comment explaining why.COMMENT
LOWsrc/transformers/core_model_loading.py323 # We squeeze each chunk here as well to make sure to give them their original shapeCOMMENT
LOWsrc/transformers/core_model_loading.py1728 # so we need to make sure to load the tensor with the same dtype from the checkpointSTRING
LOWsrc/transformers/trainer.py2015 # 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.py1638 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.py1141 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.py725 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.py646 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.py655 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.py1198 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.py684 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.py629 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.py399 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.py641 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.py744 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.py1680 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.py2270 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.py786 loss += self.aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceSTRING
LOWsrc/transformers/models/jetmoe/modular_jetmoe.py585 loss += self.aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…/transformers/models/granitemoe/modeling_granitemoe.py630 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…c/transformers/models/granitemoe/modular_granitemoe.py304 loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same deviceCODE
LOW…formers/models/minimax_m3_vl/modeling_minimax_m3_vl.py945 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.py653 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.py1064 >>> boxes = data["bboxes"] # make sure to normalize your bounding boxesCODE
LOW…s/models/granitemoehybrid/modeling_granitemoehybrid.py1282 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.py858 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.py1054 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.py821 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.py703 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.py789 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.py1927 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.py2084 ) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/dbrx/modular_dbrx.py511 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.py692 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.py1526 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.py694 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.py415 ) # make sure to reside in the same deviceCODE
LOWsrc/transformers/models/glm4v_moe/modeling_glm4v_moe.py1624 ) # make sure to reside in the same deviceCODE
LOW…ansformers/models/qwen3_vl_moe/modular_qwen3_vl_moe.py440 ) # make sure to reside in the same deviceCODE
LOW…nsformers/models/qwen3_vl_moe/modeling_qwen3_vl_moe.py1582 ) # make sure to reside in the same deviceCODE
LOW…s/models/granitemoeshared/modeling_granitemoeshared.py696 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.py1387 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.py1899 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.py2228 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.py3105 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.py1670 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.py2537 ) # 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
8 more matches not shown…
Fake / Example Data40 hits · 43 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
LOW⚡tests/models/solar_open/test_modeling_solar_open.py94 "Lorem ipsum dolor sit amet",CODE
LOW⚡tests/models/solar_open/test_modeling_solar_open.py94 "Lorem ipsum dolor sit amet",CODE
LOW⚡tests/models/solar_open/test_modeling_solar_open.py101 "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley ShellCODE
LOW⚡tests/models/solar_open/test_modeling_solar_open.py101 "Lorem ipsum dolor sit amet=√=√=√ 치수 치수 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley ShellCODE
LOW⚡tests/models/solar_open/test_modeling_solar_open.py105 "Lorem ipsum dolor sit amet=√=√ 치수=√ 치수 치수 치수 치수 치수 Shelley Shelley Shelley Shelley Shelley Shelley CODE
LOW⚡tests/models/solar_open/test_modeling_solar_open.py105 "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
LOW⚡tests/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
LOW⚡tests/models/lfm2_moe/test_modeling_lfm2_moe.py199 "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum.",CODE
LOW⚡tests/models/lfm2_moe/test_modeling_lfm2_moe.py204 "Complete the text: Lorem ipsum dolor ipsum dolor ipsum dolor ipsum dolor ipsum dolor",CODE
LOW⚡tests/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
LOW.github/workflows/self-comment-ci-amd.yml207 - run: mkdir dummy_artifact && echo "placeholder" > dummy_artifact/placeholder.txtCODE
LOWsrc/transformers/exporters/exporter_openvino.py189 decoder._input_signature = [node.name for node in graph_module.graph.nodes if node.op == "placeholder"]CODE
LOWsrc/transformers/exporters/exporter_openvino.py219 if node.op == "placeholder" and isinstance(node.meta.get("val"), torch.Tensor)CODE
LOWsrc/transformers/exporters/exporter_openvino.py272 placeholders = {node.name: node for node in graph_module.graph.nodes if node.op == "placeholder"}CODE
LOWsrc/transformers/exporters/exporter_openvino.py367 if node.op == "placeholder" and node.name in leaf_namesCODE
LOWsrc/transformers/exporters/exporter_openvino.py703 if n.op == "output" or (n.op == "placeholder" and is_top_level):CODE
LOWsrc/transformers/exporters/exporter_executorch.py780 if node.op != "placeholder":CODE
LOWsrc/transformers/exporters/exporter_executorch.py819 placeholder_names = [node.name for node in exported_program.graph.nodes if node.op == "placeholder"]CODE
LOWsrc/transformers/exporters/exporter_executorch.py1202 if feeder in erased or feeder.op in ("placeholder", "output") or feeder.users or feeder.is_impure():CODE
LOWsrc/transformers/exporters/exporter_executorch.py1232 if node.op != "placeholder" or not isinstance(node.target, str):CODE
LOW⚡src/transformers/models/idefics/processing_idefics.py298 fake_token = "<fake_token_around_image>"STRING
LOW⚡src/transformers/models/idefics/processing_idefics.py304 return image_token + fake_tokenSTRING
LOW⚡src/transformers/models/idefics/processing_idefics.py306 return fake_token + image_token + fake_tokenSTRING
LOW⚡src/transformers/models/xlnet/modeling_xlnet.py1245 dummy_token = torch.zeros((effective_batch_size, 1), dtype=torch.long, device=input_ids.device)STRING
LOW⚡src/transformers/models/xlnet/modeling_xlnet.py1253 input_ids = torch.cat([input_ids[:, -offset:], dummy_token], dim=1)STRING
LOW⚡src/transformers/models/xlnet/modeling_xlnet.py1255 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
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.py224 f.write("def helper(): pass")CODE
LOWtests/cli/test_serve.py1926 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.py772 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
TODO Padding6 hits · 7 pts
SeverityFileLineSnippetContext
LOW⚡utils/check_repo.py261 "MllamaTextModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOW⚡utils/check_repo.py262 "MllamaVisionModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOW⚡utils/check_repo.py263 "Llama4TextModel", # Building part of bigger (tested) model. # TODO: add testsCODE
LOW⚡utils/check_repo.py264 "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…models/embedding_gemma2/processing_embedding_gemma2.py271 # TODO: Add tests for audio-only processor inputs.STRING
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