AI Slop Code RIsk Monitor

karpathy/nanochat

The best ChatGPT that $100 can buy.

34.1 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for karpathy/nanochat, a Python project with 58,545 GitHub stars. SynthScan examined 9,834 lines of code across 45 source files, recording 149 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 34.1 (High 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.

34.1
Adjusted Signal
34.1
Raw Pattern Score
100%
Time Factor
2026-09-07
Last Push
58.5K
Stars
Python
Language
9.8K
Lines of Code
45
Files
149
Pattern Hits
2026-10-12
Scan Date
0.02
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 29.5/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 2.0/100 · LOW

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

Agent Over-Engineering Ratio 78.4/100 · CRITICAL

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

PR Review Velocity Impact 80.3/100 · CRITICAL

Which changes need focused human review? 149 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 1MEDIUM 83LOW 65

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 149 distinct pattern matches across 14 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.

Decorative Section Separators80 hits · 252 pts
SeverityFileLineSnippetContext
MEDIUMtasks/smoltalk.py24 # ---------------------------------------------------------------------COMMENT
MEDIUMtasks/smoltalk.py40 # ---------------------------------------------------------------------COMMENT
MEDIUMtests/test_engine.py12# -----------------------------------------------------------------------------COMMENT
MEDIUMtests/test_attention_fallback.py48# =============================================================================COMMENT
MEDIUMtests/test_attention_fallback.py50# =============================================================================COMMENT
MEDIUMtests/test_attention_fallback.py251# =============================================================================COMMENT
MEDIUMtests/test_attention_fallback.py253# =============================================================================COMMENT
MEDIUMtests/test_attention_fallback.py337# =============================================================================COMMENT
MEDIUMtests/test_attention_fallback.py339# =============================================================================COMMENT
MEDIUMnanochat/execution.py30# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/dataset.py19# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/dataset.py29# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/dataset.py83# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/tokenizer.py28# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/tokenizer.py261# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/engine.py23# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/engine.py81# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/engine.py139# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/engine.py158# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/flash_attention.py20# =============================================================================COMMENT
MEDIUMnanochat/flash_attention.py22# =============================================================================COMMENT
MEDIUMnanochat/flash_attention.py74# =============================================================================COMMENT
MEDIUMnanochat/flash_attention.py76# =============================================================================COMMENT
MEDIUMnanochat/flash_attention.py112# =============================================================================COMMENT
MEDIUMnanochat/flash_attention.py114# =============================================================================COMMENT
MEDIUMnanochat/flash_attention.py188# =============================================================================COMMENT
MEDIUMnanochat/flash_attention.py190# =============================================================================COMMENT
MEDIUMnanochat/core_eval.py14# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/optim.py17# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/optim.py65# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/optim.py182# -----------------------------------------------------------------------------COMMENT
MEDIUMnanochat/checkpoint_manager.py145# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/infer_bench.py46# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/infer_bench.py95# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/infer_bench.py124 # ------------------------------------------------------------------------COMMENT
MEDIUMscripts/infer_bench.py182 # ------------------------------------------------------------------------COMMENT
MEDIUMscripts/infer_bench.py197 # ------------------------------------------------------------------------COMMENT
MEDIUMscripts/chat_eval.py25# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/chat_eval.py82# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/chat_eval.py154# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/chat_eval.py177# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py39# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py82# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py119# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py126# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py164# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py242# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py248# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py306# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡scripts/base_train.py322# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡scripts/base_train.py328# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡scripts/base_train.py335# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py388# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py505 # -------------------------------------------------------------------------COMMENT
MEDIUMscripts/base_train.py545 # -------------------------------------------------------------------------COMMENT
MEDIUMscripts/chat_rl.py30# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/chat_rl.py62# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/chat_rl.py77# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/chat_rl.py148# -----------------------------------------------------------------------------COMMENT
MEDIUMscripts/chat_rl.py193# -----------------------------------------------------------------------------COMMENT
20 more matches not shown…
Hyper-Verbose Identifiers33 hits · 35 pts
SeverityFileLineSnippetContext
LOWtests/test_engine.py158def test_multi_sample_first_token_diversity():CODE
LOWtests/test_engine.py201def test_seed_reproducibility():CODE
LOWtests/test_engine.py214def test_temperature_zero_determinism():CODE
LOWtests/test_engine.py226def test_max_tokens_respected():CODE
LOWtests/test_engine.py249def test_different_seeds_introduce_variation_when_temperature_nonzero():CODE
LOWtests/test_tokenizer.py31def test_encode_decode_roundtrip(tokenizer):CODE
LOWtests/test_tokenizer.py47def test_encode_prepend_append(tokenizer):CODE
LOWtests/test_tokenizer.py61def test_render_conversation_masks(tokenizer):CODE
LOWtests/test_tokenizer.py82def test_render_conversation_system_message_merged(tokenizer):CODE
LOWtests/test_tokenizer.py95def test_render_conversation_tool_parts(tokenizer):CODE
LOWtests/test_tokenizer.py117def test_render_conversation_truncation(tokenizer):CODE
LOWtests/test_tokenizer.py126def test_render_for_completion(tokenizer):CODE
LOWtests/test_optim.py48def test_adamw_matches_torch_reference():CODE
LOWtests/test_optim.py99def test_muon_update_is_orthogonalized():CODE
LOWtests/test_execution.py20def test_exception_is_captured():CODE
LOWtests/test_execution.py26def test_timeout_kills_infinite_loop():CODE
LOW⚡tests/test_execution.py48def test_destructive_functions_disabled(evil):CODE
LOW⚡tests/test_execution.py58def test_writes_go_to_tempdir():CODE
LOW⚡tests/test_execution.py64def test_environment_is_scrubbed():CODE
LOW⚡tests/test_execution.py73def test_tricky_string_content():CODE
LOWtests/test_attention_fallback.py155 def test_kvcache_single_token(self):CODE
LOWtests/test_attention_fallback.py182 def test_kvcache_single_token_sliding_window(self):CODE
LOWtests/test_attention_fallback.py215 def test_backward_gradients_match(self):CODE
LOWtests/test_tasks.py46def test_mixture_covers_all_examples_deterministically():CODE
LOWtests/test_tasks.py60def test_mixture_oversampling():CODE
LOWtests/test_tasks.py73def test_hub_dataset_shuffle_matches_numpy():CODE
LOWtests/test_tasks.py84def test_render_mc_letter_binding():CODE
LOWnanochat/tokenizer.py129 def decode_single_token_bytes(self, token_id):CODE
LOWnanochat/dataloader.py74def tokenizing_distributed_data_loader_with_state_bos_bestfit(CODE
LOWnanochat/dataloader.py163def tokenizing_distributed_data_loader_bos_bestfit(*args, **kwargs):CODE
LOWnanochat/checkpoint_manager.py22def _patch_missing_config_keys(model_config_kwargs):CODE
LOWnanochat/gpt.py270 def _precompute_rotary_embeddings(self, seq_len, head_dim, base=100000, device=None):CODE
LOWscripts/chat_sft.py180def sft_data_generator_bos_bestfit(split, buffer_size=100):CODE
Deep Nesting11 hits · 11 pts
SeverityFileLineSnippetContext
LOWtasks/common.py45CODE
LOWnanochat/dataset.py84CODE
LOWnanochat/tokenizer.py96CODE
LOWnanochat/tokenizer.py140CODE
LOWnanochat/engine.py176CODE
LOWnanochat/engine.py277CODE
LOWnanochat/dataloader.py25CODE
LOWnanochat/dataloader.py74CODE
LOWscripts/chat_eval.py87CODE
LOWscripts/base_eval.py128CODE
LOWscripts/chat_sft.py180CODE
Redundant / Tautological Comments3 hits · 5 pts
SeverityFileLineSnippetContext
LOWnanochat/engine.py54 # Check if it's a pure math expression (old behavior)COMMENT
LOWnanochat/engine.py60 # Check if it's a string operation we supportCOMMENT
LOW⚡runs/scaling_laws.sh34# Check if a run already exists in resultsCOMMENT
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHnanochat/dataset.py122except:CODE
AI Slop Vocabulary3 hits · 4 pts
SeverityFileLineSnippetContext
LOWnanochat/tokenizer.py195 # simple string => simply add the tokensCOMMENT
LOWnanochat/tokenizer.py202 # string part => simply add the tokensCOMMENT
LOWnanochat/gpt.py523 # inference: just return the logits directlyCOMMENT
Excessive Try-Catch Wrapping3 hits · 4 pts
SeverityFileLineSnippetContext
LOWnanochat/engine.py41 except Exception as e:CODE
MEDIUMnanochat/engine.py35def eval_with_timeout(formula, max_time=3):CODE
LOWnanochat/flash_attention.py45 except Exception:CODE
Unused Imports4 hits · 4 pts
SeverityFileLineSnippetContext
LOWnanochat/gpt.py15CODE
LOWnanochat/gpt.py22CODE
LOWscripts/chat_cli.py8CODE
LOWscripts/base_eval.py29CODE
AI Structural Patterns3 hits · 3 pts
SeverityFileLineSnippetContext
LOWnanochat/execution.py134CODE
LOWnanochat/fp8.py154CODE
LOWscripts/base_eval.py123CODE
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMnanochat/core_eval.py175 # Sample few-shot examples (excluding current item)COMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMscripts/chat_eval.py159 # Create the evaluation objectCOMMENT
Over-Commented Block3 hits · 3 pts
SeverityFileLineSnippetContext
LOWruns/speedrun.sh1#!/bin/bashCOMMENT
LOWruns/speedrun.sh21# install uv (if not already installed)COMMENT
LOWruns/speedrun.sh41COMMENT
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWnanochat/common.py69logger = logging.getLogger(__name__)CODE
LOWnanochat/checkpoint_manager.py17logger = logging.getLogger(__name__)CODE
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippetContext
LOWscripts/chat_rl.py112 seed=seed, # must make sure to change the seed for each sampling stepCODE