Unified Efficient Fine-Tuning of 100+ LLMs & VLMs (ACL 2024)
This report summarizes scanner evidence for hiyouga/LlamaFactory, a Python project with 75,401 GitHub stars. SynthScan examined 117,756 lines of code across 571 source files, recording 1450 pattern matches distributed across 24 syntactic categories. The legacy adjusted pattern signal is 14.9 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 878 finding(s).
Are imports declared and package/API names verified? 419 finding(s).
Are wrappers, guards, and repeated structures necessary? 494 finding(s).
Which changes need focused human review? 1450 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1450 distinct pattern matches across 24 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/data/test_mm_plugin.py | 31 | CODE | |
| LOW | tests/data/test_mm_plugin.py | 31 | CODE | |
| LOW | tests/data/test_mm_plugin.py | 34 | CODE | |
| LOW | tests/data/test_mm_plugin.py | 35 | CODE | |
| LOW | tests/data/test_template.py | 36 | CODE | |
| LOW | docs/zh/conf.py | 8 | CODE | |
| LOW | docs/en/conf.py | 8 | CODE | |
| LOW | tests_v1/plugins/model_plugins/test_kernel_plugin.py | 100 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/__init__.py | 22 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/format.py | 25 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 15 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 16 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 16 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 17 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 17 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 17 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 18 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 19 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 20 | CODE | |
| LOW | src/llamafactory/v1/config/__init__.py | 21 | CODE | |
| LOW | …ry/v1/plugins/trainer_plugins/distributed/interface.py | 21 | CODE | |
| LOW | …factory/v1/plugins/trainer_plugins/distributed/base.py | 15 | CODE | |
| LOW | …ory/v1/plugins/trainer_plugins/optimizers/optimizer.py | 15 | CODE | |
| LOW | src/llamafactory/v1/plugins/model_plugins/chunk_loss.py | 17 | CODE | |
| LOW | …afactory/v1/plugins/model_plugins/kernels/interface.py | 22 | CODE | |
| LOW | …afactory/v1/plugins/model_plugins/kernels/interface.py | 23 | CODE | |
| LOW | …afactory/v1/plugins/model_plugins/kernels/interface.py | 24 | CODE | |
| LOW | …afactory/v1/plugins/model_plugins/kernels/interface.py | 25 | CODE | |
| LOW | …afactory/v1/plugins/model_plugins/kernels/interface.py | 26 | CODE | |
| LOW | …afactory/v1/plugins/model_plugins/kernels/interface.py | 27 | CODE | |
| LOW | …afactory/v1/plugins/model_plugins/kernels/interface.py | 28 | CODE | |
| LOW | …y/v1/plugins/model_plugins/kernels/liger_kernel_ops.py | 27 | CODE | |
| LOW | …y/v1/plugins/model_plugins/kernels/liger_kernel_ops.py | 58 | CODE | |
| LOW | …gins/model_plugins/kernels/ops/linear_attention/fla.py | 53 | CODE | |
| LOW | …gins/model_plugins/kernels/ops/linear_attention/fla.py | 54 | CODE | |
| LOW | …ins/model_plugins/kernels/ops/rms_norm/npu_rms_norm.py | 30 | CODE | |
| LOW | …/v1/plugins/model_plugins/kernels/ops/rope/npu_rope.py | 29 | CODE | |
| LOW | …v1/plugins/model_plugins/kernels/ops/mlp/npu_swiglu.py | 29 | CODE | |
| LOW | …ctory/v1/plugins/model_plugins/parallelization/hook.py | 17 | CODE | |
| LOW | src/llamafactory/v1/utils/packages.py | 34 | CODE | |
| LOW | src/llamafactory/v1/utils/plugin.py | 17 | CODE | |
| LOW | src/llamafactory/v1/utils/callbacks/__init__.py | 15 | CODE | |
| LOW | src/llamafactory/v1/utils/callbacks/__init__.py | 16 | CODE | |
| LOW | src/llamafactory/v1/utils/callbacks/__init__.py | 16 | CODE | |
| LOW | src/llamafactory/v1/utils/callbacks/__init__.py | 16 | CODE | |
| LOW | src/llamafactory/v1/utils/callbacks/logging_callback.py | 15 | CODE | |
| LOW | src/llamafactory/v1/utils/callbacks/trainer_callback.py | 15 | CODE | |
| LOW | src/llamafactory/v1/accelerator/interface.py | 43 | CODE | |
| LOW | src/llamafactory/v1/samplers/cli_sampler.py | 88 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 33 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 33 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 33 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 34 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 36 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 37 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 37 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 37 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 38 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 38 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 38 | CODE | |
| 332 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 87 | def _handle_device_visibility(items: list[Item]): | CODE |
| LOW | tests/conftest.py | 111 | def pytest_collection_modifyitems(config: Config, items: list[Item]): | CODE |
| LOW | tests/conftest.py | 125 | def _cleanup_distributed_state(): | CODE |
| LOW | tests/conftest.py | 170 | def fix_valuehead_cpu_loading(): | CODE |
| LOW | tests/conftest.py | 176 | def bypass_mistral_regex_check(): | CODE |
| LOW | tests/model/test_freeze.py | 46 | def test_freeze_train_all_modules(): | CODE |
| LOW | tests/model/test_freeze.py | 57 | def test_freeze_train_extra_modules(): | CODE |
| LOW⚡ | tests/model/test_lora.py | 58 | def test_lora_train_qv_modules(): | CODE |
| LOW⚡ | tests/model/test_lora.py | 64 | def test_lora_train_all_modules(): | CODE |
| LOW⚡ | tests/model/test_lora.py | 70 | def test_lora_train_extra_modules(): | CODE |
| LOW⚡ | tests/model/test_lora.py | 76 | def test_lora_train_old_adapters(): | CODE |
| LOW⚡ | tests/model/test_lora.py | 82 | def test_lora_train_new_adapters(): | CODE |
| LOW⚡ | tests/model/test_lora.py | 91 | def test_lora_train_valuehead(): | CODE |
| LOW | tests/model/model_utils/test_visual.py | 113 | def test_moss_vl_lora_target_all(freeze_vision_tower: bool): | CODE |
| LOW | tests/model/model_utils/test_visual.py | 135 | def test_moss_vl_projector_modules(): | CODE |
| LOW | tests/model/model_utils/test_visual.py | 143 | def test_moss_vl_quantized_projector_hook_skips_parameter(): | CODE |
| LOW | tests/model/model_utils/test_visual.py | 209 | def test_visual_model_save_load(): | CODE |
| LOW⚡ | tests/model/model_utils/test_embedding.py | 51 | def test_resolve_new_token_ids_returns_none_without_config(): | CODE |
| LOW⚡ | tests/model/model_utils/test_embedding.py | 57 | def test_resolve_new_token_ids_filters_invalid_and_dedups(): | CODE |
| LOW⚡ | tests/model/model_utils/test_embedding.py | 67 | def test_existing_embeddings_excludes_new_token_ids(): | CODE |
| LOW | tests/model/model_utils/test_embedding.py | 80 | def test_noisy_mean_initialization_with_token_ids_targets_exact_rows(): | CODE |
| LOW | tests/model/model_utils/test_embedding.py | 103 | def test_noisy_mean_initialization_tail_fallback(): | CODE |
| LOW | tests/model/model_utils/test_embedding.py | 118 | def test_description_init_excludes_new_token_ids_from_average(): | CODE |
| LOW | tests/model/model_utils/test_packing.py | 37 | def test_get_seqlens_in_batch(attention_mask, golden_seq_lens): | CODE |
| LOW | tests/model/model_utils/test_checkpointing.py | 43 | def test_vanilla_checkpointing(disable_gradient_checkpointing: bool): | CODE |
| LOW | tests/model/model_utils/test_checkpointing.py | 49 | def test_unsloth_gradient_checkpointing(): | CODE |
| LOW | tests/model/model_utils/test_checkpointing.py | 62 | def test_upcast_lmhead_output(): | CODE |
| LOW | tests/train/megatron_bridge/test_megatron_bridge_gpu.py | 23 | def test_check_backend_available(): | CODE |
| LOW | tests/train/megatron_bridge/test_megatron_bridge_gpu.py | 28 | def test_auto_bridge_provider_creation(mb_model_path: str): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_model_support.py | 70 | def test_megatron_bridge_supported_models_match_expected(): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_model_support.py | 75 | def test_check_model_support_accepts_supported(model_type: str): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_model_support.py | 84 | def test_check_model_support_rejects_unsupported(model_type: str): | CODE |
| LOW | tests/train/megatron_bridge/test_dataset_export.py | 28 | def test_inject_generation_block_into_llama_factory_template(): | CODE |
| LOW | tests/train/megatron_bridge/test_dataset_export.py | 41 | def test_example_to_record_messages_format(): | CODE |
| LOW | tests/train/megatron_bridge/test_dataset_export.py | 53 | def test_example_to_record_pretrain_text(): | CODE |
| LOW | tests/train/megatron_bridge/test_dataset_export.py | 59 | def test_example_to_record_sharegpt_format(): | CODE |
| LOW | tests/train/megatron_bridge/test_dataset_export.py | 76 | def test_export_dataset_for_megatron_bridge(mb_output_dir: Path, mb_model_path: str): | CODE |
| LOW | tests/train/megatron_bridge/test_dataset_export.py | 99 | def test_get_sft_dataset_kwargs_enables_chat(): | CODE |
| LOW | tests/train/megatron_bridge/test_dataset_export.py | 105 | def test_tokenizer_supports_hf_chat_template_on_gpu(mb_model_path: str): | CODE |
| LOW | tests/train/megatron_bridge/test_config_builder.py | 74 | def test_compute_train_schedule_max_steps(): | CODE |
| LOW | tests/train/megatron_bridge/test_config_builder.py | 87 | def test_apply_model_parallelism(): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_config_builder.py | 115 | def test_megatron_bridge_args_rejects_invalid_moe_dispatcher(): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_config_builder.py | 120 | def test_apply_fusion_safety_disables_missing_apex(): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_config_builder.py | 126 | def test_megatron_bridge_args_sequence_parallel_requires_tp(): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_config_builder.py | 131 | def test_resolve_warmup_steps_keeps_absolute_warmup(): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_config_builder.py | 136 | def test_resolve_decay_iters_expands_for_warmup(): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_config_builder.py | 144 | def test_megatron_bridge_args_extra_config_strips_whitespace(): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_config_builder.py | 149 | def test_apply_extra_overrides_nested_path(): | CODE |
| LOW⚡ | tests/train/megatron_bridge/test_config_builder.py | 155 | def test_should_resume_checkpoint_respects_overwrite(tmp_path): | CODE |
| LOW | tests/train/megatron_bridge/test_config_builder.py | 166 | def test_build_sft_config_on_gpu(mb_training_args_factory, mb_output_dir): | CODE |
| LOW | tests/train/megatron_bridge/test_config_builder.py | 189 | def test_build_pretrain_config_on_gpu(mb_training_args_factory, mb_output_dir): | CODE |
| LOW | tests/data/test_collator.py | 234 | def _get_expected_position_ids( | CODE |
| LOW | tests/data/test_collator.py | 274 | def test_multimodal_collator_with_packing(): | CODE |
| LOW | tests/data/test_moss_vl_training_configs.py | 23 | def test_moss_vl_training_configs_are_unpacked_and_additive(): | CODE |
| LOW | tests/data/test_mm_plugin.py | 317 | def test_llava_next_video_plugin(): | CODE |
| LOW | tests/data/test_formatter.py | 64 | def test_multi_function_formatter(): | CODE |
| LOW | tests/data/test_formatter.py | 75 | def test_default_tool_formatter(): | CODE |
| LOW | tests/data/test_formatter.py | 94 | def test_default_tool_extractor(): | CODE |
| LOW | tests/data/test_formatter.py | 101 | def test_default_multi_tool_extractor(): | CODE |
| LOW | tests/data/test_formatter.py | 193 | def test_mistral_function_formatter(): | CODE |
| 263 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker/docker-xpu/docker-compose.yml | 21 | tty: true | COMMENT |
| LOW | docker/docker-xpu/docker-compose.yml | 41 | # update these values accordingly. | COMMENT |
| LOW | tests/conftest.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/check_license.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/test_freeze.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/test_pissa.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/test_full.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/test_base.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/test_lora.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/model_utils/test_misc.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/model_utils/test_visual.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/model_utils/test_add_tokens.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/model_utils/test_embedding.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/model_utils/test_attention.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/model_utils/test_packing.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/model/model_utils/test_checkpointing.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/train/test_sft_trainer.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/train/megatron_bridge/conftest.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/train/megatron_bridge/test_megatron_bridge_gpu.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/train/megatron_bridge/test_model_support.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/train/megatron_bridge/test_dataset_export.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/train/megatron_bridge/test_config_builder.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/eval/test_eval_template.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/e2e/test_train.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/e2e/test_sglang.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/e2e/test_chat.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/test_collator.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/test_loader.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/test_moss_vl_training_configs.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/test_mm_plugin.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/test_formatter.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/test_converter.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/test_moss_vl_plugin.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/test_template.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/processor/test_feedback.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/processor/test_supervised.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/processor/test_pairwise.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/processor/test_unsupervised.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests/data/processor/test_processor_utils.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/conftest.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/core/test_data_engine.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/core/test_model_loader.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/core/utils/test_batching.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/core/rendering/test_rendering.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/config/test_args_parser.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | …s_v1/plugins/trainer_plugins/distributed/test_fsdp2.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | …ugins/trainer_plugins/distributed/test_fsdpturbo_ep.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | …ainer_plugins/distributed/test_fsdp2_weight_convert.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | …s_v1/plugins/model_plugins/test_quantization_plugin.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/plugins/model_plugins/test_peft.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/plugins/model_plugins/test_chunk_loss.py | 1 | # Copyright 2026 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/plugins/model_plugins/test_kernel_plugin.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/plugins/model_plugins/test_init_plugin.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/plugins/model_plugins/test_ulysses_cp.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/plugins/data_plugins/test_converter.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/trainers/test_fsdp2_dpo_trainer.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/trainers/test_fsdp2_sft_trainer.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/trainers/test_dpo_loss_precision.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/accelerator/test_interface.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| LOW | tests_v1/sampler/test_cli_sampler.py | 1 | # Copyright 2025 the LlamaFactory team. | COMMENT |
| 264 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests_v1/trainers/test_dpo_loss_precision.py | 27 | # ============================================================================== | COMMENT |
| MEDIUM | tests_v1/trainers/test_dpo_loss_precision.py | 29 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 57 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 59 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 67 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 69 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 167 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 169 | # ============================================================================== | COMMENT |
| MEDIUM | tests_v1/trainers/test_dpo_loss_precision.py | 210 | # ============================================================================== | COMMENT |
| MEDIUM | tests_v1/trainers/test_dpo_loss_precision.py | 212 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 51 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 53 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 251 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 253 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 273 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 275 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 334 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 336 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 355 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 357 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 32 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 34 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 50 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 53 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 181 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 184 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 285 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 287 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 352 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/model_plugins/kernels/ops/mlp/triton_grouped_gemm.py | 354 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 136 | # ------------------------------------------------------------------ | STRING |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 138 | # ------------------------------------------------------------------ | STRING |
| MEDIUM⚡ | src/llamafactory/v1/trainers/dpo_trainer.py | 169 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src/llamafactory/v1/trainers/dpo_trainer.py | 171 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 249 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 251 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 289 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 291 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 315 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 317 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 351 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 353 | # ------------------------------------------------------------------ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 133 | CODE | |
| LOW | tests/data/test_collator.py | 140 | CODE | |
| LOW | tests/data/test_mm_plugin.py | 118 | CODE | |
| LOW | tests_v1/conftest.py | 145 | CODE | |
| LOW | tests_v1/plugins/model_plugins/test_kernel_plugin.py | 42 | CODE | |
| LOW | tests_v1/plugins/model_plugins/test_kernel_plugin.py | 66 | CODE | |
| LOW | scripts/vllm_infer.py | 47 | CODE | |
| LOW | scripts/llama_pro.py | 40 | CODE | |
| LOW | scripts/convert_ckpt/llamafy_qwen.py | 39 | CODE | |
| LOW | scripts/stat_utils/cal_mfu.py | 86 | CODE | |
| LOW | src/llamafactory/launcher.py | 38 | CODE | |
| LOW | src/llamafactory/v1/launcher.py | 34 | CODE | |
| LOW | src/llamafactory/v1/core/base_trainer.py | 250 | CODE | |
| LOW | src/llamafactory/v1/core/data_engine.py | 101 | CODE | |
| LOW | src/llamafactory/v1/core/utils/batching.py | 124 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/escape.py | 62 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/rendering.py | 262 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/format.py | 38 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/format.py | 101 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/format.py | 115 | CODE | |
| LOW | src/llamafactory/v1/config/arg_utils.py | 61 | CODE | |
| LOW | src/llamafactory/v1/plugins/trainer_plugins/batching.py | 123 | CODE | |
| LOW | …actory/v1/plugins/trainer_plugins/distributed/fsdp2.py | 230 | CODE | |
| LOW | …actory/v1/plugins/trainer_plugins/distributed/fsdp2.py | 372 | CODE | |
| LOW | …actory/v1/plugins/trainer_plugins/distributed/fsdp2.py | 495 | CODE | |
| LOW | …ry/v1/plugins/trainer_plugins/distributed/fsdpturbo.py | 355 | CODE | |
| LOW | src/llamafactory/v1/plugins/model_plugins/peft.py | 207 | CODE | |
| LOW | …plugins/model_plugins/parallelization/gdn_attention.py | 258 | CODE | |
| LOW | src/llamafactory/v1/plugins/data_plugins/converter.py | 173 | CODE | |
| LOW | src/llamafactory/chat/hf_engine.py | 73 | CODE | |
| LOW | src/llamafactory/chat/chat_model.py | 47 | CODE | |
| LOW | src/llamafactory/hparams/parser.py | 395 | CODE | |
| LOW | src/llamafactory/third_party/triton/utils.py | 39 | CODE | |
| LOW | src/llamafactory/third_party/triton/utils.py | 70 | CODE | |
| LOW | src/llamafactory/third_party/triton/utils.py | 74 | CODE | |
| LOW | src/llamafactory/third_party/triton/chunk_o.py | 34 | CODE | |
| LOW | src/llamafactory/third_party/triton/chunk_o.py | 327 | CODE | |
| LOW | src/llamafactory/third_party/triton/wy_fast.py | 28 | CODE | |
| LOW | src/llamafactory/third_party/triton/wy_fast.py | 183 | CODE | |
| LOW | src/llamafactory/model/adapter.py | 147 | CODE | |
| LOW | src/llamafactory/model/loader.py | 137 | CODE | |
| LOW | src/llamafactory/model/patcher.py | 88 | CODE | |
| LOW | src/llamafactory/model/patcher.py | 437 | CODE | |
| LOW | src/llamafactory/model/model_utils/attention.py | 31 | CODE | |
| LOW | src/llamafactory/model/model_utils/quantization.py | 86 | CODE | |
| LOW | src/llamafactory/model/model_utils/liger_kernel.py | 31 | CODE | |
| LOW | src/llamafactory/model/model_utils/moe.py | 160 | CODE | |
| LOW | src/llamafactory/train/trainer_utils.py | 151 | CODE | |
| LOW | src/llamafactory/train/trainer_utils.py | 200 | CODE | |
| LOW | src/llamafactory/train/trainer_utils.py | 288 | CODE | |
| LOW | src/llamafactory/train/trainer_utils.py | 372 | CODE | |
| LOW | src/llamafactory/train/tuner.py | 69 | CODE | |
| LOW | src/llamafactory/train/hyper_parallel/workflow.py | 73 | CODE | |
| LOW | …c/llamafactory/train/megatron_bridge/dataset_export.py | 170 | CODE | |
| LOW | src/llamafactory/train/megatron_bridge/workflow.py | 65 | CODE | |
| LOW | src/llamafactory/train/dpo/trainer.py | 45 | CODE | |
| LOW | src/llamafactory/train/pt/workflow.py | 36 | CODE | |
| LOW | src/llamafactory/train/sft/trainer.py | 50 | CODE | |
| LOW | src/llamafactory/train/ppo/trainer.py | 311 | CODE | |
| LOW | src/llamafactory/train/kto/trainer.py | 44 | CODE | |
| 49 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | data/kto_en_demo.json | 67 | "content": "Certainly, measuring the results of a marketing strategy and making adjustments based on those metri | CODE |
| MEDIUM | data/kto_en_demo.json | 394 | "content": "Using Unreal's Gameplay Ability System (GAS) in conjunction with interpolation and prediction can pr | CODE |
| LOW⚡ | data/kto_en_demo.json | 903 | "content": "I apologize for the confusion. The `unique_id` parameter in the `momepy.Tessellation` function expec | CODE |
| MEDIUM | data/kto_en_demo.json | 2012 | "content": "Two-factor authentication (2FA) adds an extra layer of security by requiring users to provide two fo | CODE |
| MEDIUM | data/kto_en_demo.json | 2114 | "content": "To adapt the program to handle in-place modification or the creation of new objects based on a boole | CODE |
| MEDIUM | data/kto_en_demo.json | 2449 | "content": "I'm not sure where you've heard that information, but as an AI language model, I can share some fact | CODE |
| MEDIUM | data/kto_en_demo.json | 2790 | "content": "To derive the original matrix from the rotated one, you would need to perform a 90 degrees counter-c | CODE |
| MEDIUM | data/kto_en_demo.json | 3013 | "content": "The genetic factors that contribute to the intricate design of the peacock's tail feathers are quite | CODE |
| MEDIUM | data/kto_en_demo.json | 3585 | "content": "As an AI language model,I cannot determine the sentiment of the product review without further conte | CODE |
| MEDIUM | data/kto_en_demo.json | 3611 | "content": "I'm unable to provide you with a real-time percentage of population living in poverty in Marlborough | CODE |
| LOW | data/kto_en_demo.json | 3690 | "content": "Firstly, as a fitness trainer, I highly recommend consulting with a healthcare professional before e | CODE |
| MEDIUM | data/kto_en_demo.json | 3850 | "content": "Since each medium-sized box measures 2 feet on all sides, its volume will be: 2*2*2 = 8 cubic feet. | CODE |
| MEDIUM | data/kto_en_demo.json | 4774 | "content": "In Feng Shui, the five elements—wood, fire, earth, metal, and water—are believed to interact in cert | CODE |
| MEDIUM | data/kto_en_demo.json | 4897 | "content": "Sure, I understand the problem. However, I'm a large language model, I cannot provide a correct answ | CODE |
| MEDIUM | data/kto_en_demo.json | 4923 | "content": "As an AI language model, I am not able to provide program codes or algorithms. However, I can provid | CODE |
| MEDIUM | data/alpaca_en_demo.json | 405 | "output": "I am sorry, but as an AI language model, I do not have the data or access to real-time information to det | CODE |
| MEDIUM | data/alpaca_en_demo.json | 930 | "output": "I'm sorry, but I don't have access to external articles or news sources so I'm unable to read or summariz | CODE |
| LOW | data/alpaca_en_demo.json | 1175 | "output": "Here is an example of HTML code that can be used to create a web page that displays the temperature of th | CODE |
| MEDIUM | data/alpaca_en_demo.json | 3330 | "output": "As an AI, I don't have a physical house, so I cannot provide a description of it. Can I help you with som | CODE |
| MEDIUM | data/alpaca_en_demo.json | 3900 | "output": "Thank you for considering my request. Please let me know if you need any additional information, and I lo | CODE |
| MEDIUM | data/alpaca_en_demo.json | 3905 | "output": "I'm sorry, but I'm unable to come into work today due to unforeseen medical issues. I woke up with a seve | CODE |
| MEDIUM | data/alpaca_en_demo.json | 3975 | "output": "As an AI, I don’t have access to real-time information such as pricing, and due to the fact that movie ti | CODE |
| MEDIUM | data/alpaca_en_demo.json | 4090 | "output": "I am sorry, but as an AI language model, I do not have access to up-to-date information on housing prices | CODE |
| MEDIUM | data/alpaca_en_demo.json | 4505 | "output": "Sure, here is a simple example of a class for a car:\n\n```python\n\nclass Car:\n \n def __init__(sel | CODE |
| MEDIUM | data/alpaca_en_demo.json | 4715 | "output": "I'm sorry, but as an AI language model, I'm unable to create or display graphical content. However, I can | CODE |
| MEDIUM | data/alpaca_en_demo.json | 4715 | "output": "I'm sorry, but as an AI language model, I'm unable to create or display graphical content. However, I can | CODE |
| MEDIUM | data/alpaca_en_demo.json | 4870 | "output": "As an AI, I can assist you in coming up with design ideas and concepts for the logo. However, I'm unable | CODE |
| MEDIUM | data/alpaca_zh_demo.json | 4470 | "output": "As an AI language model I am capable of analyzing text and identifying emotions, however, the sentence pr | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 1232 | "value": "I'm sorry, but I'm unable to perform external tasks like ordering a pizza. My capabilities are current | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 1295 | "value": "Analyzing the motivations of a protagonist in a narrative can be a complex task that requires a deep u | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 3349 | "value": "To create a stacked bar chart in D3.js, you can modify the code to use the D3.js `stack()` function to | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 3452 | "value": "I'm sorry, but I'm unable to assist with booking flights as it's an external task. My current capabili | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 4143 | "value": "I'm sorry, but I'm unable to assist with that. My current capabilities allow me to calculate Body Mass | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 4328 | "value": "I'm sorry, but I'm unable to assist with that. My current capabilities are limited to generating invoi | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 5069 | "value": "I'm sorry, but I'm unable to assist with booking flights. My current capabilities are limited to calcu | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 5818 | "value": "I'm sorry, but I'm unable to perform external tasks like ordering a pizza. My current capabilities are | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 6538 | "value": "I'm sorry, but I'm unable to perform external tasks such as ordering a pizza. My current capabilities | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 6667 | "value": "I'm sorry, but I'm unable to assist with that. My current capabilities are limited to calculating the | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 6725 | "value": "I'm sorry, but I'm unable to assist with that. Booking a flight is an external task and I don't have a | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 6809 | "value": "I'm sorry, but I'm unable to perform external tasks like ordering a pizza. My capabilities are limited | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 6901 | "value": "Sure, here is how you can compile the recipe from the JSON data:\nRecipe: Tomato Spaghetti\nIngredient | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 7020 | "value": "I'm sorry, but I'm unable to assist with that. My current capabilities are limited to the functions pr | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 7592 | "value": "I'm sorry, but I'm unable to assist with booking flights. My current capabilities are limited to gener | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 8510 | "value": "I'm sorry, but I'm unable to assist with that. Booking a flight is an external task and I don't have a | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 8557 | "value": "I'm sorry, but I'm unable to book movie tickets as it's an external task and I don't have a function p | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 8823 | "value": "I'm sorry, but I'm unable to assist with booking flights. My current capabilities are limited to calcu | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 8984 | "value": "I'm sorry, but I'm unable to assist with that. My current capabilities are limited to the functions pr | CODE |
| LOW | data/glaive_toolcall_en_demo.json | 1198 | "value": "Here is your new password: a9B7$#fG3&Z1. Please make sure to save it in a secure place." | CODE |
| LOW | data/glaive_toolcall_en_demo.json | 1538 | "value": "Here is your new password: aB3#fG7!kL9@. Please make sure to save it in a secure place." | CODE |
| LOW | data/glaive_toolcall_en_demo.json | 3130 | "value": "Here is your new password: aB3#fG7!kL9@. Please make sure to save it in a secure place." | CODE |
| LOW | data/glaive_toolcall_en_demo.json | 3307 | "value": "Here is your new password: aB3#fG7!kL9@. Please make sure to save it in a secure place." | CODE |
| LOW | data/glaive_toolcall_en_demo.json | 5718 | "value": "Here is your new password: aB3#fG7!kL9@. Please make sure to save it in a secure place." | CODE |
| LOW | data/glaive_toolcall_en_demo.json | 6775 | "value": "Here is your new password: aB3#fG7!kL9@. Please make sure to save it in a secure place." | CODE |
| LOW⚡ | src/llamafactory/chat/sglang_engine.py | 127 | self._cleanup_server() # make sure to clean up any started process | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/llamafactory/v1/core/model_engine.py | 82 | except ImportError: | CODE |
| HIGH | src/llamafactory/v1/config/training_args.py | 186 | except ImportError: | CODE |
| HIGH | …plugins/model_plugins/parallelization/gdn_attention.py | 99 | except ImportError: | CODE |
| HIGH | src/llamafactory/chat/sglang_engine.py | 291 | except Exception: | CODE |
| HIGH | src/llamafactory/model/model_utils/quantization.py | 159 | except ImportError: | CODE |
| HIGH | src/llamafactory/train/callbacks.py | 394 | except Exception: | CODE |
| HIGH | src/llamafactory/webui/common.py | 55 | except Exception: | CODE |
| HIGH | src/llamafactory/data/tool_utils.py | 318 | except json.JSONDecodeError: | CODE |
| HIGH | src/llamafactory/extras/logging.py | 49 | except OSError: | CODE |
| HIGH | src/llamafactory/extras/env.py | 64 | except Exception: | CODE |
| HIGH | src/llamafactory/extras/env.py | 71 | except Exception: | CODE |
| HIGH | src/llamafactory/extras/env.py | 78 | except Exception: | CODE |
| HIGH | src/llamafactory/extras/env.py | 85 | except Exception: | CODE |
| HIGH | src/llamafactory/extras/env.py | 94 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/qwen_omni_merge.py | 86 | except Exception: | CODE |
| LOW | scripts/qwen_omni_merge.py | 135 | except Exception: | CODE |
| LOW | scripts/convert_ckpt/llamafy_qwen.py | 32 | except Exception: | CODE |
| LOW | scripts/convert_ckpt/llamafy_qwen.py | 157 | except Exception as e: | STRING |
| LOW | scripts/convert_ckpt/llamafy_baichuan2.py | 104 | except Exception as e: | STRING |
| LOW | …actory/v1/plugins/trainer_plugins/distributed/fsdp2.py | 466 | except Exception as e: | CODE |
| LOW | …1/plugins/trainer_plugins/optimizers/muon_optimizer.py | 176 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | src/llamafactory/v1/plugins/model_plugins/peft.py | 341 | except Exception as e: | STRING |
| LOW | …/v1/plugins/model_plugins/kernels/ops/rope/npu_rope.py | 155 | except Exception as e: | CODE |
| LOW | src/llamafactory/v1/utils/packages.py | 44 | except Exception: | CODE |
| LOW | src/llamafactory/v1/samplers/cli_sampler.py | 101 | except Exception: | CODE |
| LOW⚡ | src/llamafactory/chat/sglang_engine.py | 122 | except Exception as e: | CODE |
| LOW⚡ | src/llamafactory/chat/sglang_engine.py | 125 | except Exception as e: | CODE |
| LOW⚡ | src/llamafactory/chat/sglang_engine.py | 137 | except Exception as e: | CODE |
| LOW | src/llamafactory/chat/sglang_engine.py | 291 | except Exception: | CODE |
| LOW | src/llamafactory/chat/chat_model.py | 180 | except Exception: | CODE |
| LOW | src/llamafactory/hparams/model_args.py | 250 | except Exception as e: | CODE |
| LOW | src/llamafactory/third_party/triton/utils.py | 67 | except Exception: | CODE |
| LOW | src/llamafactory/third_party/triton/utils.py | 298 | except Exception: | CODE |
| MEDIUM | src/llamafactory/third_party/triton/utils.py | 157 | def get_available_device() -> str: | CODE |
| LOW | src/llamafactory/model/loader.py | 92 | except Exception as e: | STRING |
| LOW | src/llamafactory/model/loader.py | 109 | except Exception as e: | STRING |
| LOW | src/llamafactory/model/patcher.py | 124 | except Exception as e: | CODE |
| LOW | src/llamafactory/model/patcher.py | 134 | except Exception as e: | CODE |
| LOW | src/llamafactory/model/patcher.py | 501 | except Exception: | CODE |
| LOW | src/llamafactory/model/model_utils/valuehead.py | 47 | except Exception as err: | STRING |
| LOW | src/llamafactory/model/model_utils/valuehead.py | 53 | except Exception as err: | STRING |
| LOW | src/llamafactory/train/fp8_utils.py | 103 | except Exception as e: | CODE |
| LOW | src/llamafactory/train/trainer_utils.py | 876 | except Exception: | CODE |
| LOW | src/llamafactory/train/callbacks.py | 394 | except Exception: | STRING |
| LOW | src/llamafactory/train/tuner.py | 159 | except Exception as e: | CODE |
| LOW | src/llamafactory/train/tuner.py | 274 | except Exception as e: | CODE |
| LOW | …c/llamafactory/train/megatron_bridge/dataset_export.py | 46 | except Exception: | CODE |
| LOW | …c/llamafactory/train/megatron_bridge/dataset_export.py | 97 | except Exception as exc: | STRING |
| LOW⚡ | …c/llamafactory/train/megatron_bridge/dataset_export.py | 108 | except Exception as exc: | STRING |
| LOW⚡ | …c/llamafactory/train/megatron_bridge/dataset_export.py | 117 | except Exception as exc: | STRING |
| LOW | …c/llamafactory/train/megatron_bridge/dataset_export.py | 137 | except Exception as exc: | CODE |
| LOW | …c/llamafactory/train/megatron_bridge/dataset_export.py | 201 | except Exception: | STRING |
| LOW | src/llamafactory/train/megatron_bridge/workflow.py | 219 | except Exception: | CODE |
| LOW | src/llamafactory/train/ppo/trainer.py | 279 | except Exception: | CODE |
| LOW | src/llamafactory/train/mca/workflow.py | 156 | except Exception: | CODE |
| LOW | src/llamafactory/train/mca/workflow.py | 158 | except Exception as exc: | CODE |
| LOW | src/llamafactory/api/common.py | 66 | except Exception: | CODE |
| LOW | src/llamafactory/api/common.py | 95 | except Exception as e: | CODE |
| LOW | src/llamafactory/webui/common.py | 55 | except Exception: | CODE |
| LOW | src/llamafactory/webui/common.py | 79 | except Exception: | CODE |
| LOW | src/llamafactory/webui/common.py | 149 | except Exception as err: | CODE |
| LOW | src/llamafactory/webui/common.py | 159 | except Exception: | CODE |
| LOW | src/llamafactory/webui/components/chatbot.py | 45 | except Exception: | CODE |
| LOW | src/llamafactory/webui/components/data.py | 47 | except Exception: | CODE |
| LOW | src/llamafactory/data/parser.py | 111 | except Exception as err: | CODE |
| LOW | src/llamafactory/data/data_utils.py | 194 | except Exception: | STRING |
| LOW | src/llamafactory/data/tool_utils.py | 631 | except Exception: | CODE |
| LOW | src/llamafactory/extras/misc.py | 44 | except Exception: | CODE |
| LOW⚡ | src/llamafactory/extras/env.py | 64 | except Exception: | CODE |
| LOW⚡ | src/llamafactory/extras/env.py | 71 | except Exception: | CODE |
| LOW⚡ | src/llamafactory/extras/env.py | 78 | except Exception: | CODE |
| LOW⚡ | src/llamafactory/extras/env.py | 85 | except Exception: | CODE |
| LOW⚡ | src/llamafactory/extras/env.py | 94 | except Exception: | CODE |
| LOW | src/llamafactory/extras/packages.py | 38 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests_v1/plugins/model_plugins/test_peft.py | 43 | # Create a dummy adapter | COMMENT |
| MEDIUM⚡ | data/kto_en_demo.json | 887 | "content": "To smoothen the output polygons without creating gaps or overlaps, you can use a combination of libr | CODE |
| MEDIUM⚡ | data/kto_en_demo.json | 895 | "content": "I apologize for the confusion. Let's try a different approach using the `TopologicalPreserveSimplifi | CODE |
| MEDIUM⚡ | data/kto_en_demo.json | 907 | "content": "I have the following code:\n#%% Generate geoTiffs with index values based on one large geotiff with | CODE |
| MEDIUM | data/kto_en_demo.json | 919 | "content": "To smoothen the output polygons without creating gaps or overlays between the polygons, you can use | CODE |
| MEDIUM | data/alpaca_en_demo.json | 2655 | "output": "In order to build a random forest regression model to predict house prices, we need to organize the data | CODE |
| MEDIUM | data/alpaca_en_demo.json | 4405 | "output": "The most efficient way to implement a sparse matrix in Python depends on the specifics of the matrix and | CODE |
| MEDIUM | data/glaive_toolcall_zh_demo.json | 7807 | "value": "Sure, here's a sample Python code to generate the Excel table and some SQL queries to filter the anima | CODE |
| MEDIUM⚡ | data/glaive_toolcall_en_demo.json | 567 | "value": "Yes, I can help you with that. Here's a sample code snippet that should do what you're looking for:\n` | CODE |
| MEDIUM⚡ | data/glaive_toolcall_en_demo.json | 575 | "value": "Yes, you can modify the code snippet to rank the cities in ascending order by changing the `reverse` p | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 1625 | "value": "To examine real-time usage patterns of public electric vehicle charging stations in a specific city us | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 2422 | "value": "There are several algorithms that can be used to solve a Rubik's cube puzzle in Ruby programming langu | CODE |
| MEDIUM | data/glaive_toolcall_en_demo.json | 5185 | "value": "Sure, here's a Python code that can generate a sequence of clues that reveal the identity of the grand | CODE |
| MEDIUM | …1/plugins/trainer_plugins/optimizers/muon_optimizer.py | 15 | # This module is vendored into v1 (independent of v0 / `llamafactory.third_party.muon`) | COMMENT |
| MEDIUM | …mafactory/third_party/triton/chunk_gated_delta_rule.py | 334 | """This function is intended to align with the l2norm implementation in the FLA library.""" | STRING |
| MEDIUM | src/llamafactory/data/collator.py | 123 | # Create a non-padding mask. | STRING |
| MEDIUM | src/llamafactory/data/collator.py | 128 | # Create a lower triangular mask. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/llamafactory/v1/core/utils/batching.py | 48 | __all__ = ["BatchGenerator"] | CODE |
| LOW | src/llamafactory/v1/core/utils/batching.py | 362 | def set_epoch(self, epoch: int) -> None: | CODE |
| LOW | src/llamafactory/v1/core/utils/checkpoint.py | 101 | def _set_accelerator_rng_state(state) -> None: | CODE |
| LOW | src/llamafactory/v1/core/rendering/__init__.py | 25 | __all__ = ["Renderer"] | CODE |
| LOW | src/llamafactory/v1/config/__init__.py | 24 | __all__ = [ | CODE |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 48 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/llamafactory/v1/utils/helper.py | 45 | def set_seed(seed: int, full_determinism: bool = False) -> None: | CODE |
| LOW | src/llamafactory/v1/utils/callbacks/__init__.py | 19 | __all__ = [ | CODE |
| LOW | src/llamafactory/v1/accelerator/helper.py | 122 | def set_device_index() -> None: | CODE |
| LOW | src/llamafactory/chat/__init__.py | 19 | __all__ = ["BaseEngine", "ChatModel"] | CODE |
| LOW | src/llamafactory/hparams/__init__.py | 25 | __all__ = [ | CODE |
| LOW⚡ | src/llamafactory/hparams/parser.py | 212 | def _set_transformers_logging() -> None: | CODE |
| LOW⚡ | src/llamafactory/hparams/parser.py | 219 | def _set_env_vars() -> None: | CODE |
| LOW | src/llamafactory/third_party/triton/utils.py | 34 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/llamafactory/third_party/muon/__init__.py | 18 | __all__ = ["Muon"] | CODE |
| LOW | src/llamafactory/model/__init__.py | 21 | __all__ = [ | CODE |
| LOW | src/llamafactory/model/model_utils/moe.py | 36 | def _set_z3_leaf_modules(model: "PreTrainedModel", leaf_modules: list[Union["nn.Module", str]]) -> None: | CODE |
| LOW | src/llamafactory/train/callbacks.py | 196 | def _set_abort(self, signum, frame) -> None: | CODE |
| LOW | src/llamafactory/train/tuner.py | 290 | def _setup_env_visible_devices(self) -> None: | CODE |
| LOW | src/llamafactory/train/hyper_parallel/__init__.py | 18 | __all__ = ["run_pt", "run_sft"] | CODE |
| LOW | src/llamafactory/train/hyper_parallel/trainer.py | 52 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/llamafactory/train/megatron_bridge/__init__.py | 18 | __all__ = ["run_pt", "run_sft"] | CODE |
| LOW | src/llamafactory/train/dpo/__init__.py | 18 | __all__ = ["run_dpo"] | CODE |
| LOW | src/llamafactory/train/pt/__init__.py | 18 | __all__ = ["run_pt"] | CODE |
| LOW | src/llamafactory/train/sft/__init__.py | 18 | __all__ = ["run_sft"] | CODE |
| LOW | src/llamafactory/train/ppo/__init__.py | 18 | __all__ = ["run_ppo"] | CODE |
| LOW | src/llamafactory/train/kto/__init__.py | 18 | __all__ = ["run_kto"] | CODE |
| LOW | src/llamafactory/train/rm/__init__.py | 18 | __all__ = ["run_rm"] | CODE |
| LOW | src/llamafactory/train/mca/__init__.py | 18 | __all__ = ["run_dpo", "run_pt", "run_sft"] | CODE |
| LOW | src/llamafactory/webui/runner.py | 76 | def set_abort(self) -> None: | CODE |
| LOW | src/llamafactory/webui/components/__init__.py | 24 | __all__ = [ | CODE |
| LOW | src/llamafactory/data/__init__.py | 26 | __all__ = [ | CODE |
| LOW | src/llamafactory/data/parser.py | 69 | def set_attr(self, key: str, obj: dict[str, Any], default: Any | None = None) -> None: | CODE |
| LOW | src/llamafactory/data/processor/__init__.py | 23 | __all__ = [ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | data/glaive_toolcall_zh_demo.json | 664 | "value": "在LaTeX中,你可以通过使用`endfloat`包来实现这一点。以下是方法:\n1. 在你的LaTeX文档的预览部分添加`usepackage{endfloat}`。\n2. 在你希望图表出现在文档中的 | CODE |
| LOW⚡ | data/glaive_toolcall_zh_demo.json | 664 | "value": "在LaTeX中,你可以通过使用`endfloat`包来实现这一点。以下是方法:\n1. 在你的LaTeX文档的预览部分添加`usepackage{endfloat}`。\n2. 在你希望图表出现在文档中的 | CODE |
| LOW⚡ | data/glaive_toolcall_zh_demo.json | 672 | "value": "在您的LaTeX文档中,您可以通过使用`tableofcontents`命令来创建目录。以下是方法:\n1. 在您希望目录出现在文档中的位置添加`tableofcontents`命令。\n2. 编译您的L | CODE |
| LOW⚡ | data/glaive_toolcall_zh_demo.json | 672 | "value": "在您的LaTeX文档中,您可以通过使用`tableofcontents`命令来创建目录。以下是方法:\n1. 在您希望目录出现在文档中的位置添加`tableofcontents`命令。\n2. 编译您的L | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2565 | "placeholder": "System prompt (optional)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2568 | "placeholder": "Системный запрос (по желанию)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2571 | "placeholder": "系统提示词(非必填)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2574 | "placeholder": "시스템 프롬프트 (선택 사항)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2577 | "placeholder": "システムプロンプト(オプション)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2582 | "placeholder": "Tools (optional)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2585 | "placeholder": "Инструменты (по желанию)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2588 | "placeholder": "工具列表(非必填)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2591 | "placeholder": "툴 (선택 사항)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2594 | "placeholder": "ツールリスト(オプション)", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2633 | "placeholder": "Input...", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2636 | "placeholder": "Ввод...", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2639 | "placeholder": "输入...", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2642 | "placeholder": "입력...", | CODE |
| LOW⚡ | src/llamafactory/webui/locales.py | 2645 | "placeholder": "入力...", | CODE |
| LOW | src/llamafactory/data/mm_plugin.py | 1760 | dummy_data = [torch.empty(0) for _ in range(len(batch_ids))] | CODE |
| LOW | src/llamafactory/data/mm_plugin.py | 1761 | mm_inputs.update({"tgt_sizes": dummy_data, "pixel_values": dummy_data, "image_sizes": dummy_data}) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | …ry/v1/plugins/trainer_plugins/distributed/deepspeed.py | 108 | zero_config = self.accelerator.state.deepspeed_plugin.deepspeed_config.get("zero_optimization", {}) | CODE |
| CRITICAL | src/llamafactory/third_party/triton/utils.py | 270 | triton.runtime.driver.active.utils.get_device_properties(i)["max_shared_mem"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/train/megatron_bridge/conftest.py | 52 | CODE | |
| LOW | scripts/vllm_infer.py | 47 | CODE | |
| LOW | scripts/megatron_merge.py | 64 | CODE | |
| LOW | scripts/stat_utils/cal_ppl.py | 55 | CODE | |
| LOW | scripts/stat_utils/cal_mfu.py | 101 | CODE | |
| LOW | src/llamafactory/v1/core/utils/batching.py | 158 | CODE | |
| LOW | …1/plugins/trainer_plugins/optimizers/muon_optimizer.py | 119 | CODE | |
| LOW | …ry/v1/plugins/model_plugins/parallelization/ulysses.py | 198 | CODE | |
| LOW | …ry/v1/plugins/model_plugins/parallelization/ulysses.py | 195 | CODE | |
| LOW | …plugins/model_plugins/parallelization/gdn_attention.py | 255 | CODE | |
| LOW | src/llamafactory/third_party/triton/utils.py | 302 | CODE | |
| LOW | src/llamafactory/third_party/triton/chunk_delta_h.py | 536 | CODE | |
| LOW | src/llamafactory/third_party/muon/muon.py | 102 | CODE | |
| LOW | src/llamafactory/model/patcher.py | 284 | CODE | |
| LOW | src/llamafactory/data/converter.py | 131 | CODE | |
| LOW | src/llamafactory/data/converter.py | 227 | CODE | |
| LOW | src/llamafactory/data/converter.py | 367 | CODE | |
| LOW | src/llamafactory/data/template.py | 681 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 865 | 1. Add `swanlab_api_key=<your_api_key>` to the yaml file, and set it to your [API key](https://swanlab.cn/settings). | CODE |
| HIGH | README_zh.md | 867 | 方式一:在 yaml 文件中添加 `swanlab_api_key=<your_api_key>` ,并设置为你的 [API 密钥](https://swanlab.cn/settings)。 | CODE |
| HIGH | data/dpo_zh_demo.json | 3735 | "value": "创建一个完整的程序像这样将是一个复杂且漫长的过程,涉及图形和音频处理。然而,我可以指导您完成初始步骤,并为您提供资源,帮助您构建项目的简单文本版本。\n\n要获取天气数据,您可以使用OpenWeatherMa | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …y/v1/plugins/model_plugins/kernels/liger_kernel_ops.py | 64 | Applies the Liger kernel to the model. Args: **kwargs: Must include ``model``. Optional ``use_kerne | STRING |
| HIGH | …ins/model_plugins/kernels/ops/rms_norm/npu_rms_norm.py | 90 | NPU forward implementation for Gated RMSNorm with high-precision FP32 computation. This function performs RMSNorm a | STRING |
| HIGH | …mafactory/third_party/triton/chunk_gated_delta_rule.py | 232 | Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): keys | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/llamafactory/v1/core/base_sampler.py | 0 | generate tokens synchronously. args: messages: list of messages. tools: tools string. yields: generated tokens. | STRING |
| HIGH | src/llamafactory/v1/core/utils/inference_engine.py | 0 | generate tokens synchronously. args: messages: list of messages. tools: tools string. yields: generated tokens. | STRING |
| HIGH | src/llamafactory/v1/samplers/cli_sampler.py | 0 | generate tokens synchronously. args: messages: list of messages. tools: tools string. yields: generated tokens. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | data/glaive_toolcall_zh_demo.json | 7017 | "value": "计算抛掷三颗骰子得到9点或以上的概率,其中至少有一颗骰子是质数,我们可以使用包含与排除原则。\n首先,我们需要计算在没有限制的情况下抛掷三颗骰子得到9点或以上的概率。这可以通过计算得到9点或以上的方式数, | CODE |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 173 | # Step 1: Scatter grad_output to expert buffer | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 176 | # Step 2: FC2 backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 197 | # Step 3: Routing weight backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 206 | # Step 4: SiLU gate backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 216 | # Step 5: FC1 backward | COMMENT |
| LOW | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 237 | # Step 6: Gather gradients back to original positions | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | data/glaive_toolcall_zh_demo.json | 7017 | "value": "计算抛掷三颗骰子得到9点或以上的概率,其中至少有一颗骰子是质数,我们可以使用包含与排除原则。\n首先,我们需要计算在没有限制的情况下抛掷三颗骰子得到9点或以上的概率。这可以通过计算得到9点或以上的方式数, | CODE |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 173 | # Step 1: Scatter grad_output to expert buffer | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 176 | # Step 2: FC2 backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 197 | # Step 3: Routing weight backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 206 | # Step 4: SiLU gate backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 216 | # Step 5: FC1 backward | COMMENT |
| LOW | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 237 | # Step 6: Gather gradients back to original positions | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | data/alpaca_en_demo.json | 4535 | "output": "Here is a function in Python that takes in a year as an input parameter and returns whether it is a leap | CODE |
| LOW | data/glaive_toolcall_zh_demo.json | 4859 | "value": "```python\ndef calculate_summary(array, divisor):\n # Sort the array in descending order\n array | CODE |
| LOW | data/glaive_toolcall_zh_demo.json | 4859 | "value": "```python\ndef calculate_summary(array, divisor):\n # Sort the array in descending order\n array | CODE |
| LOW | data/alpaca_zh_demo.json | 275 | "output": "def calculate_sum(numbers):\n if not isinstance(numbers, list): # Check if input is a list\n r | CODE |
| LOW | src/llamafactory/v1/core/base_trainer.py | 355 | # Check if max_steps is reached | COMMENT |
| LOW | src/llamafactory/train/ppo/trainer.py | 86 | # Check if TRL version is compatible (0.8.6 <= version <= 0.9.6) | COMMENT |
| LOW | src/llamafactory/data/collator.py | 312 | # Check if position_ids shape matches expected shape. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | README.md | 28 | ### Check our new open-source project —<br>🐧 [PenguinHarness](https://github.com/Prism-Shadow/penguin-harness): Local-fi | COMMENT |
| MEDIUM | README.md | 42 | | <div style="text-align: center;"><a href="https://warp.dev/llama-factory"><img alt="Warp sponsorship" width="400" src= | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/data/test_template.py | 326 | "# ollama modelfile auto-generated by llamafactory\n\n" | STRING |
| HIGH | src/llamafactory/data/template.py | 329 | modelfile = "# ollama modelfile auto-generated by llamafactory\n\n" | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | data/kto_en_demo.json | 2769 | "content": "As an Azure Cloud Engineer working with Microsoft Azure, you can indeed utilize Azure Active Directo | CODE |
| MEDIUM | data/alpaca_en_demo.json | 3485 | "output": "John Smith's Resume\n\nSummary:\n\nAn experienced and highly skilled software engineer with over 5 years | CODE |
| MEDIUM | src/llamafactory/model/model_utils/embedding.py | 185 | # Resolve token ID for correct placement (robust to embedding padding) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/llamafactory/model/patcher.py | 105 | "`pip uninstall -y triton && pip install -r requirements/triton_ascend.txt`. " | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/ascend/qwen3_5moe_lora_sft_fsdp2.yaml | 2 | # Usage: | COMMENT |
| LOW | examples/ascend/qwen3_5_full_sft_fsdp2.yaml | 2 | # Usage: | COMMENT |