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,159 GitHub stars. SynthScan v2.0 examined 310,485 lines of code across 1494 source files, recording 2565 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 11.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).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
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 2565 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 | 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 | …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_compile.py | 1 | 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/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 | |
| LOW | tests/model/test_intern_s1.py | 20 | CODE | |
| LOW | tests/model/test_qwen3_tile_embedding.py | 12 | CODE | |
| LOW | tests/model/test_qwen3_tile_embedding.py | 13 | CODE | |
| LOW | tests/model/test_qwen3_tile_embedding.py | 14 | CODE | |
| 787 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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/float8/triton_kernels/test_import.py | 23 | def test_cpu_actor_triton_kernels_import(self): | CODE |
| LOW | tests/module/test_rope.py | 33 | def test_fope_init_sin_coef_same(self): | CODE |
| LOW | tests/module/dispatcher/test_agrs_all2all.py | 24 | def test_dispatch_and_combine(self, dtype, device): | 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/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 |
| LOW⚡ | tests/datasets/test_long_text_tokenize.py | 40 | def test_shard_char_boundaries_short(): | CODE |
| LOW⚡ | tests/datasets/test_long_text_tokenize.py | 58 | def test_shard_char_boundaries_long(): | CODE |
| LOW⚡ | tests/datasets/test_long_text_tokenize.py | 91 | def test_mixed_short_long_jsonl(): | CODE |
| LOW⚡ | tests/datasets/test_long_text_tokenize.py | 206 | def test_call_runtime_char_range(): | CODE |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 23 | def test_intern_vl_sft_single_image(self): | CODE |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 54 | def test_intern_vl_sft_multi_image(self): | CODE |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 93 | def test_intern_vl_sft_one_video(self): | CODE |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 138 | def test_intern_vl_sft_multi_video(self): | CODE |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 179 | def test_intern_vl_sft_pure_text(self): | CODE |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 202 | def test_intern_vl_pretrain_pure_text(self): | CODE |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 219 | def test_intern_vl_pretrain_image(self): | CODE |
| LOW | tests/datasets/test_intern_vl_tokenize_fn.py | 241 | def test_intern_vl_pretrain_video(self): | CODE |
| LOW | tests/datasets/test_preset_sampler.py | 61 | def test_invalid_order_out_of_range(tmp_path): | CODE |
| LOW | tests/datasets/test_preset_sampler.py | 70 | def test_load_from_npy_file_mmap(tmp_path): | CODE |
| LOW | tests/datasets/test_preset_sampler.py | 99 | def test_state_dict_world_size_mismatch(tmp_path): | CODE |
| LOW | tests/datasets/test_preset_sampler.py | 133 | def test_round_down_too_short_raises(tmp_path): | CODE |
| LOW⚡ | tests/datasets/test_preset_pack_dataset.py | 116 | def test_valid_pack_exact_length(self, tmp_path): | CODE |
| LOW⚡ | tests/datasets/test_preset_pack_dataset.py | 126 | def test_invalid_dataset_path(self, tmp_path): | CODE |
| LOW⚡ | tests/datasets/test_preset_pack_dataset.py | 391 | def test_zero_token_filter_applied_by_default(self, tmp_path, monkeypatch): | CODE |
| LOW⚡ | tests/datasets/test_preset_pack_dataset.py | 438 | def test_forces_dataset_settings(self): | CODE |
| LOW⚡ | tests/datasets/test_preset_pack_dataset.py | 466 | def generate_stress_pack_config(num_slices: int, pack_max_length: int, out_dir: str) -> int: | CODE |
| LOW⚡ | tests/datasets/test_preset_pack_dataset.py | 612 | def test_generate_stress_pack_config(self, tmp_path): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 201 | def test_invalid_token_end_offset(self, tmp_path): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 211 | def test_invalid_token_end_offset_equal(self, tmp_path): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 279 | def test_mixed_dataitem_and_longtextdataitem(self, tmp_path): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 296 | def test_consistency_check_error_dataitem_got_longtext(self, tmp_path): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 309 | def test_consistency_check_error_longtext_fields_mismatch(self, tmp_path): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 322 | def test_plain_tokenizefn_token_start_offset_applied(self, tmp_path): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 339 | def test_longtextdataitem_no_extra_truncation(self, tmp_path): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 403 | def test_disable_filter_skips_zero_token_filter(self, tmp_path, monkeypatch): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 413 | def test_disable_filter_skips_max_length_filter(self, tmp_path, monkeypatch): | CODE |
| LOW | tests/datasets/test_preset_pack_dataset.py | 623 | def test_multiprocess_getitem(self, tmp_path): | CODE |
| LOW | tests/datasets/test_jsonl_dataset.py | 60 | def test_jsonl_dataset_smoke_test(self, enable_mmap_shared: bool): | CODE |
| LOW | tests/datasets/test_jsonl_dataset.py | 112 | def test_mmap_shared_pss_lower_than_baseline(self): | CODE |
| LOW⚡ | tests/datasets/test_jsonl_dataset.py | 254 | def test_cache_dir_npy_format_consistent(self): | CODE |
| LOW⚡ | tests/datasets/test_jsonl_dataset.py | 258 | def test_cache_tag_npy_format_consistent(self): | CODE |
| LOW⚡ | tests/datasets/test_jsonl_dataset.py | 262 | def test_cache_dir_npy_format_consistent_with_mmap(self): | CODE |
| LOW⚡ | tests/datasets/test_jsonl_dataset.py | 266 | def test_cache_tag_npy_format_consistent_with_mmap(self): | CODE |
| LOW⚡ | tests/datasets/test_jsonl_dataset.py | 270 | def test_mmap_fast_path_faster_than_slow_path(self): | CODE |
| LOW | tests/datasets/test_jsonl_dataset.py | 390 | def test_npy_dir_meta_save_and_mmap_reload(): | CODE |
| LOW | tests/datasets/test_jsonl_dataset.py | 412 | def test_build_sampled_indices_uses_numpy_array_and_matches_sampling_semantics(): | CODE |
| 682 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 | 31 | # ─── Test: Newton-Schulz functions ─────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 62 | # ─── Model for end-to-end tests ────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 150 | # ─── Reference optimizer ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 300 | # ─── Test: single-GPU correctness ─────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/optim/test_muon.py | 325 | # ── Build two identical models ─────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/optim/test_muon.py | 332 | # ── Reference path ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/optim/test_muon.py | 338 | # ── Production path ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 352 | # ── Compare all parameters ─────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 366 | # ─── Test: end-to-end FSDP ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 394 | # ── Build model on every rank, then broadcast rank-0 weights ───────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 402 | # ── Generate input data on rank 0 and scatter ──────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 413 | # ── Reference: forward all samples, average loss ───────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 420 | # ── Fully shard the test model (production path) ───────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 432 | # ── Production Muon optimizer step ──────────────────────────────────── | COMMENT |
| MEDIUM | tests/optim/test_muon.py | 437 | # ── 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 |
| 76 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 | 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 | 372 | 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 | 219 | 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 | 229 | CODE | |
| LOW | tests/model/test_qwen3_vl.py | 234 | CODE | |
| LOW | tests/model/test_gpt_oss_moe.py | 168 | 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 | 183 | CODE | |
| LOW | tests/model/test_qwen3_5.py | 313 | CODE | |
| LOW | tests/model/test_qwen3_moe.py | 287 | CODE | |
| LOW | tests/model/test_qwen3_moe.py | 359 | CODE | |
| LOW | tests/model/test_qwen3_moe.py | 515 | CODE | |
| LOW | tests/model/test_qwen3_5_dense.py | 373 | CODE | |
| LOW | tests/train/test_trainer.py | 582 | CODE | |
| LOW | tests/profiler/qwen35_vl_determ.py | 327 | CODE | |
| LOW | tests/rl/test_replay_buffer.py | 361 | CODE | |
| LOW | tests/rl/test_qwen35_vl_moe_async_train_2step.py | 340 | CODE | |
| LOW | autotest/cluster/clusterx.py | 25 | CODE | |
| LOW | autotest/module/train.py | 14 | CODE | |
| LOW | autotest/utils/metric_report.py | 89 | CODE | |
| LOW | autotest/utils/resume_validation.py | 35 | CODE | |
| LOW | autotest/utils/check_metric.py | 28 | CODE | |
| LOW | autotest/utils/check_metric.py | 42 | CODE | |
| LOW | autotest/utils/check_metric.py | 59 | CODE | |
| LOW | autotest/utils/check_metric.py | 159 | CODE | |
| LOW | autotest/utils/check_metric.py | 245 | CODE | |
| LOW | .claude/skills/model_normalize/repack_hf.py | 57 | CODE | |
| LOW | .claude/skills/model_normalize/repack_hf.py | 111 | CODE | |
| LOW | .claude/skills/model_patch/model_patch.py | 72 | CODE | |
| LOW | docs/design/redesign_disagg.py | 827 | CODE | |
| LOW | examples/v1/config/reasoning_rl_qwen3p5vl_mtp_ep.py | 261 | CODE | |
| LOW | examples/v1/config/agentic_rl_qwen3p5vl_mtp_ep_code.py | 41 | CODE | |
| LOW | examples/demo_data/multi_turn_2/map_fn.py | 2 | CODE | |
| LOW | .dev_scripts/convert_old_to_new_vlm_format.py | 68 | CODE | |
| LOW | .dev_scripts/analyze_train_logs.py | 104 | CODE | |
| LOW | xtuner/entry_point.py | 276 | CODE | |
| LOW | xtuner/v1/data_proto/rl_data.py | 256 | CODE | |
| LOW | xtuner/v1/data_proto/messages/qwen35_chat.py | 48 | CODE | |
| LOW | xtuner/v1/data_proto/messages/qwen35_chat.py | 134 | CODE | |
| LOW | xtuner/v1/data_proto/messages/qwen35_chat.py | 316 | CODE | |
| LOW | xtuner/v1/data_proto/messages/chat.py | 98 | CODE | |
| LOW | xtuner/v1/data_proto/messages/chat.py | 118 | CODE | |
| 167 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/engine/test_moe_train_engine_float8.py | 390 | except Exception: | CODE |
| LOW | tests/rl/test_replay_buffer.py | 369 | except Exception as exc: | CODE |
| LOW | tests/rl/test_rl_colocate_trainer.py | 375 | except Exception as exc: | CODE |
| LOW | autotest/cluster/clusterx.py | 62 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 95 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 120 | except Exception: | CODE |
| LOW | autotest/cluster/clusterx.py | 128 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 142 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 150 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 171 | except Exception as e: | CODE |
| LOW | autotest/cluster/clusterx.py | 183 | 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 | 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/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 | 509 | 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 |
| LOW | xtuner/v1/_writer/jsonl_writer.py | 139 | except Exception: | CODE |
| MEDIUM | xtuner/v1/_writer/jsonl_writer.py | 88 | def __del__(self): | CODE |
| LOW | xtuner/v1/utils/misc.py | 147 | except Exception as e: | CODE |
| LOW | xtuner/v1/utils/misc.py | 240 | except Exception as e: | CODE |
| LOW | xtuner/v1/utils/device.py | 20 | except Exception: | CODE |
| LOW | xtuner/v1/utils/track_rl_mem.py | 469 | except Exception: | CODE |
| LOW | xtuner/v1/utils/env_check.py | 16 | except Exception: | CODE |
| LOW | xtuner/v1/utils/executor.py | 47 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | xtuner/v1/utils/executor.py | 147 | except Exception: | CODE |
| LOW⚡ | xtuner/v1/patch/dcp_async_port.py | 73 | except Exception: | CODE |
| LOW | xtuner/v1/model/base.py | 837 | except Exception as exc: | CODE |
| LOW | xtuner/v1/model/compose/base.py | 272 | except Exception as exc: | CODE |
| LOW | xtuner/v1/model/compose/intern_s1/modeling_intern_s1.py | 178 | except Exception as e: | CODE |
| LOW | xtuner/v1/model/compose/qwen3_vl/modeling_qwen3_vl.py | 176 | except Exception as e: | CODE |
| LOW | xtuner/v1/train/trainer.py | 1499 | except Exception: | CODE |
| LOW | xtuner/v1/train/cli/rl.py | 34 | except Exception as exc: | CODE |
| LOW | xtuner/v1/engine/train_engine.py | 471 | except Exception: | CODE |
| LOW | xtuner/v1/engine/train_engine.py | 475 | except Exception: | CODE |
| MEDIUM | xtuner/v1/engine/train_engine.py | 468 | def __del__(self) -> None: | CODE |
| LOW | xtuner/v1/rl/weight_update/transport.py | 205 | except Exception: | CODE |
| LOW | xtuner/v1/rl/weight_update/transport.py | 350 | except Exception: | CODE |
| LOW | xtuner/v1/rl/weight_update/transport.py | 523 | except Exception as e: | CODE |
| LOW | xtuner/v1/rl/weight_update/transport.py | 564 | except Exception as e: | CODE |
| LOW⚡ | xtuner/v1/rl/weight_update/transport.py | 647 | except Exception: | CODE |
| LOW | xtuner/v1/rl/weight_update/transport.py | 830 | except Exception as e: | CODE |
| 105 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | ci/scripts/check_metric.py | 12 | logger = logging.getLogger(__name__) | 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 | 7 | __all__ = ["BaseMessages", "ChatMessages", "Qwen35ChatMessages"] | CODE |
| LOW | xtuner/v1/data_proto/templates/__init__.py | 120 | __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 | 82 | __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/patch/__init__.py | 6 | __all__ = [ | CODE |
| LOW | xtuner/v1/patch/xtuner_storage.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | xtuner/v1/model/__init__.py | 70 | __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", "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__ = ["all_to_all_single_autograd", "ulysses_all_to_all", "split_for_sequence_parallel"] | 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/update_weighter.py | 81 | def _set_transport(self) -> None: | CODE |
| LOW | xtuner/v1/rl/weight_update/__init__.py | 23 | __all__ = [ | CODE |
| LOW | xtuner/v1/rl/utils/__init__.py | 67 | __all__ = [ | CODE |
| LOW | xtuner/v1/rl/utils/ray_cpu_worker.py | 612 | def set_cpu_resource_manager(manager: CPUResourceManager | None) -> None: | CODE |
| LOW | xtuner/v1/rl/agent_loop/__init__.py | 14 | __all__ = [ | CODE |
| LOW | xtuner/v1/rl/agent_loop/sandbox_agent_loop/__init__.py | 51 | __all__ = [ | CODE |
| LOW | xtuner/v1/rl/agent_loop/sandbox_agent_loop/schemas.py | 257 | __all__ = [ | CODE |
| LOW | xtuner/v1/rl/agent_loop/sandbox_agent_loop/judger.py | 64 | __all__ = ["Judger"] | CODE |
| LOW | …ner/v1/rl/agent_loop/localhost_agent_loop/local_run.py | 172 | __all__ = ["main", "main_async"] | CODE |
| LOW | xtuner/v1/rl/agent_loop/localhost_agent_loop/runner.py | 123 | __all__ = ["LocalhostRunner"] | CODE |
| LOW | xtuner/v1/rl/agent_loop/localhost_agent_loop/compose.py | 72 | __all__ = ["LocalhostComposeStage"] | CODE |
| 43 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/rl/test_replay_buffer.py | 39 | CODE | |
| LOW | tests/rl/test_prepare_train_data.py | 43 | CODE | |
| LOW | xtuner/v1/data_proto/sequence_context.py | 59 | 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 | 297 | 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 | 347 | CODE | |
| LOW | xtuner/v1/module/decoder_layer/moe_decoder_layer.py | 190 | CODE | |
| LOW | xtuner/v1/module/decoder_layer/moe_decoder_layer.py | 196 | 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 | 276 | CODE | |
| LOW | …r/v1/datasets/mllm_tokenize_fn/qwen3_vl_tokenize_fn.py | 500 | CODE | |
| LOW | …r/v1/datasets/mllm_tokenize_fn/qwen3_vl_tokenize_fn.py | 652 | CODE | |
| LOW | …r/v1/datasets/mllm_tokenize_fn/qwen3_vl_tokenize_fn.py | 1048 | CODE | |
| LOW | xtuner/v1/datasets/pt_tokenize_fn/long_text.py | 28 | CODE | |
| LOW | xtuner/v1/optim/muon.py | 280 | 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 | 1342 | CODE | |
| LOW | xtuner/v1/train/trainer.py | 521 | 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 | 30 | 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/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 | |
| LOW | xtuner/v1/engine/train_engine.py | 191 | CODE | |
| 34 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 | 89 | Calculate the padding length needed to make the input length divisible by divisors. Args: length: The i | STRING |
| HIGH | xtuner/v1/model/base.py | 161 | 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 | 318 | 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 | 76 | # Create a fake model file | COMMENT |
| MEDIUM | tests/train/test_trainer.py | 79 | # Create a fake config file | COMMENT |
| MEDIUM | tests/engine/test_moe_train_engine_float8.py | 376 | # 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 | 357 | # 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 | 633 | # 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 | 301 | # - GPTOSS_21B_PATH=/mnt/shared-storage-user/llmrazor-share/model/gpt-oss-20b-bf16 | 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 | 501 | self.position_ids = self.position_ids.to(device) # type: ignore | COMMENT |
| LOW | xtuner/v1/loss/base_loss_ctx.py | 21 | # There are 3 steps to compute the calibrated loss: | COMMENT |
| LOW | xtuner/v1/float8/triton_kernels/trans_quant_per_tile.py | 221 | # m_aligned = (m + 127) // 128 * 128 | COMMENT |
| LOW | xtuner/v1/module/decoder_layer/moe_decoder_layer.py | 401 | pre_dispatched=pre_dispatched, | 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/model/base.py | 661 | # MoE._replicate_other_params on ep_mesh before _fully_shard | COMMENT |
| LOW | xtuner/v1/model/base.py | 1001 | # TODO: HardCode here. The initialization method should be module specific. All module in model | COMMENT |
| LOW | xtuner/v1/model/base.py | 1021 | # | COMMENT |
| LOW | xtuner/v1/model/moe/moe.py | 601 | # MTP routed experts feed the same balancing / z aux loss as the main MoE layers | COMMENT |
| LOW | xtuner/v1/model/moe/moe.py | 1241 | ) | 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 | 33 | # 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 |
|---|---|---|---|---|
| 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/train/rl_trainer.py | 1047 | # 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 |
|---|---|---|---|---|
| CRITICAL | tests/model/test_qwen3_tile_embedding.py | 167 | embedding_weight = engine.model.language_model.embed_tokens.weight.full_tensor().mean().item() | CODE |
| CRITICAL | tests/model/test_qwen3_tile_embedding.py | 168 | lm_head_weight = engine.model.language_model.lm_head.weight.full_tensor().mean().item() | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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 | 326 | "cd /tmp && tar xzf /tmp/_lagent.tar.gz && rm /tmp/_lagent.tar.gz", | 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 | 388 | # 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 | 25 | 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 |