lightweight, standalone C++ inference engine for Google's Gemma models.
This report presents the forensic synthetic code analysis of google/gemma.cpp, a C++ project with 7,007 GitHub stars. SynthScan v2.0 examined 22,033 lines of code across 81 source files, recording 126 pattern matches distributed across 4 syntactic categories. The overall adjusted score of 6.3 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 126 distinct pattern matches across 4 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 | CMakeLists.txt | 1 | # Copyright 2019 Google LLC | COMMENT |
| LOW | cmake.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | gemma/tensor_info.h | 1 | #ifndef THIRD_PARTY_GEMMA_CPP_GEMMA_TENSOR_INFO_H_ | COMMENT |
| LOW | gemma/tensor_info.h | 21 | std::string base_name; | COMMENT |
| LOW | gemma/tensor_info.h | 41 | // The remaining tensors to be concatenated should have just a single | COMMENT |
| LOW | gemma/attention.h | 1 | // Copyright 2025 Google LLC | COMMENT |
| LOW | gemma/gemma.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | gemma/gemma.h | 21 | #include <vector> | COMMENT |
| LOW | gemma/weights.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | gemma/weights.h | 21 | COMMENT | |
| LOW | gemma/vit.h | 1 | // Copyright 2025 Google LLC | COMMENT |
| LOW | gemma/configs.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | gemma/configs.h | 21 | #include <stddef.h> | COMMENT |
| LOW | gemma/tokenizer.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | gemma/gemma-inl.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | gemma/gemma-inl.h | 21 | #include "gemma/activations.h" | COMMENT |
| LOW | gemma/gemma_args.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | gemma/gemma_args.h | 21 | #include <stddef.h> | COMMENT |
| LOW | gemma/gemma_args.h | 81 | // true to continue generation. | COMMENT |
| LOW | gemma/model_store.h | 1 | // Copyright 2025 Google LLC | COMMENT |
| LOW | gemma/model_store.h | 21 | #include <stdint.h> | COMMENT |
| LOW | gemma/kv_cache.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | gemma/flash_attention.h | 1 | // Copyright 2025 Google LLC | COMMENT |
| LOW | gemma/activations.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | gemma/bindings/GemmaInterop.cs | 1 | // Copyright 2025 Google LLC | COMMENT |
| LOW | gemma/bindings/c_api.h | 1 | // Copyright 2025 Google LLC | COMMENT |
| LOW | gemma/bindings/c_api.h | 21 | #ifdef _WIN32 | COMMENT |
| LOW | gemma/bindings/context.h | 1 | // Copyright 2025 Google LLC | COMMENT |
| LOW | gemma/bindings/context.h | 21 | #include <unordered_map> | COMMENT |
| LOW | evals/benchmark_helper.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | evals/benchmark_helper.h | 21 | #include <string> | COMMENT |
| LOW | evals/cross_entropy.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | util/mat.h | 1 | // Copyright 2023 Google LLC | COMMENT |
| LOW | util/mat.h | 21 | #include <stdint.h> | COMMENT |
| LOW | util/threading.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | util/threading.h | 21 | COMMENT | |
| LOW | util/threading.h | 61 | } | COMMENT |
| LOW | util/threading.h | 81 | // cores, call sites will have to use nested parallel-for loops as in | COMMENT |
| LOW | util/threading.h | 101 | // clusters. This is more intuitive than a per-cluster limit for users who | COMMENT |
| LOW | util/args.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | util/allocator.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | util/allocator.h | 21 | #include <stddef.h> | COMMENT |
| LOW | util/threading_context.h | 1 | // Copyright 2025 Google LLC | COMMENT |
| LOW | util/threading_context.h | 21 | COMMENT | |
| LOW | util/threading_context.h | 141 | kAcrossClusters, | COMMENT |
| LOW | util/basics.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | util/basics.h | 141 | COMMENT | |
| LOW | util/topology.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | util/topology.h | 21 | COMMENT | |
| LOW | util/test_util.h | 1 | // Copyright 2023 Google LLC | COMMENT |
| LOW | python/run_example.py | 1 | # Copyright 2024 Google LLC | COMMENT |
| LOW | python/convert_from_safetensors.py | 1 | # Copyright 2025 Google LLC | COMMENT |
| LOW | python/convert_from_safetensors.py | 101 | # Gemma2 layernorms: | COMMENT |
| LOW | io/fields.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | io/fields.h | 21 | // https://github.com/libjxl/libjxl, lib/jxl/fields.h. | COMMENT |
| LOW | io/fields.h | 41 | // and msgpack). This avoids rewriting weights when we add a new field. | COMMENT |
| LOW | io/fields.h | 141 | // Fields are written in the unchanging order established by the user-defined | COMMENT |
| LOW | io/blob_store.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| LOW | io/blob_store.h | 21 | #include <stddef.h> | COMMENT |
| LOW | io/io.h | 1 | // Copyright 2024 Google LLC | COMMENT |
| 59 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | API_SERVER_README.md | 65 | export GOOGLE_API_KEY="your-api-key-here" | CODE |
| HIGH | API_SERVER_README.md | 69 | ./build/gemma_api_client --api_key "your-api-key" --interactive 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 105 | ### Step 1: Obtain model weights and tokenizer from Kaggle or Hugging Face Hub | COMMENT |
| LOW | README.md | 121 | ### Step 2: Extract Files | COMMENT |
| LOW | README.md | 135 | ### Step 3: Build | COMMENT |
| LOW | README.md | 202 | ### Step 4: Run | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | util/threading.h | 80 | // barrier synchronization latency than one large pool. However, to utilize all | COMMENT |