Unified Efficient Fine-Tuning of 100+ LLMs & VLMs (ACL 2024)
This report presents the forensic synthetic code analysis of hiyouga/LlamaFactory, a Python project with 73,252 GitHub stars. SynthScan v2.0 examined 107,599 lines of code across 513 source files, recording 1240 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 14.0 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1240 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 | tests/data/test_mm_plugin.py | 30 | CODE | |
| LOW | tests/data/test_mm_plugin.py | 30 | CODE | |
| LOW | tests/data/test_mm_plugin.py | 33 | CODE | |
| LOW | tests/data/test_mm_plugin.py | 34 | CODE | |
| LOW | tests/data/test_template.py | 28 | CODE | |
| LOW | docs/zh/conf.py | 8 | CODE | |
| LOW | docs/en/conf.py | 8 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/__init__.py | 22 | 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 | …afactory/v1/plugins/trainer_plugins/distributed/hub.py | 15 | CODE | |
| LOW | …/llamafactory/v1/plugins/model_plugins/quantization.py | 31 | CODE | |
| LOW | …/llamafactory/v1/plugins/model_plugins/quantization.py | 31 | 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 | 53 | 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 | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 373 | CODE | |
| LOW | …v1/plugins/model_plugins/kernels/ops/mlp/npu_swiglu.py | 29 | CODE | |
| LOW | src/llamafactory/v1/utils/packages.py | 34 | 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/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 | |
| LOW | src/llamafactory/chat/hf_engine.py | 38 | CODE | |
| LOW | src/llamafactory/chat/vllm_engine.py | 34 | CODE | |
| LOW | src/llamafactory/chat/vllm_engine.py | 39 | CODE | |
| LOW | src/llamafactory/chat/vllm_engine.py | 39 | CODE | |
| LOW | src/llamafactory/chat/vllm_engine.py | 39 | CODE | |
| LOW | src/llamafactory/chat/vllm_engine.py | 40 | CODE | |
| LOW | src/llamafactory/chat/vllm_engine.py | 40 | CODE | |
| LOW | src/llamafactory/chat/vllm_engine.py | 40 | CODE | |
| LOW | src/llamafactory/chat/vllm_engine.py | 40 | CODE | |
| LOW | src/llamafactory/chat/sglang_engine.py | 29 | CODE | |
| LOW | src/llamafactory/chat/sglang_engine.py | 29 | CODE | |
| LOW | src/llamafactory/chat/sglang_engine.py | 29 | CODE | |
| LOW | src/llamafactory/chat/sglang_engine.py | 29 | CODE | |
| LOW | src/llamafactory/chat/sglang_engine.py | 40 | CODE | |
| 299 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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/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_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_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 | …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_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 |
| LOW | examples/train_full/qwen3vl_full_sft.yaml | 41 | ddp_timeout: 180000000 | COMMENT |
| LOW | examples/train_full/qwen3_full_sft.yaml | 41 | # val_size: 0.1 | COMMENT |
| LOW | examples/train_qlora/llama3_lora_sft_gptq.yaml | 41 | # per_device_eval_batch_size: 1 | COMMENT |
| LOW | examples/train_qlora/llama3_lora_sft_awq.yaml | 41 | # per_device_eval_batch_size: 1 | COMMENT |
| LOW | examples/train_qlora/llama3_lora_sft_aqlm.yaml | 41 | # per_device_eval_batch_size: 1 | COMMENT |
| LOW | examples/train_qlora/qwen3_lora_sft_otfq.yaml | 41 | ### eval | COMMENT |
| LOW | examples/train_qlora/qwen3_lora_sft_bnb_npu.yaml | 41 | COMMENT | |
| LOW | examples/train_lora/qwen3_lora_dpo.yaml | 41 | COMMENT | |
| LOW | examples/train_lora/qwen3_lora_sft_ds3.yaml | 41 | ### eval | COMMENT |
| LOW | examples/train_lora/qwen3vl_lora_dpo.yaml | 41 | ddp_timeout: 180000000 | COMMENT |
| LOW | examples/train_lora/qwen3_lora_pretrain.yaml | 41 | # val_size: 0.1 | COMMENT |
| 241 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 85 | def _handle_device_visibility(items: list[Item]): | CODE |
| LOW | tests/conftest.py | 109 | def pytest_collection_modifyitems(config: Config, items: list[Item]): | CODE |
| LOW | tests/conftest.py | 123 | def _cleanup_distributed_state(): | CODE |
| LOW | tests/conftest.py | 166 | def fix_valuehead_cpu_loading(): | CODE |
| LOW | tests/conftest.py | 172 | 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 | 84 | 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/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_mm_plugin.py | 316 | 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 |
| LOW | tests/data/test_formatter.py | 203 | def test_mistral_multi_function_formatter(): | CODE |
| LOW⚡ | tests/data/test_formatter.py | 215 | def test_mistral_tool_formatter(): | CODE |
| LOW⚡ | tests/data/test_formatter.py | 224 | def test_mistral_tool_extractor(): | CODE |
| LOW⚡ | tests/data/test_formatter.py | 231 | def test_mistral_multi_tool_extractor(): | CODE |
| LOW | tests/data/test_formatter.py | 244 | def test_qwen_function_formatter(): | CODE |
| LOW | tests/data/test_formatter.py | 253 | def test_qwen_multi_function_formatter(): | CODE |
| LOW | tests/data/test_formatter.py | 285 | def test_qwen_multi_tool_extractor(): | CODE |
| LOW | tests/data/test_template.py | 133 | def test_reasoning_encode_oneturn(cot_messages: bool, enable_thinking: bool): | STRING |
| LOW | tests/data/test_template.py | 159 | def test_reasoning_encode_multiturn(cot_messages: bool, enable_thinking: bool): | STRING |
| LOW | tests/data/test_template.py | 188 | def test_reasoning_encode_multiturn_discarding_history_cot(enable_thinking: bool, discarding_history_cot: bool): | STRING |
| LOW | tests/data/processor/test_supervised.py | 48 | def test_supervised_single_turn(num_samples: int): | CODE |
| LOW | tests/data/processor/test_supervised.py | 77 | def test_supervised_multi_turn(num_samples: int): | CODE |
| LOW | tests/data/processor/test_supervised.py | 95 | def test_supervised_train_on_prompt(num_samples: int): | CODE |
| LOW | tests/data/processor/test_supervised.py | 113 | def test_supervised_mask_history(num_samples: int): | CODE |
| LOW | tests/data/processor/test_pairwise.py | 46 | def _convert_sharegpt_to_openai(messages: list[dict[str, str]]) -> list[dict[str, str]]: | CODE |
| LOW | tests_v1/conftest.py | 86 | def _handle_device_visibility(items: list[Item]): | CODE |
| LOW | tests_v1/conftest.py | 110 | def pytest_collection_modifyitems(config: Config, items: list[Item]): | CODE |
| LOW | tests_v1/conftest.py | 135 | def _cleanup_distributed_state(): | CODE |
| LOW | tests_v1/conftest.py | 178 | def bypass_mistral_regex_check(): | CODE |
| LOW | tests_v1/core/test_model_loader.py | 30 | def test_tiny_qwen_with_kernel_plugin(): | CODE |
| LOW | tests_v1/core/utils/test_batching.py | 73 | def test_batching_plugin_data_provider_batch_sizes(): | CODE |
| LOW | tests_v1/core/utils/test_batching.py | 124 | def test_dynamic_batching_returns_none_when_token_budget_is_incomplete(): | CODE |
| LOW | tests_v1/core/utils/test_batching.py | 141 | def test_dynamic_batching_fill_buffer_restarts_until_micro_batch_is_complete(): | CODE |
| LOW | tests_v1/core/utils/test_batching.py | 210 | def test_dynamic_padding_free(): | CODE |
| LOW | tests_v1/core/utils/test_batching.py | 315 | def test_dynamic_padding_free_returns_none_when_token_budget_is_incomplete(): | CODE |
| LOW | tests_v1/core/utils/test_batching.py | 327 | def test_dynamic_padding_free_fill_buffer_restarts_until_micro_batch_is_complete(): | CODE |
| LOW | tests_v1/core/rendering/test_rendering.py | 151 | def test_render_messages_with_tools(): | CODE |
| LOW | tests_v1/core/rendering/test_rendering.py | 187 | def test_render_messages_remote(num_samples: int): | CODE |
| 150 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 | 56 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 58 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 66 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 68 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 146 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | tests_v1/trainers/test_dpo_loss_precision.py | 148 | # ============================================================================== | COMMENT |
| MEDIUM | tests_v1/trainers/test_dpo_loss_precision.py | 183 | # ============================================================================== | COMMENT |
| MEDIUM | tests_v1/trainers/test_dpo_loss_precision.py | 185 | # ============================================================================== | COMMENT |
| MEDIUM⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 45 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 47 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 245 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 247 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 267 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 269 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 328 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 330 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 349 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 351 | # --------------------------------------------------------------------------- | 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 | 138 | # ------------------------------------------------------------------ | STRING |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 140 | # ------------------------------------------------------------------ | STRING |
| MEDIUM⚡ | src/llamafactory/v1/trainers/dpo_trainer.py | 171 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | src/llamafactory/v1/trainers/dpo_trainer.py | 173 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 251 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 253 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 291 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 293 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 317 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 319 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 353 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | src/llamafactory/v1/trainers/dpo_trainer.py | 355 | # ------------------------------------------------------------------ | COMMENT |
| 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 |
|---|---|---|---|---|
| LOW | tests/data/test_collator.py | 140 | CODE | |
| LOW | tests/data/test_mm_plugin.py | 117 | 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 | 235 | CODE | |
| LOW | src/llamafactory/v1/core/data_engine.py | 101 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/escape.py | 62 | CODE | |
| LOW | src/llamafactory/v1/core/rendering/format.py | 36 | CODE | |
| LOW | src/llamafactory/v1/config/arg_utils.py | 61 | CODE | |
| LOW | src/llamafactory/v1/plugins/trainer_plugins/batching.py | 118 | CODE | |
| LOW | …actory/v1/plugins/trainer_plugins/distributed/fsdp2.py | 76 | CODE | |
| LOW | …actory/v1/plugins/trainer_plugins/distributed/fsdp2.py | 193 | CODE | |
| LOW | …actory/v1/plugins/trainer_plugins/distributed/fsdp2.py | 437 | CODE | |
| LOW | src/llamafactory/v1/plugins/model_plugins/peft.py | 199 | CODE | |
| LOW | …/v1/plugins/model_plugins/kernels/ops/rope/npu_rope.py | 136 | CODE | |
| LOW | …ins/model_plugins/parallelization/sequence_parallel.py | 129 | CODE | |
| LOW | src/llamafactory/v1/plugins/data_plugins/converter.py | 104 | 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 | 304 | 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 | 141 | CODE | |
| LOW | src/llamafactory/model/loader.py | 131 | CODE | |
| LOW | src/llamafactory/model/patcher.py | 88 | CODE | |
| LOW | src/llamafactory/model/patcher.py | 436 | CODE | |
| LOW | src/llamafactory/model/model_utils/attention.py | 31 | CODE | |
| LOW | src/llamafactory/model/model_utils/quantization.py | 82 | 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 | 68 | CODE | |
| LOW | src/llamafactory/train/hyper_parallel/workflow.py | 62 | 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 | |
| LOW | src/llamafactory/train/rm/trainer.py | 113 | CODE | |
| LOW | src/llamafactory/api/chat.py | 73 | CODE | |
| LOW | src/llamafactory/webui/runner.py | 422 | CODE | |
| LOW | src/llamafactory/webui/chatter.py | 101 | CODE | |
| LOW | src/llamafactory/webui/control.py | 160 | CODE | |
| LOW | src/llamafactory/webui/control.py | 209 | CODE | |
| LOW | src/llamafactory/webui/components/export.py | 47 | CODE | |
| LOW | src/llamafactory/webui/components/chatbot.py | 34 | CODE | |
| LOW | src/llamafactory/webui/components/chatbot.py | 49 | CODE | |
| LOW | src/llamafactory/data/formatter.py | 72 | CODE | |
| 31 more matches not shown… | ||||
| 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 | 408 | except Exception as e: | CODE |
| LOW | src/llamafactory/v1/plugins/model_plugins/peft.py | 342 | except Exception as e: | STRING |
| LOW | …afactory/v1/plugins/model_plugins/kernels/interface.py | 71 | except Exception as e: | CODE |
| LOW | …/v1/plugins/model_plugins/kernels/ops/rope/npu_rope.py | 184 | 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 | 127 | except Exception as e: | CODE |
| LOW | src/llamafactory/model/patcher.py | 137 | except Exception as e: | CODE |
| LOW | src/llamafactory/model/patcher.py | 495 | 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 | 142 | except Exception as e: | CODE |
| LOW | src/llamafactory/train/tuner.py | 257 | except Exception as e: | 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/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 |
|---|---|---|---|---|
| HIGH | …mafactory/v1/plugins/model_plugins/kernels/registry.py | 40 | Decorator to register a kernel class. The class must inherit from :class:`BaseKernel` and specify ``_kernel_id` | STRING |
| 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 | …/llamafactory/v1/plugins/model_plugins/kernels/base.py | 68 | Applies the kernel optimization to the model. Args: **kwargs: Arbitrary keyword arguments, usually | STRING |
| HIGH | …ins/model_plugins/kernels/ops/rms_norm/npu_rms_norm.py | 130 | Iterate the model and apply NPU-optimized forward to matched RMSNorm modules. Matches modules whose class name | STRING |
| HIGH | …/v1/plugins/model_plugins/kernels/ops/rope/npu_rope.py | 137 | Apply RoPE acceleration by monkey-patching ``apply_rotary_pos_emb``. Iterates through the model's modules to fi | STRING |
| HIGH | …v1/plugins/model_plugins/kernels/ops/mlp/npu_swiglu.py | 129 | Applies the NPU fused SwiGLU kernel to the model. Args: **kwargs: Keyword arguments containing the | STRING |
| HIGH | …plugins/model_plugins/kernels/ops/mlp/npu_fused_moe.py | 346 | Applies the NPU fused MoE kernel to the model. Args: **kwargs: Keyword arguments containing the mod | 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 |
|---|---|---|---|---|
| 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 | …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 | 45 | __all__ = ["BatchGenerator"] | CODE |
| LOW | src/llamafactory/v1/core/utils/batching.py | 261 | 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 | …mafactory/v1/plugins/model_plugins/kernels/registry.py | 27 | __all__ = ["Registry", "register_kernel"] | CODE |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 42 | 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 | 24 | __all__ = [ | CODE |
| LOW⚡ | src/llamafactory/hparams/parser.py | 165 | def _set_transformers_logging() -> None: | CODE |
| LOW⚡ | src/llamafactory/hparams/parser.py | 172 | 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 | 273 | 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 | 51 | logger = logging.getLogger(__name__) | 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 | 1411 | dummy_data = [torch.empty(0) for _ in range(len(batch_ids))] | CODE |
| LOW | src/llamafactory/data/mm_plugin.py | 1412 | mm_inputs.update({"tgt_sizes": dummy_data, "pixel_values": dummy_data, "image_sizes": dummy_data}) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 828 | 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 | 831 | 方式一:在 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 |
|---|---|---|---|---|
| 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 | 66 | CODE | |
| LOW | …ry/v1/plugins/model_plugins/parallelization/ulysses.py | 183 | CODE | |
| LOW | …ins/model_plugins/parallelization/sequence_parallel.py | 49 | 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 | 287 | 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 | 490 | CODE |
| 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 | 167 | # Step 1: Scatter grad_output to expert buffer | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 170 | # Step 2: FC2 backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 191 | # Step 3: Routing weight backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 200 | # Step 4: SiLU gate backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 210 | # Step 5: FC1 backward | COMMENT |
| LOW | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 231 | # 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 | 167 | # Step 1: Scatter grad_output to expert buffer | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 170 | # Step 2: FC2 backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 191 | # Step 3: Routing weight backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 200 | # Step 4: SiLU gate backward | COMMENT |
| LOW⚡ | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 210 | # Step 5: FC1 backward | COMMENT |
| LOW | …lugins/model_plugins/kernels/ops/mlp/cuda_fused_moe.py | 231 | # Step 6: Gather gradients back to original positions | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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 | 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 | 330 | # 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 | 310 | # Check if position_ids shape matches expected shape. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/data/test_template.py | 236 | "# ollama modelfile auto-generated by llamafactory\n\n" | STRING |
| HIGH | src/llamafactory/data/template.py | 323 | 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 | 187 | # Resolve token ID for correct placement (robust to embedding padding) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/llamafactory/model/patcher.py | 108 | "`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 |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | README.md | 28 | | <div style="text-align: center;"><a href="https://warp.dev/llama-factory"><img alt="Warp sponsorship" width="400" src= | CODE |