An Extensible Toolkit for Finetuning and Inference of Large Foundation Models. Large Models for All.
This report presents the forensic synthetic code analysis of OptimalScale/LMFlow, a Python project with 8,484 GitHub stars. SynthScan v2.0 examined 45,225 lines of code across 281 source files, recording 402 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 12.4 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 402 distinct pattern matches across 18 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 |
|---|---|---|---|---|
| HIGH | …SA-diffusion/diffusion_dpo/train_diffusion_dpo_lisa.py | 0 | update target parameters to be closer to those of source parameters using an exponential moving average. :param target_p | STRING |
| HIGH | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 0 | update target parameters to be closer to those of source parameters using an exponential moving average. :param target_p | STRING |
| HIGH | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 0 | update target parameters to be closer to those of source parameters using an exponential moving average. :param target_p | STRING |
| HIGH | tests/datasets/test_dataset.py | 0 | a one-line summary of the module or program, terminated by a period. leave one blank line. the rest of this docstring sh | STRING |
| HIGH | tests/models/test_hf_decoder_model.py | 0 | a one-line summary of the module or program, terminated by a period. leave one blank line. the rest of this docstring sh | STRING |
| HIGH | examples/evaluation.py | 0 | a one-line summary of the module or program, terminated by a period. leave one blank line. the rest of this docstring sh | STRING |
| HIGH | examples/finetune_multi_modal.py | 0 | a one-line summary of the module or program, terminated by a period. leave one blank line. the rest of this docstring sh | STRING |
| HIGH | examples/finetune.py | 0 | a one-line summary of the module or program, terminated by a period. leave one blank line. the rest of this docstring sh | STRING |
| HIGH | examples/benchmarking.py | 0 | a one-line summary of the module or program, terminated by a period. leave one blank line. the rest of this docstring sh | STRING |
| HIGH | src/lmflow/models/encoder_decoder_model.py | 0 | a one-line summary of the module or program, terminated by a period. leave one blank line. the rest of this docstring sh | STRING |
| HIGH | src/lmflow/models/decoder_model.py | 0 | a one-line summary of the module or program, terminated by a period. leave one blank line. the rest of this docstring sh | STRING |
| HIGH | contrib/tool-finetune/function_call_finetune.py | 0 | tokenize the full dataset. parameters ------------ dataset : lmflow.datasets.dataset. args : optional. positional argume | STRING |
| HIGH | src/lmflow/models/hf_decoder_model.py | 0 | tokenize the full dataset. parameters ------------ dataset : lmflow.datasets.dataset. args : optional. positional argume | STRING |
| HIGH | src/lmflow/models/hf_text_regression_model.py | 0 | tokenize the full dataset. parameters ------------ dataset : lmflow.datasets.dataset. args : optional. positional argume | STRING |
| HIGH | examples/chatbot_gradio.py | 0 | a simple shell chatbot implemented with lmflow apis. | STRING |
| HIGH | examples/inference.py | 0 | a simple shell chatbot implemented with lmflow apis. | STRING |
| HIGH | examples/chatbot.py | 0 | a simple shell chatbot implemented with lmflow apis. | STRING |
| HIGH | src/lmflow/optim/lamb.py | 0 | performs a single optimization step. arguments: closure: a closure that reevaluates the model and returns the loss. | STRING |
| HIGH | src/lmflow/optim/lars.py | 0 | performs a single optimization step. arguments: closure: a closure that reevaluates the model and returns the loss. | STRING |
| HIGH | src/lmflow/optim/adamp.py | 0 | performs a single optimization step. arguments: closure: a closure that reevaluates the model and returns the loss. | STRING |
| HIGH | src/lmflow/optim/yogi.py | 0 | performs a single optimization step. arguments: closure: a closure that reevaluates the model and returns the loss. | STRING |
| HIGH | src/lmflow/optim/radam.py | 0 | performs a single optimization step. arguments: closure: a closure that reevaluates the model and returns the loss. | STRING |
| HIGH | src/lmflow/optim/adabound.py | 0 | performs a single optimization step. arguments: closure: a closure that reevaluates the model and returns the loss. | STRING |
| HIGH | src/lmflow/optim/sgdp.py | 0 | performs a single optimization step. arguments: closure: a closure that reevaluates the model and returns the loss. | STRING |
| HIGH | src/lmflow/optim/sgd_schedule_free.py | 0 | performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return | STRING |
| HIGH | src/lmflow/optim/adabelief.py | 0 | performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return | STRING |
| HIGH | src/lmflow/optim/adamw_schedule_free.py | 0 | performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return | STRING |
| HIGH | src/lmflow/optim/muon.py | 0 | performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …al/LISA-diffusion/diffusion_dpo/train_diffusion_dpo.py | 69 | def import_model_class_from_model_name_or_path(pretrained_model_name_or_path: str, revision: str): | CODE |
| LOW | …SA-diffusion/diffusion_dpo/train_diffusion_dpo_lisa.py | 90 | def import_model_class_from_model_name_or_path(pretrained_model_name_or_path: str, revision: str): | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 134 | def tarfile_to_samples_nothrow(src, handler=wds.warn_and_continue): | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 375 | def scalings_for_boundary_conditions(timestep, sigma_data=0.5, timestep_scaling=10.0): | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 383 | def get_predicted_original_sample(model_output, timesteps, sample, prediction_type, alphas, sigmas): | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 468 | def import_model_class_from_model_name_or_path( | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 77 | def get_module_kohya_state_dict(module, prefix: str, dtype: torch.dtype, adapter_name: str = "default"): | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 129 | def tarfile_to_samples_nothrow(src, handler=wds.warn_and_continue): | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 356 | def scalings_for_boundary_conditions(timestep, sigma_data=0.5, timestep_scaling=10.0): | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 364 | def get_predicted_original_sample(model_output, timesteps, sample, prediction_type, alphas, sigmas): | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 448 | def import_model_class_from_model_name_or_path( | CODE |
| LOW | tests/pipeline/test_evaluator_messages.py | 9 | def test_nll_unsupported_dataset_message_includes_type(self): | CODE |
| LOW⚡ | tests/pipeline/test_auto_pipeline.py | 14 | def test_get_evaluator_pipeline(self): | CODE |
| LOW⚡ | tests/pipeline/test_auto_pipeline.py | 23 | def test_get_finetuner_pipeline(self): | CODE |
| LOW⚡ | tests/pipeline/test_auto_pipeline.py | 32 | def test_get_inferencer_pipeline(self): | CODE |
| LOW⚡ | tests/pipeline/test_auto_pipeline.py | 41 | def test_get_unsupported_pipeline(self): | CODE |
| LOW | tests/pipeline/test_sglang_infernecer.py | 22 | def sglang_test_inferencer_args() -> InferencerArguments: | CODE |
| LOW | tests/pipeline/test_memory_safe_vllm_inferencer.py | 66 | def test_inference_detokenize(self): | CODE |
| LOW | tests/pipeline/test_vllm_inferencer.py | 69 | def test_override_with_inference_args(self, model_args, inferencer_args): | CODE |
| LOW | tests/pipeline/test_vllm_inferencer.py | 131 | def test_creates_dataproto_with_repeat(self): | CODE |
| LOW | tests/pipeline/test_vllm_inferencer.py | 167 | def vllm_test_inferencer_args() -> InferencerArguments: | CODE |
| LOW | tests/pipeline/test_vllm_inferencer.py | 226 | def test_vllm_inferencer_save_load( | CODE |
| LOW | tests/datasets/conftest.py | 8 | def dataset_inference_conversation() -> Dataset: | CODE |
| LOW | tests/datasets/conftest.py | 17 | def dataset_inference_conversation_batch() -> Dataset: | CODE |
| LOW | tests/datasets/test_dataset.py | 56 | def test_create_from_dict_bad_type(self): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 17 | def test_is_accelerate_env_false_without_prefix(self): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 21 | def test_is_accelerate_env_true_with_prefix(self): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 25 | def test_is_accelerate_env_false_when_accelerate_not_prefix(self): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 31 | def test_get_device_name_cpu_when_cuda_unavailable(self, _mock_cuda: object): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 35 | def test_get_device_name_cuda_when_cuda_available(self, _mock_cuda: object): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 38 | def test_get_torch_device_matches_device_name(self): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 48 | def test_get_torch_device_fallback_returns_cuda_on_attribute_error(self, _mock_name: object): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 56 | def test_require_cuda_for_gpu_mode_raises_when_cuda_unavailable(self, _mock_cuda: object): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 63 | def test_set_cuda_device_calls_torch_set_device(self, mock_set_device: object, _mock_cuda: object): | CODE |
| LOW⚡ | tests/utils/test_envs.py | 69 | def test_set_cuda_device_raises_without_cuda(self, mock_set_device: object, _mock_cuda: object): | CODE |
| LOW | tests/utils/test_conversation_template.py | 131 | def test_encode_conversation_singleturn(self): | CODE |
| LOW | tests/utils/test_conversation_template.py | 140 | def test_encode_conversation_multiturn(self): | CODE |
| LOW | tests/utils/test_conversation_template.py | 156 | def test_encode_conversation_singleturn(self): | CODE |
| LOW | tests/utils/test_conversation_template.py | 165 | def test_encode_conversation_multiturn(self): | CODE |
| LOW | tests/utils/test_conversation_formatter.py | 7 | def test_format_string_component(self): | CODE |
| LOW | tests/models/test_hf_decoder_model.py | 290 | def make_gt_from_conversation_ids(conversation_ids): | CODE |
| LOW | tests/models/test_hf_decoder_model.py | 303 | def make_gt_from_conversation_ids_batch(batched_conversation_ids): | CODE |
| LOW | tests/models/test_hf_decoder_model.py | 367 | def test_tokenize_text_only_multiple(self): | CODE |
| LOW | tests/models/test_hf_decoder_model.py | 411 | def test_tokenize_conversation(self): | CODE |
| LOW | tests/models/test_hf_decoder_model.py | 516 | def test_tokenize_conversation_multiple(self): | CODE |
| LOW | tests/models/test_auto_model.py | 24 | def test_get_text_regression_model(self): | STRING |
| LOW | tests/models/test_auto_model.py | 40 | def test_get_unsupported_model(self): | CODE |
| LOW | contrib/tool-finetune/function_call_finetune.py | 158 | def conversation_tokenize_function( | CODE |
| LOW | examples/benchmarking.py | 115 | def is_lmflow_local_benchmarking(dataset_name): | CODE |
| LOW⚡ | examples/benchmarking.py | 142 | def is_lm_evaluation_benchmarking(dataset_name): | CODE |
| LOW⚡ | examples/benchmarking.py | 149 | def run_lmflow_local_benchmarking( | CODE |
| LOW | examples/benchmarking.py | 191 | def run_lm_evaluation_benchmarking(dataset_name, model_name): | CODE |
| LOW | scripts/archive/convert_llama_weights_to_hf.py | 59 | def compute_intermediate_size(n): | CODE |
| LOW | src/lmflow/pipeline/dpo_aligner.py | 55 | def return_prompt_and_responses(samples) -> dict[str, str]: | CODE |
| LOW | src/lmflow/pipeline/iterative_dpo_aligner.py | 120 | def _do_target_model_inference( | CODE |
| LOW | src/lmflow/pipeline/iterative_dpo_aligner.py | 145 | def _build_response_generator( | CODE |
| LOW | src/lmflow/pipeline/iterative_dpo_aligner.py | 168 | def _dataproto_to_text_to_textlist_instances(res: DataProto) -> list[dict]: | CODE |
| LOW | src/lmflow/pipeline/iterative_dpo_aligner.py | 185 | def _do_reward_model_inference( | CODE |
| LOW | src/lmflow/pipeline/iterative_dpo_aligner.py | 230 | def _parse_target_model_inference_args( | CODE |
| LOW | src/lmflow/pipeline/iterative_dpo_aligner.py | 239 | def _parse_reward_model_inference_args( | CODE |
| 54 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | experimental/RAFT-diffusion/train_text_to_image_lora.py | 361 | CODE | |
| LOW | …fusion/instruct_pix2pix/train_instruct_pix2pix_lisa.py | 404 | CODE | |
| LOW | …al/LISA-diffusion/diffusion_dpo/train_diffusion_dpo.py | 465 | CODE | |
| LOW | …SA-diffusion/diffusion_dpo/train_diffusion_dpo_lisa.py | 494 | CODE | |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 241 | CODE | |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 849 | CODE | |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 874 | CODE | |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 236 | CODE | |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 842 | CODE | |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 867 | CODE | |
| LOW | contrib/langchain/retrieval_chatbot.py | 51 | CODE | |
| LOW | contrib/langchain/retrieval_chatbot.py | 85 | CODE | |
| LOW | contrib/text2image/diffuser_finetuner.py | 99 | CODE | |
| LOW | contrib/tool-finetune/function_call_finetune.py | 158 | CODE | |
| LOW | contrib/tool-finetune/function_call_finetune.py | 35 | CODE | |
| LOW | examples/vis_chatbot.py | 63 | CODE | |
| LOW | examples/chatbot.py | 42 | CODE | |
| LOW | examples/vis_chatbot_gradio.py | 155 | CODE | |
| LOW | examples/vis_chatbot_gradio.py | 214 | CODE | |
| LOW | examples/benchmarking.py | 115 | CODE | |
| LOW | scripts/archive/export_llama_state_dict_checkpoint.py | 19 | CODE | |
| LOW | src/lmflow/pipeline/inferencer.py | 128 | CODE | |
| LOW | src/lmflow/pipeline/dpov2_aligner.py | 228 | CODE | |
| LOW | src/lmflow/pipeline/dpov2_aligner.py | 250 | CODE | |
| LOW | src/lmflow/pipeline/evaluator.py | 179 | CODE | |
| LOW | src/lmflow/pipeline/evaluator.py | 287 | CODE | |
| LOW | src/lmflow/pipeline/evaluator.py | 440 | CODE | |
| LOW | src/lmflow/pipeline/utils/dpov2_dataprocessor.py | 133 | CODE | |
| LOW | src/lmflow/pipeline/utils/dpov2_trainer.py | 102 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 282 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 865 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 1003 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 1059 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 1180 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 1266 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 1327 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 1613 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2053 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2073 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2131 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2282 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2391 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2561 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2714 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 3270 | CODE | |
| LOW | src/lmflow/datasets/multi_modal_dataset.py | 94 | CODE | |
| LOW | src/lmflow/datasets/multi_modal_dataset.py | 44 | CODE | |
| LOW | src/lmflow/datasets/dataset.py | 72 | CODE | |
| LOW | src/lmflow/datasets/dataset.py | 150 | CODE | |
| LOW | src/lmflow/optim/adan.py | 75 | CODE | |
| LOW | src/lmflow/optim/lars.py | 84 | CODE | |
| LOW | src/lmflow/optim/sgd_schedule_free.py | 61 | CODE | |
| LOW | src/lmflow/optim/sgd_schedule_free.py | 73 | CODE | |
| LOW | src/lmflow/optim/sgd_schedule_free.py | 85 | CODE | |
| LOW | src/lmflow/optim/adabelief.py | 88 | CODE | |
| LOW | src/lmflow/optim/novograd.py | 31 | CODE | |
| LOW | src/lmflow/optim/utils.py | 10 | CODE | |
| LOW | src/lmflow/optim/utils.py | 13 | CODE | |
| LOW | src/lmflow/optim/radam.py | 65 | CODE | |
| LOW | src/lmflow/optim/adamw_schedule_free.py | 58 | CODE | |
| 34 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/pipeline/test_memory_safe_vllm_inferencer.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | contrib/text2image/t2i_dataset.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | contrib/text2image/diffuser_finetuner.py | 28 | logger = logging.getLogger(__name__) | CODE |
| LOW | contrib/tool-finetune/function_call_finetune.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/iterative_dpo_train.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/dpov2_train.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/multistage_finetune.py | 33 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/reward_modeling.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/sglang_inference.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/vllm_inference.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/rm_inference.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | examples/benchmarking.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/__init__.py | 21 | __all__ = ["args", "datasets", "models", "pipeline", "utils"] | CODE |
| LOW | src/lmflow/args.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/iterative_dpo_aligner.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/sglang_inferencer.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/vllm_inferencer.py | 28 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/inferencer.py | 42 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/raft_aligner.py | 31 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/rm_inferencer.py | 38 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/rm_tuner.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/dpov2_aligner.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/finetuner.py | 37 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/utils/dpov2_dataprocessor.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/utils/rm_dataprocessor.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/utils/dpov2_trainer.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/utils/memory_safe_dpov2_align.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/pipeline/utils/memory_safe_vllm_inference.py | 24 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/datasets/dataset.py | 33 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/optim/__init__.py | 3 | __all__ = ["create_customized_optimizer"] | CODE |
| LOW | src/lmflow/utils/envs.py | 11 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/utils/envs.py | 13 | __all__ = [ | CODE |
| LOW | src/lmflow/utils/envs.py | 37 | def set_cuda_device(local_rank: int) -> None: | CODE |
| LOW | src/lmflow/utils/protocol.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/utils/deprecated.py | 10 | __all__ = ["deprecated_args"] | CODE |
| LOW | src/lmflow/utils/model.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/utils/common.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/utils/versioning.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/utils/conversation_template/__init__.py | 28 | __all__ = [ | CODE |
| LOW | src/lmflow/utils/conversation_template/__init__.py | 33 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/utils/conversation_template/llama.py | 13 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/utils/conversation_template/zephyr.py | 11 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/utils/conversation_template/gemma.py | 8 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/utils/conversation_template/base.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/models/hf_decoder_model.py | 45 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/models/hf_text_regression_model.py | 42 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/models/hf_model_mixin.py | 30 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/models/vision_encoder/__init__.py | 3 | __all__ = ["build_vision_tower"] | CODE |
| LOW | src/lmflow/tokenization/hf_decoder_model.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/lmflow/tokenization/hf_text_regression_model.py | 15 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/models/test_hf_decoder_model.py | 15 | CODE | |
| LOW | tests/models/test_hf_decoder_model.py | 20 | CODE | |
| LOW | tests/models/test_hf_decoder_model.py | 27 | CODE | |
| LOW | tests/models/test_hf_decoder_model.py | 27 | CODE | |
| LOW | tests/models/test_hf_decoder_model.py | 31 | CODE | |
| LOW | src/lmflow/__init__.py | 8 | CODE | |
| LOW | src/lmflow/__init__.py | 8 | CODE | |
| LOW | src/lmflow/__init__.py | 8 | CODE | |
| LOW | src/lmflow/__init__.py | 8 | CODE | |
| LOW | src/lmflow/__init__.py | 8 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 23 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 23 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 23 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 23 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 280 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 280 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 280 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 280 | CODE | |
| LOW | src/lmflow/datasets/__init__.py | 8 | CODE | |
| LOW | src/lmflow/datasets/__init__.py | 12 | CODE | |
| LOW | src/lmflow/optim/__init__.py | 1 | CODE | |
| LOW | src/lmflow/utils/test_utils.py | 4 | CODE | |
| LOW | src/lmflow/utils/conversation_template/__init__.py | 7 | CODE | |
| LOW | src/lmflow/utils/conversation_template/__init__.py | 7 | CODE | |
| LOW | src/lmflow/models/hf_text_regression_model.py | 39 | CODE | |
| LOW | src/lmflow/models/vision_encoder/__init__.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 158 | except Exception: | CODE |
| MEDIUM | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 147 | def __call__(self, x): | CODE |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 153 | except Exception: | CODE |
| MEDIUM | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 142 | def __call__(self, x): | CODE |
| LOW | src/lmflow/pipeline/inferencer.py | 91 | except Exception: | CODE |
| MEDIUM | src/lmflow/pipeline/inferencer.py | 92 | print("Error in setting hidden size, use the default size 1024") | CODE |
| LOW | src/lmflow/pipeline/inferencer.py | 346 | except Exception: | STRING |
| MEDIUM | src/lmflow/pipeline/inferencer.py | 347 | print("Error in setting hidden size for draft model, use the default size 1024") | STRING |
| LOW | src/lmflow/pipeline/evaluator.py | 97 | except Exception: | CODE |
| MEDIUM | src/lmflow/pipeline/evaluator.py | 98 | print("Error in setting hidden size, use the default size 1024") | CODE |
| LOW | src/lmflow/pipeline/evaluator.py | 403 | except Exception: | CODE |
| LOW | src/lmflow/pipeline/evaluator.py | 483 | except Exception: | CODE |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2274 | except Exception as e: | CODE |
| LOW | src/lmflow/utils/data_utils.py | 264 | except Exception: | CODE |
| LOW | src/lmflow/utils/versioning.py | 22 | except Exception as e: | CODE |
| LOW | src/lmflow/models/hf_model_mixin.py | 418 | except Exception: | CODE |
| LOW | src/lmflow/models/hf_model_mixin.py | 580 | except Exception: | CODE |
| LOW | src/lmflow/tokenization/hf_text_regression_model.py | 186 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | experimental/RAFT-diffusion/train_text_to_image_lora.py | 1 | # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | experimental/RAFT-diffusion/train_text_to_image_lora.py | 441 | # It's important to realize here how many attention weights will be added and of which sizes | COMMENT |
| LOW | experimental/RAFT-diffusion/train_text_to_image_lora.py | 821 | upload_folder( | COMMENT |
| LOW | experimental/RAFT-diffusion/train_text_to_image_lora.py | 841 | # for _ in range(args.num_validation_images): | COMMENT |
| LOW | …SA-diffusion/instruct_pix2pix/test_instruct_pix2pix.py | 1 | # Copyright 2024 HuggingFace Inc. | COMMENT |
| LOW | …fusion/instruct_pix2pix/train_instruct_pix2pix_lisa.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | …al/LISA-diffusion/diffusion_dpo/train_diffusion_dpo.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | …SA-diffusion/diffusion_dpo/train_diffusion_dpo_lisa.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | scripts/archive/convert_llama_weights_to_hf.py | 1 | # Copyright 2022 EleutherAI and The HuggingFace Inc. team. All rights reserved. | COMMENT |
| LOW | scripts/archive/bash.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/multimodal/run_vis_chatbot_gradio_minigpt4.sh | 1 | #!/bin/bash | COMMENT |
| LOW | src/lmflow/pipeline/finetuner.py | 181 | # We drop the small remainder, we could add padding if the model | COMMENT |
| LOW | src/lmflow/utils/conversation_template/base.py | 301 | COMMENT | |
| LOW | src/lmflow/utils/conversation_template/hymba.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | src/lmflow/utils/conversation_template/hymba.py | 21 | # {% endif %} | COMMENT |
| LOW | src/lmflow/models/hf_text_regression_model.py | 341 | COMMENT | |
| LOW | src/lmflow/tokenization/__init__.py | 1 | #!/usr/bin/env python | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …fusion/instruct_pix2pix/train_instruct_pix2pix_lisa.py | 1054 | # Create the pipeline using the trained modules and save it. | COMMENT |
| MEDIUM | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 1489 | # Create the pipeline using using the trained modules and save it. | COMMENT |
| MEDIUM | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 1440 | # Create the pipeline using using the trained modules and save it. | COMMENT |
| MEDIUM | contrib/rlhflow/reward_modeling.py | 108 | ## Define the trainer | COMMENT |
| MEDIUM | src/lmflow/datasets/dataset.py | 9 | # Importing necessary libraries and modules | COMMENT |
| MEDIUM | src/lmflow/utils/protocol.py | 610 | # Create a slice object | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | docs/readme/multi_node.md | 9 | #### Step 1: Set up single-node configurations | COMMENT |
| LOW⚡ | docs/readme/multi_node.md | 12 | #### Step 2: Prepare multi-node communication tools | COMMENT |
| LOW⚡ | docs/readme/multi_node.md | 18 | #### Step 3: Set up `~/.bashrc` | COMMENT |
| LOW⚡ | docs/readme/multi_node.md | 28 | #### Step 4: Establish SSH trust between servers | COMMENT |
| LOW | docs/readme/multi_node.md | 45 | ### Step 5: Update `hostfile` | COMMENT |
| LOW⚡ | docs/readme/multi_node.md | 65 | #### Step 6: Check firewalls | COMMENT |
| LOW⚡ | docs/readme/multi_node.md | 71 | #### Step 7: Running single-node training in each server | COMMENT |
| LOW⚡ | docs/readme/multi_node.md | 75 | #### Step 8: Run the training script | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/lmflow/pipeline/inferencer.py | 420 | CODE | |
| LOW | src/lmflow/pipeline/inferencer.py | 626 | CODE | |
| LOW | src/lmflow/pipeline/raft_aligner.py | 257 | CODE | |
| LOW | src/lmflow/pipeline/raft_aligner.py | 390 | CODE | |
| LOW | src/lmflow/pipeline/finetuner.py | 190 | CODE | |
| LOW | src/lmflow/pipeline/utils/dpov2_trainer.py | 30 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 282 | CODE | |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 3433 | CODE | |
| LOW | src/lmflow/optim/adabelief.py | 14 | CODE | |
| LOW | src/lmflow/optim/adamw_schedule_free.py | 27 | CODE | |
| LOW | src/lmflow/optim/sgdp.py | 20 | CODE | |
| LOW | src/lmflow/utils/protocol.py | 1022 | CODE | |
| LOW | src/lmflow/models/hf_decoder_model.py | 310 | CODE | |
| LOW | src/lmflow/models/vision2seq_model.py | 189 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/detail_memory.py | 11 | # Check if the model name is provided as a command-line argument | COMMENT |
| LOW | src/lmflow/pipeline/inferencer.py | 632 | # Print the result | COMMENT |
| LOW | src/lmflow/pipeline/rm_tuner.py | 125 | # Check if it's time to switch active layers, including at step 0 | COMMENT |
| LOW | src/lmflow/pipeline/utils/lisa_trainer.py | 50 | # Check if it's time to switch active layers, including at step 0 | COMMENT |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2046 | # Check if saved optimizer or scheduler states exist | COMMENT |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2869 | # Check if we should delete older checkpoint(s) | COMMENT |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 3145 | # Set back to None to begin a new accumulation | COMMENT |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 3691 | # Set back to None to begin a new accumulation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …fusion/instruct_pix2pix/train_instruct_pix2pix_lisa.py | 543 | # make sure to pop weight so that corresponding model is not saved again | COMMENT |
| LOW | …al/LISA-diffusion/diffusion_dpo/train_diffusion_dpo.py | 598 | # make sure to pop weight so that corresponding model is not saved again | COMMENT |
| LOW | …SA-diffusion/diffusion_dpo/train_diffusion_dpo_lisa.py | 617 | # make sure to pop weight so that corresponding model is not saved again | COMMENT |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lisa.py | 1042 | # make sure to pop weight so that corresponding model is not saved again | COMMENT |
| LOW | …ent_consistency_model/train_lcm_distill_sd_wds_lora.py | 1048 | # make sure to pop weight so that corresponding model is not saved again | COMMENT |
| LOW | tests/pipeline/test_finetuner_distributed_loss.py | 23 | # python subprocess takes list of strings as command, don't forget to split | COMMENT |
| LOW | tests/pipeline/test_finetuner_distributed_loss.py | 23 | # python subprocess takes list of strings as command, don't forget to split | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/lmflow/pipeline/utils/raft_trainer.py | 3531 | Upload *self.model* and *self.tokenizer* to the 🤗 model hub on the repo *self.args.hub_model_id*. Param | STRING |
| HIGH | src/lmflow/utils/protocol.py | 583 | Slice the DataProto and return a new DataProto object. This is an improved version of direct slicing wh | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | examples/benchmarking.py | 132 | os.system("cd data && ./download.sh common_sense_eval && cd -") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | pyproject.toml | 5 | # ------------------------------- | COMMENT |
| MEDIUM | pyproject.toml | 7 | # ------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/lmflow/pipeline/rm_inferencer.py | 219 | # For tensor_parallel_size == 1, we simply set num_gpus=1. | COMMENT |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 1807 | # if loss is nan or inf simply add the average of previous logged losses | COMMENT |
| LOW | src/lmflow/pipeline/utils/raft_trainer.py | 2020 | # print("I just create a optimizer here!") # called | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/lmflow/pipeline/evaluator.py | 480 | # Gets context window length | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/lmflow/utils/deprecated.py | 32 | def my_function(inference_engine='huggingface', **kwargs): | STRING |