AI Slop Code RIsk Monitor

microsoft/BitNet

Official inference framework for 1-bit LLMs

10.3 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for microsoft/BitNet, a C++ project with 40,658 GitHub stars. SynthScan examined 21,907 lines of code across 59 source files, recording 137 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 10.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.

10.3
Adjusted Signal
10.3
Raw Pattern Score
100%
Time Factor
2026-07-27
Last Push
40.7K
Stars
C++
Language
21.9K
Lines of Code
59
Files
137
Pattern Hits
2026-10-12
Scan Date
0.17
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 14.1/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 59 finding(s).

Hallucinated Dependency & Supply Chain Risk 8.5/100 · LOW

Are imports declared and package/API names verified? 31 finding(s).

Agent Over-Engineering Ratio 25.5/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 56 finding(s).

PR Review Velocity Impact 42.3/100 · MEDIUM

Which changes need focused human review? 137 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 10MEDIUM 27LOW 100

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 137 distinct pattern matches across 12 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.

Excessive Try-Catch Wrapping26 hits · 43 pts
SeverityFileLineSnippetContext
MEDIUMrun_inference_server.py13 print(f"Error occurred while running command: {e}")CODE
MEDIUMrun_inference.py13 print(f"Error occurred while running command: {e}")CODE
MEDIUMutils/quantize_embeddings.py116 print(f"Error: {result.stderr}")CODE
LOWutils/quantize_embeddings.py123 except Exception as e:CODE
MEDIUMutils/quantize_embeddings.py176 print(f"Error: {result.stderr}")CODE
LOWutils/quantize_embeddings.py183 except Exception as e:CODE
LOWutils/quantize_embeddings.py270 except Exception as e:CODE
LOWutils/quantize_embeddings.py367 except Exception as e:CODE
LOWutils/quantize_embeddings.py465 except Exception as e:CODE
LOWutils/tune_gemm_config.py252 except Exception as e:CODE
MEDIUMutils/convert-helper-bitnet.py15 print(f"Error executing command: {' '.join(map(str, e.cmd))}")CODE
MEDIUMutils/convert-helper-bitnet.py29 print(f"Error: Model directory '{model_dir}' not found or is not a directory.")CODE
MEDIUM⚡utils/convert-helper-bitnet.py48 print(f"Error: Preprocess script not found at '{preprocess_script}'")CODE
MEDIUM⚡utils/convert-helper-bitnet.py51 print(f"Error: Convert script not found at '{convert_script}'")CODE
MEDIUM⚡utils/convert-helper-bitnet.py54 print(f"Error: llama-quantize binary not found at '{llama_quantize_binary}'")CODE
MEDIUM⚡utils/convert-helper-bitnet.py58 print(f"Error: Input safetensors file not found at '{input_file}'")CODE
LOWutils/convert-helper-bitnet.py101 except Exception as e:CODE
MEDIUMutils/convert-helper-bitnet.py102 print(f"An error occurred: {e}")CODE
LOWutils/convert-helper-bitnet.py124 except Exception as e:CODE
LOWutils/test_perplexity.py102 except Exception as e:CODE
MEDIUMutils/test_perplexity.py170 print(f"Error: {result.stderr[:500]}")CODE
LOWutils/test_perplexity.py195 except Exception as e:CODE
MEDIUMutils/test_perplexity.py304 print(f"Error: {result.stderr[:500]}")CODE
LOWutils/test_perplexity.py310 except Exception as e:CODE
LOWutils/test_perplexity.py321 except Exception as e:CODE
LOWutils/test_perplexity.py598 except Exception as e:CODE
Empty Error Handlers8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHutils/convert-ms-to-gguf-bitnet.py435except FileNotFoundError:CODE
HIGHutils/convert-ms-to-gguf-bitnet.py505except FileNotFoundError:CODE
HIGHutils/convert-ms-to-gguf-bitnet.py1599except FileNotFoundError:CODE
HIGHutils/convert.py435except FileNotFoundError:CODE
HIGHutils/convert.py505except FileNotFoundError:CODE
HIGHutils/convert.py1454except FileNotFoundError:CODE
HIGHutils/test_perplexity.py112except:CODE
HIGHutils/test_perplexity.py217except ValueError:CODE
Decorative Section Separators12 hits · 36 pts
SeverityFileLineSnippetContext
MEDIUMutils/convert-bitnet-embedding-to-gguf.py32# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py34# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py90# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py92# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py335# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py337# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py397# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py399# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py416# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py418# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py495# ---------------------------------------------------------------------------COMMENT
MEDIUMutils/convert-bitnet-embedding-to-gguf.py497# ---------------------------------------------------------------------------COMMENT
Unused Imports29 hits · 29 pts
SeverityFileLineSnippetContext
LOWgpu/convert_safetensors.py1CODE
LOWgpu/convert_safetensors.py3CODE
LOWgpu/generate.py6CODE
LOWgpu/generate.py8CODE
LOWgpu/test.py3CODE
LOWgpu/test.py6CODE
LOWgpu/test.py6CODE
LOWgpu/test.py6CODE
LOWgpu/convert_checkpoint.py1CODE
LOWgpu/convert_checkpoint.py3CODE
LOWgpu/convert_checkpoint.py4CODE
LOWgpu/convert_checkpoint.py5CODE
LOWgpu/convert_checkpoint.py6CODE
LOWgpu/convert_checkpoint.py7CODE
LOWgpu/convert_checkpoint.py9CODE
LOWgpu/convert_checkpoint.py10CODE
LOWutils/convert-ms-to-gguf-bitnet.py2CODE
LOWutils/convert.py2CODE
LOWutils/generate-dummy-bitnet-model.py4CODE
LOWutils/generate-dummy-bitnet-model.py9CODE
LOWutils/generate-dummy-bitnet-model.py15CODE
LOWutils/convert-helper-bitnet.py4CODE
LOWutils/convert-bitnet-embedding-to-gguf.py3CODE
LOWutils/convert-bitnet-embedding-to-gguf.py12CODE
LOWutils/test_perplexity.py16CODE
LOWutils/test_perplexity.py17CODE
LOWutils/convert-hf-to-gguf-bitnet.py3CODE
LOWutils/convert-hf-to-gguf-bitnet.py10CODE
LOWutils/convert-hf-to-gguf-bitnet.py17CODE
Deep Nesting27 hits · 27 pts
SeverityFileLineSnippetContext
LOWsetup_env.py115CODE
LOWsetup_env.py162CODE
LOWgpu/convert_checkpoint.py15CODE
LOWutils/convert-ms-to-gguf-bitnet.py1076CODE
LOWutils/quantize_embeddings.py187CODE
LOWutils/convert.py1002CODE
LOWutils/convert.py1302CODE
LOWutils/tune_gemm_config.py262CODE
LOWutils/generate-dummy-bitnet-model.py498CODE
LOWutils/generate-dummy-bitnet-model.py577CODE
LOWutils/generate-dummy-bitnet-model.py620CODE
LOWutils/generate-dummy-bitnet-model.py328CODE
LOWutils/generate-dummy-bitnet-model.py431CODE
LOWutils/generate-dummy-bitnet-model.py861CODE
LOWutils/convert-helper-bitnet.py19CODE
LOWutils/convert-bitnet-embedding-to-gguf.py193CODE
LOWutils/convert-bitnet-embedding-to-gguf.py248CODE
LOWutils/convert-bitnet-embedding-to-gguf.py339CODE
LOWutils/convert-bitnet-embedding-to-gguf.py499CODE
LOWutils/test_perplexity.py326CODE
LOWutils/test_perplexity.py490CODE
LOWutils/convert-hf-to-gguf-bitnet.py260CODE
LOWutils/convert-hf-to-gguf-bitnet.py380CODE
LOWutils/convert-hf-to-gguf-bitnet.py776CODE
LOWutils/convert-hf-to-gguf-bitnet.py946CODE
LOWutils/convert-hf-to-gguf-bitnet.py991CODE
LOWutils/convert-hf-to-gguf-bitnet.py1074CODE
Over-Commented Block14 hits · 14 pts
SeverityFileLineSnippetContext
LOWgpu/test.py81 )COMMENT
LOWgpu/bitnet_kernels/bitnet_kernels.h1#include <cuda_runtime.h>COMMENT
LOWinclude/gemm-config.h1#define ACT_PARALLELCOMMENT
LOWinclude/gemm-config.h21 #define PARALLEL_SIZE 2COMMENT
LOWutils/convert-ms-to-gguf-bitnet.py121# assert(np.prod(arr.shape) % 4 == 0)COMMENT
LOWutils/convert-ms-to-gguf-bitnet.py1381 # if params.n_experts and params.n_experts > 0:COMMENT
LOWutils/convert-ms-to-gguf-bitnet.py1401COMMENT
LOWutils/convert-ms-to-gguf-bitnet.py1421COMMENT
LOWutils/convert-ms-to-gguf-bitnet.py1441 # for name, lazy_tensor in model.items():COMMENT
LOWutils/convert-ms-to-gguf-bitnet.py1461 # tmp[f"layers.{i}.feed_forward.w3.weight"] = part_lazy_w3(model[f"layers.{i}.feed_forward.w13.weight"], 1)COMMENT
LOWutils/convert.py121# assert(np.prod(arr.shape) % 4 == 0)COMMENT
LOWutils/test_gemm_kernel.sh121COMMENT
LOWsrc/ggml-bitnet-mad.cpp1#include <vector>COMMENT
LOWsrc/ggml-bitnet-lut.cpp1#include <vector>COMMENT
Redundant / Tautological Comments7 hits · 10 pts
SeverityFileLineSnippetContext
LOWsetup_env.py210 # Check if cmake is installedCOMMENT
LOWutils/convert-ms-to-gguf-bitnet.py1551 # Check if it's a set of safetensors filesCOMMENT
LOWutils/quantize_embeddings.py59 # Check if file already existsCOMMENT
LOWutils/convert.py1406 # Check if it's a set of safetensors filesCOMMENT
LOWutils/test_gemm_kernel.sh448# Set LD_LIBRARY_PATH to include the GGML library directoryCOMMENT
LOWutils/test_gemm_kernel.sh477 # Check if values were extracted successfullyCOMMENT
LOWutils/test_perplexity.py256 # Check if file already existsCOMMENT
Cross-Language Confusion2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHutils/codegen_tl2.py629 if (!(is_type_supported(tensor->type) && tensor->backend == GGML_BACKEND_TYPE_CPU && tensor->extra == nullptr)) {\n\CODE
HIGHutils/codegen_tl1.py324 if (!(is_type_supported(tensor->type) && tensor->backend == GGML_BACKEND_TYPE_CPU && tensor->extra == nullptr)) {\n\CODE
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMgpu/pack_weight.py23 # Create a lookup table for the permutationCOMMENT
MEDIUMgpu/pack_weight.py36 # Create the source indicesCOMMENT
Hyper-Verbose Identifiers5 hits · 5 pts
SeverityFileLineSnippetContext
LOWgpu/tokenizer.py172 def _split_whitespaces_or_nonwhitespaces(CODE
LOWutils/convert-ms-to-gguf-bitnet.py1029def lazy_load_safetensors_file(fp: IO[bytes], path: Path) -> ModelPlus:CODE
LOWutils/convert-ms-to-gguf-bitnet.py1193 def extract_vocabulary_from_model(self, vocab: Vocab) -> tuple[list[bytes], list[float], list[gguf.TokenType]]:CODE
LOWutils/convert.py955def lazy_load_safetensors_file(fp: IO[bytes], path: Path) -> ModelPlus:CODE
LOWutils/convert.py1123 def extract_vocabulary_from_model(self, vocab: Vocab) -> tuple[list[bytes], list[float], list[gguf.TokenType]]:CODE
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWgpu/pack_weight.py98CODE
LOWgpu/model.py162CODE
LOWgpu/model.py197CODE
LOWgpu/model.py243CODE
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWutils/convert-hf-to-gguf-bitnet.py370 def _set_vocab_gpt2(self) -> None:CODE