Repository Analysis

PaddlePaddle/PaddleFormers

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

25.8 Moderate AI signal View on GitHub
25.8
Adjusted Score
25.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
12,987
Stars
Python
Language
350,959
Lines of Code
1245
Files
6121
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 120HIGH 317MEDIUM 181LOW 5503

Pattern Findings

6121 matches across 18 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers3024 hits · 3246 pts
SeverityFileLineSnippet
LOWtests/testing_utils.py82def softmax_with_cross_entropy(logits, label, soft_label=False, axis=-1, ignore_index=-1):
LOWtests/testing_utils.py467def require_paddle_non_multi_gpu(test_case):
LOWtests/mergekit/test_merge_model.py128 def test_fuse_qkv_lora_merge_torch(self):
LOWtests/nn/test_mlp.py39 def test_initialization_default(self):
LOWtests/nn/test_mlp.py52 def test_initialization_fuse_ffn(self):
LOWtests/nn/test_mlp.py63 def test_initialization_non_fuse_ffn(self):
LOWtests/nn/test_criterion.py38 def test_forward_non_fuse_subbatch_sft(self):
LOWtests/nn/test_criterion.py45 def test_forward_with_loss_mask(self):
LOWtests/nn/test_criterion.py50 def test_forward_with_recompute(self):
LOWtests/nn/test_norm.py30 def test_layer_norm_initialization(self):
LOWtests/nn/test_norm.py40 def test_layer_norm_sequence_parallel(self):
LOWtests/nn/test_norm.py50 def test_rms_norm_initialization(self):
LOWtests/nn/test_norm.py59 def test_rms_norm_sequence_parallel(self):
LOWtests/nn/test_lm_head.py24 def test_initialization_default(self):
LOWtests/nn/test_lm_head.py35 def test_initialization_with_tie_word_embeddings(self):
LOWtests/nn/test_lm_head.py50 def test_forward_fused_head_loss(self):
LOWtests/nn/test_attention.py203 def test_forward_calls_correct_function(self):
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py114 def test_loss_impl_calls_loss_func(self):
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py274 def test_invalid_loss_type_raises(self):
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py289 def test_sigmoid_with_offset_alpha(self):
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py305 def test_pref_loss_ratio_applied(self):
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py322 def test_label_smoothing_applied(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py17 def test_single_eos_token_not_finished(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py26 def test_single_eos_token_finished(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py35 def test_already_finished_stays_finished(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py54 def test_list_eos_tokens_none_match(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py63 def test_nested_list_eos_tokens(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py73 def test_nested_list_eos_none_match(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py139 def test_add_better_than_worst(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py152 def test_is_done_not_enough_beams(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py159 def test_is_done_early_stopping(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py168 def test_is_done_no_early_stopping_better_available(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py187 def test_is_done_with_origin_len(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py207 def test_with_past_key_values(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py233 def test_window_size_larger_than_seq(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py247 def test_init_validation_num_beams(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py254 def test_init_validation_beam_groups(self):
LOWtests/ai_edited_test/nn/test_ai_generation_utils.py270 def test_init_with_beam_groups(self):
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py58 def test_is_causal_inferred_multi_token(self, mock_sdpa):
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py72 def test_is_causal_single_token(self, mock_sdpa):
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py87 def test_explicit_is_causal_false(self, mock_sdpa):
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py151 def test_dropout_passed_through(self, mock_sdpa):
LOWtests/ai_edited_test/nn/test_ai_sdpa_attention.py166 def test_training_passed_through(self, mock_sdpa):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py19 def test_subbatch_small_input_no_split(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py31 def test_subbatch_splits_and_concatenates(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py44 def test_subbatch_multiple_args(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py57 def test_subbatch_same_arg_idx(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py74 def test_subbatch_preserves_function_name(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py84 def test_subbatch_axis_width_mismatch_raises(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py97 def test_subbatch_same_arg_idx_invalid_raises(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py111 def test_subbatch_with_recompute(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py141 def test_calc_lm_head_logits_basic(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py153 def test_calc_lm_head_logits_with_bias(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py167 def test_calc_lm_head_logits_sequence_parallel(self):
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py181 def test_calc_lm_head_logits_tensor_parallel_output_override(self):
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py36 def test_single_rank_returns_clone(self, mock_fleet):
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py51 def test_group_none_uses_model_parallel(self, mock_fleet):
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py66 def test_multi_rank_returns_correct_shape(self, mock_fleet, mock_all_gather):
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py95 def test_single_rank_returns_clone(self, mock_fleet):
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py110 def test_group_none_uses_model_parallel(self, mock_fleet):
2964 more matches not shown…
Cross-File Repetition254 hits · 1270 pts
SeverityFileLineSnippet
HIGHtests/ai_edited_test/cli/test_ai_load_hf_ckpt.py0load a module directly from file path without going through __init__.py.
HIGHtests/ai_edited_test/cli/test_ai_deepseek_v3_fp8.py0load a module directly from file path without going through __init__.py.
HIGHtests/ai_edited_test/cli/test_ai_convert_ckpt_sft.py0load a module directly from file path without going through __init__.py.
HIGH…ts/ai_edited_test/cli/test_ai_deepseek_v3_moe_utils.py0load a module directly from file path without going through __init__.py.
HIGHtests/ai_edited_test/cli/test_ai_deepseek_v3_config.py0load a module directly from file path without going through __init__.py.
HIGHtests/ai_edited_test/cli/test_ai_deepseek_v3_kernel.py0load a module directly from file path without going through __init__.py.
HIGH…ts/ai_edited_test/cli/test_ai_deepseek_v3_moe_layer.py0load a module directly from file path without going through __init__.py.
HIGH…sts/ai_edited_test/cli/test_ai_deepseek_v3_workflow.py0load a module directly from file path without going through __init__.py.
HIGH…s/ai_edited_test/cli/test_ai_deepseek_v3_token_disp.py0load a module directly from file path without going through __init__.py.
HIGH…sts/ai_edited_test/cli/test_ai_deepseek_v3_moe_gate.py0load a module directly from file path without going through __init__.py.
HIGHtests/transformers/test_processing_common.py0we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the
HIGHtests/transformers/test_processing_common.py0we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the
HIGHtests/transformers/ernie4_5_moe_vl/test_processor.py0we use do_rescale=true, rescale_factor=-1.0 to ensure that image_processor kwargs are preserved in the processor. we the
HIGHtests/transformers/kimi_k25/test_processor.py0tests that special vision tokens do not get truncated when `truncation=true` is set.
HIGHtests/transformers/qwen2_5_vl/test_processor.py0tests that special vision tokens do not get truncated when `truncation=true` is set.
HIGHtests/transformers/qwen2_vl/test_processor.py0tests that special vision tokens do not get truncated when `truncation=true` is set.
HIGHtests/transformers/qwen3_vl/test_processor.py0tests that special vision tokens do not get truncated when `truncation=true` is set.
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
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
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
HIGHexamples/experiments/paddlefleet/run_pretrain.py0arguments pertaining to what data we are going to input our model for training and evaluating. using `pdargumentparser`
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`
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`
HIGHexamples/experiments/paddlefleet/run_pretrain.py0arguments pertaining to which model/config/tokenizer we are going to pre-train from.
HIGH…mples/experiments/deepseek_v3_pretrain/run_pretrain.py0arguments pertaining to which model/config/tokenizer we are going to pre-train from.
HIGH…ddleformers/cli/train/deepseek_v3_pretrain/workflow.py0arguments pertaining to which model/config/tokenizer we are going to pre-train from.
HIGHexamples/experiments/paddlefleet/glm45_provider.py0provider for glm 4.5 air 106b-a12b: https://huggingface.co/zai-org/glm-4.5-air
HIGHexamples/experiments/paddlefleet/glm45_provider.py0provider for glm 4.5 air 106b-a12b: https://huggingface.co/zai-org/glm-4.5-air
HIGHexamples/experiments/paddlefleet/glm45_provider.py0provider for glm 4.5 air 106b-a12b: https://huggingface.co/zai-org/glm-4.5-air
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
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
HIGHpaddleformers/transformers/moe_layer.py0moe layer forward function 1. gate forward. 2. dispatch export. 3. experts forward. args: hidden_state: moe layer input
HIGHexamples/experiments/deepseek_v3_pretrain/moe_layer.py0moe expert dispatch from: https://huggingface.co/deepseek-ai/deepseek-v3/blob/main/modeling_deepseek.py
HIGH…dleformers/cli/train/deepseek_v3_pretrain/moe_layer.py0moe expert dispatch from: https://huggingface.co/deepseek-ai/deepseek-v3/blob/main/modeling_deepseek.py
HIGHpaddleformers/transformers/moe_layer.py0moe expert dispatch from: https://huggingface.co/deepseek-ai/deepseek-v3/blob/main/modeling_deepseek.py
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
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
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
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
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
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[paddle
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[paddle
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[paddle
HIGHpaddleformers/transformers/moe_gate.py0_summary_ args: scores (paddle.tensor): [bsz*seq_len, n_experts] k (int): select the top k experts returns: tuple[paddle
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[paddle
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_group
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_group
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_group
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_group
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_group
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_group
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_group
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_group
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_group
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_group
HIGHexamples/experiments/deepseek_v3_pretrain/moe_gate.py0calculate sequence auxiliary loss. args: logits (paddle.tensor): model output. returns: paddle.tensor: the value of sequ
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 sequ
HIGHpaddleformers/transformers/moe_gate_auto.py0calculate sequence auxiliary loss. args: logits (paddle.tensor): model output. returns: paddle.tensor: the value of sequ
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 forma
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 forma
194 more matches not shown…
Hallucination Indicators120 hits · 1265 pts
SeverityFileLineSnippet
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py150 x_fp8, x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py157 _, _, x_t_fp8, x_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
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(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py172 _, _, w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py182 o2_fp8, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py186 _, _, w2_t_fp8, w2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py227 do3_fp8, do3_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py234 _, _, do3_t_fp8, do3_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
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(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py247 w2_fp8, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py257 _, _, o2_t_fp8, o2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py277 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py284 _, _, do1_t_fp8, do1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
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(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py297 w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py354 x_fp8, x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py358 _, _, w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py368 o2_fp8, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py372 _, _, w2_t_fp8, w2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py412 _, _, x_t_fp8, x_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py422 do3_fp8, do3_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py429 _, _, do3_t_fp8, do3_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
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(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py442 w2_fp8, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py452 _, _, o2_t_fp8, o2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py472 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py479 _, _, do1_t_fp8, do1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
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(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py492 w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…amples/experiments/ernie_pretrain/models/fp8_linear.py400 _, _, w1_fp8, w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…xperiments/ernie_pretrain/models/ernie/modeling_moe.py2003 layer.self_attn.o_proj.dense_experts.down_proj.weight.scale_(factor)
CRITICAL…xperiments/ernie_pretrain/models/ernie/modeling_moe.py2015 layer.mlp.dense_experts.down_proj.weight.scale_(factor)
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py191 w1_t_quant, w1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py201 x_fp8, x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py267 w2_quant, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py279 o2_quant, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py325 w2_quant, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py336 o2_quant, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py384 bw_w2_quant, bw_w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py393 unzipped_grad_fp8, unzipped_grad_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py438 bw_w2_quant, bw_w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py447 unzipped_grad_fp8, unzipped_grad_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py508 bw_w1_quant, bw_w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py518 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py568 o2_t_fp8, o2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py587 out_grad_fp8, out_grad_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py651 input_x_fp8, input_x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py667 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py891 w1_t_quant, w1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py909 x_fp8, x_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py966 w2_quant, w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py986 o2_fp8, o2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1031 bw_w2_quant, bw_w2_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1040 unzipped_grad_fp8, unzipped_grad_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1106 bw_w1_quant, bw_w1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1115 do1_fp8, do1_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1187 o2_t_fp8, o2_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1203 do3_t_fp8, do3_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
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(
CRITICAL…rnie_pretrain/models/moe/token_dispatcher/fp8_utils.py1266 do1_t_fp8, do1_t_scale = paddle.incubate.nn.functional.fp8.fp8_quant_blockwise(
60 more matches not shown…
Over-Commented Block1016 hits · 986 pts
SeverityFileLineSnippet
LOWsetup.py1# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
LOWci/check_pr_approval.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWci/check_approval.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/conftest.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/parallel_launch.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWtests/testing_utils.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWtests/common_test.py1# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
LOWtests/__init__.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/check_log_for_exitcode.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_pt_fp8.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/qwen3vl_sft.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_a100.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_dpo_lora.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/update_precision.sh1# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/qwen.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/check_pr_approval.py1# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/qwen3_single_card.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/qwen3vl_sft_single_card.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_pt_ep4.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/qwen3vl_lora.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_dpo.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/qwen3_a100.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_pt_single_card.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_sft_cp.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_pt.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/preprocess.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_sft.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/check_precision_approval.sh1# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/check_loss.py1# Copyright (c) 2026 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_lora.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/integration_test/glm45_pt_grouped_gemm.sh1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/mergekit/test_merge_model.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
LOWtests/mergekit/test_sparsify_method.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
LOWtests/mergekit/__init__.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
LOWtests/mergekit/test_merge_config.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
LOWtests/mergekit/test_merge_method.py1# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
LOWtests/nn/test_mlp.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/nn/test_activation.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/nn/test_criterion.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/nn/test_norm.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/nn/__init__.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/nn/test_lm_head.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/nn/test_attention.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_dpo_loss.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_all_gather.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_allgather_layer.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_gate.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_kto_loss.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_factory.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_block.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_alltoall_layer.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_sink_impl.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_all_to_all.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_topk_gate.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_pp_model.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_layer.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_deepep_comm.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_utils.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/nn/test_ai_moe_abstract.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
LOWtests/ai_edited_test/datasets/test_ai_augment_utils.py1# Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
956 more matches not shown…
Deep Nesting618 hits · 572 pts
SeverityFileLineSnippet
LOWsetup.py149
LOWtests/testing_utils.py260
LOWtests/testing_utils.py512
LOWtests/testing_utils.py578
LOWtests/testing_utils.py517
LOWtests/testing_utils.py587
LOWtests/testing_utils.py518
LOWtests/testing_utils.py589
LOWtests/integration_test/check_loss.py41
LOWtests/integration_test/check_loss.py65
LOWtests/nn/test_attention.py27
LOWtests/ai_edited_test/utils/test_ai_env.py27
LOWtests/ai_edited_test/utils/test_ai_tools.py118
LOWtests/ai_edited_test/cli/test_ai_finetuning_args.py132
LOWtests/ai_edited_test/cli/test_ai_launcher.py87
LOWtests/ai_edited_test/cli/test_ai_launcher.py98
LOWtests/ai_edited_test/trainer/test_ai_async_handler.py32
LOWtests/ai_edited_test/trainer/test_ai_async_handler.py163
LOWtests/peft/test_lora.py94
LOWtests/transformers/test_modeling_common.py486
LOWtests/transformers/test_modeling_common.py677
LOWtests/transformers/test_modeling_common.py735
LOWtests/transformers/test_processing_common.py160
LOWtests/transformers/test_segment_parallel_utils.py107
LOWtests/transformers/test_conversion_common.py118
LOWtests/transformers/test_conversion_common.py153
LOWtests/transformers/test_video_processing_common.py382
LOWtests/transformers/test_safetensors.py56
LOWtests/transformers/test_safetensors.py90
LOWtests/transformers/phi3/test_modeling.py349
LOWtests/transformers/auto/test_modeling.py110
LOWtests/transformers/glm4_moe/test_modeling.py380
LOWtests/transformers/llama/test_modeling.py319
LOWtests/trainer/test_trainer_callback.py108
LOWexamples/tools/trans_paddlenlp2hf.py44
LOWexamples/tools/merge.py30
LOWexamples/tools/create_pretraining_data.py134
LOWexamples/tools/create_pretraining_data.py306
LOWexamples/tools/create_pretraining_data.py213
LOWexamples/tools/create_pretraining_data.py248
LOWexamples/experiments/paddlefleet/run_pretrain.py474
LOWexamples/experiments/deepseek_v3_pretrain/fp8_linear.py54
LOWexamples/experiments/deepseek_v3_pretrain/moe_utils.py420
LOW…mples/experiments/deepseek_v3_pretrain/load_hf_ckpt.py274
LOW…xperiments/deepseek_v3_pretrain/convert_ckpt_to_sft.py218
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py163
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py635
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py1398
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py2515
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py97
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py1834
LOW…amples/experiments/deepseek_v3_pretrain/modeling_pp.py2309
LOW…_pretrain/tools/uc_to_sharded/convert_uc_to_sharded.py40
LOW…_pretrain/tools/uc_to_sharded/convert_uc_to_sharded.py138
LOW…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py404
LOW…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py549
LOW…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py664
LOW…amples/experiments/ernie_pretrain/models/comm_utils.py148
LOW…amples/experiments/ernie_pretrain/models/comm_utils.py193
LOW…amples/experiments/ernie_pretrain/models/comm_utils.py150
558 more matches not shown…
Unused Imports603 hits · 567 pts
SeverityFileLineSnippet
LOWtests/testing_utils.py14
LOWtests/ai_edited_test/quantization/test_ai_qlora.py10
LOWtests/utils/test_downloader.py15
LOWtests/transformers/test_modeling_common.py15
LOWtests/transformers/test_processing_common.py16
LOWtests/transformers/test_generation_utils.py15
LOWtests/transformers/test_video_processing_common.py16
LOWtests/transformers/gpt_oss/test_modeling.py15
LOWtests/transformers/kimi_k2/test_modeling.py15
LOWtests/transformers/phi3/test_modeling.py15
LOWtests/transformers/auto/test_configuration.py15
LOWtests/transformers/qwen2/test_modeling.py15
LOWtests/transformers/kimi_k25/test_processor.py16
LOWtests/transformers/qwen3moe/test_modeling.py15
LOWtests/transformers/qwen3/test_modeling.py15
LOWtests/transformers/gemma3_text/test_modeling.py15
LOWtests/transformers/qwen2moe/test_modeling.py15
LOWtests/transformers/qwen2_5_vl/test_modeling.py15
LOWtests/transformers/qwen2_5_vl/test_processor.py16
LOW…ts/transformers/ernie4_5_moe_vl/test_vision_process.py14
LOWtests/transformers/ernie4_5_moe_vl/test_modeling.py15
LOWtests/transformers/ernie4_5_moe_vl/test_processor.py14
LOWtests/transformers/glm_ocr/test_modeling.py15
LOWtests/transformers/glm_ocr/test_processor.py14
LOWtests/transformers/deepseek_v3/test_modeling.py15
LOWtests/transformers/glm_moe_dsa/test_modeling.py15
LOWtests/transformers/glm4v_moe/test_modeling.py15
LOWtests/transformers/glm4v_moe/test_processor.py16
LOWtests/transformers/qwen3_vl_moe/test_modeling.py15
LOWtests/transformers/glm4_moe/test_modeling.py15
LOWtests/transformers/qwen2_vl/test_vision_process.py16
LOWtests/transformers/qwen2_vl/test_processor.py16
LOWtests/transformers/qwen2_vl/test_video_processor.py16
LOWtests/transformers/qwen3next/test_modeling.py15
LOWtests/transformers/ernie4_5/test_modeling.py15
LOWtests/transformers/paddleocr_vl/test_modeling.py15
LOWtests/transformers/paddleocr_vl/test_processor.py15
LOWtests/transformers/llama/test_modeling.py15
LOWtests/transformers/qwen3_vl/test_modeling.py15
LOWtests/transformers/qwen3_vl/test_processor.py16
LOWtests/transformers/qwen3_vl/test_modeling_fleet.py14
LOWtests/transformers/qwen3_vl/test_video_processor.py16
LOWexamples/experiments/deepseek_v3_pretrain/moe_layer.py17
LOWexamples/experiments/deepseek_v3_pretrain/moe_gate.py17
LOWexamples/experiments/deepseek_v3_pretrain/modeling.py22
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py86
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py87
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py88
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py89
LOW…es/experiments/deepseek_v3_pretrain/config/__init__.py90
LOW…es/experiments/ernie_pretrain/models/ernie/__init__.py16
LOW…es/experiments/ernie_pretrain/models/ernie/__init__.py17
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py15
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py16
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py17
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py18
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py19
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py19
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py20
LOW…riments/ernie_pretrain/ernie/src/callbacks/__init__.py21
543 more matches not shown…
Self-Referential Comments86 hits · 260 pts
SeverityFileLineSnippet
MEDIUMtests/nn/test_mlp.py25 # Create a mock config with default values
MEDIUMtests/nn/test_attention.py267 # Create the ground truth dense causal mask for the naive implementation
MEDIUMtests/nn/test_attention.py297 # Create the ground truth dense mask from the FlashMask sparse format
MEDIUMtests/ai_edited_test/nn/test_ai_pp_model.py401 # Create a config where head_dim attribute doesn't exist at all,
MEDIUMtests/ai_edited_test/nn/test_ai_pp_model.py691 # Create a mock layer that has a weight attribute
MEDIUMtests/ai_edited_test/datasets/test_ai_mm_plugin.py188 # Create a new plugin class
MEDIUMtests/ai_edited_test/utils/test_ai_doc_parser.py46 # Create a temp file with content < 1024 chars
MEDIUMtests/ai_edited_test/utils/test_ai_aistudio_download.py237 # Create the expected cache structure
MEDIUMtests/ai_edited_test/utils/test_ai_optimizer.py28 # Create a simple model and optimizer so we can call the method
MEDIUMtests/ai_edited_test/utils/test_ai_image_utils.py63 # Create a simple test image and its base64 encoding
MEDIUMtests/ai_edited_test/cli/test_ai_ernie_top2_gate.py128 # Create a near-orthogonal weight matrix
MEDIUMtests/ai_edited_test/cli/test_ai_dataset_formatting.py180 # Create a dataset with unsupported features
MEDIUMtests/ai_edited_test/cli/test_ai_cli.py54 # Create the partial after mocking print
MEDIUMtests/ai_edited_test/peft/test_ai_loraga_utils.py105 # Create a mock LoRA module
MEDIUM…s/ai_edited_test/transformers/test_ai_moe_gate_auto.py140 # Create a weight parameter for the gate
MEDIUM…_edited_test/transformers/test_ai_kimi_k2_tokenizer.py27 # Create a minimal tiktoken model file for testing
MEDIUMtests/ai_edited_test/trainer/test_ai_timer.py172 # Create a _Timer first
MEDIUMtests/ai_edited_test/trainer/test_ai_timer.py184 # Create a distinct class to force type mismatch
MEDIUMtests/transformers/test_processing_common.py379 # Define the kwargs for each modality
MEDIUMtests/transformers/test_processing_common.py400 # Define the kwargs for each modality
MEDIUMtests/transformers/test_processing_common.py570 # Define the kwargs for each modality
MEDIUMtests/transformers/test_processing_common.py591 # Define the kwargs for each modality
MEDIUMtests/transformers/ernie4_5_moe_vl/test_processor.py461 # Define the kwargs for each modality
MEDIUMtests/transformers/ernie4_5_moe_vl/test_processor.py477 # Define the kwargs for each modality
MEDIUMtests/trainer/test_trainer_callback.py16# This file is modified from
MEDIUMexamples/experiments/paddlefleet/run_pretrain.py614 # Create the learning_rate sheduler and optimizer
MEDIUM…mples/experiments/deepseek_v3_pretrain/run_pretrain.py577 # Create the learning_rate sheduler and optimizer
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_utils.py118 # Create an output tensor filled with zeros
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_utils.py335 # Create an output tensor filled with zeros
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_gate.py186 # Create a mask for 1st's expert per token
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_gate.py252 # Create a mask for 1st's expert per token.
MEDIUMexamples/experiments/deepseek_v3_pretrain/moe_gate.py257 # Create a mask for 2nd's expert per token using Gumbel-max trick.
MEDIUMscripts/iluvatar_ci/test_ernie_21b_sft.py27 # Define the exact shell command to execute
MEDIUMscripts/xpu_ci/test_ernie_21b_sft.py27 # Define the exact shell command to execute
MEDIUMscripts/xpu_ci/test_ernie_28b_thinking_sft.py27 # Define the exact shell command to execute
MEDIUMscripts/codestyle/check_dead_links.py118 # Create the symlink
MEDIUM.github/workflows/cherry-pick.yml97 # Create a new branch for the cherry-pick
MEDIUMpaddleformers/datasets/template/mm_plugin.py561 # Create an image with a white background and the same size as the original image
MEDIUMpaddleformers/utils/download/common.py310 # Create a factory function that returns a Session with configured proxies
MEDIUMpaddleformers/cli/cli.py94 # Create a default GPU list string (e.g., "0,1,2" for 3 GPUs)
MEDIUM…dleformers/cli/train/deepseek_v3_pretrain/moe_utils.py118 # Create an output tensor filled with zeros
MEDIUM…dleformers/cli/train/deepseek_v3_pretrain/moe_utils.py335 # Create an output tensor filled with zeros
MEDIUM…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py186 # Create a mask for 1st's expert per token
MEDIUM…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py252 # Create a mask for 1st's expert per token.
MEDIUM…ddleformers/cli/train/deepseek_v3_pretrain/moe_gate.py257 # Create a mask for 2nd's expert per token using Gumbel-max trick.
MEDIUM…ddleformers/cli/train/deepseek_v3_pretrain/workflow.py507 # Create the learning_rate sheduler and optimizer
MEDIUMpaddleformers/cli/train/auto_parallel/workflow.py320 # Create the learning_rate scheduler and optimizer
MEDIUMpaddleformers/cli/train/sft/workflow.py692 # Create the learning_rate sheduler and optimizer
MEDIUMpaddleformers/transformers/video_utils.py220 # Create a batched list from single object
MEDIUMpaddleformers/transformers/image_transforms.py722 # Create the outer list
MEDIUMpaddleformers/transformers/moe_utils.py66 # Create a dense expert-to-token mapping from the sparse token-to-expert mapping
MEDIUMpaddleformers/transformers/moe_utils.py109 # Create an output tensor filled with zeros
MEDIUMpaddleformers/transformers/processing_utils.py471 # Create a unified `preprocessor_config.json` and save all attributes as a composite config, except for toke
MEDIUMpaddleformers/transformers/image_processing_utils.py53 # Define the key methods that should support Paddle tensor return types.
MEDIUMpaddleformers/transformers/moe_gate.py345 # Create a mask for 1st's expert per token
MEDIUMpaddleformers/transformers/moe_gate.py413 # Create a mask for 1st's expert per token.
MEDIUMpaddleformers/transformers/moe_gate.py418 # Create a mask for 2nd's expert per token using Gumbel-max trick.
MEDIUMpaddleformers/transformers/moe_gate_auto.py348 # Create a mask for 1st's expert per token
MEDIUMpaddleformers/transformers/moe_gate_auto.py414 # Create a mask for 1st's expert per token.
MEDIUMpaddleformers/transformers/moe_gate_auto.py419 # Create a mask for 2nd's expert per token using Gumbel-max trick.
26 more matches not shown…
Docstring Block Structure47 hits · 235 pts
SeverityFileLineSnippet
HIGHexamples/experiments/deepseek_v3_pretrain/fp8_linear.py57 Applies a linear transformation to the incoming data: y = xA^T + b. This function supports specialized implemen
HIGHexamples/experiments/deepseek_v3_pretrain/kernel.py101 Dequantizes the given weight tensor using the provided scale tensor. Args: x (paddle.Tensor): The quant
HIGH…rnie_pretrain/models/moe/token_dispatcher/moe_utils.py110Permute tokens based on expert assignment indices. Args: tokens (paddle.Tensor): Input tokens to be permute
HIGH…rnie_pretrain/models/moe/token_dispatcher/moe_utils.py136Restore original token order from permuted tokens. Args: permuted_tokens (paddle.Tensor): Permuted tokens t
HIGHscripts/regression/test_models.py116Load model configuration from YAML file. Args: model_key: The model identifier to load configuratio
HIGHpaddleformers/nn/pp_model.py114 Determines the layer partitioning scheme for Pipeline Parallelism (PP) and Virtual Pipeline Parallelism (VP) wi
HIGHpaddleformers/nn/attention/sink_impl.py561 A unified, high-performance attention implementation with Sink mechanism support. This function automatically
HIGHpaddleformers/datasets/data_utils.py119Convert batch dialogue into input_ids. The API support multiple data format: `pt`, `sft. Args: dials (
HIGHpaddleformers/datasets/DPODataset.py161Generate packed sequences using greedy strategy. Args: examples: List of examples to pack.
HIGHpaddleformers/datasets/DPODataset.py187Preprocess DPO training examples Args: example: Raw training example containing: -
HIGHpaddleformers/utils/downloader.py94Get weights path from WEIGHT_HOME, if not exists, download it from url. Args: url (str): download url
HIGHpaddleformers/utils/tools.py148 Args: version (str): The first version string needed to be compared. The format of version stri
HIGHpaddleformers/utils/distributed.py167nested all gather function with offload Args: tensor (Any): the desired tensor, list of tensor, dict of ten
HIGHpaddleformers/utils/download/aistudio_hub_download.py628 Checks if a file exists in a repository on the Aistudio Hub. Args: repo_id (`str`): A name
HIGHpaddleformers/cli/hparams/parser.py120_summary_ Args: parser (PdArgumentParser): _description_ args (Optional[Union[dict[str, Any], list[
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 implemen
HIGHpaddleformers/cli/train/deepseek_v3_pretrain/kernel.py101 Dequantizes the given weight tensor using the provided scale tensor. Args: x (paddle.Tensor): The quant
HIGH…rnie_pretrain/models/moe/token_dispatcher/moe_utils.py110Permute tokens based on expert assignment indices. Args: tokens (paddle.Tensor): Input tokens to be permute
HIGH…rnie_pretrain/models/moe/token_dispatcher/moe_utils.py136Restore original token order from permuted tokens. Args: permuted_tokens (paddle.Tensor): Permuted tokens t
HIGHpaddleformers/transformers/configuration_utils.py1070 Instantiate a [`PretrainedConfig`] (or a derived class) from a pretrained model configuration. Args:
HIGHpaddleformers/transformers/model_utils.py211 This function chunks the `input_tensors` into smaller input tensor parts of size `chunk_size` over the dimension
HIGHpaddleformers/transformers/feature_extraction_utils.py231 Instantiate a type of [`~feature_extraction_utils.FeatureExtractionMixin`] from a feature extractor, *e.g.* a
HIGHpaddleformers/transformers/fp8_utils.py211 FP8 Linear computation function supporting multiple return modes and quantized/unquantized inputs. Arg
HIGHpaddleformers/transformers/conversion_utils.py1400get name mapping of PretrainedModel Args: config (PretrainedConfig): the configuration of name-mapp
HIGHpaddleformers/transformers/conversion_utils.py1526get fused parameter mapping of PretrainedModel Args: config (PretrainedConfig): the configuration o
HIGHpaddleformers/transformers/utils.py511 Tries to locate a file in a local folder and repo, downloads and cache it if necessary. Args: path_or_r
HIGHpaddleformers/transformers/auto/video_processing.py87 Loads the video processor configuration from a pretrained model video processor configuration. Args: p
HIGHpaddleformers/transformers/auto/feature_extraction.py91 Loads the feature extractor configuration from a pretrained model feature extractor configuration. Args:
HIGHpaddleformers/transformers/auto/tokenizer.py65 Loads the tokenizer configuration from a pretrained model tokenizer configuration. Args: pretrained_mo
HIGHpaddleformers/transformers/auto/image_processing.py107 Loads the image processor configuration from a pretrained model image processor configuration. Args: p
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 to
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
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 to
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:
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:
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) wi
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.
HIGH…ernie4_5_moe_vl/model/distributed/common_dist_utils.py83 Performs parallel matrix multiplication with tensor model parallelism support. Args: x (paddle.Tensor)
HIGH…rmers/transformers/ernie4_5_moe_vl/model/utils/misc.py89TrainingLogs Args: object (_type_): _description_ Raises: AttributeError: _description_ R
HIGH…rmers/transformers/ernie4_5_moe_vl/model/utils/misc.py170gate attr Args: attr (_type_): _description_ Raises: AttributeError: _descript
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 t
HIGHpaddleformers/transformers/glm4v_moe/modeling.py1340 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:
HIGHpaddleformers/transformers/qwen2_vl/vision_process.py162calculate the number of frames for video used for model inputs. Args: ele (dict): a dict contains the confi
HIGHpaddleformers/transformers/qwen2_vl/vision_process.py202 Calculate the start and end frame indices based on the given time range. Args: ele (dict): A dictionar
HIGHpaddleformers/transformers/paddleocr_vl/modeling.py1798 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:
HIGHpaddleformers/data/causal_dataset.py36 Retrieve logits with retry mechanism if no response is received within the specified time Parameters:
HIGHpaddleformers/generation/configuration_utils.py346 Instantiate a [`GenerationConfig`] from a generation configuration file. Args: pretrained_
Excessive Try-Catch Wrapping159 hits · 183 pts
SeverityFileLineSnippet
LOWsetup.py220except Exception as e:
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py125 except Exception:
LOWtests/ai_edited_test/datasets/test_ai_template.py291 except Exception:
LOWtests/ai_edited_test/cli/test_ai_ernie_moe_utils.py66 except Exception:
LOW…sts/ai_edited_test/cli/test_ai_tensorboard_callback.py109 except Exception:
LOWtests/ai_edited_test/cli/test_ai_deepseek_v3_kernel.py46 except Exception:
LOWtests/ai_edited_test/cli/test_ai_deepseek_v3_kernel.py85except Exception as e:
LOW…_edited_test/transformers/test_ai_kimi_k2_tokenizer.py162 except Exception:
LOW…_edited_test/transformers/test_ai_kimi_k2_tokenizer.py170 except Exception:
LOWtests/peft/test_lora.py213 except Exception as e:
LOWtests/peft/test_lora.py283 except Exception as e:
LOWtests/transformers/qwen3_vl/test_modeling_fleet.py33except Exception as error:
LOWdocs/zh/custom_datasets_format_zh.md14 except Exception:
MEDIUMdocs/zh/custom_datasets_format_zh.md9def load_parquet(file_path):
LOW…mples/experiments/deepseek_v3_pretrain/load_hf_ckpt.py369 except Exception as e:
LOW…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py612 except Exception:
MEDIUM…rnie_pretrain/tools/sharded_to_uc/merge_sharding_ep.py614 print("Error !!!!")
LOWexamples/experiments/ernie_pretrain/ernie/pretrain.py539 except Exception:
LOW…e_pretrain/ernie/src/callbacks/tensorboard_callback.py25except Exception:
LOWexamples/best_practices/PaddleOCR-VL/README.md565 except Exception:
LOWexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md153 except Exception:
LOWexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md231 except Exception:
LOWexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md950 except Exception:
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md146def download_image_cv2(url):
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md151 except Exception as e:
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md178 except Exception as e:
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md195 except Exception as e:
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md296 except Exception as e:
MEDIUM…ces/tutorials/how_to_train_a_visual_grounding_model.md678 print(f"Error: Image not found at: {full_image_path}")
LOW…ces/tutorials/how_to_train_a_visual_grounding_model.md688 except Exception as e:
LOWscripts/ci_utils/training_utils.py92 except Exception as e:
LOWscripts/codestyle/check_dead_links.py68 except Exception as e:
MEDIUMscripts/codestyle/check_dead_links.py69 print(f"Error reading {file_path}: {e}")
MEDIUMscripts/regression/merge_configs.py210 print(f"Error: {origin_config_path} does not exist")
MEDIUMscripts/regression/merge_configs.py214 print(f"Error: {update_config_path} does not exist")
LOWscripts/regression/test_models.py212 except Exception as e:
LOWscripts/regression/test_models.py235 except Exception as e:
LOWscripts/regression/test_models.py634 except Exception as e:
MEDIUM.github/workflows/cleanup_ci_gists.yml55 print(f"Error: API returned {resp.status_code}: {resp.text}")
LOW.github/workflows/cleanup_ci_gists.yml60 except Exception as e:
MEDIUM.github/workflows/cleanup_ci_gists.yml61 print(f"Error parsing JSON: {e}")
LOWpaddleformers/nn/pp_model.py651 except Exception:
LOWpaddleformers/nn/moe_deepep/modular_moe_layer.py86 except Exception:
MEDIUMpaddleformers/datasets/SFTDataset.py239def _rss_mb():
LOWpaddleformers/datasets/SFTDataset.py217 except Exception as e:
LOWpaddleformers/datasets/SFTDataset.py221 except Exception:
LOWpaddleformers/datasets/SFTDataset.py245 except Exception:
LOWpaddleformers/datasets/SFTDataset.py320 except Exception as e:
LOWpaddleformers/datasets/SFTDataset.py773 except Exception:
LOWpaddleformers/datasets/SFTDataset.py1063 except Exception as e:
LOWpaddleformers/datasets/SFTDataset.py1085 except Exception as e:
LOWpaddleformers/datasets/SFTDataset.py1118 except Exception:
LOWpaddleformers/datasets/SFTDataset.py1157 except Exception:
LOWpaddleformers/datasets/DPODataset.py104 except Exception as e:
LOWpaddleformers/datasets/DPODataset.py122 except Exception as e:
LOWpaddleformers/datasets/DPODataset.py143 except Exception as e:
LOWpaddleformers/datasets/reader/file_reader.py119 except Exception as e:
LOWpaddleformers/datasets/reader/io.py74 except Exception as e:
MEDIUMpaddleformers/datasets/reader/io.py47def load_txt(file_path):
MEDIUMpaddleformers/datasets/reader/mix_datasets.py271 print(f"Error: cannot find class named '{class_name}'.")
99 more matches not shown…
Decorative Section Separators50 hits · 182 pts
SeverityFileLineSnippet
MEDIUMtests/dataset/test_collate.py44# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py46# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py64# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py66# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py80# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py82# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py99# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py101# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py122# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py132# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py141# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py143# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py179# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py181# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py224# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py226# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py231# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py29# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_collate.py31# ---------------------------------------------------------------------------
MEDIUMtests/dataset/test_mix_datasets.py35# ===========================================================================
MEDIUMtests/dataset/test_mix_datasets.py37# ===========================================================================
MEDIUMtests/dataset/test_mix_datasets.py211# ===========================================================================
MEDIUMtests/dataset/test_mix_datasets.py213# ===========================================================================
MEDIUMtests/transformers/glm_ocr/test_modeling.py635 # -------------------------
MEDIUMtests/transformers/glm_ocr/test_modeling.py637 # -------------------------
MEDIUMtests/transformers/glm_ocr/test_modeling.py665 # -------------------------
MEDIUMtests/transformers/glm_ocr/test_modeling.py668 # -------------------------
MEDIUMtests/transformers/glm_ocr/test_modeling.py709 # -------------------------
MEDIUMtests/transformers/glm_ocr/test_modeling.py711 # -------------------------
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/table_ocr.md135# ==========================================
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/table_ocr.md137# ==========================================
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/table_ocr.md285# ==========================================
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/table_ocr.md287# ==========================================
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md140# ==========================================
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md334# ==========================================
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md336# ==========================================
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md484# ==========================================
MEDIUMexamples/best_practices/PaddleOCR-VL-1.5/region_ocr.md486# ==========================================
MEDIUM.github/workflows/formers_bot_analysis.yml86 # ── 定时触发路径 ──────────────────────────────────────────────────
MEDIUM.github/workflows/formers_bot_analysis.yml114 # ── PR 触发路径 ───────────────────────────────────────────────────
MEDIUM.github/workflows/formers_bot_analysis.yml297 # ── 写入 GITHUB_OUTPUT,供 report-to-monitor 步骤读取 ──────────
MEDIUMpaddleformers/utils/upcast_downcast_triton.py352# -----------------------------------------------------------------------------
MEDIUMpaddleformers/utils/upcast_downcast_triton.py354# -----------------------------------------------------------------------------
MEDIUMpaddleformers/utils/upcast_downcast_triton.py476# ------------
MEDIUMpaddleformers/transformers/aoa_config_base.py525 # ==================================================================
MEDIUMpaddleformers/transformers/aoa_config_base.py527 # ==================================================================
MEDIUMpaddleformers/transformers/paddleocr_vl/modeling.py870 # ==========================================
MEDIUMpaddleformers/transformers/paddleocr_vl/modeling.py872 # ==========================================
MEDIUMpaddleformers/transformers/paddleocr_vl/modeling.py905 # ==========================================
MEDIUMpaddleformers/transformers/paddleocr_vl/modeling.py907 # ==========================================
Cross-Language Confusion16 hits · 88 pts
SeverityFileLineSnippet
HIGH…ai_edited_test/transformers/test_ai_longcontext_ops.py33 heap.push((0, 5))
HIGH…ai_edited_test/transformers/test_ai_longcontext_ops.py34 heap.push((1, 3))
HIGH…ai_edited_test/transformers/test_ai_longcontext_ops.py35 heap.push((2, 8))
HIGHscripts/regression/test_models.py673 subprocess.run("pkill -9 -f 'paddleformers/cli/launcher.py' 2>/dev/null || true", shell=True)
HIGHpaddleformers/quantization/quantization_linear.py332 "2) cd PaddleSlim && pip install -e .\n"
HIGHpaddleformers/quantization/quantization_linear.py333 "3) cd csrc && python ./setup_cuda.py install"
HIGHpaddleformers/quantization/quantization_linear.py522 "2) cd PaddleSlim && pip install -e .\n"
HIGHpaddleformers/quantization/quantization_linear.py523 "3) cd csrc && python ./setup_cuda.py install"
HIGHpaddleformers/quantization/quantization_linear.py761 "2) cd PaddleSlim && pip install -e .\n"
HIGHpaddleformers/quantization/quantization_linear.py762 "3) cd csrc && python ./setup_cuda.py install"
HIGHpaddleformers/transformers/video_utils.py323 f" 1. Install dependencies: `conda install ffmpeg -c conda-forge` or `apt-get update && apt-get install f
HIGHpaddleformers/transformers/audio_processing_utils.py23 print("need to install audioread and librosa. Please try: pip install audioread && pip install librosa")
HIGHpaddleformers/transformers/kimi_k25/media_utils.py103 f" 1. Install dependencies: `conda install ffmpeg -c conda-forge` or `apt-get update && apt-get install f
HIGH…/transformers/ernie4_5_moe_vl/model/longcontext_ops.py134 surplus_piles.push([src_rank, surplus - move_amount])
HIGH…/transformers/ernie4_5_moe_vl/model/longcontext_ops.py136 deficit_piles.push([dst_rank, deficit - move_amount])
HIGHpaddleformers/transformers/qwen2_vl/vision_process.py286 f" 1. Install dependencies: `conda install ffmpeg -c conda-forge` or `apt-get update && apt-get install f
Redundant / Tautological Comments51 hits · 74 pts
SeverityFileLineSnippet
LOWtests/transformers/test_video_processing_common.py277 # Set sampling to True. Video frames should be sampled with `num_frames` in the output
LOWtests/transformers/test_cache_utils.py424 # Check if they are on the same device as the model parameters
LOWtests/transformers/qwen2_vl/test_video_processor.py302 # Set sampling to True. Video frames should be sampled with `num_frames` in the output
LOWscripts/regression/prepare_datasets.py95 # Check if already exists
LOWscripts/regression/ci_model_unittest.sh134 # Check if file is in transformer directories (don't check file existence, rely on git diff)
LOW.github/workflows/cherry-pick.yml90 # Check if target branch exists on remote
LOW.github/workflows/cherry-pick.yml154 # Check if PR already exists
LOW.github/workflows/_xpu_ci_test.yml60 # Check if anything matching ${REPO_NAME}* still exists
LOWpaddleformers/datasets/dataset.py206 # Check if selected name and split is valid in this DatasetBuilder
LOWpaddleformers/datasets/SFTDataset.py399 # Set flag to False and yield empty list to signal the end of estimation
LOWpaddleformers/datasets/SFTDataset.py436 # Set flag to False and yield empty list to signal the end of estimation
LOWpaddleformers/datasets/SFTDataset.py468 # Set flag to False and yield empty list to signal the end of estimation
LOWpaddleformers/datasets/SFTDataset.py499 # Set flag to False and yield empty list to signal the end of estimation
LOWpaddleformers/datasets/SFTDataset.py540 # Set flag to False and yield empty list to signal the end of estimation
LOWpaddleformers/datasets/DPODataset.py218 # Check if multimedia tags are included in "messages"+"chosen_response", and "messages"+"rejected_response"
LOWpaddleformers/utils/upcast_downcast_triton.py726 # # Check if blocks and scales are on CPU, and move to GPU if so
LOWpaddleformers/utils/import_utils.py118 # Check if the package spec exists and grab its version to avoid importing a local directory
LOWpaddleformers/utils/import_utils.py131 # Check if the version contains "dev"
LOWpaddleformers/utils/import_utils.py161 # Check if the package spec exists and grab its version to avoid importing a local directory
LOWpaddleformers/utils/import_utils.py174 # Check if the version contains "dev"
LOWpaddleformers/utils/download/aistudio_hub_download.py714 # Check if file is cached as "no_exist"
LOWpaddleformers/utils/download/aistudio_hub_download.py718 # Check if revision folder exists
LOWpaddleformers/utils/download/aistudio_hub_download.py726 # Check if file exists in cache
LOWpaddleformers/cli/export/export.py97 # Check if the output directory is a valid model directory (contains .safetensors or .pdparams files)
LOWpaddleformers/transformers/model_utils.py1741 # Check if README file already exist in repo
LOWpaddleformers/transformers/model_utils.py3009 # Check if `_keep_in_fp32_modules` is not None
LOW…dleformers/transformers/image_processing_utils_fast.py605 # Check if we have nested structure, assuming the nesting is consistent
LOWpaddleformers/transformers/image_utils.py752 # Check if image is in (n_channels, height, width) or (height, width, n_channels) format
LOWpaddleformers/transformers/image_utils.py762 # Check if cropped area is within image boundaries
LOWpaddleformers/transformers/image_transforms.py438 # Check if cropped area is within image boundaries
LOWpaddleformers/transformers/feature_extraction_utils.py174 # Check if the args are a device or a dtype
LOWpaddleformers/transformers/processing_utils.py913 # Check if tokenizer is fast - use backend attribute if available, otherwise fall back to class name
LOWpaddleformers/transformers/utils.py690 # Check if the model is already cached or not. We only try the last checkpoint, this should cover most cases of
LOWpaddleformers/transformers/gpt_provider.py210 # Check if mtp_block_spec parameter is supported
LOWpaddleformers/transformers/masking_utils.py247 # Check if the mask can be safely skipped
LOWpaddleformers/transformers/kimi_k2/modeling.py186 # Check if mtp_block_spec parameter is supported
LOWpaddleformers/transformers/kimi_k2/modeling.py228 # Check if mtp_block_spec parameter is supported
LOW…dleformers/transformers/legacy/tokenizer_utils_base.py1981 # Check if README file already exist in repo
LOWpaddleformers/transformers/ernie4_5_moe_vl/tokenizer.py240 # Check if padding is needed
LOW…ddleformers/transformers/qwen3_vl_moe/configuration.py320 # Check if the attribute exists in sub-configs
LOW…ddleformers/transformers/qwen3_vl_moe/configuration.py356 # Check if user has set a top-level override
LOWpaddleformers/transformers/qwen3_vl/configuration.py309 # Check if the attribute exists in sub-configs
LOWpaddleformers/transformers/qwen3_vl/configuration.py345 # Check if user has set a top-level override
LOWpaddleformers/data/data_collator.py571 # Check if padding is necessary.
LOWpaddleformers/data/data_collator.py607 # Check if padding is necessary.
LOWpaddleformers/trainer/trainer.py1950 # Check if continuing training from a checkpoint
LOWpaddleformers/trainer/trainer.py4301 # Check if we should delete older checkpoint(s)
LOWpaddleformers/trainer/trainer.py4327 # Check if we should delete older hf checkpoint(s)
LOWpaddleformers/trainer/trainer.py4914 # Set back to None to begin a new accumulation
LOWpaddleformers/trainer/integrations.py287 # Check if a Weights & Biases (wandb) API key is provided in the training arguments
LOWpaddleformers/generation/utils.py282 # Check if we are done so that we can save a pad step if all(done)
Verbosity Indicators38 hits · 65 pts
SeverityFileLineSnippet
LOWtests/nn/test_attention.py163 # Step 1: Reshape tensors from [B, S, H, D] to [B, H, S, D] for matrix multiplication
LOWtests/nn/test_attention.py168 # Step 2: Transpose key for matmul: [B, H, S, D] -> [B, H, D, S]
LOWtests/nn/test_attention.py171 # Step 3: Calculate attention scores (Query @ Key^T) and apply scaling
LOWtests/nn/test_attention.py174 # Step 4: Apply the attention mask if provided
LOWtests/nn/test_attention.py179 # Step 5: Prepare and concatenate the sink logits. The sink is a special token
LOWtests/nn/test_attention.py184 # Step 6: Apply softmax over the combined logits (scores + sink)
LOWtests/nn/test_attention.py188 # Step 7: Separate the attention probabilities from the sink probabilities
LOWtests/nn/test_attention.py191 # Step 8: Apply dropout to the scores
LOWtests/nn/test_attention.py194 # Step 9: Compute the weighted sum of values (Scores @ Value)
LOWtests/nn/test_attention.py197 # Step 10: Reshape the output back to [B, S, H, D] and flatten the head dimension
LOWpaddleformers/datasets/dataset.py669 # We need to check if the example contains label column and confirm its name.
LOWpaddleformers/datasets/dataset.py705 # We need to check if the example contains label column and confirm its name.
LOWpaddleformers/transformers/minimax_m2/modeling.py953 # Step 1: Transpose fleet weight
LOWpaddleformers/transformers/minimax_m2/modeling.py956 # Step 2: Split into per-group chunks along axis=0
LOWpaddleformers/transformers/minimax_m2/modeling.py978 # Step 3: Reassemble q_proj (interleaved Q+Gate)
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 style
LOWpaddleformers/transformers/deepseek_v4/modeling.py943 # Step 1: split up_gate_proj back to w1/w3 (intermediate, no transpose yet)
LOWpaddleformers/transformers/deepseek_v4/modeling.py949 # Step 2: transpose each piece to HF shape
LOWpaddleformers/transformers/qwen3_5/modeling.py254 # Step 1: Split q_proj into 2*num_heads equal chunks (each = head_dim)
LOWpaddleformers/transformers/qwen3_5/modeling.py259 # Step 2: Split k_proj and v_proj into num_kv_heads chunks
LOWpaddleformers/transformers/qwen3_5/modeling.py264 # Step 3: Assemble per-group in fleet order and concat
LOWpaddleformers/transformers/qwen3_5/modeling.py279 # Step 4: Transpose the fused weight
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=0
LOWpaddleformers/transformers/qwen3_5/modeling.py335 # Step 2: 6 sources (q, k, v, z, b, a) → fused_in_proj with TP interleaving
LOWpaddleformers/transformers/qwen3_5/modeling.py339 # Step 3: Transpose to Fleet layout [hidden, in_proj_dim]
LOWpaddleformers/transformers/qwen3_5/modeling.py624 # Step 1: Transpose fleet weight [in, out] -> [out, in]
LOWpaddleformers/transformers/qwen3_5/modeling.py627 # Step 2: Split into per-group chunks along axis=0
LOWpaddleformers/transformers/qwen3_5/modeling.py644 # Step 3: Reassemble into HF format
LOWpaddleformers/trainer/utils/offload_optimizer.py46 # Step 1: mock _add_accumulator
LOWpaddleformers/trainer/utils/offload_optimizer.py56 # Step 2: mock _C_ops.adamw_ and _C_ops.adamw
LOWpaddleformers/trainer/utils/offload_optimizer.py77 # Step 3: mock _insert_sync
LOWpaddleformers/trainer/utils/offload_optimizer.py95 # Step 4: mock Muon._muon_update and Muon._apply_optimize
LOWpaddleformers/trainer/utils/offload_optimizer.py177 # Step 1: mock _add_accumulator
LOWpaddleformers/trainer/utils/offload_optimizer.py187 # Step 2: mock _C_ops.adamw_ and _C_ops.adamw
LOWpaddleformers/trainer/utils/offload_optimizer.py207 # Step 3: mock _insert_sync
LOWpaddleformers/trainer/utils/offload_optimizer.py225 # Step 4: mock Muon._muon_update and Muon._apply_optimize
LOWpaddleformers/generation/utils.py389 # Step 1: Process input mask to generate basic expanded mask
LOWpaddleformers/generation/utils.py447 # Step 2: Convert boolean mask to numerical mask (adapt to different devices)
Dead Code26 hits · 52 pts
SeverityFileLineSnippet
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py77
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py79
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py80
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py85
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py90
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py91
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py99
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py111
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py112
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py116
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py117
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py118
MEDIUM…e_pretrain/ernie/src/callbacks/moe_logging_callback.py120
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py78
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py80
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py81
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py86
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py91
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py92
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py100
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py112
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py113
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py117
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py118
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py119
MEDIUM…n/ernie_pretrain/src/callbacks/moe_logging_callback.py121
AI Slop Vocabulary5 hits · 10 pts
SeverityFileLineSnippet
MEDIUMtests/generation/test_logits_process.py330 # scores = 0 to facilitate checks
LOWpaddleformers/datasets/DPODataset.py386 # The sequnece is too long, just return None
LOWpaddleformers/peft/lora/lora_model.py101 # If paddle_xpu is not installed, just use PaddleFormers's native lora layers
LOWpaddleformers/transformers/linear_utils.py82 # If paddle_xpu is not installed, just use Paddle's native Linear implementations
MEDIUMpaddleformers/transformers/auto/tokenizer.py234 # First, let's see whether the tokenizer_type is passed so that we can leverage it
Slop Phrases4 hits · 5 pts
SeverityFileLineSnippet
LOWpaddleformers/nn/moe_deepep/modular_moe_layer.py314 # the current expert. We need to make sure to multiply the output hidden
LOWpaddleformers/transformers/qwen2_moe/modeling.py370 # the current expert. We need to make sure to multiply the output hidden
LOWpaddleformers/transformers/qwen3_moe/modeling.py368 # the current expert. We need to make sure to multiply the output hidden
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` if
Overly Generic Function Names3 hits · 4 pts
SeverityFileLineSnippet
LOWtests/ai_edited_test/nn/test_ai_loss_utils.py78 def my_function(x):
LOWtests/ai_edited_test/trainer/test_ai_zero_cost_ckpt.py109 def my_function(state_dict):
LOWpaddleformers/data/data_collator.py507 def process_data(self, data, pad_idx, max_len):
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippet
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 appl