AI Slop Code Risk Monitor

skyzh/tiny-llm

SlopCodeMonitor badge for skyzh/tiny-llm Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

learn LLM inference system on Apple Silicon for systems engineers: build a tiny vLLM + Qwen

1.5 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for skyzh/tiny-llm, a Python project with 5,495 GitHub stars. SynthScan examined 283,660 lines of code across 310 source files, recording 405 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 1.5 (Low 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.

1.5
Adjusted Signal
1.5
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
5.5K
Stars
Python
Language
283.7K
Lines of Code
310
Files
405
Pattern Hits
2026-10-31
Scan Date
0.02
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 3.3/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 2.9/100 · LOW

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

Agent Over-Engineering Ratio 3.8/100 · LOW

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

PR Review Velocity Impact 7.7/100 · LOW

Which changes need focused human review? 405 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 6MEDIUM 9LOW 390

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 405 distinct pattern matches across 11 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.

Unused Imports191 hits · 168 pts
SeverityFileLineSnippetContext
LOWweek4-capstone.py3CODE
LOWagent.py3CODE
LOWbenchmark_results/task360-week3-projection-e2e.py8CODE
LOWbenchmark_results/task346-paged-prefill-operator.py9CODE
LOWtests_refsol/test_week_3_day_1.py17CODE
LOWtests_refsol/test_week_3_day_1.py18CODE
LOWtests_refsol/test_week_1_day_6.py1CODE
LOWtests_refsol/test_week_1_day_2.py3CODE
LOWtests_refsol/test_week_1_day_2.py5CODE
LOWtests_refsol/test_week_1_day_3.py4CODE
LOWtests_refsol/test_week_1_day_3.py5CODE
LOWtests_refsol/test_week_1_day_4.py5CODE
LOWtests_refsol/test_week_1_day_4.py6CODE
LOWtests_refsol/test_rope.py3CODE
LOWtests_refsol/test_rope.py4CODE
LOWtests_refsol/tiny_llm_base.py1CODE
LOWtests_refsol/test_week_1_day_5.py2CODE
LOWtests_refsol/test_week_1_day_1.py4CODE
LOWtests_refsol/test_week_1_day_1.py5CODE
LOWtests_refsol/test_week_3_day_7.py3CODE
LOWtests/tiny_llm_base.py1CODE
LOWbenches/week2_gpudebug.py3CODE
LOWsrc/tiny_llm_ref/__init__.py1CODE
LOWsrc/tiny_llm_ref/__init__.py2CODE
LOWsrc/tiny_llm_ref/__init__.py3CODE
LOWsrc/tiny_llm_ref/__init__.py4CODE
LOWsrc/tiny_llm_ref/__init__.py5CODE
LOWsrc/tiny_llm_ref/__init__.py6CODE
LOWsrc/tiny_llm_ref/__init__.py7CODE
LOWsrc/tiny_llm_ref/__init__.py8CODE
LOWsrc/tiny_llm_ref/__init__.py9CODE
LOWsrc/tiny_llm_ref/__init__.py10CODE
LOWsrc/tiny_llm_ref/__init__.py11CODE
LOWsrc/tiny_llm_ref/__init__.py12CODE
LOWsrc/tiny_llm_ref/__init__.py13CODE
LOWsrc/tiny_llm_ref/__init__.py14CODE
LOWsrc/tiny_llm_ref/__init__.py15CODE
LOWsrc/tiny_llm_ref/__init__.py16CODE
LOWsrc/tiny_llm_ref/__init__.py17CODE
LOWsrc/tiny_llm_ref/__init__.py18CODE
LOWsrc/tiny_llm_ref/__init__.py19CODE
LOWsrc/tiny_llm_ref/__init__.py20CODE
LOWsrc/tiny_llm_ref/basics.py2CODE
LOWsrc/tiny_llm_ref/agent/receipts.py5CODE
LOWsrc/tiny_llm_ref/agent/checkpoint.py5CODE
LOWsrc/tiny_llm_ref/agent/protocol.py3CODE
LOWsrc/tiny_llm_ref/agent/evaluation.py5CODE
LOWsrc/tiny_llm_ref/agent/steering.py5CODE
LOWsrc/tiny_llm_ref/agent/__init__.py3CODE
LOWsrc/tiny_llm_ref/agent/__init__.py3CODE
LOWsrc/tiny_llm_ref/agent/__init__.py3CODE
LOWsrc/tiny_llm_ref/agent/__init__.py4CODE
LOWsrc/tiny_llm_ref/agent/__init__.py4CODE
LOWsrc/tiny_llm_ref/agent/__init__.py4CODE
LOWsrc/tiny_llm_ref/agent/__init__.py4CODE
LOWsrc/tiny_llm_ref/agent/__init__.py4CODE
LOWsrc/tiny_llm_ref/agent/__init__.py11CODE
LOWsrc/tiny_llm_ref/agent/__init__.py11CODE
LOWsrc/tiny_llm_ref/agent/__init__.py12CODE
LOWsrc/tiny_llm_ref/agent/__init__.py12CODE
131 more matches not shown…
Hyper-Verbose Identifiers150 hits · 152 pts
SeverityFileLineSnippetContext
LOWmodel_names.py11def shortcut_name_to_full_name(model_name: str) -> str:CODE
LOWtests_refsol/test_extension_interface_sync.py274def _learner_owned_cpp_definitions(source: str) -> set[str]:CODE
LOW⚡tests_refsol/test_extension_interface_sync.py289def _assert_checkpoint_helper_throws(source: str) -> None:CODE
LOW⚡tests_refsol/test_extension_interface_sync.py297def _assert_metal_scaffold_only(source: str) -> None:CODE
LOW⚡tests_refsol/test_extension_interface_sync.py307def _assert_metal_checkpoint_marker(source: str, kernel: str, checkpoint: str) -> None:CODE
LOWtests_refsol/test_extension_interface_sync.py362def _functions_in_code_tokens(CODE
LOWtests_refsol/test_extension_interface_sync.py419def test_starter_and_reference_publish_the_same_learner_extension_functions():CODE
LOWtests_refsol/test_extension_interface_sync.py446def test_starter_cpp_stubs_are_registered_and_checkpoint_labeled():CODE
LOWtests_refsol/test_extension_interface_sync.py483def test_starter_metal_stubs_name_each_learner_owned_kernel_and_checkpoint():CODE
LOWtests_refsol/test_extension_interface_sync.py493def test_each_extension_task_names_the_exact_starter_functions_to_modify():CODE
LOWtests_refsol/test_extension_interface_sync.py507def test_optional_future_interfaces_do_not_leak_into_earlier_checkpoints():CODE
LOWtests_refsol/test_extension_interface_sync.py532def test_cpp_fail_closed_guard_rejects_a_fake_success_body():CODE
LOWtests_refsol/test_extension_interface_sync.py544def test_built_starter_extension_fails_closed_for_every_public_operation(monkeypatch):CODE
LOWtests_refsol/test_extension_interface_sync.py587def test_binding_guard_rejects_a_changed_python_default():CODE
LOWtests_refsol/test_extension_interface_sync.py649def test_metal_guard_rejects_a_leaked_kernel_body():CODE
LOWtests_refsol/test_extension_interface_sync.py663def test_setup_distinguishes_the_runnable_demo_from_future_stubs():STRING
LOWtests_refsol/test_week_3_day_1.py408def make_stage_compatible_request(model, prompt, *, prefill_max_step, prompt_idx):CODE
LOWtests_refsol/test_week_2_day_1.py68def test_capacity_cache_exposes_only_the_logical_prefix():CODE
LOWtests_refsol/test_week_2_day_1.py90def test_capacity_rewind_and_overflow_preserve_the_logical_prefix():CODE
LOWtests_refsol/test_week_3_day_5.py101def test_long_prefill_matches_dense_attention_across_paged_boundaries(CODE
LOWtests_refsol/test_week_3_day_5.py115def test_batched_gqa_long_prefill_honors_explicit_scale() -> None:CODE
LOWtests_refsol/test_week_2_day_5.py76def test_selected_controls_can_be_disabled_independently(disabled):CODE
LOWtests_refsol/test_week_2_day_5.py85def test_selected_is_default_and_matches_explicit_checkpoint():CODE
LOWtests_refsol/test_week_3_day_4.py345def test_paged_attention_rejects_invalid_live_metadata_before_dispatch(CODE
LOWtests_refsol/test_week_3_day_4.py371def test_paged_attention_rejects_active_context_shorter_than_query(CODE
LOWtests_refsol/test_model_names.py17def test_shortcut_name_to_full_name(shortcut, full_name):CODE
LOWtests_refsol/test_model_names.py21def test_full_model_name_is_unchanged():CODE
LOWtests_refsol/test_week_4_day_1.py153def _assert_exact_observation_payload(run_agent_impl):CODE
LOWtests_refsol/test_fixture_rng.py20def test_seeded_fixture_is_repeatable_and_preserves_global_rng(seed, head_dim):CODE
LOWtests_refsol/test_fixture_rng.py33def test_seeded_fixture_preserves_global_rng_on_failure(monkeypatch):CODE
LOWtests_refsol/test_fixture_rng.py46def test_unseeded_fixture_keeps_global_rng_behavior():CODE
LOWtests_refsol/test_fixture_rng.py52def test_seed_changes_fixture_without_advancing_global_rng():CODE
LOWtests_refsol/test_dev_tools.py28def test_pytest_status_and_output_are_propagated(tmp_path, command, test_directory):CODE
LOWtests_refsol/test_dev_tools.py51def test_partial_week_day_selection_fails_closed(tmp_path, command):CODE
LOWtests_refsol/test_dev_tools.py74def test_non_positive_week_day_selection_fails_closed(tmp_path, command, selectors):CODE
LOWtests_refsol/test_dev_tools.py89def test_copy_test_missing_source_fails_closed(tmp_path):CODE
LOWtests_refsol/test_dev_tools.py117def test_copy_test_non_positive_selection_fails_closed(tmp_path, selectors):CODE
LOWtests_refsol/test_dev_tools.py129def test_missing_command_fails_closed(tmp_path):CODE
LOWtests_refsol/test_dense_kv_capacity.py17def test_capacity_cache_writes_only_new_slices_and_hides_the_tail():CODE
LOWtests_refsol/test_dense_kv_capacity.py45def test_disabled_control_keeps_concatenate_accounting():CODE
LOWtests_refsol/test_dense_kv_capacity.py64def test_capacity_boundary_is_transactional_and_zero_append_is_a_noop():CODE
LOWtests_refsol/test_dense_kv_capacity.py91def test_capacity_rewind_reuses_storage_and_overwrites_the_logical_suffix():CODE
LOWtests_refsol/test_dense_kv_capacity.py126def test_capacity_mode_matches_the_legacy_model_cache():CODE
LOWtests_refsol/test_dense_kv_capacity.py216def test_generation_preserves_a_no_argument_cache_factory(capsys):CODE
LOWtests_refsol/test_week_3_day_7.py179def test_target_prefill_eos_finishes_before_the_draft_runs():CODE
LOWtests_refsol/test_week_3_day_7.py221def test_draft_prefill_eos_falls_back_to_target_only():CODE
LOWtests_refsol/test_week_3_day_7.py241def test_mismatch_rewinds_first_middle_and_final_proposal(mismatch_index: int):CODE
LOWtests_refsol/test_week_3_day_7.py266def test_low_acceptance_mismatches_match_the_complete_target_only_output():CODE
LOWtests_refsol/test_week_3_day_7.py305def test_full_acceptance_stops_on_bonus_eos_without_a_followup_model_call():CODE
LOWtests_refsol/test_week_3_day_7.py326def test_matching_eos_inside_a_short_proposal_is_terminal():CODE
LOWtests_refsol/test_week_3_day_7.py346def test_full_acceptance_catches_up_before_the_next_proposal():CODE
LOWtests_refsol/test_week_3_day_7.py383def test_draft_proposal_stops_early_at_eos_without_terminating_target():CODE
LOWtests_refsol/test_week_3_day_7.py410def test_repeated_calls_use_fresh_public_detokenizers():CODE
LOWtests_refsol/test_week_3_day_7.py442def test_incompatible_tokenizers_fail_before_model_execution(CODE
LOWtests_refsol/test_week_3_day_7.py461def test_tokenizers_without_comparable_vocabularies_fail_before_execution():CODE
LOWtests_refsol/test_week_3_day_7.py481def test_invalid_proposal_length_fails_before_model_execution(proposal_length):CODE
LOWtests_refsol/test_week_3_day_7.py501def test_invalid_output_budget_fails_before_model_or_tokenizer_execution(max_tokens):CODE
LOWtests_refsol/test_week_3_day_7.py522def test_zero_output_budget_returns_without_model_cache_or_tokenizer_work():CODE
LOWtests_refsol/test_week_3_day_7.py543def test_target_only_budget_stops_before_eos_without_an_extra_model_call():CODE
LOWtests_refsol/test_week_3_day_7.py564def test_target_only_eos_stops_before_the_output_budget():CODE
90 more matches not shown…
Excessive Try-Catch Wrapping23 hits · 32 pts
SeverityFileLineSnippetContext
LOWagent.py140 except Exception as error:CODE
LOWtests_refsol/test_week_1_day_3.py177 except Exception:CODE
LOWtests_refsol/test_week_1_day_3.py246 except Exception:CODE
LOWtests_refsol/utils.py137 except Exception as e:CODE
LOWtests_refsol/utils.py148 except Exception as e:CODE
LOWtests_refsol/utils.py159 except Exception as e:CODE
MEDIUMtests_refsol/utils.py131def qwen3_0_6b_model_exists() -> bool:CODE
MEDIUMtests_refsol/utils.py142def qwen3_1_7b_model_exists() -> bool:CODE
MEDIUMtests_refsol/utils.py153def qwen3_4b_model_exists() -> bool:CODE
LOWtests/utils.py137 except Exception as e:CODE
LOWtests/utils.py148 except Exception as e:CODE
LOWtests/utils.py159 except Exception as e:CODE
MEDIUMtests/utils.py131def qwen3_0_6b_model_exists() -> bool:CODE
MEDIUMtests/utils.py142def qwen3_1_7b_model_exists() -> bool:CODE
MEDIUMtests/utils.py153def qwen3_4b_model_exists() -> bool:CODE
LOWbenches/utils.py137 except Exception as e:CODE
LOWbenches/utils.py148 except Exception as e:CODE
LOWbenches/utils.py159 except Exception as e:CODE
MEDIUMbenches/utils.py131def qwen3_0_6b_model_exists() -> bool:CODE
MEDIUMbenches/utils.py142def qwen3_1_7b_model_exists() -> bool:CODE
MEDIUMbenches/utils.py153def qwen3_4b_model_exists() -> bool:CODE
LOWsrc/tiny_llm_ref/kv_cache.py201 except Exception:CODE
LOWsrc/tiny_llm_ref/paged_kv_cache.py309 except Exception:CODE
Deep Nesting23 hits · 23 pts
SeverityFileLineSnippetContext
LOWtests_refsol/test_extension_interface_sync.py246CODE
LOWtests_refsol/test_extension_interface_sync.py382CODE
LOWtests_refsol/test_week_3_day_1.py191CODE
LOWtests_refsol/test_week_1_day_3.py71CODE
LOWtests_refsol/test_week_1_day_1.py28CODE
LOWtests_refsol/test_week_1_day_1.py82CODE
LOWtests_refsol/test_week_4_starter_sync.py91CODE
LOWscripts/diff_api.py9CODE
LOWscripts/dev-tools.py45CODE
LOWbenches/week2_gpudebug.py194CODE
LOWbenches/bench_week2_operators.py745CODE
LOWbenches/bench_week2_operators.py799CODE
LOWbenches/bench_serving_progression.py274CODE
LOWbenches/bench.py368CODE
LOWbenches/bench.py609CODE
LOWbenches/bench.py397CODE
LOWbenches/bench_chunked_prefill.py164CODE
LOWsrc/tiny_llm_ref/attention.py71CODE
LOWsrc/tiny_llm_ref/generate.py130CODE
LOWsrc/tiny_llm_ref/week2_kernels.py46CODE
LOWsrc/tiny_llm_ref/batch.py136CODE
LOWsrc/tiny_llm_ref/positional_encoding.py26CODE
LOWsrc/tiny_llm_ref/agent/receipts.py89CODE
Empty Error Handlers3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHtests_refsol/test_week_3_day_1.py525except ValueError:CODE
HIGHtests_refsol/test_week_1_day_3.py177except Exception:CODE
HIGHtests_refsol/test_week_1_day_3.py246except Exception:CODE
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHtests_refsol/utils.py0build a tiny model; an explicit seed leaves the global rng untouched.STRING
HIGHtests/utils.py0build a tiny model; an explicit seed leaves the global rng untouched.STRING
HIGHbenches/utils.py0build a tiny model; an explicit seed leaves the global rng untouched.STRING
Verbosity Indicators3 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/tiny_llm_ref/kv_cache.py98 # Step 1: append each active row into its request cache. This methodCOMMENT
LOW⚡src/tiny_llm_ref/kv_cache.py111 # Step 2: compute seq_len of this batchCOMMENT
LOW⚡src/tiny_llm_ref/kv_cache.py119 # Step 3: rebuild one dense batch tensor. True paged attention willCOMMENT
Structural Annotation Overuse3 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/tiny_llm_ref/kv_cache.py98 # Step 1: append each active row into its request cache. This methodCOMMENT
LOW⚡src/tiny_llm_ref/kv_cache.py111 # Step 2: compute seq_len of this batchCOMMENT
LOW⚡src/tiny_llm_ref/kv_cache.py119 # Step 3: rebuild one dense batch tensor. True paged attention willCOMMENT
AI Structural Patterns3 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/tiny_llm_ref/qwen3_week3.py207CODE
LOWsrc/tiny_llm_ref/qwen3_week2.py313CODE
LOWsrc/tiny_llm_ref/qwen3_week1.py149CODE
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/tiny_llm_ref/agent/__init__.py43__all__ = [CODE
LOWsrc/tiny_llm/agent/__init__.py43__all__ = [CODE
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/extensions/src/axpby.cpp1// Copyright © 2023-2025 Apple Inc.COMMENT