AI Slop Code RIsk Monitor

deepseek-ai/DeepSpec

DeepSpec: a full-stack codebase for training and evaluating speculative decoding algorithms

16.0 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for deepseek-ai/DeepSpec, a Python project with 7,204 GitHub stars. SynthScan examined 11,816 lines of code across 76 source files, recording 185 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 16.0 (Elevated 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.

16.0
Adjusted Signal
16.0
Raw Pattern Score
100%
Time Factor
2026-07-09
Last Push
7.2K
Stars
Python
Language
11.8K
Lines of Code
76
Files
185
Pattern Hits
2026-10-12
Scan Date
0.00
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 27.0/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 28.0/100 · MEDIUM

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

Agent Over-Engineering Ratio 33.4/100 · MEDIUM

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

PR Review Velocity Impact 55.1/100 · HIGH

Which changes need focused human review? 185 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 0MEDIUM 2LOW 183

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 185 distinct pattern matches across 9 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 Imports78 hits · 78 pts
SeverityFileLineSnippetContext
LOWeval.py1CODE
LOWdeepspec/utils/__init__.py6CODE
LOWdeepspec/utils/__init__.py6CODE
LOWdeepspec/utils/__init__.py6CODE
LOWdeepspec/utils/__init__.py6CODE
LOWdeepspec/utils/__init__.py7CODE
LOWdeepspec/utils/__init__.py7CODE
LOWdeepspec/utils/__init__.py7CODE
LOWdeepspec/utils/__init__.py7CODE
LOWdeepspec/utils/__init__.py7CODE
LOWdeepspec/utils/__init__.py7CODE
LOWdeepspec/utils/__init__.py7CODE
LOWdeepspec/utils/__init__.py16CODE
LOWdeepspec/utils/__init__.py16CODE
LOWdeepspec/utils/__init__.py17CODE
LOWdeepspec/utils/__init__.py17CODE
LOWdeepspec/utils/__init__.py17CODE
LOWdeepspec/utils/__init__.py18CODE
LOWdeepspec/utils/sampling.py1CODE
LOWdeepspec/utils/constant/__init__.py2CODE
LOWdeepspec/utils/constant/__init__.py3CODE
LOWdeepspec/utils/constant/__init__.py5CODE
LOWdeepspec/modeling/__init__.py1CODE
LOWdeepspec/modeling/__init__.py1CODE
LOWdeepspec/modeling/__init__.py1CODE
LOWdeepspec/modeling/__init__.py6CODE
LOWdeepspec/modeling/__init__.py6CODE
LOWdeepspec/modeling/eagle3/__init__.py1CODE
LOWdeepspec/modeling/eagle3/__init__.py1CODE
LOWdeepspec/modeling/eagle3/__init__.py2CODE
LOWdeepspec/modeling/eagle3/__init__.py3CODE
LOWdeepspec/modeling/eagle3/common.py1CODE
LOWdeepspec/modeling/eagle3/gemma4/__init__.py1CODE
LOWdeepspec/modeling/eagle3/gemma4/__init__.py2CODE
LOWdeepspec/modeling/eagle3/gemma4/modeling.py1CODE
LOWdeepspec/modeling/eagle3/qwen3/__init__.py1CODE
LOWdeepspec/modeling/eagle3/qwen3/__init__.py2CODE
LOWdeepspec/modeling/eagle3/qwen3/modeling.py1CODE
LOWdeepspec/modeling/dspark/__init__.py1CODE
LOWdeepspec/modeling/dspark/__init__.py1CODE
LOWdeepspec/modeling/dspark/__init__.py2CODE
LOWdeepspec/modeling/dspark/__init__.py3CODE
LOWdeepspec/modeling/dspark/gemma4/__init__.py1CODE
LOWdeepspec/modeling/dspark/gemma4/__init__.py2CODE
LOWdeepspec/modeling/dspark/qwen3/__init__.py1CODE
LOWdeepspec/modeling/dspark/qwen3/__init__.py2CODE
LOWdeepspec/eval/base_evaluator.py1CODE
LOWdeepspec/eval/__init__.py1CODE
LOWdeepspec/eval/__init__.py1CODE
LOWdeepspec/eval/__init__.py1CODE
LOWdeepspec/eval/__init__.py2CODE
LOWdeepspec/eval/__init__.py2CODE
LOWdeepspec/eval/__init__.py3CODE
LOWdeepspec/eval/__init__.py3CODE
LOWdeepspec/eval/eagle3/__init__.py1CODE
LOWdeepspec/eval/eagle3/__init__.py1CODE
LOWdeepspec/eval/eagle3/evaluator.py1CODE
LOWdeepspec/eval/dspark/__init__.py1CODE
LOWdeepspec/eval/dspark/__init__.py1CODE
LOWdeepspec/eval/dspark/__init__.py2CODE
18 more matches not shown…
Hyper-Verbose Identifiers53 hits · 53 pts
SeverityFileLineSnippetContext
LOWdeepspec/utils/metrics.py72def _assert_schema_consistent():CODE
LOWdeepspec/modeling/eagle3/loss.py57def _compute_loss_normalizers(CODE
LOWdeepspec/modeling/eagle3/loss.py77def _build_next_token_position_mask(CODE
LOWdeepspec/modeling/eagle3/loss.py92def _build_padded_next_token_target_probs(CODE
LOWdeepspec/modeling/eagle3/loss.py162def _log_softmax_forward_kernel(CODE
LOWdeepspec/modeling/eagle3/loss.py225def _log_softmax_backward_kernel(CODE
LOWdeepspec/modeling/eagle3/common.py56def get_compiled_flex_attention():CODE
LOWdeepspec/modeling/eagle3/common.py64def compile_friendly_flex_attention(CODE
LOWdeepspec/modeling/eagle3/common.py77def get_compiled_create_block_mask():CODE
LOWdeepspec/modeling/eagle3/common.py87def compile_friendly_create_block_mask(CODE
LOWdeepspec/modeling/eagle3/gemma4/config.py22def _validate_required_text_fields(text_config) -> None:CODE
LOWdeepspec/modeling/eagle3/gemma4/modeling.py307 def initialize_embeddings_and_head(CODE
LOWdeepspec/modeling/eagle3/gemma4/modeling.py322 def set_embedding_head_trainable(self, trainable: bool):CODE
LOWdeepspec/modeling/eagle3/qwen3/modeling.py245 def initialize_embeddings_and_head(CODE
LOWdeepspec/modeling/eagle3/qwen3/modeling.py260 def set_embedding_head_trainable(self, trainable: bool):CODE
LOWdeepspec/modeling/dspark/loss.py11def _all_reduce_loss_denominators(CODE
LOWdeepspec/modeling/dspark/loss.py40def _compute_local_probabilistic_stats(CODE
LOWdeepspec/modeling/dspark/common.py59def validate_target_layer_ids(layer_ids, num_target_layers: int):CODE
LOWdeepspec/modeling/dspark/common.py78def create_dspark_attention_mask(CODE
LOWdeepspec/modeling/dspark/common.py109def build_anchor_candidate_mask(CODE
LOWdeepspec/modeling/dspark/gemma4/config.py22def _validate_required_text_fields(text_config) -> None:CODE
LOWdeepspec/modeling/dspark/gemma4/modeling.py320 def initialize_embeddings_and_head(CODE
LOWdeepspec/modeling/dspark/gemma4/modeling.py335 def set_embedding_head_trainable(self, trainable: bool):CODE
LOWdeepspec/modeling/dspark/qwen3/modeling.py270 def initialize_embeddings_and_head(CODE
LOWdeepspec/modeling/dspark/qwen3/modeling.py285 def set_embedding_head_trainable(self, trainable: bool):CODE
LOWdeepspec/eval/base_evaluator.py100def assert_no_final_target_layer(target_model, target_layer_ids) -> None:CODE
LOWdeepspec/eval/base_evaluator.py550 def allreduce_response_metrics(CODE
LOWdeepspec/eval/dspark/draft_ops.py22def forward_dspark_draft_block(CODE
LOWdeepspec/eval/dspark/draft_ops.py57def _predict_confidence_logits(CODE
LOWdeepspec/eval/dspark/evaluator.py44 def _build_confidence_head_recorder(self) -> ConfidenceHeadRecorder | None:CODE
LOWdeepspec/data/target_cache_dataset.py38def build_target_cache_shard_path(cache_dir: str, file_name: str) -> str:CODE
LOWdeepspec/data/target_cache_dataset.py42def expected_target_cache_tensor_numel(CODE
LOWdeepspec/data/target_cache_dataset.py57def expected_target_cache_tensor_nbytes(CODE
LOWdeepspec/data/target_cache_dataset.py123def load_target_cache_manifest(cache_dir: str):CODE
LOWdeepspec/data/target_cache_dataset.py132def validate_target_cache_manifest(*, cache_dir: str, manifest):CODE
LOWdeepspec/data/target_cache_dataset.py231def compute_local_sample_range(*, num_samples: int, rank: int, world_size: int):CODE
LOWdeepspec/data/target_cache_dataset.py239def prepare_target_cache_output_dir(output_dir: str):CODE
LOWdeepspec/data/target_cache_dataset.py283def build_target_cache_sample_bytes(CODE
LOWdeepspec/data/target_cache_dataset.py505def load_local_cache_write_summary(rank_dir: str):CODE
LOWdeepspec/data/target_cache_dataset.py510def build_global_target_cache_shard_map(summaries):CODE
LOWdeepspec/data/target_cache_dataset.py532def rename_local_target_cache_shards(*, output_dir: str, rank_dir: str, summary, shard_map):CODE
LOWdeepspec/data/target_cache_dataset.py540def finalize_target_cache_index(*, output_dir: str, summaries, shard_map):CODE
LOWdeepspec/data/target_cache_dataset.py580def build_target_cache_manifest(CODE
LOWdeepspec/data/target_cache_dataset.py605def write_target_cache_manifest(*, output_dir: str, manifest):CODE
LOWdeepspec/data/target_cache_dataset.py609def cleanup_target_cache_tmp_dir(output_dir: str):CODE
LOWdeepspec/trainer/base_trainer.py77def _compute_gradient_accumulation_steps(CODE
LOWdeepspec/trainer/base_trainer.py89def _compute_samples_per_epoch(*, dataset_size: int, global_batch_size: int) -> int:CODE
LOWdeepspec/trainer/base_trainer.py98def _compute_training_schedule(CODE
LOWdeepspec/trainer/ckpt_manager.py25def discover_latest_checkpoint(checkpoint_dir):CODE
LOWdeepspec/trainer/ckpt_manager.py188def _rank_training_state_path(checkpoint_dir: str, global_rank: int) -> str:CODE
LOWdeepspec/trainer/ckpt_manager.py195def _serialize_training_state(CODE
LOWscripts/data/generate_train_data.py53def get_random_reasoning_effort():CODE
LOWscripts/data/prepare_target_cache.py83def run_target_forward_with_hooks(CODE
Modern Structural Boilerplate30 hits · 30 pts
SeverityFileLineSnippetContext
LOWdeepspec/__init__.py1__all__ = []CODE
LOWdeepspec/utils/metrics.py173__all__ = ["add_metric", "flush", "reset"]CODE
LOWdeepspec/utils/__init__.py66__all__ = [CODE
LOWdeepspec/utils/sampling.py47__all__ = [CODE
LOWdeepspec/modeling/__init__.py8__all__ = [CODE
LOWdeepspec/modeling/eagle3/__init__.py5__all__ = [CODE
LOWdeepspec/modeling/eagle3/loss.py455__all__ = [CODE
LOWdeepspec/modeling/eagle3/common.py193__all__ = [CODE
LOWdeepspec/modeling/eagle3/gemma4/config.py91__all__ = [CODE
LOWdeepspec/modeling/eagle3/gemma4/__init__.py4__all__ = [CODE
LOWdeepspec/modeling/eagle3/gemma4/modeling.py491__all__ = [CODE
LOWdeepspec/modeling/eagle3/qwen3/config.py42__all__ = [CODE
LOWdeepspec/modeling/eagle3/qwen3/__init__.py4__all__ = [CODE
LOWdeepspec/modeling/eagle3/qwen3/modeling.py410__all__ = [CODE
LOWdeepspec/modeling/dspark/__init__.py5__all__ = [CODE
LOWdeepspec/modeling/dspark/loss.py332__all__ = [CODE
LOWdeepspec/modeling/dspark/common.py297__all__ = [CODE
LOWdeepspec/modeling/dspark/markov_head.py314__all__ = [CODE
LOWdeepspec/modeling/dspark/gemma4/config.py105__all__ = [CODE
LOWdeepspec/modeling/dspark/gemma4/__init__.py4__all__ = [CODE
LOWdeepspec/modeling/dspark/gemma4/modeling.py600__all__ = [CODE
LOWdeepspec/modeling/dspark/qwen3/config.py59__all__ = [CODE
LOWdeepspec/modeling/dspark/qwen3/__init__.py4__all__ = [CODE
LOWdeepspec/modeling/dspark/qwen3/modeling.py528__all__ = [CODE
LOWdeepspec/eval/__init__.py5__all__ = [CODE
LOWdeepspec/eval/eagle3/__init__.py3__all__ = ["Gemma4Eagle3Evaluator", "Qwen3Eagle3Evaluator"]CODE
LOWdeepspec/eval/eagle3/evaluator.py195__all__ = ["Gemma4Eagle3Evaluator", "Qwen3Eagle3Evaluator"]CODE
LOWdeepspec/eval/dspark/__init__.py9__all__ = [CODE
LOWdeepspec/data/__init__.py9__all__ = [CODE
LOWdeepspec/trainer/__init__.py5__all__ = [CODE
Excessive Try-Catch Wrapping6 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUMdeepspec/utils/__init__.py29def run_git_text(cmd):CODE
LOWdeepspec/utils/__init__.py36 except Exception:CODE
LOWdeepspec/utils/__init__.py62 except Exception:CODE
LOWscripts/data/generate_train_data.py131 except Exception as exc:CODE
LOWscripts/data/generate_train_data.py165 except Exception as exc:CODE
LOWscripts/data/generate_train_data.py192 except Exception as exc:CODE
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
LOWdeepspec/modeling/eagle3/gemma4/modeling.py221CODE
LOWdeepspec/modeling/eagle3/gemma4/modeling.py398CODE
LOWdeepspec/modeling/eagle3/qwen3/modeling.py169CODE
LOWdeepspec/modeling/eagle3/qwen3/modeling.py324CODE
LOWdeepspec/modeling/dspark/gemma4/modeling.py201CODE
LOWdeepspec/modeling/dspark/qwen3/modeling.py165CODE
Deep Nesting6 hits · 6 pts
SeverityFileLineSnippetContext
LOWdeepspec/eval/base_evaluator.py550CODE
LOWdeepspec/data/target_cache_dataset.py438CODE
LOWeval_datasets/convert_eval_datasets_to_jsonl.py251CODE
LOWscripts/data/generate_train_data.py57CODE
LOWscripts/data/generate_train_data.py272CODE
LOWscripts/data/prepare_target_cache.py209CODE
Structural Annotation Overuse3 hits · 4 pts
SeverityFileLineSnippetContext
LOWscripts/data/README.md27## Step 1: Download And Split DataCOMMENT
LOWscripts/data/README.md47## Step 2: Regenerate Answers With Qwen3-4BCOMMENT
LOWscripts/data/README.md103## Step 3: Prepare Target CacheCOMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMscripts/train/train.sh34# local_batch_size is the per-GPU micro-batch size. Raise it to better utilize GPUsCOMMENT
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWscripts/train/train.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/train/train.sh21# config/eagle3/eagle3_qwen3_4b.pyCOMMENT