MiniCPM5-1B: A SOTA 1B on-device LLM, small yet powerful.
This report presents the forensic synthetic code analysis of OpenBMB/MiniCPM, a Jupyter Notebook project with 10,087 GitHub stars. SynthScan v2.0 examined 45,489 lines of code across 150 source files, recording 126 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 3.9 places this repository in the Likely human-written 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 126 distinct pattern matches across 10 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 |
|---|---|---|---|---|
| MEDIUM | …ma_factory_example/llama_factory_data/kto_en_demo.json | 67 | "content": "Certainly, measuring the results of a marketing strategy and making adjustments based on those metri | CODE |
| MEDIUM | …ma_factory_example/llama_factory_data/kto_en_demo.json | 394 | "content": "Using Unreal's Gameplay Ability System (GAS) in conjunction with interpolation and prediction can pr | CODE |
| LOW⚡ | …ma_factory_example/llama_factory_data/kto_en_demo.json | 903 | "content": "I apologize for the confusion. The `unique_id` parameter in the `momepy.Tessellation` function expec | CODE |
| MEDIUM | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_data/kto_en_demo.json | 3690 | "content": "Firstly, as a fitness trainer, I highly recommend consulting with a healthcare professional before e | CODE |
| MEDIUM | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_data/sft_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 | …tune/llama_factory/llama_factory_data/kto_en_demo.json | 67 | "content": "Certainly, measuring the results of a marketing strategy and making adjustments based on those metri | CODE |
| MEDIUM | …tune/llama_factory/llama_factory_data/kto_en_demo.json | 394 | "content": "Using Unreal's Gameplay Ability System (GAS) in conjunction with interpolation and prediction can pr | CODE |
| LOW⚡ | …tune/llama_factory/llama_factory_data/kto_en_demo.json | 903 | "content": "I apologize for the confusion. The `unique_id` parameter in the `momepy.Tessellation` function expec | CODE |
| MEDIUM | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_data/kto_en_demo.json | 3690 | "content": "Firstly, as a fitness trainer, I highly recommend consulting with a healthcare professional before e | CODE |
| MEDIUM | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_data/sft_zh_demo.json | 4470 | "output": "As an AI language model I am capable of analyzing text and identifying emotions, however, the sentence pr | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | demo/minicpm3/code_interpreter/code_interpreter.py | 105 | # Create a SamplingParams object | STRING |
| MEDIUM | demo/minicpm3/code_interpreter/code_interpreter.py | 135 | # Define a regular expression pattern to match Python code blocks | COMMENT |
| MEDIUM⚡ | …ma_factory_example/llama_factory_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⚡ | …ma_factory_example/llama_factory_data/kto_en_demo.json | 895 | "content": "I apologize for the confusion. Let's try a different approach using the `TopologicalPreserveSimplifi | CODE |
| MEDIUM⚡ | …ma_factory_example/llama_factory_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 | …ma_factory_example/llama_factory_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⚡ | …tune/llama_factory/llama_factory_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⚡ | …tune/llama_factory/llama_factory_data/kto_en_demo.json | 895 | "content": "I apologize for the confusion. Let's try a different approach using the `TopologicalPreserveSimplifi | CODE |
| MEDIUM⚡ | …tune/llama_factory/llama_factory_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 | …tune/llama_factory/llama_factory_data/kto_en_demo.json | 919 | "content": "To smoothen the output polygons without creating gaps or overlays between the polygons, you can use | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | demo/minicpm4/MCP/generate_example.py | 63 | except Exception as e: | CODE |
| LOW | demo/minicpm4/MCP/eval_scripts.py | 83 | except Exception as e: | CODE |
| LOW | …o/minicpm4/SurveyGeneration/src/retriever/retriever.py | 163 | except Exception as e: | CODE |
| MEDIUM | …o/minicpm4/SurveyGeneration/src/retriever/retriever.py | 164 | print(f"Error in call_search_engine: {e}") | CODE |
| MEDIUM | …o/minicpm4/SurveyGeneration/src/retriever/retriever.py | 133 | def call_search_engine(tool_call, topk=10): | CODE |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/run.py | 51 | except Exception as e: | CODE |
| MEDIUM | demo/minicpm4/SurveyGeneration/src/generation/run.py | 52 | print(f"Error sending to WebSocket: {e}") | CODE |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/run.py | 210 | except Exception as e: | CODE |
| MEDIUM | demo/minicpm4/SurveyGeneration/src/generation/run.py | 211 | print(f"Error posting to frontend: {e}") | CODE |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/run.py | 310 | except Exception as e: | CODE |
| MEDIUM | demo/minicpm4/SurveyGeneration/src/generation/run.py | 311 | print(f"Error generating survey: {e}") | CODE |
| LOW | demo/minicpm3/function_call/minicpm_tool_parser.py | 205 | except Exception as e: | CODE |
| LOW | demo/minicpm3/function_call/minicpm_tool_parser.py | 277 | except Exception as e: | CODE |
| LOW | demo/minicpm3/code_interpreter/code_interpreter.py | 76 | except Exception as e: | STRING |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 40 | except Exception: # pragma: no cover | CODE |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 108 | except Exception: | CODE |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 226 | except Exception: | CODE |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 260 | except Exception: | CODE |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 402 | except Exception as e: | CODE |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 645 | except Exception: | CODE |
| LOW | finetune/mlx_finetune.py | 441 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | demo/minicpm4/MCP/generate_example.py | 25 | CODE | |
| LOW | demo/minicpm4/MCP/generate_example.py | 71 | CODE | |
| LOW | demo/minicpm4/MCP/eval_scripts.py | 21 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/run.py | 93 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/run.py | 227 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/run.py | 255 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 36 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 75 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 149 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 210 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 408 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 462 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 510 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 556 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 612 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 639 | CODE | |
| LOW | demo/minicpm3/function_call/minicpm_tool_parser.py | 150 | CODE | |
| LOW | demo/minicpm3/function_call/minicpm_tool_parser.py | 239 | CODE | |
| LOW | demo/minicpm3/function_call/minicpm_tool_parser.py | 75 | CODE | |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 161 | CODE | |
| LOW | finetune/finetune.py | 78 | CODE | |
| LOW | finetune/sft_dpo_trainer/finetune_dpo_trainer.py | 85 | CODE | |
| LOW | finetune/sft_dpo_trainer/finetune_dpo_trainer.py | 184 | CODE | |
| LOW | finetune/sft_dpo_trainer/finetune_dpo_trainer.py | 228 | CODE | |
| LOW | minicpm_sala/finetune/trainer/finetune.py | 78 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | demo/minicpm/langchain_demo.py | 35 | CODE | |
| LOW | demo/minicpm/langchain_demo.py | 40 | CODE | |
| LOW | demo/minicpm4/MCP/eval_scripts.py | 1 | CODE | |
| LOW | …inicpm4/SurveyGeneration/src/preprocess/build_index.py | 6 | CODE | |
| LOW | …inicpm4/SurveyGeneration/src/preprocess/build_index.py | 8 | CODE | |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 276 | CODE | |
| LOW | demo/minicpm3/code_interpreter/code_interpreter.py | 3 | CODE | |
| LOW | demo/minicpm3/code_interpreter/code_interpreter.py | 4 | CODE | |
| LOW | demo/minicpm3/code_interpreter/code_interpreter.py | 6 | CODE | |
| LOW | demo/minicpm3/code_interpreter/code_interpreter.py | 7 | CODE | |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 6 | CODE | |
| LOW | quantize/awq_quantize.py | 4 | CODE | |
| LOW | quantize/quantize_eval.py | 5 | CODE | |
| LOW | finetune/mlx_finetune.py | 46 | CODE | |
| LOW | finetune/sft_dpo_trainer/finetune_dpo_trainer.py | 5 | CODE | |
| LOW | finetune/sft_dpo_trainer/finetune_dpo_trainer.py | 5 | CODE | |
| LOW | finetune/sft_dpo_trainer/finetune_dpo_trainer.py | 19 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 75 | def convert_survey_dict_to_str(current_survey): | CODE |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 149 | def convert_survey_dict_to_abbr_str(current_survey): | CODE |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 408 | def _build_user_prompt_force_correct(query, current_survey, trajs): | CODE |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 510 | def build_prompt_for_generator(self): | CODE |
| LOW | demo/minicpm3/function_call/minicpm_tool_parser.py | 75 | def extract_tool_calls_streaming( | CODE |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 464 | def _process_complete_block_streaming( | CODE |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 526 | def _process_partial_block_streaming( | CODE |
| LOW | tool_parsers/minicpm5xml_tool_parser.py | 565 | def extract_tool_calls_streaming( | CODE |
| LOW | quantize/quantize_data/alpaca_data_cleaned.json | 730 | "output": "Here's a Python implementation of the function:\n\n```\ndef uppercase_unless_rejected(string):\n if st | CODE |
| LOW | finetune/sft_dpo_trainer/finetune_dpo_trainer.py | 228 | def encode_conversation_with_labels(self, messages, response): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | demo/minicpm3/code_interpreter/code_interpreter.py | 165 | # Check if the response contains the termination keyword | COMMENT |
| LOW | finetune/mlx_finetune.py | 487 | # Check if any sequence is longer than 2048 tokens | COMMENT |
| LOW | …ma_factory_example/llama_factory_data/sft_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 | …tune/llama_factory/llama_factory_data/sft_zh_demo.json | 275 | "output": "def calculate_sum(numbers):\n if not isinstance(numbers, list): # Check if input is a list\n r | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …/SurveyGeneration/frontend/minicpm4-survey/src/App.jsx | 181 | }; | COMMENT |
| LOW | demo/minicpm4/SurveyGeneration/src/generation/buffer.py | 1 | COMMENT | |
| LOW | demo/minicpm3/function_call/function_calling.py | 41 | # "tool_calls": [ | COMMENT |
| LOW | demo/minicpm3/function_call/function_calling.py | 61 | # { | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …ma_factory_example/llama_factory_data/kto_en_demo.json | 2769 | "content": " As an Azure Cloud Engineer working with Microsoft Azure, you can indeed utilize Azure Active Direct | CODE |
| MEDIUM | …tune/llama_factory/llama_factory_data/kto_en_demo.json | 2769 | "content": " As an Azure Cloud Engineer working with Microsoft Azure, you can indeed utilize Azure Active Direct | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …o/minicpm4/SurveyGeneration/src/retriever/retriever.py | 131 | CODE |