Repository Analysis

PaddlePaddle/PaddleFormers

PaddleFormers is an easy-to-use library of pre-trained large language model zoo based on PaddlePaddle.

26.4 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of PaddlePaddle/PaddleFormers, a Python project with 12,984 GitHub stars. SynthScan v2.0 examined 364,874 lines of code across 1287 source files, recording 6967 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 26.4 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

26.4
Adjusted Score
26.4
Raw Score
100%
Time Factor
2026-07-14
Last Push
13.0K
Stars
Python
Language
364.9K
Lines of Code
1.3K
Files
7.0K
Pattern Hits
2026-07-14
Scan Date
0.35
HC Hit Rate

What These Metrics Mean

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

Score History

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

Severity Breakdown

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

CRITICAL 62HIGH 394MEDIUM 172LOW 6339

Directory Score Breakdown

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

Pattern Findings

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

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers3111 hits · 3341 pts
SeverityFileLineSnippetContext
LOWtests/testing_utils.py82def softmax_with_cross_entropy(logits, label, soft_label=False, axis=-1, ignore_index=-1):CODE
LOWtests/testing_utils.py467def require_paddle_non_multi_gpu(test_case):CODE
LOWtests/mergekit/test_merge_model.py128 def test_fuse_qkv_lora_merge_torch(self):CODE
LOWtests/nn/test_mlp.py39 def test_initialization_default(self):CODE
LOWtests/nn/test_mlp.py52 def test_initialization_fuse_ffn(self):CODE
LOWtests/nn/test_mlp.py63 def test_initialization_non_fuse_ffn(self):CODE
LOWtests/nn/test_criterion.py38 def test_forward_non_fuse_subbatch_sft(self):CODE
LOWtests/nn/test_criterion.py45 def test_forward_with_loss_mask(self):CODE
LOWtests/nn/test_criterion.py50 def test_forward_with_recompute(self):CODE
LOWtests/nn/test_norm.py30 def test_layer_norm_initialization(self):CODE
LOWtests/nn/test_norm.py40 def test_layer_norm_sequence_parallel(self):CODE
LOWtests/nn/test_norm.py50 def test_rms_norm_initialization(self):CODE
LOWtests/nn/test_norm.py59 def test_rms_norm_sequence_parallel(self):CODE
LOWtests/nn/test_lm_head.py24 def test_initialization_default(self):CODE
LOWtests/nn/test_lm_head.py35 def test_initialization_with_tie_word_embeddings(self):CODE
LOWtests/nn/test_lm_head.py50 def test_forward_fused_head_loss(self):CODE
LOWtests/nn/test_attention.py203 def test_forward_calls_correct_function(self):CODE
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py114 def test_loss_impl_calls_loss_func(self):CODE
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py274 def test_invalid_loss_type_raises(self):CODE
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py289 def test_sigmoid_with_offset_alpha(self):CODE
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py305 def test_pref_loss_ratio_applied(self):CODE
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py322 def test_label_smoothing_applied(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py17 def test_single_eos_token_not_finished(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py26 def test_single_eos_token_finished(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py35 def test_already_finished_stays_finished(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py54 def test_list_eos_tokens_none_match(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py63 def test_nested_list_eos_tokens(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py73 def test_nested_list_eos_none_match(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py139 def test_add_better_than_worst(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py152 def test_is_done_not_enough_beams(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py159 def test_is_done_early_stopping(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py168 def test_is_done_no_early_stopping_better_available(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py187 def test_is_done_with_origin_len(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py207 def test_with_past_key_values(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py233 def test_window_size_larger_than_seq(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py247 def test_init_validation_num_beams(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py254 def test_init_validation_beam_groups(self):CODE
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py270 def test_init_with_beam_groups(self):CODE
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py58 def test_is_causal_inferred_multi_token(self, mock_sdpa):CODE
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py72 def test_is_causal_single_token(self, mock_sdpa):CODE
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py87 def test_explicit_is_causal_false(self, mock_sdpa):CODE
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py151 def test_dropout_passed_through(self, mock_sdpa):CODE
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py166 def test_training_passed_through(self, mock_sdpa):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py19 def test_subbatch_small_input_no_split(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py31 def test_subbatch_splits_and_concatenates(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py44 def test_subbatch_multiple_args(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py57 def test_subbatch_same_arg_idx(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py74 def test_subbatch_preserves_function_name(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py84 def test_subbatch_axis_width_mismatch_raises(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py97 def test_subbatch_same_arg_idx_invalid_raises(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py111 def test_subbatch_with_recompute(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py141 def test_calc_lm_head_logits_basic(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py153 def test_calc_lm_head_logits_with_bias(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py167 def test_calc_lm_head_logits_sequence_parallel(self):CODE
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py181 def test_calc_lm_head_logits_tensor_parallel_output_override(self):CODE
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py36 def test_single_rank_returns_clone(self, mock_fleet):CODE
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py51 def test_group_none_uses_model_parallel(self, mock_fleet):CODE
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py66 def test_multi_rank_returns_correct_shape(self, mock_fleet, mock_all_gather):CODE
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py95 def test_single_rank_returns_clone(self, mock_fleet):CODE
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py110 def test_group_none_uses_model_parallel(self, mock_fleet):CODE
3051 more matches not shown…
Cross-File Repetition331 hits · 1655 pts
SeverityFileLineSnippetContext
HIGHtests/ai_edited_test/cli/test_ai_load_hf_ckpt.py0load a module directly from file path without going through __init__.py.STRING
HIGHtests/ai_edited_test/cli/test_ai_deepseek_v3_fp8.py0load a module directly from file path without going through __init__.py.STRING
HIGHtests/ai_edited_test/cli/test_ai_convert_ckpt_sft.py0load a module directly from file path without going through __init__.py.STRING
HIGH…ts/ai_edited_test/cli/test_ai_deepseek_v3_moe_utils.py0load a module directly from file path without going through __init__.py.STRING
HIGHtests/ai_edited_test/cli/test_ai_deepseek_v3_config.py0load a module directly from file path without going through __init__.py.STRING
HIGHtests/ai_edited_test/cli/test_ai_deepseek_v3_kernel.py0load a module directly from file path without going through __init__.py.STRING
HIGH…ts/ai_edited_test/cli/test_ai_deepseek_v3_moe_layer.py0load a module directly from file path without going through __init__.py.STRING
HIGH…sts/ai_edited_test/cli/test_ai_deepseek_v3_workflow.py0load a module directly from file path without going through __init__.py.STRING
HIGH…s/ai_edited_test/cli/test_ai_deepseek_v3_token_disp.py0load a module directly from file path without going through __init__.py.STRING
HIGH…sts/ai_edited_test/cli/test_ai_deepseek_v3_moe_gate.py0load a module directly from file path without going through __init__.py.STRING
HIGHtests/transformers/kimi_k25/test_processor.py0tests that special vision tokens do not get truncated when `truncation=true` is set.STRING
HIGHtests/transformers/qwen2_5_vl/test_processor.py0tests that special vision tokens do not get truncated when `truncation=true` is set.STRING
HIGHtests/transformers/qwen2_vl/test_processor.py0tests that special vision tokens do not get truncated when `truncation=true` is set.STRING
HIGHtests/transformers/qwen3_vl/test_processor.py0tests that special vision tokens do not get truncated when `truncation=true` is set.STRING
HIGHtests/transformers/qwen2_5_vl/test_modeling.py0tests that vlms through an error with explicit message saying what is wrong when number of images don't match number of STRING
HIGHtests/transformers/qwen3_vl_moe/test_modeling.py0tests that vlms through an error with explicit message saying what is wrong when number of images don't match number of STRING
HIGHtests/transformers/qwen3_vl/test_modeling.py0tests that vlms through an error with explicit message saying what is wrong when number of images don't match number of STRING
HIGHtests/transformers/paddleocr_vl/test_modeling.py0tests that vlms through an error with explicit message saying what is wrong when number of images don't match number of STRING
HIGHexamples/experiments/paddlefleet/run_pretrain.py0arguments pertaining to what data we are going to input our model for training and evaluating. using `pdargumentparser` STRING
HIGH…mples/experiments/deepseek_v3_pretrain/run_pretrain.py0arguments pertaining to what data we are going to input our model for training and evaluating. using `pdargumentparser` STRING
HIGH…ddleformers/cli/train/deepseek_v3_pretrain/workflow.py0arguments pertaining to what data we are going to input our model for training and evaluating. using `pdargumentparser` STRING
HIGHexamples/experiments/paddlefleet/run_pretrain.py0arguments pertaining to which model/config/tokenizer we are going to pre-train from.STRING
HIGH…mples/experiments/deepseek_v3_pretrain/run_pretrain.py0arguments pertaining to which model/config/tokenizer we are going to pre-train from.STRING
HIGH…ddleformers/cli/train/deepseek_v3_pretrain/workflow.py0arguments pertaining to which model/config/tokenizer we are going to pre-train from.STRING
HIGHexamples/experiments/deepseek_v3_pretrain/moe_utils.py0restore the original order of tokens after permutation. if probs are provided, it will also apply them to the tokens befSTRING
HIGH…dleformers/cli/train/deepseek_v3_pretrain/moe_utils.py0restore the original order of tokens after permutation. if probs are provided, it will also apply them to the tokens befSTRING
HIGHpaddleformers/transformers/moe_utils.py0restore the original order of tokens after permutation. if probs are provided, it will also apply them to the tokens befSTRING
HIGHexamples/experiments/deepseek_v3_pretrain/moe_layer.py0moe layer forward function 1. gate forward. 2. dispatch export. 3. experts forward. args: hidden_state: moe layer input STRING
HIGH…dleformers/cli/train/deepseek_v3_pretrain/moe_layer.py0moe layer forward function 1. gate forward. 2. dispatch export. 3. experts forward. args: hidden_state: moe layer input STRING
HIGHpaddleformers/transformers/moe_layer.py0moe layer forward function 1. gate forward. 2. dispatch export. 3. experts forward. args: hidden_state: moe layer input STRING
HIGHexamples/experiments/deepseek_v3_pretrain/moe_layer.py0moe expert dispatch from: https://huggingface.co/deepseek-ai/deepseek-v3/blob/main/modeling_deepseek.pySTRING
HIGH…dleformers/cli/train/deepseek_v3_pretrain/moe_layer.py0moe expert dispatch from: https://huggingface.co/deepseek-ai/deepseek-v3/blob/main/modeling_deepseek.pySTRING
HIGHpaddleformers/transformers/moe_layer.py0moe expert dispatch from: https://huggingface.co/deepseek-ai/deepseek-v3/blob/main/modeling_deepseek.pySTRING
HIGHexamples/experiments/deepseek_v3_pretrain/moe_gate.py0_summary_ the priority is the cumulative sum of the expert indices. this method is used in hunyuan model args: topk_idx STRING
HIGHpaddleformers/nn/moe_deepep/moe_gate.py0_summary_ the priority is the cumulative sum of the expert indices. this method is used in hunyuan model args: topk_idx STRING
HIGH…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py0_summary_ the priority is the cumulative sum of the expert indices. this method is used in hunyuan model args: topk_idx STRING
HIGHpaddleformers/transformers/moe_gate.py0_summary_ the priority is the cumulative sum of the expert indices. this method is used in hunyuan model args: topk_idx STRING
HIGHpaddleformers/transformers/moe_gate_auto.py0_summary_ the priority is the cumulative sum of the expert indices. this method is used in hunyuan model args: topk_idx STRING
HIGHexamples/experiments/deepseek_v3_pretrain/moe_gate.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts returns: tuple[paddleSTRING
HIGHpaddleformers/nn/moe_deepep/moe_gate.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts returns: tuple[paddleSTRING
HIGH…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts returns: tuple[paddleSTRING
HIGHpaddleformers/transformers/moe_gate.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts returns: tuple[paddleSTRING
HIGHpaddleformers/transformers/moe_gate_auto.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts returns: tuple[paddleSTRING
HIGHexamples/experiments/deepseek_v3_pretrain/moe_gate.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts in each group n_groupSTRING
HIGHpaddleformers/nn/moe_deepep/moe_gate.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts in each group n_groupSTRING
HIGH…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts in each group n_groupSTRING
HIGHpaddleformers/transformers/moe_gate.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts in each group n_groupSTRING
HIGHpaddleformers/transformers/moe_gate_auto.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts in each group n_groupSTRING
HIGHexamples/experiments/deepseek_v3_pretrain/moe_gate.py0calculate sequence auxiliary loss. args: logits (paddle.tensor): model output. returns: paddle.tensor: the value of sequSTRING
HIGH…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py0calculate sequence auxiliary loss. args: logits (paddle.tensor): model output. returns: paddle.tensor: the value of sequSTRING
HIGHpaddleformers/transformers/moe_gate_auto.py0calculate sequence auxiliary loss. args: logits (paddle.tensor): model output. returns: paddle.tensor: the value of sequSTRING
HIGH…mples/experiments/deepseek_v3_pretrain/load_hf_ckpt.py0convert paddle model parameter names to hugging face format name lists args: paddle_name: parameter name in paddle formaSTRING
HIGH…xperiments/deepseek_v3_pretrain/convert_ckpt_to_sft.py0convert paddle model parameter names to hugging face format name lists args: paddle_name: parameter name in paddle formaSTRING
HIGH…s/cli/train/deepseek_v3_pretrain/utils/load_hf_ckpt.py0convert paddle model parameter names to hugging face format name lists args: paddle_name: parameter name in paddle formaSTRING
HIGH…rain/deepseek_v3_pretrain/utils/convert_ckpt_to_sft.py0convert paddle model parameter names to hugging face format name lists args: paddle_name: parameter name in paddle formaSTRING
HIGHexamples/experiments/deepseek_v3_pretrain/modeling.py0get the value of the 'use_casual_mask' environment variable.STRING
HIGHpaddleformers/utils/masking_utils.py0get the value of the 'use_casual_mask' environment variable.STRING
HIGH…ddleformers/cli/train/deepseek_v3_pretrain/modeling.py0get the value of the 'use_casual_mask' environment variable.STRING
HIGHexamples/experiments/deepseek_v3_pretrain/modeling.py0args: hidden_states (_type_): [batch_size * seq_len, hidden_size]STRING
HIGH…ddleformers/cli/train/deepseek_v3_pretrain/modeling.py0args: hidden_states (_type_): [batch_size * seq_len, hidden_size]STRING
271 more matches not shown…
Over-Commented Block1050 hits · 1019 pts
SeverityFileLineSnippetContext
LOWsetup.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/conftest.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/parallel_launch.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/testing_utils.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/common_test.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/__init__.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/check_log_for_exitcode.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_pt_fp8.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/qwen3vl_sft.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_a100.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_dpo_lora.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/update_precision.sh1# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/qwen.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/check_pr_approval.py1# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/qwen3_single_card.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/qwen3vl_sft_single_card.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_pt_ep4.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/qwen3vl_lora.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_dpo.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/qwen3_a100.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_pt_single_card.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_sft_cp.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_pt.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/preprocess.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_sft.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/check_precision_approval.sh1# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/check_loss.py1# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_lora.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/integration_test/glm45_pt_grouped_gemm.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/mergekit/test_merge_model.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/mergekit/test_sparsify_method.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/mergekit/__init__.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/mergekit/test_merge_config.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/mergekit/test_merge_method.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/nn/test_mlp.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/nn/test_activation.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/nn/test_criterion.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/nn/test_norm.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/nn/__init__.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/nn/test_lm_head.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/nn/test_attention.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_allgather_layer.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_gate.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_kto_loss.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_factory.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_block.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_alltoall_layer.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_sink_impl.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_all_to_all.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_topk_gate.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_pp_model.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_layer.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_comm.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_utils.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/nn/test_ai_moe_abstract.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOWtests/ai_edited_test/datasets/test_ai_augment_utils.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOW…ts/ai_edited_test/datasets/test_ai_grounding_plugin.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.COMMENT
LOW…ai_edited_test/datasets/test_ai_datasets_data_utils.py1# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved.COMMENT
990 more matches not shown…
Hallucination Indicators62 hits · 652 pts
SeverityFileLineSnippetContext
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py150 x_fp8, x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py157 _, _, x_t_fp8, x_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py165 x_fp8, x_scale, x_t_fp8, x_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py172 _, _, w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py182 o2_fp8, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py186 _, _, w2_t_fp8, w2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py227 do3_fp8, do3_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py234 _, _, do3_t_fp8, do3_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py241 do3_fp8, do3_scale, do3_t_fp8, do3_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py247 w2_fp8, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py257 _, _, o2_t_fp8, o2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py277 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py284 _, _, do1_t_fp8, do1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py291 do1_fp8, do1_scale, do1_t_fp8, do1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py297 w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py354 x_fp8, x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py358 _, _, w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py368 o2_fp8, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py372 _, _, w2_t_fp8, w2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py412 _, _, x_t_fp8, x_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py422 do3_fp8, do3_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py429 _, _, do3_t_fp8, do3_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py436 do3_fp8, do3_scale, do3_t_fp8, do3_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py442 w2_fp8, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py452 _, _, o2_t_fp8, o2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py472 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py479 _, _, do1_t_fp8, do1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py486 do1_fp8, do1_scale, do1_t_fp8, do1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py492 w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py400 _, _, w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…xperiments/ernie_pretrain/models/ernie/modeling_moe.py2003 layer.self_attn.o_proj.dense_experts.down_proj.weight.scale_(factor)CODE
CRITICAL…xperiments/ernie_pretrain/models/ernie/modeling_moe.py2015 layer.mlp.dense_experts.down_proj.weight.scale_(factor)CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py191 w1_t_quant, w1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py201 x_fp8, x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py267 w2_quant, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py279 o2_quant, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py325 w2_quant, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py336 o2_quant, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py384 bw_w2_quant, bw_w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py393 unzipped_grad_fp8, unzipped_grad_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py438 bw_w2_quant, bw_w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py447 unzipped_grad_fp8, unzipped_grad_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py508 bw_w1_quant, bw_w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py518 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py568 o2_t_fp8, o2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py587 out_grad_fp8, out_grad_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py651 input_x_fp8, input_x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py667 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py891 w1_t_quant, w1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py909 x_fp8, x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py966 w2_quant, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py986 o2_fp8, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1031 bw_w2_quant, bw_w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1040 unzipped_grad_fp8, unzipped_grad_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1106 bw_w1_quant, bw_w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1115 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1187 o2_t_fp8, o2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1203 do3_t_fp8, do3_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1250 input_x_t_fp8, input_x_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1266 do1_t_fp8, do1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(CODE
2 more matches not shown…
Unused Imports633 hits · 593 pts
SeverityFileLineSnippetContext
LOWtests/testing_utils.py14CODE
LOWtests/ai_edited_test/quantization/test_ai_qlora.py10CODE
LOWtests/utils/test_downloader.py15CODE
LOWtests/transformers/test_modeling_common.py15CODE
LOWtests/transformers/test_processing_common.py16CODE
LOWtests/transformers/test_generation_utils.py15CODE
LOWtests/transformers/test_video_processing_common.py16CODE
LOWtests/transformers/gpt_oss/test_modeling.py15CODE
LOWtests/transformers/kimi_k2/test_modeling.py15CODE
LOWtests/transformers/phi3/test_modeling.py15CODE
LOWtests/transformers/auto/test_configuration.py15CODE
LOWtests/transformers/qwen2/test_modeling.py15CODE
LOWtests/transformers/kimi_k25/test_processor.py16CODE
LOWtests/transformers/minicpm/test_modeling_minicpm.py13CODE
LOWtests/transformers/qwen3moe/test_modeling.py15CODE
LOWtests/transformers/qwen3/test_modeling.py15CODE
LOWtests/transformers/gemma3_text/test_modeling.py15CODE
LOWtests/transformers/qwen2moe/test_modeling.py15CODE
LOWtests/transformers/intern_lm2/test_modeling.py14CODE
LOWtests/transformers/qwen2_5_vl/test_modeling.py15CODE
LOWtests/transformers/qwen2_5_vl/test_processor.py16CODE
LOW…ts/transformers/ernie4_5_moe_vl/test_vision_process.py14CODE
LOWtests/transformers/ernie4_5_moe_vl/test_modeling.py15CODE
LOWtests/transformers/ernie4_5_moe_vl/test_processor.py14CODE
LOWtests/transformers/glm_ocr/test_modeling.py15CODE
LOWtests/transformers/glm_ocr/test_processor.py14CODE
LOWtests/transformers/deepseek_v3/test_modeling.py15CODE
LOWtests/transformers/glm_moe_dsa/test_modeling.py15CODE
LOWtests/transformers/glm4v_moe/test_modeling.py15CODE
LOWtests/transformers/glm4v_moe/test_processor.py16CODE
LOWtests/transformers/qwen3_vl_moe/test_modeling.py15CODE
LOWtests/transformers/intern_lm2_5/test_modeling.py14CODE
LOWtests/transformers/glm4_moe/test_modeling.py15CODE
LOWtests/transformers/qwen2_vl/test_vision_process.py16CODE
LOWtests/transformers/qwen2_vl/test_processor.py16CODE
LOWtests/transformers/qwen2_vl/test_video_processor.py16CODE
LOWtests/transformers/qwen3next/test_modeling.py15CODE
LOWtests/transformers/ernie4_5/test_modeling.py15CODE
LOWtests/transformers/paddleocr_vl/test_modeling.py15CODE
LOWtests/transformers/paddleocr_vl/test_processor.py15CODE
LOWtests/transformers/llama/test_modeling.py15CODE
LOWtests/transformers/qwen3_vl/test_modeling.py15CODE
LOWtests/transformers/qwen3_vl/test_processor.py16CODE
LOWtests/transformers/qwen3_vl/test_modeling_fleet.py14CODE
LOWtests/transformers/qwen3_vl/test_video_processor.py16CODE
LOWexamples/experiments/deepseek_v3_pretrain/moe_layer.py17CODE
LOWexamples/experiments/deepseek_v3_pretrain/moe_gate.py17CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py22CODE
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py86CODE
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py87CODE
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py88CODE
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py89CODE
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py90CODE
LOW…es/experiments/ernie_pretrain/models/ernie/__init__.py16CODE
LOW…es/experiments/ernie_pretrain/models/ernie/__init__.py17CODE
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py15CODE
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py16CODE
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py17CODE
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py18CODE
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py19CODE
573 more matches not shown…
Deep Nesting635 hits · 578 pts
SeverityFileLineSnippetContext
LOWsetup.py149CODE
LOWtests/testing_utils.py260CODE
LOWtests/testing_utils.py512CODE
LOWtests/testing_utils.py578CODE
LOWtests/testing_utils.py517CODE
LOWtests/testing_utils.py587CODE
LOWtests/testing_utils.py518CODE
LOWtests/testing_utils.py589CODE
LOWtests/integration_test/check_loss.py41CODE
LOWtests/nn/test_attention.py27CODE
LOWtests/ai_edited_test/utils/test_ai_env.py27CODE
LOWtests/ai_edited_test/utils/test_ai_tools.py118CODE
LOWtests/ai_edited_test/cli/test_ai_finetuning_args.py132CODE
LOWtests/ai_edited_test/cli/test_ai_launcher.py39CODE
LOWtests/ai_edited_test/cli/test_ai_launcher.py74CODE
LOWtests/ai_edited_test/trainer/test_ai_async_handler.py32CODE
LOWtests/ai_edited_test/trainer/test_ai_async_handler.py163CODE
LOWtests/peft/test_lora.py94CODE
LOWtests/transformers/test_modeling_common.py486CODE
LOWtests/transformers/test_modeling_common.py677CODE
LOWtests/transformers/test_modeling_common.py735CODE
LOWtests/transformers/test_processing_common.py160CODE
LOWtests/transformers/test_segment_parallel_utils.py107CODE
LOWtests/transformers/test_conversion_common.py118CODE
LOWtests/transformers/test_conversion_common.py153CODE
LOWtests/transformers/test_video_processing_common.py382CODE
LOWtests/transformers/test_safetensors.py56CODE
LOWtests/transformers/test_safetensors.py90CODE
LOWtests/transformers/phi3/test_modeling.py349CODE
LOWtests/transformers/auto/test_modeling.py110CODE
LOWtests/transformers/glm4_moe/test_modeling.py380CODE
LOWtests/transformers/llama/test_modeling.py319CODE
LOWtests/trainer/test_trainer_callback.py108CODE
LOWexamples/tools/trans_paddlenlp2hf.py44CODE
LOWexamples/tools/merge.py30CODE
LOWexamples/tools/create_pretraining_data.py134CODE
LOWexamples/tools/create_pretraining_data.py306CODE
LOWexamples/tools/create_pretraining_data.py213CODE
LOWexamples/tools/create_pretraining_data.py248CODE
LOWexamples/experiments/paddlefleet/run_pretrain.py474CODE
LOWexamples/experiments/deepseek_v3_pretrain/fp8_linear.py54CODE
LOWexamples/experiments/deepseek_v3_pretrain/moe_utils.py420CODE
LOW…mples/experiments/deepseek_v3_pretrain/load_hf_ckpt.py274CODE
LOW…xperiments/deepseek_v3_pretrain/convert_ckpt_to_sft.py218CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py177CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py649CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py1412CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py2334CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py2589CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py97CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py1834CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py2309CODE
LOW…_pretrain/tools/uc_to_sharded/convert_uc_to_sharded.py40CODE
LOW…_pretrain/tools/uc_to_sharded/convert_uc_to_sharded.py138CODE
LOW…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py404CODE
LOW…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py549CODE
LOW…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py664CODE
LOW…amples/experiments/ernie_pretrain/models/comm_utils.py148CODE
LOW…amples/experiments/ernie_pretrain/models/comm_utils.py193CODE
LOW…amples/experiments/ernie_pretrain/models/comm_utils.py150CODE
575 more matches not shown…
AI Structural Patterns353 hits · 337 pts
SeverityFileLineSnippetContext
LOWtests/testing_utils.py488CODE
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py22CODE
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_gate.py30CODE
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_layer.py39CODE
LOW…sts/ai_edited_test/quantization/test_ai_quant_utils.py21CODE
LOWtests/ai_edited_test/quantization/test_ai_qat_utils.py19CODE
LOWtests/transformers/gpt_oss/test_modeling.py36CODE
LOWtests/transformers/kimi_k2/test_modeling.py34CODE
LOWtests/transformers/phi3/test_modeling.py36CODE
LOWtests/transformers/qwen2/test_modeling.py42CODE
LOWtests/transformers/minicpm/test_modeling_minicpm.py33CODE
LOWtests/transformers/qwen3moe/test_modeling.py40CODE
LOWtests/transformers/qwen3/test_modeling.py42CODE
LOWtests/transformers/gemma3_text/test_modeling.py39CODE
LOWtests/transformers/qwen2moe/test_modeling.py40CODE
LOWtests/transformers/qwen2_5_vl/test_modeling.py44CODE
LOWtests/transformers/ernie4_5_moe_vl/test_modeling.py46CODE
LOWtests/transformers/glm_ocr/test_modeling.py37CODE
LOWtests/transformers/deepseek_v3/test_modeling.py39CODE
LOWtests/transformers/glm_moe_dsa/test_modeling.py34CODE
LOWtests/transformers/glm4v_moe/test_modeling.py45CODE
LOWtests/transformers/qwen3_vl_moe/test_modeling.py45CODE
LOWtests/transformers/glm4_moe/test_modeling.py40CODE
LOWtests/transformers/qwen2_vl/test_video_processor.py40CODE
LOWtests/transformers/qwen3next/test_modeling.py40CODE
LOWtests/transformers/ernie4_5/test_modeling.py43CODE
LOWtests/transformers/paddleocr_vl/test_modeling.py38CODE
LOWtests/transformers/llama/test_modeling.py37CODE
LOWtests/transformers/qwen3_vl/test_modeling.py43CODE
LOWtests/transformers/qwen3_vl/test_video_processor.py45CODE
LOWtests/trainer/test_moe_unified_checkpoint.py77CODE
LOWexamples/experiments/deepseek_v3_pretrain/moe_layer.py186CODE
LOWexamples/experiments/deepseek_v3_pretrain/moe_layer.py823CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py319CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py1589CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py1888CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py695CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py734CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py760CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py817CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py875CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py907CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py956CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py1692CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py1818CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py2014CODE
LOW…periments/deepseek_v3_pretrain/config/configuration.py132CODE
LOW…_pretrain/tools/uc_to_sharded/convert_uc_to_sharded.py53CODE
LOW…ments/ernie_pretrain/models/sequence_parallel_utils.py157CODE
LOW…ments/ernie_pretrain/models/sequence_parallel_utils.py180CODE
LOW…ments/ernie_pretrain/models/sequence_parallel_utils.py335CODE
LOW…ments/ernie_pretrain/models/sequence_parallel_utils.py459CODE
LOW…ments/ernie_pretrain/models/sequence_parallel_utils.py467CODE
LOW…amples/experiments/ernie_pretrain/models/comm_utils.py128CODE
LOW…periments/ernie_pretrain/models/ernie/configuration.py72CODE
LOW…xperiments/ernie_pretrain/models/ernie/modeling_moe.py563CODE
LOW…xperiments/ernie_pretrain/models/ernie/modeling_moe.py814CODE
LOW…xperiments/ernie_pretrain/models/ernie/modeling_moe.py1147CODE
LOW…xperiments/ernie_pretrain/models/ernie/modeling_moe.py1657CODE
LOW…xperiments/ernie_pretrain/models/ernie/modeling_moe.py2140CODE
293 more matches not shown…
Self-Referential Comments86 hits · 260 pts
SeverityFileLineSnippetContext
MEDIUMtests/nn/test_mlp.py25 # Create a mock config with default valuesCOMMENT
MEDIUMtests/nn/test_attention.py267 # Create the ground truth dense causal mask for the naive implementationCOMMENT
MEDIUMtests/nn/test_attention.py297 # Create the ground truth dense mask from the FlashMask sparse formatCOMMENT
MEDIUMtests/ai_edited_test/nn/test_ai_pp_model.py401 # Create a config where head_dim attribute doesn't exist at all,COMMENT
MEDIUMtests/ai_edited_test/nn/test_ai_pp_model.py691 # Create a mock layer that has a weight attributeCOMMENT
MEDIUMtests/ai_edited_test/datasets/test_ai_mm_plugin.py188 # Create a new plugin classCOMMENT
MEDIUMtests/ai_edited_test/utils/test_ai_doc_parser.py46 # Create a temp file with content < 1024 charsCOMMENT
MEDIUMtests/ai_edited_test/utils/test_ai_aistudio_download.py237 # Create the expected cache structureCOMMENT
MEDIUMtests/ai_edited_test/utils/test_ai_optimizer.py28 # Create a simple model and optimizer so we can call the methodCOMMENT
MEDIUMtests/ai_edited_test/utils/test_ai_image_utils.py63 # Create a simple test image and its base64 encodingCOMMENT
MEDIUMtests/ai_edited_test/cli/test_ai_ernie_top2_gate.py128 # Create a near-orthogonal weight matrixCOMMENT
MEDIUMtests/ai_edited_test/cli/test_ai_dataset_formatting.py180 # Create a dataset with unsupported featuresCOMMENT
MEDIUMtests/ai_edited_test/cli/test_ai_cli.py54 # Create the partial after mocking printCOMMENT
MEDIUMtests/ai_edited_test/peft/test_ai_loraga_utils.py105 # Create a mock LoRA moduleCOMMENT
MEDIUM…s/ai_edited_test/transformers/test_ai_moe_gate_auto.py140 # Create a weight parameter for the gateCOMMENT
MEDIUM…_edited_test/transformers/test_ai_kimi_k2_tokenizer.py27 # Create a minimal tiktoken model file for testingCOMMENT
MEDIUMtests/ai_edited_test/trainer/test_ai_timer.py172 # Create a _Timer firstCOMMENT
MEDIUMtests/ai_edited_test/trainer/test_ai_timer.py184 # Create a distinct class to force type mismatchCOMMENT
MEDIUMtests/transformers/test_processing_common.py379 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/transformers/test_processing_common.py400 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/transformers/test_processing_common.py570 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/transformers/test_processing_common.py591 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/transformers/ernie4_5_moe_vl/test_processor.py461 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/transformers/ernie4_5_moe_vl/test_processor.py477 # Define the kwargs for each modalityCOMMENT
MEDIUMtests/trainer/test_trainer_callback.py16# This file is modified fromCOMMENT
MEDIUMexamples/experiments/paddlefleet/run_pretrain.py614 # Create the learning_rate sheduler and optimizerCOMMENT
MEDIUM…mples/experiments/deepseek_v3_pretrain/run_pretrain.py577 # Create the learning_rate sheduler and optimizerCOMMENT
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_utils.py118 # Create an output tensor filled with zerosCOMMENT
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_utils.py335 # Create an output tensor filled with zerosCOMMENT
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_gate.py186 # Create a mask for 1st's expert per tokenCOMMENT
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_gate.py252 # Create a mask for 1st's expert per token.COMMENT
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_gate.py257 # Create a mask for 2nd's expert per token using Gumbel-max trick.COMMENT
MEDIUMscripts/iluvatar_ci/test_ernie_21b_sft.py27 # Define the exact shell command to executeCOMMENT
MEDIUMscripts/xpu_ci/test_ernie_21b_sft.py27 # Define the exact shell command to executeCOMMENT
MEDIUMscripts/xpu_ci/test_ernie_28b_thinking_sft.py27 # Define the exact shell command to executeCOMMENT
MEDIUMscripts/codestyle/check_dead_links.py118 # Create the symlinkCOMMENT
MEDIUM.github/workflows/cherry-pick.yml97 # Create a new branch for the cherry-pickCOMMENT
MEDIUMpaddleformers/datasets/template/mm_plugin.py561 # Create an image with a white background and the same size as the original imageCOMMENT
MEDIUMpaddleformers/utils/download/common.py310 # Create a factory function that returns a Session with configured proxiesSTRING
MEDIUMpaddleformers/cli/cli.py98 # Create a default GPU list string (e.g., "0,1,2" for 3 GPUs)COMMENT
MEDIUM…dleformers/cli/train/deepseek_v3_pretrain/moe_utils.py118 # Create an output tensor filled with zerosCOMMENT
MEDIUM…dleformers/cli/train/deepseek_v3_pretrain/moe_utils.py335 # Create an output tensor filled with zerosCOMMENT
MEDIUM…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py186 # Create a mask for 1st's expert per tokenCOMMENT
MEDIUM…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py252 # Create a mask for 1st's expert per token.COMMENT
MEDIUM…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py257 # Create a mask for 2nd's expert per token using Gumbel-max trick.COMMENT
MEDIUM…ddleformers/cli/train/deepseek_v3_pretrain/workflow.py507 # Create the learning_rate sheduler and optimizerCOMMENT
MEDIUMpaddleformers/cli/train/auto_parallel/workflow.py320 # Create the learning_rate scheduler and optimizerCOMMENT
MEDIUMpaddleformers/cli/train/sft/workflow.py695 # Create the learning_rate sheduler and optimizerCOMMENT
MEDIUMpaddleformers/transformers/video_utils.py220 # Create a batched list from single objectCOMMENT
MEDIUMpaddleformers/transformers/image_transforms.py722 # Create the outer listCOMMENT
MEDIUMpaddleformers/transformers/moe_utils.py66 # Create a dense expert-to-token mapping from the sparse token-to-expert mappingCOMMENT
MEDIUMpaddleformers/transformers/moe_utils.py109 # Create an output tensor filled with zerosCOMMENT
MEDIUMpaddleformers/transformers/processing_utils.py471 # Create a unified `preprocessor_config.json` and save all attributes as a composite config, except for tokeCOMMENT
MEDIUMpaddleformers/transformers/image_processing_utils.py53 # Define the key methods that should support Paddle tensor return types.COMMENT
MEDIUMpaddleformers/transformers/moe_gate.py345 # Create a mask for 1st's expert per tokenCOMMENT
MEDIUMpaddleformers/transformers/moe_gate.py413 # Create a mask for 1st's expert per token.COMMENT
MEDIUMpaddleformers/transformers/moe_gate.py418 # Create a mask for 2nd's expert per token using Gumbel-max trick.COMMENT
MEDIUMpaddleformers/transformers/moe_gate_auto.py348 # Create a mask for 1st's expert per tokenCOMMENT
MEDIUMpaddleformers/transformers/moe_gate_auto.py414 # Create a mask for 1st's expert per token.COMMENT
MEDIUMpaddleformers/transformers/moe_gate_auto.py419 # Create a mask for 2nd's expert per token using Gumbel-max trick.COMMENT
26 more matches not shown…
Docstring Block Structure47 hits · 235 pts
SeverityFileLineSnippetContext
HIGHexamples/experiments/deepseek_v3_pretrain/fp8_linear.py57 Applies a linear transformation to the incoming data: y = xA^T + b. This function supports specialized implemenSTRING
HIGHexamples/experiments/deepseek_v3_pretrain/kernel.py101 Dequantizes the given weight tensor using the provided scale tensor. Args: x (paddle.Tensor): The quantSTRING
HIGH…rnie_pretrain/models/moe/token_dispatcher/moe_utils.py110Permute tokens based on expert assignment indices. Args: tokens (paddle.Tensor): Input tokens to be permuteSTRING
HIGH…rnie_pretrain/models/moe/token_dispatcher/moe_utils.py136Restore original token order from permuted tokens. Args: permuted_tokens (paddle.Tensor): Permuted tokens tSTRING
HIGHscripts/regression/test_models.py116Load model configuration from YAML file. Args: model_key: The model identifier to load configuratioSTRING
HIGHpaddleformers/nn/pp_model.py114 Determines the layer partitioning scheme for Pipeline Parallelism (PP) and Virtual Pipeline Parallelism (VP) wiSTRING
HIGHpaddleformers/nn/attention/sink_impl.py561 A unified, high-performance attention implementation with Sink mechanism support. This function automatically STRING
HIGHpaddleformers/datasets/data_utils.py119Convert batch dialogue into input_ids. The API support multiple data format: `pt`, `sft. Args: dials (STRING
HIGHpaddleformers/datasets/DPODataset.py161Generate packed sequences using greedy strategy. Args: examples: List of examples to pack. STRING
HIGHpaddleformers/datasets/DPODataset.py187Preprocess DPO training examples Args: example: Raw training example containing: - STRING
HIGHpaddleformers/utils/downloader.py94Get weights path from WEIGHT_HOME, if not exists, download it from url. Args: url (str): download url STRING
HIGHpaddleformers/utils/tools.py148 Args: version (str): The first version string needed to be compared. The format of version striSTRING
HIGHpaddleformers/utils/distributed.py167nested all gather function with offload Args: tensor (Any): the desired tensor, list of tensor, dict of tenSTRING
HIGHpaddleformers/utils/download/aistudio_hub_download.py628 Checks if a file exists in a repository on the Aistudio Hub. Args: repo_id (`str`): A nameSTRING
HIGHpaddleformers/cli/hparams/parser.py120_summary_ Args: parser (PdArgumentParser): _description_ args (Optional[Union[dict[str, Any], list[STRING
HIGH…leformers/cli/train/deepseek_v3_pretrain/fp8_linear.py57 Applies a linear transformation to the incoming data: y = xA^T + b. This function supports specialized implemenSTRING
HIGHpaddleformers/cli/train/deepseek_v3_pretrain/kernel.py101 Dequantizes the given weight tensor using the provided scale tensor. Args: x (paddle.Tensor): The quantSTRING
HIGH…rnie_pretrain/models/moe/token_dispatcher/moe_utils.py110Permute tokens based on expert assignment indices. Args: tokens (paddle.Tensor): Input tokens to be permuteSTRING
HIGH…rnie_pretrain/models/moe/token_dispatcher/moe_utils.py136Restore original token order from permuted tokens. Args: permuted_tokens (paddle.Tensor): Permuted tokens tSTRING
HIGHpaddleformers/transformers/configuration_utils.py1101 Instantiate a [`PretrainedConfig`] (or a derived class) from a pretrained model configuration. Args: STRING
HIGHpaddleformers/transformers/model_utils.py211 This function chunks the `input_tensors` into smaller input tensor parts of size `chunk_size` over the dimension STRING
HIGHpaddleformers/transformers/feature_extraction_utils.py231 Instantiate a type of [`~feature_extraction_utils.FeatureExtractionMixin`] from a feature extractor, *e.g.* a STRING
HIGHpaddleformers/transformers/fp8_utils.py227 FP8 Linear computation function supporting multiple return modes and quantized/unquantized inputs. ArgSTRING
HIGHpaddleformers/transformers/conversion_utils.py1400get name mapping of PretrainedModel Args: config (PretrainedConfig): the configuration of name-mappSTRING
HIGHpaddleformers/transformers/conversion_utils.py1526get fused parameter mapping of PretrainedModel Args: config (PretrainedConfig): the configuration oSTRING
HIGHpaddleformers/transformers/utils.py511 Tries to locate a file in a local folder and repo, downloads and cache it if necessary. Args: path_or_rSTRING
HIGHpaddleformers/transformers/auto/video_processing.py87 Loads the video processor configuration from a pretrained model video processor configuration. Args: pSTRING
HIGHpaddleformers/transformers/auto/feature_extraction.py91 Loads the feature extractor configuration from a pretrained model feature extractor configuration. Args: STRING
HIGHpaddleformers/transformers/auto/tokenizer.py65 Loads the tokenizer configuration from a pretrained model tokenizer configuration. Args: pretrained_moSTRING
HIGHpaddleformers/transformers/auto/image_processing.py107 Loads the image processor configuration from a pretrained model image processor configuration. Args: pSTRING
HIGHpaddleformers/transformers/legacy/tokenizer_utils.py1093 Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added toSTRING
HIGH…dleformers/transformers/legacy/tokenizer_utils_base.py839 Add a dictionary of special tokens (eos, pad, cls, etc.) to the encoder and link them to class attributes. If STRING
HIGH…dleformers/transformers/legacy/tokenizer_utils_base.py933 Add a list of new tokens to the tokenizer class. If the new tokens are not in the vocabulary, they are added toSTRING
HIGHpaddleformers/transformers/qwen2_5_vl/modeling.py1245 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:STRING
HIGH…/transformers/ernie4_5_moe_vl/model/modeling_moe_vl.py1080 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:STRING
HIGH…/transformers/ernie4_5_moe_vl/model/modeling_moe_pp.py93 Determines the layer partitioning scheme for Pipeline Parallelism (PP) and Virtual Pipeline Parallelism (VP) wiSTRING
HIGH…ansformers/ernie4_5_moe_vl/model/modeling_moe_vl_pp.py830 Convert input data into a format acceptable by the model, including image processing, text processing, etc. STRING
HIGH…ernie4_5_moe_vl/model/distributed/common_dist_utils.py83 Performs parallel matrix multiplication with tensor model parallelism support. Args: x (paddle.Tensor)STRING
HIGH…rmers/transformers/ernie4_5_moe_vl/model/utils/misc.py89TrainingLogs Args: object (_type_): _description_ Raises: AttributeError: _description_ RSTRING
HIGH…rmers/transformers/ernie4_5_moe_vl/model/utils/misc.py170gate attr Args: attr (_type_): _description_ Raises: AttributeError: _descriptSTRING
HIGH…/ernie4_5_moe_vl/model/fusion_ops/common_fusion_ops.py49 Performs fused flash attention with multiple implementation variants. Args: q (paddle.Tensor): Query tSTRING
HIGHpaddleformers/transformers/glm4v_moe/modeling.py1340 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:STRING
HIGHpaddleformers/transformers/qwen2_vl/vision_process.py162calculate the number of frames for video used for model inputs. Args: ele (dict): a dict contains the confiSTRING
HIGHpaddleformers/transformers/qwen2_vl/vision_process.py202 Calculate the start and end frame indices based on the given time range. Args: ele (dict): A dictionarSTRING
HIGHpaddleformers/transformers/paddleocr_vl/modeling.py1798 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:STRING
HIGHpaddleformers/data/causal_dataset.py36 Retrieve logits with retry mechanism if no response is received within the specified time Parameters: STRING
HIGHpaddleformers/generation/configuration_utils.py346 Instantiate a [`GenerationConfig`] from a generation configuration file. Args: pretrained_STRING
Modern Structural Boilerplate234 hits · 222 pts
SeverityFileLineSnippetContext
LOWsetup.py76__all__ = ['show']CODE
LOWtests/testing_utils.py39__all__ = ["get_vocab_list", "stable_softmax", "cross_entropy"]CODE
LOWtests/common_test.py20__all__ = ["CommonTest", "CpuCommonTest"]CODE
LOW…ples/experiments/paddlefleet/deepseek_v3_2_provider.py40logger = logging.getLogger(__name__)CODE
LOWexamples/experiments/paddlefleet/glm45_provider.py27logger = logging.getLogger(__name__)CODE
LOWexamples/experiments/paddlefleet/qwen_provider.py27logger = logging.getLogger(__name__)CODE
LOWexamples/experiments/deepseek_v3_pretrain/fp8_linear.py42__all__ = [CODE
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py135__all__ = [CODE
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py72__all__ = [CODE
LOW…periments/deepseek_v3_pretrain/config/configuration.py18__all__ = [CODE
LOW…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py33logger = logging.getLogger(__name__)CODE
LOW…amples/experiments/ernie_pretrain/models/fp8_linear.py41__all__ = ["Fp8FusedMlp"]CODE
LOWexamples/experiments/ernie_pretrain/models/utils.py21logger = logging.getLogger(__name__)CODE
LOW…ments/ernie_pretrain/models/sequence_parallel_utils.py41logger = logging.getLogger(__name__)CODE
LOW…amples/experiments/ernie_pretrain/models/comm_utils.py30logger = logging.getLogger(__name__)CODE
LOW…periments/ernie_pretrain/models/ernie/configuration.py24logger = logging.getLogger(__name__)CODE
LOW…periments/ernie_pretrain/models/ernie/configuration.py26__all__ = [CODE
LOW…xperiments/ernie_pretrain/models/ernie/modeling_moe.py90logger = logging.getLogger(__name__)CODE
LOW…xperiments/ernie_pretrain/models/ernie/modeling_moe.py111__all__ = [CODE
LOW…es/experiments/ernie_pretrain/models/ernie/modeling.py71logger = logging.getLogger(__name__)CODE
LOW…es/experiments/ernie_pretrain/models/ernie/modeling.py120__all__ = [CODE
LOW…experiments/ernie_pretrain/models/ernie/modeling_pp.py87logger = logging.getLogger(__name__)CODE
LOW…les/experiments/ernie_pretrain/models/moe/top2_gate.py32logger = logging.getLogger(__name__)CODE
LOW…les/experiments/ernie_pretrain/models/moe/moe_layer.py53logger = logging.getLogger(__name__)CODE
LOW…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py37__all__ = [CODE
LOW…mples/experiments/ernie_pretrain/ernie/model_config.py18__all__ = ["ModelConfig"]CODE
LOW…e_pretrain/ernie/src/callbacks/moe_logging_callback.py42__all__ = ["GlobalRNGCallback", "MoeLoggingCallback"]CODE
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py24__all__ = [CODE
LOW…ernie_pretrain/ernie/src/callbacks/logging_callback.py19logger = logging.getLogger(__name__)CODE
LOW…_pretrain/ernie/src/callbacks/sp_grad_sync_callback.py25logger = logging.getLogger(__name__)CODE
LOW…e/src/callbacks/moe_correction_bias_adjust_callback.py25logger = logging.getLogger(__name__)CODE
LOW…train/ernie/src/callbacks/fp8_quant_weight_callback.py21logger = logging.getLogger(__name__)CODE
LOW…/experiments/ernie_pretrain/ernie/src/clip/__init__.py17__all__ = ["ClipGradForMOEByGlobalNorm"]CODE
LOW…/experiments/ernie_pretrain/ernie/src/clip/moe_clip.py25logger = logging.getLogger(__name__)CODE
LOW…nts/ernie_pretrain/ernie/src/lr_schedulers/__init__.py17__all__ = ["get_wsd_schedule_with_warmup", "get_cosine_schedule_with_warmup"]CODE
LOW…les/experiments/ernie_pretrain/ernie/src/utils/misc.py23logger = logging.getLogger(__name__)CODE
LOW…experiments/ernie_pretrain/ernie/src/utils/__init__.py17__all__ = ["logger", "setup_logger_output_file"]CODE
LOW…ments/ernie_pretrain/ernie/src/utils/training_utils.py17logger = logging.getLogger(__name__)CODE
LOW…eriments/ernie_pretrain/ernie/src/trainers/__init__.py21__all__ = [CODE
LOW…nie_pretrain/ernie/src/trainers/pretraining_trainer.py15__all__ = [CODE
LOW…nie_pretrain/ernie/src/trainers/pretraining_trainer.py94logger = logging.getLogger(__name__)CODE
LOW…rainers/dygraph_optimizer/hybrid_parallel_optimizer.py34__all__ = []CODE
LOWpaddleformers/nn/embedding.py21__all__ = ["Embedding"]CODE
LOWpaddleformers/nn/linear.py26__all__ = ["Linear"]CODE
LOWpaddleformers/nn/norm.py26__all__ = ["Norm"]CODE
LOWpaddleformers/nn/mlp.py22__all__ = ["MLP"]CODE
LOWpaddleformers/nn/lm_head.py24__all__ = ["LMHead"]CODE
LOWpaddleformers/nn/attention/interface.py19__all__ = ["AttentionInterface"]CODE
LOWpaddleformers/nn/moe_deepep/modular_moe_layer.py36logger = logging.getLogger(__name__)CODE
LOWpaddleformers/nn/moe_deepep/moe_factory.py62__all__ = ["QuickAccessMoEFactory"]CODE
LOWpaddleformers/nn/moe_deepep/moe_loss.py24logger = logging.getLogger(__name__)CODE
LOWpaddleformers/datasets/dataset.py48__all__ = ["MapDataset", "DatasetBuilder", "IterDataset", "load_dataset"]CODE
LOWpaddleformers/datasets/rlhf_datasets/protocol.py28__all__ = [CODE
LOWpaddleformers/utils/downloader.py44__all__ = ["get_weights_path_from_url"]CODE
LOWpaddleformers/utils/moe_hybrid_parallel_optimizer.py47__all__ = [CODE
LOWpaddleformers/utils/batch_sampler.py19__all__ = ["MappingBatchSampler", "MappingDistributedBatchSampler", "DistributedBatchSampler"]CODE
LOWpaddleformers/utils/initializer.py26__all__ = [CODE
LOWpaddleformers/utils/safetensors.py23__all__ = [CODE
LOWpaddleformers/utils/memory_utils.py18__all__ = [CODE
LOWpaddleformers/utils/download/common.py44logger = logging.getLogger(__name__)CODE
174 more matches not shown…
Excessive Try-Catch Wrapping178 hits · 203 pts
SeverityFileLineSnippetContext
LOWsetup.py220except Exception as e:STRING
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py125 except Exception:CODE
LOWtests/ai_edited_test/datasets/test_ai_template.py291 except Exception:CODE
LOWtests/ai_edited_test/cli/test_ai_ernie_moe_utils.py66 except Exception:CODE
LOW…sts/ai_edited_test/cli/test_ai_tensorboard_callback.py109 except Exception:CODE
LOWtests/ai_edited_test/cli/test_ai_deepseek_v3_kernel.py46 except Exception:CODE
LOWtests/ai_edited_test/cli/test_ai_deepseek_v3_kernel.py85except Exception as e:CODE
LOW…_edited_test/transformers/test_ai_kimi_k2_tokenizer.py162 except Exception:CODE
LOW…_edited_test/transformers/test_ai_kimi_k2_tokenizer.py170 except Exception:CODE
LOWtests/peft/test_lora.py213 except Exception as e:CODE
LOWtests/peft/test_lora.py283 except Exception as e:CODE
LOWtests/transformers/phi4/test_phi4_modeling.py149 except Exception:CODE
LOWtests/transformers/phi4/test_phi4_modeling.py210 except Exception:CODE
LOWtests/transformers/phi4/test_phi4_modeling.py426 except Exception:CODE
LOWtests/transformers/intern_lm2_5/test_tokenizer.py29 except Exception:CODE
MEDIUMtests/transformers/intern_lm2_5/test_tokenizer.py26def setUpClass(cls):CODE
LOWtests/transformers/qwen3_vl/test_modeling_fleet.py33except Exception as error:CODE
LOWdocs/zh/custom_datasets_format_zh.md14 except Exception:CODE
MEDIUMdocs/zh/custom_datasets_format_zh.md9def load_parquet(file_path):CODE
LOW…mples/experiments/deepseek_v3_pretrain/load_hf_ckpt.py369 except Exception as e:CODE
LOW…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py612 except Exception:CODE
MEDIUM…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py614 print("Error !!!!")CODE
LOWexamples/experiments/ernie_pretrain/ernie/pretrain.py539 except Exception:CODE
LOW…e_pretrain/ernie/src/callbacks/tensorboard_callback.py25except Exception:CODE
LOWexamples/best_practices/PaddleOCR-VL/README.md565 except Exception:CODE
LOWexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md153 except Exception:CODE
LOWexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md231 except Exception:CODE
LOWexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md950 except Exception:CODE
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md146def download_image_cv2(url):CODE
LOW…ples/best_practices/DeepSeek-V4/dequant_fp8_to_bf16.py188 except Exception as e:CODE
LOW…ples/best_practices/DeepSeek-V4/dequant_fp8_to_bf16.py285 except Exception as e:CODE
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md151 except Exception as e:CODE
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md178 except Exception as e:CODE
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md195 except Exception as e:CODE
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md296 except Exception as e:CODE
MEDIUM…ces/tutorials/how_to_train_a_visual_grounding_model.md678 print(f"Error: Image not found at: {full_image_path}")CODE
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md688 except Exception as e:CODE
LOWscripts/ci_utils/training_utils.py92 except Exception as e:CODE
LOWscripts/codestyle/check_dead_links.py68 except Exception as e:CODE
MEDIUMscripts/codestyle/check_dead_links.py69 print(f"Error reading {file_path}: {e}")CODE
MEDIUMscripts/regression/merge_configs.py210 print(f"Error: {origin_config_path} does not exist")CODE
MEDIUMscripts/regression/merge_configs.py214 print(f"Error: {update_config_path} does not exist")CODE
LOWscripts/regression/test_models.py212 except Exception as e:CODE
LOWscripts/regression/test_models.py235 except Exception as e:CODE
LOWscripts/regression/test_models.py634 except Exception as e:CODE
MEDIUM.github/workflows/cleanup_ci_gists.yml55 print(f"Error: API returned {resp.status_code}: {resp.text}")CODE
LOW.github/workflows/cleanup_ci_gists.yml60 except Exception as e:CODE
MEDIUM.github/workflows/cleanup_ci_gists.yml61 print(f"Error parsing JSON: {e}")CODE
LOWpaddleformers/nn/pp_model.py651 except Exception:CODE
LOWpaddleformers/nn/moe_deepep/modular_moe_layer.py86 except Exception:CODE
LOWpaddleformers/datasets/collate.py615 except Exception:CODE
MEDIUMpaddleformers/datasets/SFTDataset.py239def _rss_mb():CODE
LOWpaddleformers/datasets/SFTDataset.py217 except Exception as e:CODE
LOWpaddleformers/datasets/SFTDataset.py221 except Exception:CODE
LOWpaddleformers/datasets/SFTDataset.py245 except Exception:CODE
LOWpaddleformers/datasets/SFTDataset.py320 except Exception as e:CODE
LOWpaddleformers/datasets/SFTDataset.py773 except Exception:CODE
LOWpaddleformers/datasets/SFTDataset.py1063 except Exception as e:CODE
LOWpaddleformers/datasets/SFTDataset.py1085 except Exception as e:CODE
LOWpaddleformers/datasets/SFTDataset.py1118 except Exception:CODE
118 more matches not shown…
Decorative Section Separators39 hits · 126 pts
SeverityFileLineSnippetContext
MEDIUMtests/dataset/test_collate.py97# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/dataset/test_collate.py107# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/dataset/test_collate.py189# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/dataset/test_collate.py202# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/dataset/test_collate.py258# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/dataset/test_collate.py272# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/dataset/test_mix_datasets.py35# ===========================================================================COMMENT
MEDIUMtests/dataset/test_mix_datasets.py37# ===========================================================================COMMENT
MEDIUMtests/dataset/test_mix_datasets.py211# ===========================================================================COMMENT
MEDIUMtests/dataset/test_mix_datasets.py213# ===========================================================================COMMENT
MEDIUMtests/transformers/glm_ocr/test_modeling.py635 # -------------------------COMMENT
MEDIUMtests/transformers/glm_ocr/test_modeling.py637 # -------------------------COMMENT
MEDIUMtests/transformers/glm_ocr/test_modeling.py665 # -------------------------COMMENT
MEDIUMtests/transformers/glm_ocr/test_modeling.py668 # -------------------------COMMENT
MEDIUMtests/transformers/glm_ocr/test_modeling.py709 # -------------------------COMMENT
MEDIUMtests/transformers/glm_ocr/test_modeling.py711 # -------------------------COMMENT
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/table_ocr.md135# ==========================================COMMENT
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/table_ocr.md137# ==========================================COMMENT
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/table_ocr.md285# ==========================================COMMENT
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/table_ocr.md287# ==========================================COMMENT
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md140# ==========================================COMMENT
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md334# ==========================================COMMENT
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md336# ==========================================COMMENT
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md484# ==========================================COMMENT
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md486# ==========================================COMMENT
MEDIUM…ples/best_practices/DeepSeek-V4/dequant_fp8_to_bf16.py156# ---------------------------------------------------------------------------COMMENT
MEDIUM…ples/best_practices/DeepSeek-V4/dequant_fp8_to_bf16.py158# ---------------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/formers_bot_analysis.yml86 # ── 定时触发路径 ──────────────────────────────────────────────────COMMENT
MEDIUM.github/workflows/formers_bot_analysis.yml114 # ── PR 触发路径 ───────────────────────────────────────────────────COMMENT
MEDIUM.github/workflows/formers_bot_analysis.yml297 # ── 写入 GITHUB_OUTPUT,供 report-to-monitor 步骤读取 ──────────COMMENT
MEDIUMpaddleformers/utils/upcast_downcast_triton.py352# -----------------------------------------------------------------------------COMMENT
MEDIUMpaddleformers/utils/upcast_downcast_triton.py354# -----------------------------------------------------------------------------COMMENT
MEDIUMpaddleformers/utils/upcast_downcast_triton.py476# ------------COMMENT
MEDIUMpaddleformers/transformers/aoa_config_base.py525 # ==================================================================COMMENT
MEDIUMpaddleformers/transformers/aoa_config_base.py527 # ==================================================================COMMENT
MEDIUMpaddleformers/transformers/paddleocr_vl/modeling.py870 # ==========================================COMMENT
MEDIUMpaddleformers/transformers/paddleocr_vl/modeling.py872 # ==========================================COMMENT
MEDIUMpaddleformers/transformers/paddleocr_vl/modeling.py905 # ==========================================COMMENT
MEDIUMpaddleformers/transformers/paddleocr_vl/modeling.py907 # ==========================================COMMENT
Cross-Language Confusion16 hits · 88 pts
SeverityFileLineSnippetContext
HIGH…ai_edited_test/transformers/test_ai_longcontext_ops.py33 heap.push((0, 5))CODE
HIGH…ai_edited_test/transformers/test_ai_longcontext_ops.py34 heap.push((1, 3))CODE
HIGH…ai_edited_test/transformers/test_ai_longcontext_ops.py35 heap.push((2, 8))CODE
HIGHscripts/regression/test_models.py673 subprocess.run("pkill -9 -f 'paddleformers/cli/launcher.py' 2>/dev/null || true", shell=True)CODE
HIGHpaddleformers/quantization/quantization_linear.py332 "2) cd PaddleSlim && pip install -e .\n"CODE
HIGHpaddleformers/quantization/quantization_linear.py333 "3) cd csrc && python ./setup_cuda.py install"CODE
HIGHpaddleformers/quantization/quantization_linear.py522 "2) cd PaddleSlim && pip install -e .\n"CODE
HIGHpaddleformers/quantization/quantization_linear.py523 "3) cd csrc && python ./setup_cuda.py install"CODE
HIGHpaddleformers/quantization/quantization_linear.py761 "2) cd PaddleSlim && pip install -e .\n"CODE
HIGHpaddleformers/quantization/quantization_linear.py762 "3) cd csrc && python ./setup_cuda.py install"CODE
HIGHpaddleformers/transformers/video_utils.py323 f" 1. Install dependencies: `conda install ffmpeg -c conda-forge` or `apt-get update && apt-get install fCODE
HIGHpaddleformers/transformers/audio_processing_utils.py23 print("need to install audioread and librosa. Please try: pip install audioread && pip install librosa")CODE
HIGHpaddleformers/transformers/kimi_k25/media_utils.py103 f" 1. Install dependencies: `conda install ffmpeg -c conda-forge` or `apt-get update && apt-get install fCODE
HIGH…/transformers/ernie4_5_moe_vl/model/longcontext_ops.py134 surplus_piles.push([src_rank, surplus - move_amount])CODE
HIGH…/transformers/ernie4_5_moe_vl/model/longcontext_ops.py136 deficit_piles.push([dst_rank, deficit - move_amount])CODE
HIGHpaddleformers/transformers/qwen2_vl/vision_process.py286 f" 1. Install dependencies: `conda install ffmpeg -c conda-forge` or `apt-get update && apt-get install fCODE
Redundant / Tautological Comments52 hits · 76 pts
SeverityFileLineSnippetContext
LOWtests/transformers/test_video_processing_common.py277 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOWtests/transformers/test_cache_utils.py424 # Check if they are on the same device as the model parametersCOMMENT
LOWtests/transformers/qwen2_vl/test_video_processor.py302 # Set sampling to True. Video frames should be sampled with `num_frames` in the outputCOMMENT
LOWscripts/regression/prepare_datasets.py95 # Check if already existsCOMMENT
LOWscripts/regression/ci_model_unittest.sh130 # Check if file is in transformer directories (don't check file existence, rely on git diff)COMMENT
LOW.github/workflows/cherry-pick.yml90 # Check if target branch exists on remoteCOMMENT
LOW.github/workflows/cherry-pick.yml154 # Check if PR already existsCOMMENT
LOW.github/workflows/_xpu_ci_test.yml60 # Check if anything matching ${REPO_NAME}* still existsCOMMENT
LOWpaddleformers/datasets/dataset.py206 # Check if selected name and split is valid in this DatasetBuilderCOMMENT
LOWpaddleformers/datasets/SFTDataset.py399 # Set flag to False and yield empty list to signal the end of estimationCOMMENT
LOWpaddleformers/datasets/SFTDataset.py436 # Set flag to False and yield empty list to signal the end of estimationCOMMENT
LOWpaddleformers/datasets/SFTDataset.py468 # Set flag to False and yield empty list to signal the end of estimationCOMMENT
LOWpaddleformers/datasets/SFTDataset.py499 # Set flag to False and yield empty list to signal the end of estimationCOMMENT
LOWpaddleformers/datasets/SFTDataset.py540 # Set flag to False and yield empty list to signal the end of estimationCOMMENT
LOWpaddleformers/datasets/DPODataset.py218 # Check if multimedia tags are included in "messages"+"chosen_response", and "messages"+"rejected_response"COMMENT
LOWpaddleformers/utils/upcast_downcast_triton.py726 # # Check if blocks and scales are on CPU, and move to GPU if soCOMMENT
LOWpaddleformers/utils/import_utils.py118 # Check if the package spec exists and grab its version to avoid importing a local directoryCOMMENT
LOWpaddleformers/utils/import_utils.py131 # Check if the version contains "dev"COMMENT
LOWpaddleformers/utils/import_utils.py161 # Check if the package spec exists and grab its version to avoid importing a local directoryCOMMENT
LOWpaddleformers/utils/import_utils.py174 # Check if the version contains "dev"COMMENT
LOWpaddleformers/utils/download/aistudio_hub_download.py714 # Check if file is cached as "no_exist"COMMENT
LOWpaddleformers/utils/download/aistudio_hub_download.py718 # Check if revision folder existsCOMMENT
LOWpaddleformers/utils/download/aistudio_hub_download.py726 # Check if file exists in cacheCOMMENT
LOWpaddleformers/cli/export/export.py97 # Check if the output directory is a valid model directory (contains .safetensors or .pdparams files)COMMENT
LOWpaddleformers/transformers/model_utils.py1741 # Check if README file already exist in repoSTRING
LOWpaddleformers/transformers/model_utils.py3009 # Check if `_keep_in_fp32_modules` is not NoneSTRING
LOW…dleformers/transformers/image_processing_utils_fast.py605 # Check if we have nested structure, assuming the nesting is consistentCOMMENT
LOWpaddleformers/transformers/image_utils.py752 # Check if image is in (n_channels, height, width) or (height, width, n_channels) formatCOMMENT
LOWpaddleformers/transformers/image_utils.py762 # Check if cropped area is within image boundariesCOMMENT
LOWpaddleformers/transformers/image_transforms.py438 # Check if cropped area is within image boundariesCOMMENT
LOWpaddleformers/transformers/feature_extraction_utils.py174 # Check if the args are a device or a dtypeSTRING
LOWpaddleformers/transformers/processing_utils.py913 # Check if tokenizer is fast - use backend attribute if available, otherwise fall back to class nameCOMMENT
LOWpaddleformers/transformers/utils.py690 # Check if the model is already cached or not. We only try the last checkpoint, this should cover most cases ofSTRING
LOWpaddleformers/transformers/gpt_provider.py210 # Check if mtp_block_spec parameter is supportedCOMMENT
LOWpaddleformers/transformers/masking_utils.py247 # Check if the mask can be safely skippedCOMMENT
LOWpaddleformers/transformers/kimi_k2/modeling.py186 # Check if mtp_block_spec parameter is supportedCOMMENT
LOWpaddleformers/transformers/kimi_k2/modeling.py228 # Check if mtp_block_spec parameter is supportedCOMMENT
LOW…dleformers/transformers/legacy/tokenizer_utils_base.py1981 # Check if README file already exist in repoCOMMENT
LOWpaddleformers/transformers/ernie4_5_moe_vl/tokenizer.py240 # Check if padding is neededCOMMENT
LOW…ddleformers/transformers/qwen3_vl_moe/configuration.py320 # Check if the attribute exists in sub-configsCOMMENT
LOW…ddleformers/transformers/qwen3_vl_moe/configuration.py356 # Check if user has set a top-level overrideCOMMENT
LOWpaddleformers/transformers/qwen3_vl/configuration.py309 # Check if the attribute exists in sub-configsCOMMENT
LOWpaddleformers/transformers/qwen3_vl/configuration.py345 # Check if user has set a top-level overrideCOMMENT
LOWpaddleformers/data/data_collator.py571 # Check if padding is necessary.COMMENT
LOWpaddleformers/data/data_collator.py607 # Check if padding is necessary.COMMENT
LOWpaddleformers/trainer/trainer.py2168 # Check if continuing training from a checkpointCOMMENT
LOWpaddleformers/trainer/trainer.py4613 # Check if we should delete older checkpoint(s)COMMENT
LOWpaddleformers/trainer/trainer.py4639 # Check if we should delete older hf checkpoint(s)COMMENT
LOWpaddleformers/trainer/trainer.py5226 # Set back to None to begin a new accumulationCOMMENT
LOWpaddleformers/trainer/integrations.py287 # Check if a Weights & Biases (wandb) API key is provided in the training argumentsCOMMENT
LOWpaddleformers/trainer/integrations.py453 # Check if SwanLab is disabled via environment variableCOMMENT
LOWpaddleformers/generation/utils.py282 # Check if we are done so that we can save a pad step if all(done)COMMENT
Verbosity Indicators38 hits · 73 pts
SeverityFileLineSnippetContext
LOWtests/nn/test_attention.py163 # Step 1: Reshape tensors from [B, S, H, D] to [B, H, S, D] for matrix multiplicationCOMMENT
LOWtests/nn/test_attention.py168 # Step 2: Transpose key for matmul: [B, H, S, D] -> [B, H, D, S]COMMENT
LOWtests/nn/test_attention.py171 # Step 3: Calculate attention scores (Query @ Key^T) and apply scalingCOMMENT
LOWtests/nn/test_attention.py174 # Step 4: Apply the attention mask if providedCOMMENT
LOWtests/nn/test_attention.py179 # Step 5: Prepare and concatenate the sink logits. The sink is a special tokenCOMMENT
LOWtests/nn/test_attention.py184 # Step 6: Apply softmax over the combined logits (scores + sink)COMMENT
LOWtests/nn/test_attention.py188 # Step 7: Separate the attention probabilities from the sink probabilitiesCOMMENT
LOWtests/nn/test_attention.py191 # Step 8: Apply dropout to the scoresCOMMENT
LOWtests/nn/test_attention.py194 # Step 9: Compute the weighted sum of values (Scores @ Value)COMMENT
LOWtests/nn/test_attention.py197 # Step 10: Reshape the output back to [B, S, H, D] and flatten the head dimensionCOMMENT
LOWpaddleformers/datasets/dataset.py669 # We need to check if the example contains label column and confirm its name.COMMENT
LOWpaddleformers/datasets/dataset.py705 # We need to check if the example contains label column and confirm its name.COMMENT
LOWpaddleformers/transformers/minimax_m2/modeling.py1088 # Step 1: Transpose fleet weightCOMMENT
LOWpaddleformers/transformers/minimax_m2/modeling.py1093 # Step 2: Split into per-group chunks along axis=0COMMENT
LOWpaddleformers/transformers/minimax_m2/modeling.py1115 # Step 3: Reassemble q_proj (interleaved Q+Gate)COMMENT
LOWpaddleformers/transformers/auto/feature_extraction.py176 # not all of these are nested. We need to check if it was saved recently as nested or if it is legacy styleCOMMENT
LOWpaddleformers/transformers/deepseek_v4/modeling.py976 # Step 1: split up_gate_proj back to w1/w3 (intermediate, no transpose yet)COMMENT
LOWpaddleformers/transformers/deepseek_v4/modeling.py982 # Step 2: transpose each piece to HF shapeCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py254 # Step 1: Split q_proj into 2*num_heads equal chunks (each = head_dim)COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py259 # Step 2: Split k_proj and v_proj into num_kv_heads chunksCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py264 # Step 3: Assemble per-group in fleet order and concatCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py335 # Step 2: 6 sources (q, k, v, z, b, a) → fused_in_proj with TP interleavingCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py339 # Step 3: Transpose to Fleet layout [hidden, in_proj_dim]COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py624 # Step 1: Transpose fleet weight [in, out] -> [out, in]COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py627 # Step 2: Split into per-group chunks along axis=0COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py279 # Step 4: Transpose the fused weightCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py319 # Step 1: Split in_proj_qkv [qk_dim+qk_dim+v_dim, hidden] into q, k, v along axis=0COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py644 # Step 3: Reassemble into HF formatCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py46 # Step 1: mock _add_accumulatorCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py56 # Step 2: mock _C_ops.adamw_ and _C_ops.adamwCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py177 # Step 1: mock _add_accumulatorCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py187 # Step 2: mock _C_ops.adamw_ and _C_ops.adamwCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py77 # Step 3: mock _insert_syncCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py95 # Step 4: mock Muon._muon_update and Muon._apply_optimizeCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py207 # Step 3: mock _insert_syncCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py225 # Step 4: mock Muon._muon_update and Muon._apply_optimizeCOMMENT
LOWpaddleformers/generation/utils.py389 # Step 1: Process input mask to generate basic expanded maskSTRING
LOWpaddleformers/generation/utils.py447 # Step 2: Convert boolean mask to numerical mask (adapt to different devices)STRING
Structural Annotation Overuse35 hits · 68 pts
SeverityFileLineSnippetContext
LOWtests/nn/test_attention.py163 # Step 1: Reshape tensors from [B, S, H, D] to [B, H, S, D] for matrix multiplicationCOMMENT
LOWtests/nn/test_attention.py168 # Step 2: Transpose key for matmul: [B, H, S, D] -> [B, H, D, S]COMMENT
LOWtests/nn/test_attention.py171 # Step 3: Calculate attention scores (Query @ Key^T) and apply scalingCOMMENT
LOWtests/nn/test_attention.py174 # Step 4: Apply the attention mask if providedCOMMENT
LOWtests/nn/test_attention.py179 # Step 5: Prepare and concatenate the sink logits. The sink is a special tokenCOMMENT
LOWtests/nn/test_attention.py184 # Step 6: Apply softmax over the combined logits (scores + sink)COMMENT
LOWtests/nn/test_attention.py188 # Step 7: Separate the attention probabilities from the sink probabilitiesCOMMENT
LOWtests/nn/test_attention.py191 # Step 8: Apply dropout to the scoresCOMMENT
LOWtests/nn/test_attention.py194 # Step 9: Compute the weighted sum of values (Scores @ Value)COMMENT
LOWtests/nn/test_attention.py197 # Step 10: Reshape the output back to [B, S, H, D] and flatten the head dimensionCOMMENT
LOWpaddleformers/transformers/minimax_m2/modeling.py1088 # Step 1: Transpose fleet weightCOMMENT
LOWpaddleformers/transformers/minimax_m2/modeling.py1093 # Step 2: Split into per-group chunks along axis=0COMMENT
LOWpaddleformers/transformers/minimax_m2/modeling.py1115 # Step 3: Reassemble q_proj (interleaved Q+Gate)COMMENT
LOWpaddleformers/transformers/deepseek_v4/modeling.py976 # Step 1: split up_gate_proj back to w1/w3 (intermediate, no transpose yet)COMMENT
LOWpaddleformers/transformers/deepseek_v4/modeling.py982 # Step 2: transpose each piece to HF shapeCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py254 # Step 1: Split q_proj into 2*num_heads equal chunks (each = head_dim)COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py259 # Step 2: Split k_proj and v_proj into num_kv_heads chunksCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py264 # Step 3: Assemble per-group in fleet order and concatCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py335 # Step 2: 6 sources (q, k, v, z, b, a) → fused_in_proj with TP interleavingCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py339 # Step 3: Transpose to Fleet layout [hidden, in_proj_dim]COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py624 # Step 1: Transpose fleet weight [in, out] -> [out, in]COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py627 # Step 2: Split into per-group chunks along axis=0COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py279 # Step 4: Transpose the fused weightCOMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py319 # Step 1: Split in_proj_qkv [qk_dim+qk_dim+v_dim, hidden] into q, k, v along axis=0COMMENT
LOWpaddleformers/transformers/qwen3_5/modeling.py644 # Step 3: Reassemble into HF formatCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py46 # Step 1: mock _add_accumulatorCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py56 # Step 2: mock _C_ops.adamw_ and _C_ops.adamwCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py177 # Step 1: mock _add_accumulatorCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py187 # Step 2: mock _C_ops.adamw_ and _C_ops.adamwCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py77 # Step 3: mock _insert_syncCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py95 # Step 4: mock Muon._muon_update and Muon._apply_optimizeCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py207 # Step 3: mock _insert_syncCOMMENT
LOWpaddleformers/trainer/utils/offload_optimizer.py225 # Step 4: mock Muon._muon_update and Muon._apply_optimizeCOMMENT
LOWpaddleformers/generation/utils.py389 # Step 1: Process input mask to generate basic expanded maskSTRING
LOWpaddleformers/generation/utils.py447 # Step 2: Convert boolean mask to numerical mask (adapt to different devices)STRING
Dead Code26 hits · 52 pts
SeverityFileLineSnippetContext
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py77CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py79CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py80CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py85CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py90CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py91CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py99CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py111CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py112CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py116CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py117CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py118CODE
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py120CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py78CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py80CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py81CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py86CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py91CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py92CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py100CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py112CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py113CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py117CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py118CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py119CODE
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py121CODE
Fake / Example Data26 hits · 36 pts
SeverityFileLineSnippetContext
LOWtests/ai_edited_test/datasets/test_ai_mm_plugin.py165 mock_response.content = b"fake_data"CODE
LOW…ctices/tutorials/how_to_train_a_function_call_model.md96{"messages": [{"role": "user", "content": "I need to generate an invoice for a customer named John Doe. He bought 2 applCODE
LOW…ansformers/ernie4_5_moe_vl/model/modeling_moe_vl_pp.py969 fake_data = paddle.ones([pp_sd_group.nranks, 1])CODE
LOW…ansformers/ernie4_5_moe_vl/model/modeling_moe_vl_pp.py971 dist.alltoall(fake_out, fake_data, pp_sd_group)CODE
LOWpaddleformers/data/dist_dataloader.py151 fake_data = [nested_reduce_tensor(data)]CODE
LOWpaddleformers/data/dist_dataloader.py157 fake_data = [None]CODE
LOWpaddleformers/data/dist_dataloader.py160 fake_data = [nested_reduce_tensor(data)]CODE
LOWpaddleformers/data/dist_dataloader.py166 fake_data = [None]CODE
LOWpaddleformers/data/dist_dataloader.py169 fake_data,CODE
LOWpaddleformers/data/dist_dataloader.py175 fake_data,CODE
LOWpaddleformers/data/dist_dataloader.py180 fake_data = fake_data[0]CODE
LOWpaddleformers/data/dist_dataloader.py181 if fake_data is None:CODE
LOWpaddleformers/data/dist_dataloader.py187 data = nested_empty_tensor(fake_data)CODE
LOWpaddleformers/data/dist_dataloader.py190 data = nested_empty_tensor(fake_data)CODE
LOWpaddleformers/data/dist_dataloader.py436 fake_data = [nested_reduce_tensor(data)]CODE
LOWpaddleformers/data/dist_dataloader.py440 fake_data = [None]CODE
LOWpaddleformers/data/dist_dataloader.py443 fake_data = [nested_reduce_tensor(data)]CODE
LOWpaddleformers/data/dist_dataloader.py447 fake_data = [None]CODE
LOWpaddleformers/data/dist_dataloader.py450 fake_data,CODE
LOWpaddleformers/data/dist_dataloader.py456 fake_data,CODE
LOWpaddleformers/data/dist_dataloader.py461 fake_data = fake_data[0]CODE
LOWpaddleformers/data/dist_dataloader.py462 if fake_data is None:CODE
LOWpaddleformers/data/dist_dataloader.py468 data = nested_empty_tensor(fake_data)CODE
LOWpaddleformers/data/dist_dataloader.py471 data = nested_empty_tensor(fake_data)CODE
LOWpaddleformers/data/dist_dataloader.py387 fake_data = [None] * self._dataset_world_sizeCODE
LOWpaddleformers/data/dist_dataloader.py389 fake_data, src=self._stream_data_src, group=self._stream_data_groupCODE
AI Slop Vocabulary5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMtests/generation/test_logits_process.py330 # scores = 0 to facilitate checksCOMMENT
LOWpaddleformers/datasets/DPODataset.py386 # The sequnece is too long, just return NoneCOMMENT
LOWpaddleformers/peft/lora/lora_model.py101 # If paddle_xpu is not installed, just use PaddleFormers's native lora layersCOMMENT
LOWpaddleformers/transformers/linear_utils.py82 # If paddle_xpu is not installed, just use Paddle's native Linear implementationsCOMMENT
MEDIUMpaddleformers/transformers/auto/tokenizer.py234 # First, let's see whether the tokenizer_type is passed so that we can leverage itCOMMENT
Slop Phrases4 hits · 5 pts
SeverityFileLineSnippetContext
LOWpaddleformers/nn/moe_deepep/modular_moe_layer.py314 # the current expert. We need to make sure to multiply the output hiddenCOMMENT
LOWpaddleformers/transformers/qwen2_moe/modeling.py370 # the current expert. We need to make sure to multiply the output hiddenCOMMENT
LOWpaddleformers/transformers/qwen3_moe/modeling.py368 # the current expert. We need to make sure to multiply the output hiddenCOMMENT
LOWpaddleformers/trainer/training_args.py353 If you set this value, `greater_is_better` will default to `True`. Don't forget to set it to `False` ifSTRING
Overly Generic Function Names3 hits · 4 pts
SeverityFileLineSnippetContext
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py78 def my_function(x):CODE
LOWtests/ai_edited_test/trainer/test_ai_zero_cost_ckpt.py109 def my_function(state_dict):CODE
LOWpaddleformers/data/data_collator.py507 def process_data(self, data, pad_idx, max_len):CODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWpaddleformers/nn/moe/moe_alltoall_layer.py82 # TODO: implement reduce in cuda opsCOMMENT
LOW…rs/transformers/ernie4_5_moe_vl/model/moe/moe_layer.py133 # TODO: implement reduce in cuda opsCOMMENT
Modern AI Meta-Vocabulary1 hit · 1 pts
SeverityFileLineSnippetContext
MEDIUMpaddleformers/transformers/tokenizer_utils.py227 "documents": [] # RAG context documentsSTRING