A Next-Generation Training Engine Built for Ultra-Large MoE Models
This report summarizes scanner evidence for InternLM/xtuner, a Python project with 5,206 GitHub stars. SynthScan examined 355,777 lines of code across 1636 source files, recording 3429 pattern matches distributed across 24 syntactic categories. The legacy adjusted pattern signal is 13.7 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 1761 finding(s).
Are imports declared and package/API names verified? 962 finding(s).
Are wrappers, guards, and repeated structures necessary? 2055 finding(s).
Which changes need focused human review? 3429 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 3429 distinct pattern matches across 24 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | recipe/trace/viewer/server.py | 47 | def normalize_jaeger_query_url(jaeger_query_url: str | None) -> str | None: | CODE |
| LOW | recipe/trace/viewer/server.py | 125 | def fetch_rollout_view_payload_from_trace_jsonl( | CODE |
| LOW | recipe/trace/viewer/server.py | 150 | def start_rollout_trace_viewer( | CODE |
| LOW | recipe/trace/viewer/render.py | 10 | def render_rollout_trace_html( | CODE |
| LOW | recipe/trace/viewer/payload.py | 36 | def build_rollout_view_payload_from_jaeger_traces( | CODE |
| LOW | recipe/trace/viewer/payload.py | 174 | def load_jaeger_traces_from_otel_jsonl(trace_jsonl_path: Path | str) -> list[dict[str, Any]]: | CODE |
| LOW | recipe/trace/viewer/payload.py | 261 | def _jaeger_traces_from_json_record(record: dict[str, Any], *, context: str) -> list[dict[str, Any]] | None: | CODE |
| LOW | recipe/trace/viewer/payload.py | 289 | def _otel_span_to_jaeger_span( | CODE |
| LOW | recipe/trace/viewer/payload.py | 356 | def _otel_any_value_to_python(value: Any) -> Any: | CODE |
| LOW | recipe/trace/viewer/payload.py | 420 | def _has_finished_sample_root_span(spans: list[dict[str, Any]]) -> bool: | CODE |
| LOW | recipe/trace/viewer/payload.py | 457 | def _running_display_path_names(spans: list[dict[str, Any]]) -> list[str]: | CODE |
| LOW | recipe/trace/viewer/payload.py | 537 | def filter_rollout_view_payload_by_train_step(payload: dict[str, Any], train_step: Any = "latest") -> dict[str, Any]: | CODE |
| LOW | recipe/trace/viewer/payload.py | 587 | def _build_stage_duration_summaries(samples: list[dict[str, Any]]) -> list[dict[str, Any]]: | CODE |
| LOW | recipe/trace/viewer/payload.py | 650 | def _summarize_raw_span_durations(raw_durations: dict[str, list[float]]) -> list[dict[str, Any]]: | CODE |
| LOW | recipe/trace/viewer/payload.py | 703 | def _apply_sample_reward_filter(sample: dict[str, Any]) -> None: | CODE |
| LOW | recipe/trace/viewer/payload.py | 796 | def _stage_from_span_name_and_attributes(span_name: str, attributes: dict[str, Any] | None = None) -> str: | CODE |
| LOW | recipe/trace/viewer/payload.py | 958 | def _normalize_jaeger_query_url(jaeger_query_url: str | None) -> str | None: | CODE |
| LOW | …erl_agent/sandbox_example/test_verl_tool_agent_loop.py | 208 | def _setup_sandbox_and_verl_config(self): | CODE |
| LOW | …erl_agent/sandbox_example/test_verl_tool_agent_loop.py | 240 | async def test_verl_tool_agent_loop(self): | CODE |
| LOW | …erl_agent/sandbox_example/test_verl_tool_agent_loop.py | 313 | async def test_verl_tool_agent_loop_manager(self): | CODE |
| LOW | …n_policy_distillation/build_teacher_server_commands.py | 41 | def build_teacher_launch_server_commands( | CODE |
| LOW | …n_policy_distillation/build_teacher_server_commands.py | 153 | def _allocate_teacher_devices( | CODE |
| LOW | …n_policy_distillation/build_teacher_server_commands.py | 255 | def _allocate_teacher_server_port( | CODE |
| LOW | …n_policy_distillation/build_teacher_server_commands.py | 274 | def _get_teacher_server_paths( | CODE |
| LOW | tests/conftest.py | 26 | def _is_hf_dynamic_module_root(path: str) -> bool: | CODE |
| LOW | tests/conftest.py | 34 | def _cleanup_hf_dynamic_modules() -> None: | CODE |
| LOW | tests/loss/test_ce_loss.py | 38 | def test_global_loss_reduction(self, loss_mode, grad_accumulation_steps, chunk_size, atol, rtol): | CODE |
| LOW | tests/loss/test_ce_loss.py | 131 | def test_other_loss_reduction(self, loss_reduction, loss_mode, grad_accumulation_steps, chunk_size, atol, rtol): | CODE |
| LOW | tests/loss/test_ce_loss.py | 266 | def test_sp_global_loss_reduction(self, loss_mode, sp_size, grad_accumulation_steps, chunk_size, atol, rtol): | CODE |
| LOW | tests/loss/test_ce_loss.py | 341 | def test_sp_others_loss_reduction(self, loss_reduction, loss_mode, sp_size, grad_accumulation_steps, chunk_size, ato | CODE |
| LOW | tests/loss/test_aux_loss.py | 49 | def test_grouped_router_assignments_are_counted(self): | CODE |
| LOW | tests/loss/test_aux_loss.py | 71 | def test_rollout_assignments_are_counted(self): | CODE |
| LOW | tests/loss/test_chunk_loss.py | 24 | def test_chunk_loss_matches_reference_with_trainable_head(): | CODE |
| LOW | tests/loss/test_chunk_loss.py | 54 | def test_chunk_loss_skips_weight_grad_allocation_for_detached_head(): | CODE |
| LOW | tests/float8/triton_kernels/test_import.py | 23 | def test_cpu_actor_triton_kernels_import(self): | CODE |
| LOW | tests/module/test_grouped_linear.py | 27 | def test_grouped_gemm_switch_selects_implementation( | CODE |
| LOW | tests/module/test_dense_decoder_layer.py | 59 | def test_batched_inputs_match_independent_forwards(self): | CODE |
| LOW | tests/module/test_rope.py | 33 | def test_fope_init_sin_coef_same(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 50 | def _tilelang_sparse_mla_available() -> bool: | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 64 | def _cudnn_dsa_sparse_mla_available() -> bool: | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 91 | def _tilelang_sparse_mla_inputs(): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 99 | def _cudnn_dsa_sparse_mla_inputs(): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 205 | def test_torch_indexer_matches_raw_gate_reference(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 279 | def test_packed_inputs_respect_causal_boundaries_and_backward(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 306 | def test_indexer_freeze_contract(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 316 | def test_shared_layer_consumes_explicit_topk_ids(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 339 | def test_checkpoint_reuses_source_topk_storage(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 378 | def test_absorbed_attention_matches_unabsorbed_mla(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 399 | def test_compiled_attention_matches_eager(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 424 | def test_packed_attention_matches_full_sequence(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 480 | def test_tilelang_indexer_matches_torch(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 521 | def test_cudnn_local_query_global_kv_matches_full_sequence(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 569 | def test_tilelang_forward_backward_matches_torch(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 600 | def test_cudnn_forward_backward_matches_torch(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 632 | def test_compiled_cudnn_backward_matches_tilelang(self): | CODE |
| LOW | tests/module/dispatcher/test_agrs_all2all.py | 24 | def test_dispatch_and_combine(self, dtype, device): | CODE |
| LOW | …dule/dispatcher/test_torch_all2all_shared_expert_tp.py | 101 | def _record_shared_expert_tp_stages(dispatcher: TorchAll2AllDispatcher) -> dict[str, list[str | int]]: | CODE |
| LOW | …dule/dispatcher/test_torch_all2all_shared_expert_tp.py | 156 | def _assert_shared_expert_tp_async_stages( | CODE |
| LOW | tests/module/dispatcher/test_noep.py | 20 | def test_dispatch_and_combine(self, dtype, device): | CODE |
| LOW | tests/module/dispatcher/test_deepep.py | 29 | def test_dispatch_and_combine(self, dtype, device, async_op): | CODE |
| 1191 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ci/config/qwen3_5_moe_35BA3.py | 11 | CODE | |
| LOW | ci/scripts/xtuner_unittest.py | 10 | CODE | |
| LOW | ci/scripts/test_sft_trainer.py | 15 | CODE | |
| LOW | ci/scripts/test_sft_trainer.py | 20 | CODE | |
| LOW | ci/scripts/test_sft_trainer_235B.py | 9 | CODE | |
| LOW | ci/scripts/test_sft_trainer_235B.py | 22 | CODE | |
| LOW | ci/scripts/test_sft_trainer_235B.py | 23 | CODE | |
| LOW | ci/scripts/test_sft_trainer_235B.py | 26 | CODE | |
| LOW | ci/scripts/test_sft_dense_trainer.py | 16 | CODE | |
| LOW | ci/scripts/test_sft_dense_trainer.py | 19 | CODE | |
| LOW | ci/scripts/test_sft_trainer_intralayer.py | 21 | CODE | |
| LOW | recipe/trace/viewer/server.py | 8 | CODE | |
| LOW | recipe/trace/viewer/render.py | 3 | CODE | |
| LOW | recipe/trace/viewer/payload.py | 8 | CODE | |
| LOW | …erl_agent/gsm8k_tool_example/gsm8k_tool_grpo_config.py | 9 | CODE | |
| LOW | …n_policy_distillation/build_teacher_server_commands.py | 17 | CODE | |
| LOW | tests/conftest.py | 15 | CODE | |
| LOW | tests/chat_template/test_chat_template.py | 1 | CODE | |
| LOW | tests/chat_template/test_chat_template.py | 7 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 1 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 4 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 4 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 4 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 5 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 5 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 5 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 5 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 11 | CODE | |
| LOW | tests/loss/test_oreal_loss.py | 11 | CODE | |
| LOW | tests/loss/test_grpo_loss.py | 1 | CODE | |
| LOW | tests/float8/triton_kernels/test_import.py | 27 | CODE | |
| LOW | tests/float8/triton_kernels/test_import.py | 27 | CODE | |
| LOW | tests/float8/triton_kernels/test_import.py | 27 | CODE | |
| LOW | tests/module/dispatcher/test_agrs_all2all.py | 1 | CODE | |
| LOW | tests/module/dispatcher/test_agrs_all2all.py | 4 | CODE | |
| LOW | tests/module/dispatcher/test_deepep.py | 1 | CODE | |
| LOW | tests/module/dispatcher/test_deepep.py | 9 | CODE | |
| LOW | tests/datasets/test_dataloader.py | 4 | CODE | |
| LOW | tests/datasets/test_pack_config_from_pack_infos.py | 12 | CODE | |
| LOW | tests/datasets/test_qwen35_vl_tokenize_fn.py | 3 | CODE | |
| LOW | tests/datasets/test_qwen35_vl_tokenize_fn.py | 4 | CODE | |
| LOW | tests/datasets/test_long_text_tokenize.py | 6 | CODE | |
| LOW | tests/datasets/test_long_text_tokenize.py | 7 | CODE | |
| LOW | tests/datasets/test_dataset.py | 1 | CODE | |
| LOW | tests/datasets/test_dataset.py | 4 | CODE | |
| LOW | tests/autotest/test_common_utils.py | 1 | CODE | |
| LOW | tests/utils/test_interleaved_shard.py | 8 | CODE | |
| LOW | tests/utils/test_internal_metrics.py | 2 | CODE | |
| LOW | tests/utils/test_internal_metrics.py | 5 | CODE | |
| LOW | tests/utils/test_internal_metrics.py | 6 | CODE | |
| LOW | tests/utils/test_internal_metrics.py | 16 | CODE | |
| LOW | tests/utils/test_internal_metrics.py | 17 | CODE | |
| LOW | tests/utils/test_internal_metrics.py | 18 | CODE | |
| LOW | tests/utils/test_internal_metrics.py | 19 | CODE | |
| LOW | tests/utils/test_internal_metrics.py | 20 | CODE | |
| LOW | tests/utils/test_check_health.py | 5 | CODE | |
| LOW | tests/patch/test_dcp_interleaved_planner.py | 15 | CODE | |
| LOW | tests/model/test_qwen3_vl.py | 2 | CODE | |
| LOW | tests/model/test_qwen3_vl.py | 17 | CODE | |
| LOW | tests/model/test_qwen3_dense.py | 6 | CODE | |
| 865 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | ci/scripts/test_sft_trainer.py | 0 | plot comparison curves between two sets of data. args: history_data: list of historical data points current_data: list o | STRING |
| HIGH | ci/scripts/test_sft_trainer_235B.py | 0 | plot comparison curves between two sets of data. args: history_data: list of historical data points current_data: list o | STRING |
| HIGH | ci/scripts/test_vlm_sft_trainer.py | 0 | plot comparison curves between two sets of data. args: history_data: list of historical data points current_data: list o | STRING |
| HIGH | ci/scripts/test_sft_trainer_dsv3.py | 0 | plot comparison curves between two sets of data. args: history_data: list of historical data points current_data: list o | STRING |
| HIGH | ci/scripts/test_sft_dense_trainer.py | 0 | plot comparison curves between two sets of data. args: history_data: list of historical data points current_data: list o | STRING |
| HIGH | ci/scripts/test_sft_trainer_intralayer.py | 0 | plot comparison curves between two sets of data. args: history_data: list of historical data points current_data: list o | STRING |
| HIGH | …cipe/verl_agent/sandbox_example/sandbox_grpo_config.py | 0 | rl colocate trainer 示例配置(grpo + gsm8k)。 用法:通过环境变量传入路径后,由 cli 加载本配置并 trainer_cfg.build().fit()。 需设置: work_dir, model_path | STRING |
| HIGH | autotest/config/rl_qwen3p5_35B_dapo.py | 0 | rl colocate trainer 示例配置(grpo + gsm8k)。 用法:通过环境变量传入路径后,由 cli 加载本配置并 trainer_cfg.build().fit()。 需设置: work_dir, model_path | STRING |
| HIGH | autotest/config/rl_qwen3_gsm8k_grpo.py | 0 | rl colocate trainer 示例配置(grpo + gsm8k)。 用法:通过环境变量传入路径后,由 cli 加载本配置并 trainer_cfg.build().fit()。 需设置: work_dir, model_path | STRING |
| HIGH | autotest/config/rl_qwen3_vl_geometry3k_grpo.py | 0 | rl colocate trainer 示例配置(grpo + gsm8k)。 用法:通过环境变量传入路径后,由 cli 加载本配置并 trainer_cfg.build().fit()。 需设置: work_dir, model_path | STRING |
| HIGH | examples/v1/config/rl_grpo_gsm8k_with_tool.py | 0 | rl colocate trainer 示例配置(grpo + gsm8k)。 用法:通过环境变量传入路径后,由 cli 加载本配置并 trainer_cfg.build().fit()。 需设置: work_dir, model_path | STRING |
| HIGH | examples/v1/config/rl_grpo_gsm8k_async.py | 0 | rl colocate trainer 示例配置(grpo + gsm8k)。 用法:通过环境变量传入路径后,由 cli 加载本配置并 trainer_cfg.build().fit()。 需设置: work_dir, model_path | STRING |
| HIGH | examples/v1/config/rl_grpo_geo3k_judge.py | 0 | rl colocate trainer 示例配置(grpo + gsm8k)。 用法:通过环境变量传入路径后,由 cli 加载本配置并 trainer_cfg.build().fit()。 需设置: work_dir, model_path | STRING |
| HIGH | examples/v1/config/rl_grpo_gsm8k_judge.py | 0 | rl colocate trainer 示例配置(grpo + gsm8k)。 用法:通过环境变量传入路径后,由 cli 加载本配置并 trainer_cfg.build().fit()。 需设置: work_dir, model_path | STRING |
| HIGH | tests/ops/test_grouped_gemm_triton.py | 0 | grouped matrix multiplication (gmm) for expert models. args: x (tensor): input tensor of shape (batch_size, seq_len, din | STRING |
| HIGH | xtuner/v1/ops/moe/cuda/group_gemm_cutlass.py | 0 | grouped matrix multiplication (gmm) for expert models. args: x (tensor): input tensor of shape (batch_size, seq_len, din | STRING |
| HIGH | xtuner/v1/ops/moe/cuda/group_gemm.py | 0 | grouped matrix multiplication (gmm) for expert models. args: x (tensor): input tensor of shape (batch_size, seq_len, din | STRING |
| HIGH | xtuner/v1/module/attention/mla.py | 0 | applies rotary position embedding to the query and key tensors. args: q (`torch.tensor`): the query tensor. k (`torch.te | STRING |
| HIGH | …/model/transformers_models/mixtral/modeling_mixtral.py | 0 | applies rotary position embedding to the query and key tensors. args: q (`torch.tensor`): the query tensor. k (`torch.te | STRING |
| HIGH | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 0 | applies rotary position embedding to the query and key tensors. args: q (`torch.tensor`): the query tensor. k (`torch.te | STRING |
| HIGH | xtuner/v1/module/attention/mla.py | 0 | multi-headed attention from 'attention is all you need' paper. | STRING |
| HIGH | xtuner/v1/module/attention/mha.py | 0 | multi-headed attention from 'attention is all you need' paper. | STRING |
| HIGH | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 0 | multi-headed attention from 'attention is all you need' paper. | STRING |
| HIGH | xtuner/v1/datasets/sampler.py | 0 | sets the epoch for this sampler. when :attr:`shuffle=true`, this ensures all replicas use a different random ordering fo | STRING |
| HIGH | xtuner/dataset/samplers/intern_repo.py | 0 | sets the epoch for this sampler. when :attr:`shuffle=true`, this ensures all replicas use a different random ordering fo | STRING |
| HIGH | xtuner/dataset/samplers/length_grouped.py | 0 | sets the epoch for this sampler. when :attr:`shuffle=true`, this ensures all replicas use a different random ordering fo | STRING |
| HIGH | xtuner/v1/ops/rotary_emb.py | 0 | applies rotary position embedding to the query and key tensors. args: q (`torch.tensor`): the query tensor. k (`torch.te | STRING |
| HIGH | …erters/modeling_internlm2_reward/modeling_internlm2.py | 0 | applies rotary position embedding to the query and key tensors. args: q (`torch.tensor`): the query tensor. k (`torch.te | STRING |
| HIGH | xtuner/model/modules/dispatch/phi3.py | 0 | applies rotary position embedding to the query and key tensors. args: q (`torch.tensor`): the query tensor. k (`torch.te | STRING |
| HIGH | xtuner/v1/ops/rotary_emb.py | 0 | this is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). the hidden states go from (batch, num_key_va | STRING |
| HIGH | …erters/modeling_internlm2_reward/modeling_internlm2.py | 0 | this is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). the hidden states go from (batch, num_key_va | STRING |
| HIGH | …/model/transformers_models/mixtral/modeling_mixtral.py | 0 | this is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). the hidden states go from (batch, num_key_va | STRING |
| HIGH | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 0 | this is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). the hidden states go from (batch, num_key_va | STRING |
| HIGH | xtuner/model/modules/dispatch/phi3.py | 0 | this is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). the hidden states go from (batch, num_key_va | STRING |
| HIGH | xtuner/model/modules/dispatch/internlm2.py | 0 | this is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). the hidden states go from (batch, num_key_va | STRING |
| HIGH | xtuner/model/modules/dispatch/yi.py | 0 | this is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). the hidden states go from (batch, num_key_va | STRING |
| HIGH | …erters/modeling_internlm2_reward/modeling_internlm2.py | 0 | deepseekv2 flash attention module. this module inherits from `deepseekv2attention` as the weights of the module stays un | STRING |
| HIGH | …/model/transformers_models/mixtral/modeling_mixtral.py | 0 | deepseekv2 flash attention module. this module inherits from `deepseekv2attention` as the weights of the module stays un | STRING |
| HIGH | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 0 | deepseekv2 flash attention module. this module inherits from `deepseekv2attention` as the weights of the module stays un | STRING |
| HIGH | …erters/modeling_internlm2_reward/modeling_internlm2.py | 0 | calls the forward method of flash attention - if the input hidden states contain at least one padding token first unpad | STRING |
| HIGH | …/model/transformers_models/mixtral/modeling_mixtral.py | 0 | calls the forward method of flash attention - if the input hidden states contain at least one padding token first unpad | STRING |
| HIGH | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 0 | calls the forward method of flash attention - if the input hidden states contain at least one padding token first unpad | STRING |
| HIGH | …erters/modeling_internlm2_reward/modeling_internlm2.py | 0 | this model inherits from [`pretrainedmodel`]. check the superclass documentation for the generic methods the library imp | STRING |
| HIGH | …/model/transformers_models/mixtral/modeling_mixtral.py | 0 | this model inherits from [`pretrainedmodel`]. check the superclass documentation for the generic methods the library imp | STRING |
| HIGH | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 0 | this model inherits from [`pretrainedmodel`]. check the superclass documentation for the generic methods the library imp | STRING |
| HIGH | …erters/modeling_internlm2_reward/modeling_internlm2.py | 0 | args: labels (`torch.longtensor` of shape `(batch_size, sequence_length)`, *optional*): labels for computing the masked | STRING |
| HIGH | …/model/transformers_models/mixtral/modeling_mixtral.py | 0 | args: labels (`torch.longtensor` of shape `(batch_size, sequence_length)`, *optional*): labels for computing the masked | STRING |
| HIGH | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 0 | args: labels (`torch.longtensor` of shape `(batch_size, sequence_length)`, *optional*): labels for computing the masked | STRING |
| HIGH | …erters/modeling_internlm2_reward/modeling_internlm2.py | 0 | the deepseekv2 model transformer with a sequence classification head on top (linear layer). [`deepseekv2forsequenceclass | STRING |
| HIGH | …/model/transformers_models/mixtral/modeling_mixtral.py | 0 | the deepseekv2 model transformer with a sequence classification head on top (linear layer). [`deepseekv2forsequenceclass | STRING |
| HIGH | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 0 | the deepseekv2 model transformer with a sequence classification head on top (linear layer). [`deepseekv2forsequenceclass | STRING |
| HIGH | …erters/modeling_internlm2_reward/modeling_internlm2.py | 0 | labels (`torch.longtensor` of shape `(batch_size,)`, *optional*): labels for computing the sequence classification/regre | STRING |
| HIGH | …/model/transformers_models/mixtral/modeling_mixtral.py | 0 | labels (`torch.longtensor` of shape `(batch_size,)`, *optional*): labels for computing the sequence classification/regre | STRING |
| HIGH | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 0 | labels (`torch.longtensor` of shape `(batch_size,)`, *optional*): labels for computing the sequence classification/regre | STRING |
| HIGH | …b/internlm2_chat_7b_full_finetune_custom_dataset_e1.py | 0 | data format: [ { "conversation": [ { "system": "", "input": "xxx", "output": "xxx" }, { "input": "xxx", "output": "xxx" | STRING |
| HIGH | …internlm2_5_chat_7b_full_finetune_custom_dataset_e1.py | 0 | data format: [ { "conversation": [ { "system": "", "input": "xxx", "output": "xxx" }, { "input": "xxx", "output": "xxx" | STRING |
| HIGH | …/internlm2_chat_20b_full_finetune_custom_dataset_e1.py | 0 | data format: [ { "conversation": [ { "system": "", "input": "xxx", "output": "xxx" }, { "input": "xxx", "output": "xxx" | STRING |
| HIGH | …lm2_7b/internlm2_7b_full_finetune_custom_dataset_e1.py | 0 | data format: [ { "conversation": [ { "system": "", "input": "xxx", "output": "xxx" }, { "input": "xxx", "output": "xxx" | STRING |
| HIGH | …full_finetune_custom_dataset_e1_sequence_parallel_4.py | 0 | data format: [ { "conversation": [ { "system": "", "input": "xxx", "output": "xxx" }, { "input": "xxx", "output": "xxx" | STRING |
| HIGH | …2_20b/internlm2_20b_full_finetune_custom_dataset_e1.py | 0 | data format: [ { "conversation": [ { "system": "", "input": "xxx", "output": "xxx" }, { "input": "xxx", "output": "xxx" | STRING |
| 69 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/datasets/test_long_text_tokenize.py | 12 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_long_text_tokenize.py | 14 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_long_text_tokenize.py | 36 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_long_text_tokenize.py | 38 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_long_text_tokenize.py | 54 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_long_text_tokenize.py | 56 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_long_text_tokenize.py | 87 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_long_text_tokenize.py | 89 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_long_text_tokenize.py | 176 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_long_text_tokenize.py | 178 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_long_text_tokenize.py | 202 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_long_text_tokenize.py | 204 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_sampler.py | 9 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_sampler.py | 11 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_sampler.py | 33 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_sampler.py | 35 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 110 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 112 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 385 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 387 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 432 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 434 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 457 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 459 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 606 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/datasets/test_preset_pack_dataset.py | 608 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_pack_dataset.py | 18 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_pack_dataset.py | 20 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_pack_dataset.py | 79 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_pack_dataset.py | 81 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_pack_dataset.py | 222 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_pack_dataset.py | 224 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_pack_dataset.py | 356 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/datasets/test_preset_pack_dataset.py | 358 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/optim/test_muon.py | 333 | # ─── Test: single-GPU correctness ─────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/optim/test_muon.py | 378 | # ── Build two identical models ─────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/optim/test_muon.py | 385 | # ── Reference path ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/optim/test_muon.py | 391 | # ── Production path ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 36 | # ─── Test: Newton-Schulz functions ─────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 95 | # ─── Model for end-to-end tests ────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 183 | # ─── Reference optimizer ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 405 | # ── Compare all parameters ─────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 491 | # ─── Test: end-to-end FSDP ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 526 | # ── Build model on every rank, then broadcast rank-0 weights ───────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 535 | # ── Generate input data on rank 0 and scatter ──────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 546 | # ── Reference: forward all samples, average loss ───────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 553 | # ── Fully shard the test model (production path) ───────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 565 | # ── Production Muon optimizer step ──────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 578 | # ── Compare all parameters ─────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/profiler/test_prober.py | 74 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/profiler/test_prober.py | 76 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/profiler/test_prober.py | 39 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/profiler/test_prober.py | 41 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/profiler/test_prober.py | 155 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/profiler/test_prober.py | 157 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/profiler/test_prober.py | 236 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/profiler/test_prober.py | 238 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/profiler/test_prober.py | 326 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/profiler/test_prober.py | 328 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/profiler/test_prober.py | 402 | # --------------------------------------------------------------------------- | COMMENT |
| 88 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | recipe/trace/viewer/server.py | 346 | except KeyboardInterrupt: | CODE |
| HIGH | recipe/trace/viewer/payload.py | 722 | except (TypeError, ValueError): | CODE |
| HIGH | …erl_agent/sandbox_example/test_verl_tool_agent_loop.py | 89 | except Exception: | CODE |
| HIGH | …cipe/verl_agent/sandbox_example/sandbox_grpo_config.py | 158 | except Exception: | CODE |
| HIGH | tests/datasets/test_pack_config_from_pack_infos.py | 35 | except OSError: | CODE |
| HIGH | tests/patch/test_dcp_interleaved_planner.py | 128 | except Exception: | CODE |
| HIGH | tests/patch/test_dcp_interleaved_planner.py | 162 | except Exception: | CODE |
| HIGH | tests/model/test_qwen3_tile_embedding.py | 100 | except: | CODE |
| HIGH | tests/model/test_qwen3_tile_embedding.py | 175 | except: | CODE |
| HIGH | tests/engine/test_moe_train_engine_float8.py | 119 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_float8.py | 198 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_float8.py | 290 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_float8.py | 390 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_float8.py | 485 | except Exception: | CODE |
| HIGH | tests/engine/test_dense_train_engine.py | 98 | except: | CODE |
| HIGH | tests/engine/test_dense_train_engine.py | 181 | except: | CODE |
| HIGH | tests/engine/test_moe_train_engine_deepep_expert_tp.py | 158 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_deepep_expert_tp.py | 227 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_deepep_expert_tp.py | 273 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_deepep_expert_tp.py | 333 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 551 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 622 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 668 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 727 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 823 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 871 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 923 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 971 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 1040 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine_tpep.py | 1083 | except Exception: | CODE |
| HIGH | tests/engine/test_moe_train_engine.py | 137 | except: | CODE |
| HIGH | tests/engine/test_moe_train_engine.py | 234 | except: | CODE |
| HIGH | tests/engine/test_moe_train_engine.py | 303 | except: | CODE |
| HIGH | tests/engine/test_moe_train_engine.py | 385 | except: | CODE |
| HIGH | tests/engine/test_moe_train_engine.py | 454 | except: | CODE |
| HIGH | tests/rl/trace_utils.py | 54 | except RuntimeError: | CODE |
| HIGH | autotest/cluster/clusterx.py | 214 | except Exception: | CODE |
| HIGH | xtuner/v1/datasets/utils.py | 40 | except OSError: | CODE |
| HIGH | xtuner/v1/datasets/mllm_tokenize_fn/qwen3_vl_utils.py | 20 | except ImportError: | CODE |
| HIGH | …ner/v1/datasets/mllm_tokenize_fn/intern_s1_vl_utils.py | 20 | except ImportError: | CODE |
| HIGH | xtuner/v1/_writer/jsonl_writer.py | 91 | except KeyboardInterrupt: | CODE |
| HIGH | xtuner/v1/optim/muon.py | 109 | except StopIteration: | CODE |
| HIGH | xtuner/v1/utils/track_rl_mem.py | 366 | except (psutil.NoSuchProcess, psutil.AccessDenied): | CODE |
| HIGH | xtuner/v1/utils/env_check.py | 107 | except (OSError, subprocess.SubprocessError): | CODE |
| HIGH | xtuner/v1/utils/rl_test_utils.py | 80 | except requests.ConnectionError: | CODE |
| HIGH | xtuner/v1/ops/__init__.py | 32 | except ImportError: | CODE |
| HIGH | xtuner/v1/ops/sparse_mla/lmdeploy_fp8_index.py | 230 | except ImportError: | CODE |
| HIGH | …r/v1/ops/moe/cuda/triton_kernels/k_grouped_gemm_TMA.py | 331 | except: # noqa: E722 | CODE |
| HIGH | …oe/cuda/triton_kernels/k_grouped_gemm_TMA_triton3_4.py | 303 | except: # noqa: E722 | CODE |
| HIGH | …r/v1/ops/moe/cuda/triton_kernels/m_grouped_gemm_TMA.py | 463 | except: # noqa: E722 | CODE |
| HIGH | …oe/cuda/triton_kernels/m_grouped_gemm_TMA_triton3_4.py | 465 | except: # noqa: E722 | CODE |
| HIGH | xtuner/v1/engine/train_engine.py | 516 | except Exception: | CODE |
| HIGH | xtuner/v1/engine/train_engine.py | 520 | except Exception: | CODE |
| HIGH | xtuner/v1/rl/trace/runtime.py | 341 | except subprocess.TimeoutExpired: | CODE |
| HIGH | xtuner/v1/rl/utils/async_utils.py | 29 | except asyncio.CancelledError: | CODE |
| HIGH | xtuner/v1/rl/utils/ray_utils.py | 81 | except ImportError: | CODE |
| HIGH | xtuner/v1/rl/agent_loop/sandbox_agent_loop/trace.py | 209 | except Exception: | CODE |
| HIGH | xtuner/v1/rl/agent_loop/sandbox_agent_loop/trace.py | 308 | except Exception: | CODE |
| HIGH | xtuner/v1/rl/rollout/worker.py | 493 | except (json.JSONDecodeError, OSError): | CODE |
| HIGH | xtuner/v1/rl/rollout/worker.py | 864 | except ValueError: | CODE |
| 20 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ci/scripts/xtuner_unittest.py | 31 | CODE | |
| LOW | ci/scripts/check_metric.py | 15 | CODE | |
| LOW | ci/scripts/check_metric.py | 69 | CODE | |
| LOW | recipe/trace/viewer/payload.py | 36 | CODE | |
| LOW | recipe/trace/viewer/payload.py | 174 | CODE | |
| LOW | recipe/trace/viewer/payload.py | 382 | CODE | |
| LOW | recipe/trace/viewer/payload.py | 703 | CODE | |
| LOW | …n_policy_distillation/build_teacher_server_commands.py | 41 | CODE | |
| LOW | tests/datasets/test_dataloader.py | 42 | CODE | |
| LOW | tests/datasets/test_pack_config_from_pack_infos.py | 28 | CODE | |
| LOW | tests/datasets/test_qwen3_vl_tokenize_fn.py | 94 | CODE | |
| LOW | tests/datasets/test_qwen3_vl_tokenize_fn.py | 135 | CODE | |
| LOW | tests/datasets/test_qwen3_vl_tokenize_fn.py | 194 | CODE | |
| LOW | tests/datasets/test_qwen3_vl_tokenize_fn.py | 217 | CODE | |
| LOW | tests/datasets/test_qwen3_vl_tokenize_fn.py | 283 | CODE | |
| LOW | tests/datasets/test_qwen3_vl_tokenize_fn.py | 378 | CODE | |
| LOW | tests/datasets/test_qwen35_vl_tokenize_fn.py | 63 | CODE | |
| LOW | tests/datasets/test_qwen35_vl_tokenize_fn.py | 103 | CODE | |
| LOW | tests/datasets/test_qwen35_vl_tokenize_fn.py | 153 | CODE | |
| LOW | tests/datasets/test_qwen35_vl_tokenize_fn.py | 249 | CODE | |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 23 | CODE | |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 54 | CODE | |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 179 | CODE | |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 219 | CODE | |
| LOW | tests/optim/test_muon.py | 262 | CODE | |
| LOW | tests/model/test_qwen3_vl.py | 234 | CODE | |
| LOW | tests/model/test_gpt_oss_moe.py | 175 | CODE | |
| LOW | tests/model/test_fsdp_model.py | 164 | CODE | |
| LOW | tests/model/test_qwen3_dense.py | 220 | CODE | |
| LOW | tests/model/test_model_init.py | 51 | CODE | |
| LOW | tests/model/test_intern_s1.py | 400 | CODE | |
| LOW | tests/model/test_qwen3_tile_embedding.py | 184 | CODE | |
| LOW | tests/model/test_qwen3_5.py | 354 | CODE | |
| LOW | tests/model/test_qwen3_moe.py | 289 | CODE | |
| LOW | tests/model/test_qwen3_moe.py | 362 | CODE | |
| LOW | tests/model/test_qwen3_moe.py | 518 | CODE | |
| LOW | tests/model/test_qwen3_5_dense.py | 373 | CODE | |
| LOW | tests/train/test_trainer.py | 588 | CODE | |
| LOW | tests/profiler/qwen35_vl_determ.py | 327 | CODE | |
| LOW | tests/engine/test_glm52_moe_train_engine.py | 245 | CODE | |
| LOW | tests/engine/test_glm52_moe_train_engine.py | 391 | CODE | |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 387 | CODE | |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 749 | CODE | |
| LOW | tests/rl/test_producer.py | 389 | CODE | |
| LOW | tests/rl/trace_utils.py | 154 | CODE | |
| LOW | tests/rl/test_replay_buffer.py | 666 | CODE | |
| LOW | tests/rl/test_qwen35_vl_moe_async_train_2step.py | 360 | CODE | |
| LOW | autotest/cluster/clusterx.py | 89 | CODE | |
| LOW | autotest/config/rl_qwen3p5_vl_35B_mtp_ep.py | 277 | CODE | |
| LOW | autotest/config/rl_interns2_preview_dapo.py | 163 | CODE | |
| LOW | …otest/config/rl_interns2_preview_vl_dapo_ep2_resume.py | 246 | CODE | |
| LOW | autotest/config/rl_interns2_preview_vl_dapo.py | 246 | CODE | |
| LOW | autotest/config/rl_interns2_preview_vl_grpo.py | 246 | CODE | |
| LOW | autotest/module/train.py | 14 | CODE | |
| LOW | autotest/utils/metric_report.py | 90 | CODE | |
| LOW | autotest/utils/resume_validation.py | 35 | CODE | |
| LOW | autotest/utils/common_utils.py | 122 | CODE | |
| LOW | autotest/utils/check_metric.py | 82 | CODE | |
| LOW | autotest/utils/check_metric.py | 96 | CODE | |
| LOW | autotest/utils/check_metric.py | 181 | CODE | |
| 212 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ci/scripts/xtuner_unittest.py | 103 | except Exception as e: | CODE |
| LOW | …erl_agent/sandbox_example/test_verl_tool_agent_loop.py | 89 | except Exception: | CODE |
| LOW | …cipe/verl_agent/sandbox_example/sandbox_grpo_config.py | 158 | except Exception: | CODE |
| LOW | recipe/verl_agent/common/agent_loop_verl_tool.py | 129 | except Exception as e: | CODE |
| LOW | tests/datasets/test_dataset.py | 82 | except Exception as e: | CODE |
| LOW | tests/patch/test_dcp_interleaved_planner.py | 128 | except Exception: | CODE |
| LOW | tests/patch/test_dcp_interleaved_planner.py | 162 | except Exception: | CODE |
| LOW | tests/ops/test_lmdeploy_fp8_index.py | 27 | except Exception: | CODE |
| LOW | tests/ops/test_lmdeploy_fp8_index.py | 50 | except Exception: | CODE |
| LOW | tests/ops/test_lmdeploy_fp8_index.py | 61 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_float8.py | 119 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_float8.py | 198 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_float8.py | 290 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_float8.py | 390 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_float8.py | 485 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_deepep_expert_tp.py | 158 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_deepep_expert_tp.py | 227 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_deepep_expert_tp.py | 273 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_deepep_expert_tp.py | 333 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 551 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 622 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 668 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 727 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 823 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 871 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 923 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 971 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 1040 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_tpep.py | 1083 | except Exception: | CODE |
| LOW | tests/rl/test_qwen35_vl_moe_recover_e2e.py | 265 | except Exception as error: | CODE |
| LOW | tests/rl/test_replay_buffer.py | 674 | except Exception as exc: | CODE |
| LOW | tests/rl/test_rl_colocate_trainer.py | 385 | except Exception as exc: | CODE |
| LOW | tests/rl/test_trace_store.py | 64 | except Exception as exc: | CODE |
| LOW | autotest/cluster/clusterx.py | 138 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 189 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 214 | except Exception: | CODE |
| LOW | autotest/cluster/clusterx.py | 222 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 236 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 244 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 265 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 277 | except Exception as e: | CODE |
| LOW | autotest/utils/run_cmd.py | 8 | except Exception as e: | CODE |
| MEDIUM | autotest/utils/run_cmd.py | 5 | def run_cmd(command): | CODE |
| LOW | …ls/add-chat-template/scripts/audit_hf_chat_template.py | 95 | except Exception as exc: | CODE |
| LOW | …ls/add-chat-template/scripts/audit_hf_chat_template.py | 126 | except Exception as exc: | CODE |
| LOW | …ls/add-chat-template/scripts/audit_hf_chat_template.py | 141 | except Exception as exc: | CODE |
| LOW | docs/design/sep_code_demo.py | 771 | except Exception: | CODE |
| LOW | .dev_scripts/extract_json_profile.py | 18 | except Exception as e: | CODE |
| LOW | xtuner/entry_point.py | 331 | except Exception as e: | STRING |
| LOW | xtuner/v1/data_proto/messages/qwen35_chat.py | 301 | except Exception: | CODE |
| LOW | xtuner/v1/data_proto/messages/glm52_chat.py | 227 | except Exception: | CODE |
| LOW | xtuner/v1/datasets/vlm_jsonl.py | 46 | except Exception as e: | CODE |
| MEDIUM | xtuner/v1/datasets/vlm_jsonl.py | 33 | def __getitem__(self, item): | CODE |
| LOW | xtuner/v1/datasets/utils.py | 226 | except Exception: # https://github.com/facebookresearch/detectron2/issues/1885 | CODE |
| LOW | xtuner/v1/datasets/packing.py | 583 | except Exception: | CODE |
| LOW | …/datasets/mllm_tokenize_fn/intern_s1_vl_tokenize_fn.py | 212 | except Exception as e: | CODE |
| LOW | …/datasets/mllm_tokenize_fn/intern_s1_vl_tokenize_fn.py | 253 | except Exception as e: | CODE |
| LOW | …/datasets/mllm_tokenize_fn/intern_s1_vl_tokenize_fn.py | 376 | except Exception as e: | CODE |
| LOW | xtuner/v1/datasets/mllm_tokenize_fn/qwen3_vl_utils.py | 59 | except Exception as e: | CODE |
| LOW | xtuner/v1/datasets/mllm_tokenize_fn/qwen3_vl_utils.py | 153 | except Exception as e: | CODE |
| 159 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | recipe/trace/viewer/render.py | 227 | if (left == null && right == null) return 0; | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 227 | if (left == null && right == null) return 0; | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 228 | if (left == null) return 1; | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 229 | if (right == null) return -1; | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 236 | return Array.from(new Set(values.filter((value) => value != null))).sort(compareValues); | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 240 | if (payload.requested_train_step !== undefined && payload.requested_train_step !== null && payload.requested_train | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 243 | if (payload.selected_train_step !== undefined && payload.selected_train_step !== null) { | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 243 | if (payload.selected_train_step !== undefined && payload.selected_train_step !== null) { | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 360 | ["Samples", data.sample_count || 0], | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 361 | ["Groups", data.group_count || 0], | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 362 | ["Steps", data.step_count || 0], | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 424 | if (node.elapsed_ms !== undefined && node.elapsed_ms !== null) return formatDurationMs(node.elapsed_ms); | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 424 | if (node.elapsed_ms !== undefined && node.elapsed_ms !== null) return formatDurationMs(node.elapsed_ms); | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 425 | if (node.duration_ms !== undefined && node.duration_ms !== null) return formatDurationMs(node.duration_ms); | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 425 | if (node.duration_ms !== undefined && node.duration_ms !== null) return formatDurationMs(node.duration_ms); | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 430 | const nodes = (sample.display_path && sample.display_path.length) ? sample.display_path : fallbackDisplayPath(sam | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 465 | if (data.service_name) sourceParts.push(`service ${data.service_name}`); | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 466 | if (data.run_id) sourceParts.push(`run ${data.run_id}`); | CODE |
| HIGH⚡ | recipe/trace/viewer/render.py | 467 | if (data.generated_at_s) sourceParts.push(`generated ${new Date(data.generated_at_s * 1000).toLocaleString()}`); | CODE |
| HIGH | recipe/trace/viewer/render.py | 206 | let pendingStepRequest = null; | CODE |
| HIGH | recipe/trace/viewer/render.py | 324 | if (fieldValue === undefined) return fields.all.includes(term.value); | CODE |
| HIGH | recipe/trace/viewer/render.py | 333 | return !searchTerms.length || matchesSearch(sample, searchTerms); | CODE |
| HIGH | recipe/trace/viewer/render.py | 388 | return `${type}${message} (${error.sample_count || 0})`; | CODE |
| HIGH | recipe/trace/viewer/render.py | 411 | <td>${esc(row.error_count || 0)}</td> | CODE |
| HIGH | recipe/trace/viewer/render.py | 484 | const selectedStep = String(step || filters.step || "latest"); | CODE |
| HIGH | recipe/trace/viewer/render.py | 490 | const response = await fetch(url.toString(), {cache: "no-store"}); | CODE |
| HIGH | recipe/trace/viewer/render.py | 501 | if (pendingStepRequest === request) pendingStepRequest = null; | CODE |
| HIGH | recipe/trace/viewer/render.py | 506 | const selectedStep = String(step || filters.step || "latest"); | CODE |
| HIGH | recipe/trace/viewer/render.py | 517 | if (!autoRefresh || pendingStepRequest) return; | CODE |
| HIGH | recipe/trace/viewer/render.py | 518 | await fetchStep(filters.step || data.requested_train_step || data.selected_train_step || "latest"); | CODE |
| HIGH | xtuner/v1/rl/rollout_is.py | 493 | - mismatch_kl: Direct KL divergence estimator KL(π_rollout || π_training) | STRING |
| HIGH | xtuner/v1/rl/agent_loop/sandbox_agent_loop/hooks.py | 179 | f'test -d "{remote_path}" && echo DIR || echo FILE', | CODE |
| HIGH | xtuner/v1/rl/agent_loop/sandbox_agent_loop/hooks.py | 344 | "cd /tmp && tar xzf /tmp/_lagent.tar.gz && rm /tmp/_lagent.tar.gz", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ci/scripts/check_metric.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | recipe/trace/viewer/server.py | 356 | __all__ = [ | CODE |
| LOW | recipe/trace/viewer/render.py | 532 | __all__ = ["render_rollout_trace_html", "write_rollout_trace_html"] | STRING |
| LOW | recipe/trace/viewer/payload.py | 983 | __all__ = [ | CODE |
| LOW | tests/model/test_qwen3_vl_async_hf.py | 20 | def _set_hf_for_compose_submodules(model, hf_path: str | Path) -> None: | CODE |
| LOW | autotest/utils/check_metric.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | docs/pygments_extension/__init__.py | 6 | __all__ = ['XTunerPythonLexer', 'XTunerDraculaStyle', 'XTunerEmacsStyle'] | CODE |
| LOW | xtuner/registry.py | 4 | __all__ = ["BUILDER", "MAP_FUNC"] | CODE |
| LOW | xtuner/v1/data_proto/__init__.py | 4 | __all__ = [ | CODE |
| LOW | xtuner/v1/data_proto/messages/__init__.py | 8 | __all__ = ["BaseMessages", "ChatMessages", "Qwen35ChatMessages", "Glm52ChatMessages"] | CODE |
| LOW | xtuner/v1/data_proto/templates/__init__.py | 121 | __all__ = ["ChatTemplate", "HybridChatTemplate"] | CODE |
| LOW | xtuner/v1/loss/__init__.py | 17 | __all__ = [ | CODE |
| LOW | xtuner/v1/loss/moe_loss.py | 304 | def _update_running(self, value: torch.Tensor) -> None: | CODE |
| LOW | xtuner/v1/config/__init__.py | 6 | __all__ = [ | CODE |
| LOW | xtuner/v1/float8/__init__.py | 6 | __all__ = [ | CODE |
| LOW | xtuner/v1/float8/triton_kernels/__init__.py | 28 | __all__ = [ | CODE |
| LOW | xtuner/v1/module/__init__.py | 25 | __all__ = [ | CODE |
| LOW | xtuner/v1/module/attention/__init__.py | 8 | __all__ = [ | CODE |
| LOW | xtuner/v1/module/rms_norm/__init__.py | 4 | __all__ = ["RMSNorm"] | CODE |
| LOW | xtuner/v1/module/dispatcher/__init__.py | 99 | __all__ = [ | CODE |
| LOW | xtuner/v1/module/rope/__init__.py | 11 | __all__ = [ | CODE |
| LOW | xtuner/v1/module/mtp/__init__.py | 7 | __all__ = ["MTPConfig", "MTPBlock", "MTPLayer", "roll_packed_tensor", "roll_sequence_context"] | CODE |
| LOW | xtuner/v1/module/router/__init__.py | 6 | __all__ = [ | CODE |
| LOW | xtuner/v1/datasets/build.py | 4 | __all__ = [ | CODE |
| LOW | xtuner/v1/datasets/preset_sampler.py | 170 | def set_epoch(self, epoch: int) -> None: | CODE |
| LOW | xtuner/v1/datasets/__init__.py | 38 | __all__ = [ | CODE |
| LOW | xtuner/v1/datasets/dataloader.py | 121 | def set_epoch(self, epoch: int) -> None: | CODE |
| LOW | xtuner/v1/datasets/sampler.py | 122 | def set_epoch(self, epoch: int) -> None: | CODE |
| LOW | xtuner/v1/datasets/sampler.py | 266 | def set_epoch(self, epoch: int) -> None: | CODE |
| LOW | xtuner/v1/datasets/mllm_tokenize_fn/__init__.py | 6 | __all__ = [ | CODE |
| LOW | xtuner/v1/datasets/pt_tokenize_fn/__init__.py | 5 | __all__ = [ | CODE |
| LOW | xtuner/v1/datasets/rl_tokenize_fn/__init__.py | 5 | __all__ = ["RLTextTokenizeFnConfig", "RLQwen3VLTokenizeFnConfig"] | CODE |
| LOW | xtuner/v1/_writer/__init__.py | 45 | __all__ = ["JsonlWriter", "TensorboardWriter"] | CODE |
| LOW | xtuner/v1/optim/__init__.py | 5 | __all__ = ["Muon", "SwapAdamW"] | CODE |
| LOW | xtuner/v1/utils/__init__.py | 32 | __all__ = [ | CODE |
| LOW⚡ | xtuner/v1/utils/process.py | 37 | def set_async_save_process_qos() -> None: | CODE |
| LOW⚡ | xtuner/v1/utils/process.py | 44 | def set_process_qos(cpu_priority: int | None, io_priority: int | None) -> None: | CODE |
| LOW | xtuner/v1/utils/interleaved_shard.py | 40 | __all__ = [ | CODE |
| LOW | xtuner/v1/patch/dcp_interleaved_planner.py | 55 | __all__ = ["InterleavedShardSavePlanner", "InterleavedShardLoadPlanner"] | CODE |
| LOW | xtuner/v1/patch/__init__.py | 7 | __all__ = [ | CODE |
| LOW | xtuner/v1/patch/xtuner_storage.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | xtuner/v1/model/__init__.py | 74 | __all__ = [ | CODE |
| LOW | xtuner/v1/model/compose/intern_s1/__init__.py | 13 | __all__ = [ | CODE |
| LOW | xtuner/v1/model/compose/qwen3_5/__init__.py | 4 | __all__ = [ | CODE |
| LOW | xtuner/v1/model/compose/internvl/__init__.py | 14 | __all__ = [ | CODE |
| LOW | xtuner/v1/model/compose/qwen3_vl/__init__.py | 5 | __all__ = [ | CODE |
| LOW | xtuner/v1/model/utils/__init__.py | 5 | __all__ = [ | CODE |
| LOW | xtuner/v1/model/utils/checkpointing.py | 14 | __all__ = ["apply_activation_checkpointing", "is_checkpoint_replay", "reuse_during_recompute"] | CODE |
| LOW | xtuner/v1/model/moe/moe.py | 604 | def _set_recv_tokens_hook(self, hook: Callable[[int], None] | None) -> None: | CODE |
| LOW | xtuner/v1/model/moe/glm52/__init__.py | 5 | __all__ = [ | CODE |
| LOW | xtuner/v1/model/moe/glm52/dsa_mla.py | 533 | def _setup_absorbed_query_context(ctx, inputs, output) -> None: | CODE |
| LOW | xtuner/v1/train/__init__.py | 5 | __all__ = ["Trainer", "TrainerConfig", "UTF8ByteTokenizer", "ResumeConfig", "LoadCheckpointConfig"] | CODE |
| LOW | xtuner/v1/ops/__init__.py | 4 | __all__ = ["all_to_all_single_autograd", "ulysses_all_to_all"] | CODE |
| LOW | xtuner/v1/ops/comm/__init__.py | 5 | __all__ = [ | CODE |
| LOW | xtuner/v1/ops/sparse_mla/flash_mla.py | 93 | def _setup_flash_mla_context(ctx, inputs, output) -> None: | CODE |
| LOW⚡ | xtuner/v1/ops/sparse_mla/tilelang.py | 84 | def _setup_tilelang_sparse_mla_context(ctx, inputs, output) -> None: | CODE |
| LOW | xtuner/v1/ops/sparse_mla/__init__.py | 138 | __all__ = [ | CODE |
| LOW | xtuner/v1/ops/sparse_mla/indexer_fp8_quant.py | 148 | __all__ = ["FP8_DTYPE", "INDEXER_HEAD_DIM", "indexer_fp8_quant"] | CODE |
| LOW | xtuner/v1/ops/sparse_mla/lmdeploy_sparse_index_topk.py | 201 | __all__ = ["is_sparse_index_topk_supported", "sparse_index_topk"] | CODE |
| LOW⚡ | xtuner/v1/ops/sparse_mla/cudnn_dsa.py | 66 | def _setup_cudnn_dsa_sparse_mla_context(ctx, inputs, output) -> None: | CODE |
| 70 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/rl/test_replay_buffer.py | 43 | CODE | |
| LOW | tests/rl/test_prepare_train_data.py | 49 | CODE | |
| LOW | xtuner/v1/data_proto/sequence_context.py | 60 | CODE | |
| LOW | xtuner/v1/data_proto/utils.py | 129 | CODE | |
| LOW | xtuner/v1/loss/liger_with_weights.py | 24 | CODE | |
| LOW | xtuner/v1/loss/liger_with_weights.py | 211 | CODE | |
| LOW | xtuner/v1/float8/float8_gmm_tile_wise.py | 369 | CODE | |
| LOW | xtuner/v1/module/attention/mla.py | 177 | CODE | |
| LOW | xtuner/v1/module/attention/mha.py | 115 | CODE | |
| LOW | xtuner/v1/module/dispatcher/deepep.py | 449 | CODE | |
| LOW | xtuner/v1/module/decoder_layer/moe_decoder_layer.py | 234 | CODE | |
| LOW | xtuner/v1/module/decoder_layer/moe_decoder_layer.py | 240 | CODE | |
| LOW | xtuner/v1/module/decoder_layer/dense_decoder_layer.py | 60 | CODE | |
| LOW | xtuner/v1/datasets/ftdp.py | 770 | CODE | |
| LOW | xtuner/v1/datasets/jsonl.py | 263 | CODE | |
| LOW | …/datasets/mllm_tokenize_fn/intern_s1_vl_tokenize_fn.py | 72 | CODE | |
| LOW | …/datasets/mllm_tokenize_fn/intern_s1_vl_tokenize_fn.py | 203 | CODE | |
| LOW | …/datasets/mllm_tokenize_fn/intern_s1_vl_tokenize_fn.py | 340 | CODE | |
| LOW | …/datasets/mllm_tokenize_fn/intern_s1_vl_tokenize_fn.py | 466 | CODE | |
| LOW | …/v1/datasets/mllm_tokenize_fn/base_mllm_tokenize_fn.py | 139 | CODE | |
| LOW | …r/v1/datasets/mllm_tokenize_fn/qwen3_vl_tokenize_fn.py | 277 | CODE | |
| LOW | …r/v1/datasets/mllm_tokenize_fn/qwen3_vl_tokenize_fn.py | 501 | CODE | |
| LOW | …r/v1/datasets/mllm_tokenize_fn/qwen3_vl_tokenize_fn.py | 653 | CODE | |
| LOW | …r/v1/datasets/mllm_tokenize_fn/qwen3_vl_tokenize_fn.py | 1049 | CODE | |
| LOW | xtuner/v1/datasets/pt_tokenize_fn/long_text.py | 28 | CODE | |
| LOW | xtuner/v1/optim/muon.py | 331 | CODE | |
| LOW | xtuner/v1/optim/swap_adamw.py | 23 | CODE | |
| LOW | xtuner/v1/utils/convert_gsm8k.py | 59 | CODE | |
| LOW | xtuner/v1/utils/convert_geometry3k.py | 81 | CODE | |
| LOW | xtuner/v1/utils/convert_gsm8k_with_tool.py | 76 | CODE | |
| LOW | xtuner/v1/patch/xtuner_storage.py | 149 | CODE | |
| LOW | xtuner/v1/model/base.py | 1283 | CODE | |
| LOW | xtuner/v1/model/moe/glm52/dsa_mla.py | 275 | CODE | |
| LOW | xtuner/v1/train/trainer.py | 528 | CODE | |
| LOW | xtuner/v1/ops/tensor_parallel/npu.py | 351 | CODE | |
| LOW | xtuner/v1/ops/tensor_parallel/npu.py | 169 | CODE | |
| LOW | xtuner/v1/ops/tensor_parallel/npu.py | 282 | CODE | |
| LOW | xtuner/v1/ops/tensor_parallel/cuda.py | 24 | CODE | |
| LOW | xtuner/v1/ops/rms_norm/gpu.py | 108 | CODE | |
| LOW | xtuner/v1/ops/rms_norm/gpu.py | 164 | CODE | |
| LOW | xtuner/v1/ops/rms_norm/gpu.py | 346 | CODE | |
| LOW | xtuner/v1/ops/rms_norm/gpu.py | 412 | CODE | |
| LOW | xtuner/v1/ops/rms_norm/gpu.py | 696 | CODE | |
| LOW | xtuner/v1/ops/rms_norm/gpu.py | 756 | CODE | |
| LOW | xtuner/v1/ops/rms_norm/gpu.py | 1046 | CODE | |
| LOW | xtuner/v1/ops/rms_norm/gpu.py | 1088 | CODE | |
| LOW | xtuner/v1/ops/rms_norm/gpu.py | 893 | CODE | |
| LOW | xtuner/v1/ops/comm/all_to_all.py | 51 | CODE | |
| LOW | xtuner/v1/ops/comm/sequence_parallel.py | 39 | CODE | |
| LOW | xtuner/v1/ops/gated_deltanet/chunk_gated_delta_rule.py | 279 | CODE | |
| LOW | xtuner/v1/ops/gated_deltanet/rms_norm_gated.py | 75 | CODE | |
| LOW | xtuner/v1/ops/gated_deltanet/rms_norm_gated.py | 109 | CODE | |
| LOW | xtuner/v1/ops/sparse_mla/tilelang_sparse_mla_bwd.py | 84 | CODE | |
| LOW | xtuner/v1/ops/moe/npu/group_gemm.py | 10 | CODE | |
| LOW | xtuner/v1/ops/flash_attn/protocol.py | 26 | CODE | |
| LOW | xtuner/v1/ops/flash_attn/protocol.py | 5 | CODE | |
| LOW | xtuner/v1/ops/flash_attn/npu.py | 5 | CODE | |
| LOW | xtuner/v1/ops/flash_attn/gpu.py | 248 | CODE | |
| LOW | xtuner/v1/ops/flash_attn/gpu.py | 292 | CODE | |
| LOW | xtuner/v1/ops/flash_attn/gpu.py | 487 | CODE | |
| 38 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …n_policy_distillation/build_teacher_server_commands.py | 160 | Allocate high-rank GPUs to local Teachers and leave the rest to Student. Teacher replicas are processed by descendi | STRING |
| HIGH | …ner/v1/float8/triton_kernels/per_block_dequant_gemm.py | 38 | Dequantizes the given weight tensor using the provided scale tensor. Args: x (torch.Tensor): The quantized | STRING |
| HIGH | xtuner/v1/utils/misc.py | 106 | Calculate the padding length needed to make the input length divisible by divisors. Args: length: The i | STRING |
| HIGH | xtuner/v1/model/base.py | 163 | Build a `TransformerConfig` from a pre-trained HuggingFace model. This method creates a configuration object ba | STRING |
| HIGH | xtuner/v1/train/toy_tokenizer.py | 114 | Decode a sequence of token IDs back to text. Converts byte-level token IDs back to UTF-8 text. Special tokens a | STRING |
| HIGH | xtuner/v1/ops/gated_deltanet/chunk_gated_delta_rule.py | 297 | Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): | STRING |
| HIGH | xtuner/v1/rl/utils/ray_accelerator_worker.py | 312 | Determine the type of accelerator used in a PlacementGroup. Args: pg (PlacementGroup): The placemen | STRING |
| HIGH | xtuner/v1/rl/utils/ray_accelerator_worker.py | 336 | Provide a dictionary of resource requests for Ray tasks or actors that need to be scheduled on a node with a spe | STRING |
| HIGH | xtuner/v1/rl/utils/ray_accelerator_worker.py | 363 | Get SPMD (Single Program, Multiple Data) info from the placement group. This includes the sorted bundle | STRING |
| HIGH | xtuner/v1/rl/rollout/trace_store.py | 363 | Export the stored training trace given a complete prompt text. Args: session_id (str): The session | STRING |
| HIGH | xtuner/parallel/sequence/comm.py | 72 | Convenience function to apply the all-to-all operation with scatter and gather dimensions. Notes: We ha | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/model/test_qwen3_5_dense.py | 274 | # Whole-model bitwise parity that runs the real `compose.forward` / `Dense.forward` orchestration | COMMENT |
| MEDIUM⚡ | tests/model/test_qwen3_5_dense.py | 280 | # layer present — it only needs the forward orchestration to run end-to-end. N=4 covers both | COMMENT |
| MEDIUM | tests/rl/test_prepare_train_data.py | 202 | # plain: 2 个 mask!=0 token 计入 2.0; agentic: 2 个 label!=-100 token 计入 -1.0。 | COMMENT |
| MEDIUM | xtuner/v1/data_proto/messages/glm52_chat.py | 134 | # The opening <think> is template scaffolding. The trace and its closing tag are model-generated. | COMMENT |
| MEDIUM | xtuner/v1/train/rl_trainer.py | 1208 | # session_id is only set by agentic loops / XTUNER_DETERMINISTIC; plain RL falls back | COMMENT |
| MEDIUM | xtuner/v1/train/rl_trainer.py | 1281 | # Mixed agentic/VLM batches use three-axis MRoPE position IDs. Repeat the | COMMENT |
| MEDIUM | xtuner/v1/train/rl_trainer.py | 1282 | # normal text positions on every axis so agentic samples have the same rank | COMMENT |
| MEDIUM | xtuner/v1/ops/flash_attn/protocol.py | 17 | window_size=(-1, -1), # -1 means infinite context window | CODE |
| MEDIUM | xtuner/v1/ops/flash_attn/gpu.py | 29 | window_size_left: int = -1, # -1 means infinite context window | CODE |
| MEDIUM | xtuner/v1/ops/flash_attn/gpu.py | 82 | window_size_left: int = -1, # -1 means infinite context window | CODE |
| MEDIUM | xtuner/v1/ops/flash_attn/gpu.py | 111 | window_size_left: int = -1, # -1 means infinite context window | CODE |
| MEDIUM | xtuner/v1/ops/flash_attn/gpu.py | 158 | window_size_left: int = -1, # -1 means infinite context window | CODE |
| MEDIUM | xtuner/v1/ops/flash_attn/gpu.py | 303 | window_size=(-1, -1), # -1 means infinite context window | CODE |
| MEDIUM | xtuner/model/modules/dispatch/attention.py | 25 | window_size=(-1, -1), # -1 means infinite context window | CODE |
| MEDIUM | xtuner/model/modules/dispatch/attention.py | 48 | window_size=(-1, -1), # -1 means infinite context window | CODE |
| MEDIUM | xtuner/model/modules/dispatch/attention.py | 89 | window_size=(-1, -1), # -1 means infinite context window | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/train/test_trainer.py | 78 | # Create a fake model file | COMMENT |
| MEDIUM | tests/train/test_trainer.py | 81 | # Create a fake config file | COMMENT |
| MEDIUM | tests/engine/test_moe_train_engine_float8.py | 471 | # Create a fresh engine that has never run a training step, then call | COMMENT |
| MEDIUM | tests/rl/test_cpu_pg.py | 102 | # Create a receiver worker | COMMENT |
| MEDIUM | xtuner/v1/datasets/packing.py | 512 | # Create a single dedicated process group with a generous timeout for | COMMENT |
| MEDIUM | …r/v1/datasets/mllm_tokenize_fn/intern_s1_vl_process.py | 42 | # Define the JPEG compression quality range, pre-create all JPEG compression functions | COMMENT |
| MEDIUM | xtuner/v1/optim/muon.py | 4 | # This file is developed based on and inspired by the following projects: | COMMENT |
| MEDIUM | xtuner/v1/utils/compile.py | 63 | # Create a singleton instance | COMMENT |
| MEDIUM | xtuner/v1/model/base.py | 359 | # This method is for compatibility with transformers 5.x rope_utils | COMMENT |
| MEDIUM⚡ | …er/v1/ops/flash_attn/flash_sink_varlen_attn_gpt_oss.py | 6 | # This file contains code originally written by Wenhao Li. | COMMENT |
| MEDIUM | xtuner/v1/profiler/prober_utils.py | 1 | # This file is separated from prober.py to avoid circular import. | COMMENT |
| MEDIUM⚡ | xtuner/v1/rl/weight_update/transport.py | 652 | # Create a Gloo process group for synchronization during NCCL weight update. | COMMENT |
| MEDIUM | xtuner/utils/rm_utils.py | 10 | """This class is used to process the input sequences for the reward | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ci/config/qwen3_5_dense4B.py | 1 | # Smoke SFT config for Qwen3.5-VL Dense 4B's text tower — drives the full | COMMENT |
| LOW | tests/model/test_qwen3_5_dense.py | 261 | self.assertEqual(loss_diff, 0.0, f"VL loss not bitwise-equal: {loss_diff}") | COMMENT |
| LOW | tests/rl/test_replay_buffer.py | 1 | # 当前 ReplayBuffer PR-fast 单测覆盖点: | COMMENT |
| LOW | autotest/config.yaml | 1801 | # - | COMMENT |
| LOW | autotest/utils/check_metric.py | 41 | # Without ``aggregate``, behavior stays step-by-step drift vs baseline. | COMMENT |
| LOW | docs/en/switch_language.md | 1 | ## <a href='https://xtuner.readthedocs.io/en/latest/'>English</a> | COMMENT |
| LOW | docs/en/pretrain_sft/tutorial/resume.md | 1 | # Automatic Resume Training | COMMENT |
| LOW | .dev_scripts/debug_rl_snapshot.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | .dev_scripts/debug_rl_snapshot.sh | 21 | # WORK_DIR=/path/to/ray/work_dir OUT_ROOT=/path/to/debug_output \ | COMMENT |
| LOW | xtuner/__init__.py | 1 | # # Copyright (c) OpenMMLab. All rights reserved. | COMMENT |
| LOW | xtuner/__init__.py | 21 | # patch_deepspeed_engine() | COMMENT |
| LOW | xtuner/v1/loss/base_loss_ctx.py | 21 | # There are 3 steps to compute the calibrated loss: | COMMENT |
| LOW | xtuner/v1/config/fsdp.py | 21 | # Training-time FSDP CPU offload is version-sensitive for XTuner model configs | COMMENT |
| LOW | xtuner/v1/float8/fsdp_utils.py | 441 | scale = scale.view(-1, 2, dim, scale.shape[-1]) | COMMENT |
| LOW | xtuner/v1/float8/triton_kernels/trans_quant_per_tile.py | 221 | # m_aligned = (m + 127) // 128 * 128 | COMMENT |
| LOW | xtuner/v1/module/dispatcher/deepep.py | 481 | # thread runs well ahead of the GPU stream, and the next microbatch's | COMMENT |
| LOW | xtuner/v1/datasets/jsonl.py | 321 | if not os.path.exists(_cached_file): | COMMENT |
| LOW | xtuner/v1/datasets/jsonl.py | 341 | # "tags": { | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 1 | # ================================================================ | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 721 | # Newton-Schulz needs the LOCAL number of experts after EP sharding, so each | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 741 | # | COMMENT |
| LOW | xtuner/v1/utils/load_spec.py | 381 | # inner to outer, so the steps are reversed; preserved shards, such as an EP shard kept local for RL weight | COMMENT |
| LOW | xtuner/v1/model/base.py | 1021 | initialized_params = default_init_weights(self) | COMMENT |
| LOW | xtuner/v1/model/moe/moe.py | 1681 | # as `fsdp_mesh`. However, PyTorch's mesh management uses global logic: when a | COMMENT |
| LOW | xtuner/v1/model/moe/glm52/dsa_mla.py | 421 | w_kc, w_vc = torch.split(wkv_b, [self.qk_nope_head_dim, self.v_head_dim], dim=1) | COMMENT |
| LOW | xtuner/v1/train/trainer.py | 1981 | # if model_cfg.text_config.pad_token_id != pad_token_id: | COMMENT |
| LOW | xtuner/v1/rl/rollout_is.py | 1 | # modified from https://github.com/volcengine/verl/blob/main/verl/trainer/ppo/mismatch_helper.py | COMMENT |
| LOW | xtuner/v1/rl/agent_loop/sandbox_agent_loop/trace.py | 321 | fp.write(line + "\n") | COMMENT |
| LOW | xtuner/tools/llm_calc/llm_calculator.py | 441 | # core attn的计算 | COMMENT |
| LOW | xtuner/tools/llm_calc/llm_calculator.py | 641 | print(f"Total_params_num: {self.params_num / 1024**3} B, embed_params_num: {self.embed_params_num / 1024**3} B, | COMMENT |
| LOW | xtuner/tools/llm_calc/llm_calculator.py | 661 | COMMENT | |
| LOW | …erters/modeling_internlm2_reward/modeling_internlm2.py | 1 | # Copyright (c) The InternLM team and The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | …s/modeling_internlm2_reward/configuration_internlm2.py | 1 | # coding=utf-8 | COMMENT |
| LOW | xtuner/dataset/refcoco_json.py | 261 | self.data["categories"] = instances["categories"] | COMMENT |
| LOW | …del/polar/POLAR_1_8B_full_varlenattn_custom_dataset.py | 81 | type=AutoModel.from_pretrained, | COMMENT |
| LOW | …model/polar/POLAR_7B_full_varlenattn_custom_dataset.py | 81 | type=AutoModel.from_pretrained, | COMMENT |
| LOW | …l/transformers_models/mixtral/configuration_mixtral.py | 1 | # Copyright 2023 Mixtral AI and the HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | …l/transformers_models/deepseek_v2/modeling_deepseek.py | 1 | # Copyright 2023 DeepSeek-AI and The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | xtuner/engine/hooks/throughput_hook.py | 121 | # qkv_proj + o_proj: 8B * s * h^2 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | xtuner/v1/module/dispatcher/torch_all2all.py | 34 | # 1. (preprocess) Sort the hidden states along the expert dimension (permute) to facilitate torch all2all, and record th | COMMENT |
| LOW | xtuner/v1/utils/httpx_utils.py | 52 | # For simplicity here, we'll just return the known ones or fall back. | COMMENT |
| MEDIUM | xtuner/v1/model/compose/qwen3_vl/modeling_qwen3_vl.py | 165 | # To simplify and facilitate the processing of deepstack_visual_embeds inside language_model, | COMMENT |
| LOW | xtuner/v1/ops/gated_deltanet/causal_conv1d.py | 204 | # Here we just pass in None and dx will be allocated in the C++ code. | COMMENT |
| MEDIUM⚡ | xtuner/v1/rl/rollout_is.py | 274 | # Step 2: Compute comprehensive metrics | COMMENT |
| MEDIUM | xtuner/v1/rl/rollout_is.py | 361 | """Compute comprehensive metrics for importance sampling weights. | STRING |
| LOW | xtuner/utils/zero_to_any_dtype.py | 206 | # for non-expert parameters. So we can just use the max of the | COMMENT |
| MEDIUM | …r/configs/minicpm/minicpm3_4b/minicpm3_4b_dpo_qlora.py | 37 | dpo_loss_type = "sigmoid" # One of ['sigmoid', 'hinge', 'ipo', 'kto_pair', 'sppo_hard', 'nca_pair', 'robust'] # noqa: | CODE |
| MEDIUM | xtuner/configs/minicpm/1_2b/minicpm_1b_dpo_qlora.py | 37 | dpo_loss_type = "sigmoid" # One of ['sigmoid', 'hinge', 'ipo', 'kto_pair', 'sppo_hard', 'nca_pair', 'robust'] # noqa: | CODE |
| MEDIUM | xtuner/configs/minicpm/2b/minicpm_2b_dpo_qlora.py | 37 | dpo_loss_type = "sigmoid" # One of ['sigmoid', 'hinge', 'ipo', 'kto_pair', 'sppo_hard', 'nca_pair', 'robust'] # noqa: | CODE |
| MEDIUM | …dpo/internlm/internlm2_chat_7b_dpo_qlora_varlenattn.py | 38 | dpo_loss_type = "sigmoid" # One of ['sigmoid', 'hinge', 'ipo', 'kto_pair', 'sppo_hard', 'nca_pair', 'robust'] # noqa: | CODE |
| MEDIUM | …r/configs/dpo/internlm/internlm2_chat_1_8b_dpo_full.py | 35 | dpo_loss_type = "sigmoid" # One of ['sigmoid', 'hinge', 'ipo', 'kto_pair', 'sppo_hard', 'nca_pair', 'robust'] # noqa: | CODE |
| MEDIUM | …po/internlm/internlm2_chat_1_8b_dpo_full_varlenattn.py | 36 | dpo_loss_type = "sigmoid" # One of ['sigmoid', 'hinge', 'ipo', 'kto_pair', 'sppo_hard', 'nca_pair', 'robust'] # noqa: | CODE |
| MEDIUM | …ternlm2_chat_1_8b_dpo_full_varlenattn_jsonl_dataset.py | 35 | dpo_loss_type = "sigmoid" # One of ['sigmoid', 'hinge', 'ipo', 'kto_pair', 'sppo_hard', 'nca_pair', 'robust'] # noqa: | CODE |
| MEDIUM | …s/dpo/llama/llama3_8b_instruct_dpo_qlora_varlenattn.py | 38 | dpo_loss_type = "sigmoid" # One of ['sigmoid', 'hinge', 'ipo', 'kto_pair', 'sppo_hard', 'nca_pair', 'robust'] # noqa: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/datasets/test_preset_dataloader.py | 287 | # Step 1: jsonl | COMMENT |
| LOW | tests/datasets/test_preset_dataloader.py | 309 | # Step 2: pack config | COMMENT |
| LOW | tests/datasets/test_preset_dataloader.py | 344 | # Step 3: sampler config | COMMENT |
| LOW⚡ | xtuner/v1/optim/muon.py | 805 | # Step 1: resolve the FSDP-visible shard dimension for this batch's shape | COMMENT |
| LOW⚡ | xtuner/v1/optim/muon.py | 815 | # Step 2: gather this batch's gradients and per-parameter optimizer state. | COMMENT |
| LOW⚡ | xtuner/v1/optim/muon.py | 824 | # Step 3: pick the Newton-Schulz callback — MuonSplit parameters orthogonalize | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 672 | # Step 1: locate the sharded mesh dim(s) and the tensor dim(s) they shard. | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 731 | # Step 2: expert-locality optimizations — when an FSDP rank already holds complete | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 783 | # Step 3: general case — every rank holds a shard of each matrix, so they are | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 837 | # Step 4: re-route a remainder (or all-to-all-disabled) batch away from all_to_all, | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 851 | # Step 5: assemble the AsyncTask, which starts running immediately up to its | COMMENT |
| LOW | xtuner/v1/rl/rollout_is.py | 207 | # Step 1: Compute raw importance weights based on the specified level | COMMENT |
| LOW⚡ | xtuner/v1/rl/rollout_is.py | 274 | # Step 2: Compute comprehensive metrics | COMMENT |
| LOW | xtuner/v1/rl/rollout_is.py | 289 | # Step 3: Apply outlier handling and rejection sampling | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/datasets/test_preset_dataloader.py | 287 | # Step 1: jsonl | COMMENT |
| LOW | tests/datasets/test_preset_dataloader.py | 309 | # Step 2: pack config | COMMENT |
| LOW | tests/datasets/test_preset_dataloader.py | 344 | # Step 3: sampler config | COMMENT |
| LOW⚡ | xtuner/v1/optim/muon.py | 805 | # Step 1: resolve the FSDP-visible shard dimension for this batch's shape | COMMENT |
| LOW⚡ | xtuner/v1/optim/muon.py | 815 | # Step 2: gather this batch's gradients and per-parameter optimizer state. | COMMENT |
| LOW⚡ | xtuner/v1/optim/muon.py | 824 | # Step 3: pick the Newton-Schulz callback — MuonSplit parameters orthogonalize | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 672 | # Step 1: locate the sharded mesh dim(s) and the tensor dim(s) they shard. | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 731 | # Step 2: expert-locality optimizations — when an FSDP rank already holds complete | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 783 | # Step 3: general case — every rank holds a shard of each matrix, so they are | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 837 | # Step 4: re-route a remainder (or all-to-all-disabled) batch away from all_to_all, | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 851 | # Step 5: assemble the AsyncTask, which starts running immediately up to its | COMMENT |
| LOW | xtuner/v1/rl/rollout_is.py | 207 | # Step 1: Compute raw importance weights based on the specified level | COMMENT |
| LOW⚡ | xtuner/v1/rl/rollout_is.py | 274 | # Step 2: Compute comprehensive metrics | COMMENT |
| LOW | xtuner/v1/rl/rollout_is.py | 289 | # Step 3: Apply outlier handling and rejection sampling | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tests/model/test_qwen3_tile_embedding.py | 168 | embedding_weight = engine.model.language_model.embed_tokens.weight.full_tensor().mean().item() | CODE |
| CRITICAL | tests/model/test_qwen3_tile_embedding.py | 169 | lm_head_weight = engine.model.language_model.lm_head.weight.full_tensor().mean().item() | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | xtuner/v1/datasets/_hardcode_patch.py | 94 | # Check if buffer matches skip_seq | COMMENT |
| LOW | xtuner/v1/datasets/_hardcode_patch.py | 100 | # Check if buffer is still a valid prefix | COMMENT |
| LOW | xtuner/v1/datasets/_hardcode_patch.py | 117 | # Check if current token starts a new potential match | COMMENT |
| LOW | xtuner/v1/datasets/_hardcode_patch.py | 128 | # Check if the remaining buffer is exactly <think></think> | COMMENT |
| LOW | xtuner/v1/optim/muon.py | 475 | # Increment step | COMMENT |
| LOW | xtuner/v1/utils/test_utils.py | 28 | # Check if the shapes of the tensors match | COMMENT |
| LOW | xtuner/v1/utils/test_utils.py | 60 | # Check if all elements are close | COMMENT |
| LOW | xtuner/v1/rl/rollout_is.py | 256 | # Check if any token ratio is below veto threshold (in log space) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | .claude/CLAUDE.md | 61 | 4. **Never** include metadata or watermarks unrelated to the code itself, such as "generated by AI" or "Co-Authored-By: | CODE |
| HIGH | .codex/AGENTS.md | 61 | 4. **Never** include metadata or watermarks unrelated to the code itself, such as "generated by AI" or "Co-Authored-By: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | xtuner/tools/tokenize_ftdp_datasets.py | 320 | # 500 is a magic number, you can change it to any number you want | COMMENT |
| LOW | …/model/transformers_models/mixtral/modeling_mixtral.py | 794 | # the current expert. We need to make sure to multiply the output hidden | COMMENT |
| LOW | …/model/transformers_models/mixtral/modeling_mixtral.py | 1437 | loss += self.router_aux_loss_coef * aux_loss.to(loss.device) # make sure to reside in the same device | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/gh.sh | 7 | # Usage: | COMMENT |
| LOW | xtuner/v1/float8/triton_kernels/trans_quant_per_tile.py | 281 | # Example usage | COMMENT |
| LOW | xtuner/utils/rm_utils.py | 224 | # Example usage | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | autotest/cluster/clusterx.py | 89 | def execute_task(self, task_config: Dict[str, Any]): | CODE |
| LOW | xtuner/dataset/moss_sft.py | 121 | def process_data(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | xtuner/v1/datasets/vlm_jsonl.py | 25 | self.fake_data = { | CODE |
| LOW | xtuner/v1/datasets/vlm_jsonl.py | 48 | data = self.tokenize_fn(self.fake_data) | CODE |