A Next-Generation Training Engine Built for Ultra-Large MoE Models
This report presents the forensic synthetic code analysis of InternLM/xtuner, a Python project with 5,185 GitHub stars. SynthScan v2.0 examined 338,397 lines of code across 1588 source files, recording 3040 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 12.4 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 3040 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| 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 | 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/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 | 47 | def _tilelang_sparse_mla_available() -> bool: | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 61 | def _cudnn_dsa_sparse_mla_available() -> bool: | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 86 | def _tilelang_sparse_mla_inputs(): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 94 | def _cudnn_dsa_sparse_mla_inputs(): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 170 | def test_packed_inputs_respect_causal_boundaries_and_backward(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 195 | def test_shared_layers_reuse_topk_without_cross_context_leak(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 215 | def test_reentrant_checkpoint_reuses_and_releases_topk(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 243 | def test_packed_attention_matches_full_sequence(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 297 | def test_tilelang_indexer_matches_torch(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 338 | def test_cudnn_local_query_global_kv_matches_full_sequence(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 391 | def test_tilelang_forward_backward_matches_torch(self): | CODE |
| LOW | tests/module/attention/test_dsa_mla.py | 422 | 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 |
| LOW | tests/module/dispatcher/test_torch_all2all.py | 22 | def test_dispatch_and_combine(self, dtype, device): | CODE |
| LOW | tests/module/dispatcher/test_noep_expert_tp.py | 89 | def test_sync_path_uses_real_tp_collectives(self) -> None: | CODE |
| LOW | tests/module/dispatcher/test_noep_expert_tp.py | 144 | def test_async_path_exposes_events_at_stage_boundaries(self) -> None: | CODE |
| LOW | tests/module/dispatcher/test_noep_expert_tp.py | 246 | def test_async_sync_path_matches_output_and_gradients(self) -> None: | CODE |
| LOW | tests/module/dispatcher/test_deepep_expert_tp.py | 42 | def test_sync_virtual_expert_path_preserves_output_and_gradients(self) -> None: | CODE |
| LOW | tests/module/dispatcher/test_deepep_expert_tp.py | 131 | def test_async_path_matches_sync_output_and_gradients(self) -> None: | CODE |
| LOW | tests/module/dispatcher/test_deepep_expert_tp.py | 208 | def test_async_path_accepts_topk_weights_without_gradients(self) -> None: | CODE |
| LOW | tests/datasets/test_dataloader.py | 172 | def test_dataloader_resume_single_process(tmp_path, pack_level, num_workers, group_by_length, pack_workers): | CODE |
| LOW | tests/datasets/test_dataloader.py | 374 | def test_dataloader_resume_multi_process(tmp_path, pack_level, num_workers, group_by_length): | CODE |
| LOW | tests/datasets/test_pack_config_from_pack_infos.py | 47 | def test_pack_config_from_pack_infos_hundred_million_rows(): | CODE |
| LOW | tests/datasets/test_pack_config_from_pack_infos.py | 110 | def test_pack_config_vectorized_matches_reference_small(): | CODE |
| 976 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 | 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/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_checkpoint_wrapper_checker.py | 1 | 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 | |
| LOW | tests/model/test_qwen3_dense.py | 17 | CODE | |
| 823 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 | 354 | # ── Build two identical models ─────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/optim/test_muon.py | 361 | # ── Reference path ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/optim/test_muon.py | 367 | # ── Production path ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 32 | # ─── Test: Newton-Schulz functions ─────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 91 | # ─── Model for end-to-end tests ────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 179 | # ─── Reference optimizer ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 329 | # ─── Test: single-GPU correctness ─────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 381 | # ── Compare all parameters ─────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 459 | # ─── Test: end-to-end FSDP ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 487 | # ── Build model on every rank, then broadcast rank-0 weights ───────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 495 | # ── Generate input data on rank 0 and scatter ──────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 506 | # ── Reference: forward all samples, average loss ───────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 513 | # ── Fully shard the test model (production path) ───────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 525 | # ── Production Muon optimizer step ──────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 532 | # ── 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 |
|---|---|---|---|---|
| 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 | 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 | 258 | 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 | 251 | CODE | |
| LOW | tests/engine/test_glm52_moe_train_engine.py | 397 | 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/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 | 355 | CODE | |
| LOW | autotest/cluster/clusterx.py | 61 | 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/check_metric.py | 55 | CODE | |
| LOW | autotest/utils/check_metric.py | 69 | CODE | |
| LOW | autotest/utils/check_metric.py | 102 | CODE | |
| LOW | autotest/utils/check_metric.py | 242 | CODE | |
| LOW | autotest/utils/check_metric.py | 343 | CODE | |
| LOW | .claude/skills/model_normalize/repack_hf.py | 57 | CODE | |
| 201 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/engine/test_moe_train_engine_float8.py | 116 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_float8.py | 195 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_float8.py | 287 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_float8.py | 387 | except Exception: | CODE |
| LOW | tests/engine/test_moe_train_engine_float8.py | 482 | 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_replay_buffer.py | 674 | except Exception as exc: | CODE |
| LOW | tests/rl/test_rl_colocate_trainer.py | 379 | except Exception as exc: | CODE |
| LOW | tests/rl/test_trace_store.py | 64 | except Exception as exc: | CODE |
| LOW | autotest/cluster/clusterx.py | 99 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 134 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 159 | except Exception: | CODE |
| LOW | autotest/cluster/clusterx.py | 167 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 181 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 189 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 210 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 222 | 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 |
| LOW | …ner/v1/datasets/mllm_tokenize_fn/intern_s1_vl_utils.py | 54 | except Exception: | CODE |
| LOW | …r/v1/datasets/mllm_tokenize_fn/qwen3_vl_tokenize_fn.py | 510 | except Exception as e: | CODE |
| LOW | xtuner/v1/_writer/jsonl_writer.py | 93 | except Exception: | CODE |
| LOW | xtuner/v1/_writer/jsonl_writer.py | 128 | except Exception: | CODE |
| 150 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 | 11 | 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 | 27 | __all__ = [ | CODE |
| LOW | xtuner/v1/module/attention/__init__.py | 9 | __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__ = ["checkpoint_wrapper", "pytree_reentrant_checkpoint", "module_dict_repr", "ModelForwardExtraLogInfo"] | 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/tilelang.py | 82 | def _setup_tilelang_sparse_mla_context(ctx, inputs, output) -> None: | CODE |
| LOW | xtuner/v1/ops/sparse_mla/__init__.py | 95 | __all__ = [ | CODE |
| LOW⚡ | xtuner/v1/ops/sparse_mla/cudnn_dsa.py | 63 | def _setup_cudnn_dsa_sparse_mla_context(ctx, inputs, output) -> None: | CODE |
| LOW | xtuner/v1/ops/moe/cuda/triton_kernels/__init__.py | 30 | __all__ = ["k_grouped_gemm", "m_grouped_gemm"] | CODE |
| LOW | xtuner/v1/profiler/__init__.py | 23 | __all__ = [ | CODE |
| LOW | xtuner/v1/engine/__init__.py | 6 | __all__ = [ | CODE |
| LOW | xtuner/v1/rl/advantage/__init__.py | 16 | __all__ = [ | CODE |
| LOW | xtuner/v1/rl/weight_update/transport.py | 1078 | def _update_engines(self) -> None: | CODE |
| LOW | xtuner/v1/rl/weight_update/update_weighter.py | 79 | def _set_transport(self) -> None: | CODE |
| LOW | xtuner/v1/rl/weight_update/__init__.py | 24 | __all__ = [ | CODE |
| 58 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 | 43 | CODE | |
| LOW | xtuner/v1/data_proto/sequence_context.py | 104 | 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 | 447 | CODE | |
| LOW | xtuner/v1/module/decoder_layer/moe_decoder_layer.py | 200 | CODE | |
| LOW | xtuner/v1/module/decoder_layer/moe_decoder_layer.py | 206 | CODE | |
| LOW | xtuner/v1/module/decoder_layer/dense_decoder_layer.py | 39 | 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 | 303 | 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/train/trainer.py | 524 | 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 | |
| LOW | xtuner/v1/ops/flash_attn/gpu.py | 536 | CODE | |
| 37 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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/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 | 468 | # 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 | 643 | # 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 | 1581 | timeout: 1080 | 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/data_proto/sequence_context.py | 581 | # Background: | 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 | mtp_checkpoint_use_reentrant: Annotated[ | 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/attention/dsa_mla.py | 141 | # q: [bsz, S, Ni, Di]; k: [bsz, S, Di] | COMMENT |
| LOW | xtuner/v1/module/decoder_layer/moe_decoder_layer.py | 421 | post_dispatched = self.dispatcher.dispatch_postprocess( | 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/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/utils/checkpointing.py | 101 | ) -> torch.Tensor | tuple[torch.Tensor, ...]: | COMMENT |
| LOW | xtuner/v1/model/moe/moe.py | 701 | router_logits_list[micro_batch_idx][f"mtp_layer{mtp_idx}"] = mtp_router_results | COMMENT |
| LOW | xtuner/v1/model/moe/moe.py | 1261 | # 因而出现 original=COMPUTE、replay=REUSE,无法重建相同清单。 | COMMENT |
| LOW | xtuner/v1/model/moe/moe.py | 1461 | # For MoE models that can perform inference independently without FSDP, | COMMENT |
| LOW | xtuner/v1/train/trainer.py | 1961 | ) | 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⚡ | 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 | 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 | 1101 | # session_id is only set by agentic loops / XTUNER_DETERMINISTIC; plain RL falls back | 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 | 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 |
|---|---|---|---|---|
| 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 | 444 | # 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 |
|---|---|---|---|---|
| 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/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/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 |
|---|---|---|---|---|
| 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 | 61 | 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 |