lightweight, standalone C++ inference engine for Google's Gemma models.
This report summarizes scanner evidence for google/gemma.cpp, a C++ project with 7,058 GitHub stars. SynthScan examined 22,033 lines of code across 81 source files, recording 126 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 6.3 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 124 finding(s).
Are imports declared and package/API names verified? 2 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 126 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 126 distinct pattern matches across 4 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | 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 |