AI Slop Code Risk Monitor

lyogavin/airllm

SlopCodeMonitor badge for lyogavin/airllm Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

AirLLM 2.8T LLM inference with single 4GB GPU

21.3 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for lyogavin/airllm, a Jupyter Notebook project with 41,402 GitHub stars. SynthScan examined 12,294 lines of code across 69 source files, recording 203 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 21.3 (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.

21.3
Adjusted Signal
21.3
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
41.4K
Stars
Jupyter Notebook
Language
12.3K
Lines of Code
69
Files
203
Pattern Hits
2026-10-31
Scan Date
0.19
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 39.6/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 17.7/100 · LOW

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

Agent Over-Engineering Ratio 53.0/100 · HIGH

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

PR Review Velocity Impact 67.7/100 · HIGH

Which changes need focused human review? 203 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 13MEDIUM 5LOW 185

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 203 distinct pattern matches across 10 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.

Hyper-Verbose Identifiers82 hits · 88 pts
SeverityFileLineSnippetContext
LOWtraining/qlora.py381def print_trainable_parameters(args, model):CODE
LOWtraining/qlora.py398def smart_tokenizer_and_embedding_resize(CODE
LOWtraining/qlora.py473def extract_unnatural_instructions_data(examples, extract_reformulations=False):CODE
LOW⚡air_llm/tests/test_kimi_k3_split.py110 def test_every_module_is_split_out(self):CODE
LOW⚡air_llm/tests/test_kimi_k3_split.py118 def test_one_shard_per_layer_is_linked_not_copied(self):CODE
LOW⚡air_llm/tests/test_kimi_k3_split.py126 def test_projector_and_vision_tower_are_linked(self):CODE
LOW⚡air_llm/tests/test_kimi_k3_split.py132 def test_shared_shard_modules_are_materialised_separately(self):CODE
LOWair_llm/tests/test_kimi_k3_split.py145 def test_contents_match_the_original_checkpoint(self):CODE
LOWair_llm/tests/test_kimi_k3_split.py203 def test_all_modules_written_as_real_files(self):CODE
LOWair_llm/tests/test_compression.py18 def test_should_compress_uncompress(self):CODE
LOW⚡air_llm/tests/test_default_device.py30 def test_prefers_cuda_when_available(self):CODE
LOW⚡air_llm/tests/test_default_device.py34 def test_falls_back_to_mps_on_apple_silicon(self):CODE
LOW⚡air_llm/tests/test_default_device.py40 def test_falls_back_to_cpu_when_no_accelerator(self):CODE
LOW⚡air_llm/tests/test_default_device.py44 def test_cuda_preferred_over_mps(self):CODE
LOW⚡air_llm/tests/test_default_device.py48 def test_init_uses_default_device_when_none_passed(self):CODE
LOW⚡air_llm/tests/test_default_device.py56 def test_explicit_device_is_still_honoured(self):CODE
LOWair_llm/tests/test_automodel.py16 def test_auto_model_should_return_correct_model(self):CODE
LOWair_llm/tests/test_streamed_lora.py33 def test_base_is_frozen_adapters_train(self):CODE
LOWair_llm/tests/test_streamed_lora.py55 def test_inject_and_roundtrip_state(self):CODE
LOWair_llm/tests/test_streamed_lora.py76 def test_matches_full_cross_entropy(self):CODE
LOWair_llm/tests/test_streamed_lora.py98 def test_batched_shape_and_cpu_weight(self):CODE
LOWair_llm/tests/test_streamed_lora.py154 def test_streamed_lora_matches_resident_grads(self):CODE
LOWair_llm/tests/test_streamed_lora.py198 def test_base_frozen_and_loss_drops(self):CODE
LOWair_llm/tests/test_streamed_lora.py221 def test_inject_by_class_name(self):CODE
LOWair_llm/tests/test_qwen3_8_split.py114 def test_every_streamed_and_resident_module_is_split_out(self):CODE
LOWair_llm/tests/test_qwen3_8_split.py122 def test_vision_tower_is_one_shard_and_excludes_decoder_weights(self):CODE
LOWair_llm/tests/test_qwen3_8_split.py139 def test_decoder_and_head_round_trip(self):CODE
LOWair_llm/tests/test_qwen3_8_split.py154 def test_shared_shards_are_copied_not_linked(self):CODE
LOWair_llm/tests/test_mlx_input_types.py7 def test_torch_tensor_is_converted_for_embedding_lookup(self):CODE
LOWair_llm/tests/test_mlx_input_types.py20 def test_existing_mlx_array_is_reused(self):CODE
LOWair_llm/tests/test_mlx_input_types.py29 def test_python_sequence_is_converted(self):CODE
LOWair_llm/tests/test_expert_streaming_compression.py68 def test_expert_streaming_engages_without_compression(self):CODE
LOWair_llm/tests/test_expert_streaming_compression.py77 def test_expert_streaming_disabled_when_compression_is_on(self):CODE
LOWair_llm/tests/test_expert_streaming_compression.py88 def test_load_layer_subset_does_not_decompress(self):CODE
LOWair_llm/tests/test_qwen38_flash_next_split.py123 def test_file_loader_concatenates_without_keeping_shard_keys(self):CODE
LOWair_llm/tests/test_qwen38_flash_next_split.py143 def test_rejects_gapped_shard_indices(self):CODE
LOWair_llm/tests/test_qwen38_flash_next_split.py150 def test_marker_discovers_the_parent_layer(self):CODE
LOWair_llm/tests/test_qwen38_flash_next_split.py187 def test_every_streamed_and_resident_module_is_split_out(self):CODE
LOWair_llm/tests/test_qwen38_flash_next_split.py197 def test_ngram_table_is_peeled_out_of_its_decoder_layer(self):CODE
LOW⚡air_llm/tests/test_qwen38_flash_next_split.py212 def test_packed_experts_stay_on_the_decoder_layer(self):CODE
LOW⚡air_llm/tests/test_qwen38_flash_next_split.py218 def test_output_mix_is_the_norm_slot(self):CODE
LOW⚡air_llm/tests/test_qwen38_flash_next_split.py223 def test_vision_tower_is_one_shard_and_excludes_decoder_weights(self):CODE
LOWair_llm/tests/test_qwen38_flash_next_split.py258 def test_shared_shards_are_copied_not_linked(self):CODE
LOWair_llm/tests/test_qwen38_flash_next_split.py271 def test_huge_embedding_is_born_on_meta(self):CODE
LOWair_llm/tests/test_mlx_import_regression.py8def test_mlx_module_does_not_eagerly_import_unused_llama_class():CODE
LOWair_llm/airllm/airllm_chatglm.py16 def get_use_better_transformer(self):CODE
LOWair_llm/airllm/airllm_chatglm.py25 def get_past_key_values_cache_seq_len(self, past_key_values):CODE
LOWair_llm/airllm/lora_linear.py167def inject_packed_expert_lora(module, r=16, alpha=32, device=None, dtype=None):CODE
LOWair_llm/airllm/airllm_internlm.py16 def get_use_better_transformer(self):CODE
LOWair_llm/airllm/airllm_qwen.py16 def get_use_better_transformer(self):CODE
LOWair_llm/airllm/airllm_qwen.py22 def get_past_key_values_cache_seq_len(self, past_key_values):CODE
LOWair_llm/airllm/airllm_baichuan.py18 def get_use_better_transformer(self):CODE
LOWair_llm/airllm/airllm_base.py41def restore_relocated_transformers_symbols():CODE
LOWair_llm/airllm/airllm_base.py232 def _propagate_attn_implementation(self, impl):CODE
LOWair_llm/airllm/airllm_base.py252 def _model_matches_layer_names(self, model):CODE
LOWair_llm/airllm/airllm_base.py405 def set_layers_from_layer_names(self):CODE
LOWair_llm/airllm/airllm_base.py460 def _restore_plain_weight_modules(self, state_dict):CODE
LOWair_llm/airllm/airllm_base.py658 def _param_names_from_state_dict(self, state_dict):CODE
LOWair_llm/airllm/airllm_base.py714 def _load_cpu_resident_modules(self):CODE
LOWair_llm/airllm/airllm_mistral.py16 def get_use_better_transformer(self):CODE
22 more matches not shown…
Unused Imports49 hits · 48 pts
SeverityFileLineSnippetContext
LOWtraining/qlora.py4CODE
LOWair_llm/tests/test_automodel.py1CODE
LOWair_llm/airllm/__init__.py9CODE
LOWair_llm/airllm/__init__.py10CODE
LOWair_llm/airllm/__init__.py14CODE
LOWair_llm/airllm/__init__.py15CODE
LOWair_llm/airllm/__init__.py16CODE
LOWair_llm/airllm/__init__.py17CODE
LOWair_llm/airllm/lora_data.py3CODE
LOWair_llm/airllm/airllm_base.py2CODE
LOWair_llm/airllm/airllm_base.py2CODE
LOWair_llm/airllm/airllm_base.py2CODE
LOWair_llm/airllm/airllm_base.py2CODE
LOWair_llm/airllm/airllm_base.py3CODE
LOWair_llm/airllm/airllm_base.py24CODE
LOWair_llm/airllm/airllm_qwen2.py2CODE
LOWair_llm/airllm/utils.py12CODE
LOWair_llm/airllm/utils.py14CODE
LOWair_llm/airllm/utils.py14CODE
LOWair_llm/airllm/utils.py14CODE
LOWair_llm/airllm/utils.py14CODE
LOWair_llm/airllm/utils.py14CODE
LOWair_llm/airllm/utils.py26CODE
LOWair_llm/airllm/airllm_llama_mlx.py2CODE
LOWair_llm/airllm/airllm_llama_mlx.py3CODE
LOWair_llm/airllm/airllm_llama_mlx.py4CODE
LOWair_llm/airllm/airllm_llama_mlx.py8CODE
LOWair_llm/airllm/airllm_llama_mlx.py13CODE
LOWair_llm/airllm/airllm_llama_mlx.py16CODE
LOWair_llm/airllm/airllm_llama_mlx.py16CODE
LOWair_llm/airllm/airllm_llama_mlx.py16CODE
LOWair_llm/airllm/airllm_llama_mlx.py16CODE
LOWair_llm/airllm/airllm_llama_mlx.py17CODE
LOWair_llm/airllm/airllm_llama_mlx.py17CODE
LOWair_llm/airllm/persist/__init__.py1CODE
LOWair_llm/airllm/persist/mlx_model_persister.py10CODE
LOWair_llm/airllm/persist/mlx_model_persister.py12CODE
LOWrlhf/qlora_dpo.py4CODE
LOWrlhf/qlora_dpo.py5CODE
LOWrlhf/qlora_dpo.py13CODE
LOWrlhf/qlora_dpo.py43CODE
LOWrlhf/qlora_dpo.py43CODE
LOWrlhf/qlora_dpo.py43CODE
LOWscripts/test_cn_dataset_lenghts.py3CODE
LOWanima_100k/longer_training.py4CODE
LOWanima_100k/longer_training.py22CODE
LOWanima_100k/modeling_flash_llama.py21CODE
LOWanima_100k/modeling_flash_llama.py38CODE
LOWanima_100k/modeling_flash_llama.py38CODE
Empty Error Handlers7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHair_llm/airllm/airllm_base.py454except RuntimeError:CODE
HIGHair_llm/airllm/utils.py82except Exception as ex:CODE
HIGHair_llm/airllm/utils.py533except OSError:CODE
HIGHair_llm/airllm/utils.py538except OSError:CODE
HIGHair_llm/airllm/utils.py695except ValueError:CODE
HIGHair_llm/airllm/utils.py723except ValueError:CODE
HIGHanima_100k/longer_training.py95except Exception as e:CODE
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHtraining/qlora.py0prints the number of trainable parameters in the model.STRING
HIGHrlhf/qlora_dpo.py0prints the number of trainable parameters in the model.STRING
HIGHanima_100k/longer_training.py0prints the number of trainable parameters in the model.STRING
HIGHtraining/qlora.py0resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisibleSTRING
HIGHrlhf/qlora_dpo.py0resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisibleSTRING
HIGHanima_100k/longer_training.py0resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisibleSTRING
Excessive Try-Catch Wrapping18 hits · 22 pts
SeverityFileLineSnippetContext
LOWair_llm/airllm/airllm_lora.py299 except Exception as e: # noqa: BLE001 - fall back to the layer's is_causal pathCODE
LOWair_llm/airllm/airllm_lora.py501 except Exception as e: # noqa: BLE001CODE
MEDIUMair_llm/airllm/airllm_lora.py279def _make_masks(self, hidden_shape, attention_mask, text_position_ids):CODE
MEDIUMair_llm/airllm/airllm_lora.py373def load_adapter(self, path):CODE
LOWair_llm/airllm/__init__.py43 except Exception as _e: # noqa: BLE001 - optional family, keep package importableCODE
MEDIUMair_llm/airllm/airllm_base.py218def get_generation_config(self):CODE
LOWair_llm/airllm/airllm_base.py162 except Exception:CODE
LOWair_llm/airllm/airllm_base.py221 except Exception:CODE
LOWair_llm/airllm/airllm_base.py315 except Exception as e: # noqa: BLE001 - try the next factoryCODE
LOWair_llm/airllm/airllm_base.py318 except Exception as e: # noqa: BLE001 - try the next factoryCODE
LOWair_llm/airllm/airllm_base.py341 except Exception as e:CODE
LOWair_llm/airllm/airllm_base.py819 except Exception:CODE
LOWair_llm/airllm/utils.py82 except Exception as ex:CODE
LOWair_llm/airllm/persist/mlx_model_persister.py111 except Exception as ex:CODE
MEDIUMair_llm/airllm/persist/mlx_model_persister.py91def load_model(self, layer_name, path):CODE
LOWrlhf/qlora_dpo.py588 except Exception:CODE
LOWrlhf/qlora_dpo.py733 except Exception as e:CODE
LOWanima_100k/longer_training.py95 except Exception as e:CODE
Deep Nesting24 hits · 22 pts
SeverityFileLineSnippetContext
LOWtraining/qlora.py306CODE
LOWtraining/qlora.py473CODE
LOWtraining/qlora.py510CODE
LOWtraining/qlora.py525CODE
LOWtraining/qlora.py549CODE
LOWtraining/qlora.py579CODE
LOWair_llm/tests/test_compression.py18CODE
LOWair_llm/airllm/lora_data.py76CODE
LOWair_llm/airllm/airllm_base.py297CODE
LOWair_llm/airllm/airllm_base.py430CODE
LOWair_llm/airllm/utils.py104CODE
LOWair_llm/airllm/utils.py239CODE
LOWair_llm/airllm/utils.py544CODE
LOWrlhf/qlora_dpo.py354CODE
LOWrlhf/qlora_dpo.py516CODE
LOWrlhf/qlora_dpo.py553CODE
LOWscripts/gen_star_history.py46CODE
LOWanima_100k/longer_training.py83CODE
LOWanima_100k/longer_training.py368CODE
LOWanima_100k/longer_training.py546CODE
LOWanima_100k/longer_training.py583CODE
LOWanima_100k/longer_training.py598CODE
LOWanima_100k/longer_training.py627CODE
LOWanima_100k/modeling_flash_llama.py948CODE
AI Structural Patterns8 hits · 8 pts
SeverityFileLineSnippetContext
LOWair_llm/airllm/airllm_lora.py90CODE
LOWair_llm/airllm/airllm_lora.py397CODE
LOWair_llm/airllm/airllm_base.py84CODE
LOWair_llm/airllm/tokenization_baichuan.py57CODE
LOWair_llm/airllm/airllm_llama_mlx.py233CODE
LOWanima_100k/modeling_flash_llama.py624CODE
LOWanima_100k/modeling_flash_llama.py772CODE
LOWanima_100k/modeling_flash_llama.py948CODE
Over-Commented Block5 hits · 5 pts
SeverityFileLineSnippetContext
LOWair_llm/airllm/utils.py601 layers = [layer_names['rotary_pos_emb']] + layersCOMMENT
LOWair_llm/airllm/tokenization_baichuan.py1# Copyright 2023 Baichuan Inc. All Rights Reserved.COMMENT
LOW.github/workflows/release.yml1name: Publish to PyPICOMMENT
LOW.github/workflows/star-history.yml1name: Refresh Star HistoryCOMMENT
LOWanima_100k/modeling_flash_llama.py1# coding=utf-8COMMENT
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWtraining/qlora.py60logger = logging.getLogger(__name__)CODE
LOWrlhf/qlora_dpo.py62logger = logging.getLogger(__name__)CODE
LOWanima_100k/longer_training.py60logger = logging.getLogger(__name__)CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUManima_100k/extened_longchat_topiced_conversations.json1[{"TOPIC_ID": 1, "TOPIC": "The psychology of happiness", "CONVERSATION": "USER: I would like to discuss the topic of theCODE