AI Slop Code RIsk Monitor

lyogavin/airllm

AirLLM 70B inference with single 4GB GPU

20.9 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for lyogavin/airllm, a Jupyter Notebook project with 35,956 GitHub stars. SynthScan examined 11,776 lines of code across 63 source files, recording 190 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 20.9 (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.

20.9
Adjusted Signal
20.9
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
36.0K
Stars
Jupyter Notebook
Language
11.8K
Lines of Code
63
Files
190
Pattern Hits
2026-10-12
Scan Date
0.21
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 36.5/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 19.0/100 · LOW

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

Agent Over-Engineering Ratio 51.3/100 · HIGH

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

PR Review Velocity Impact 67.5/100 · HIGH

Which changes need focused human review? 190 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 172

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 190 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 Identifiers69 hits · 72 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
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_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/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.py231 def _propagate_attn_implementation(self, impl):CODE
LOWair_llm/airllm/airllm_base.py251 def _model_matches_layer_names(self, model):CODE
LOWair_llm/airllm/airllm_base.py404 def set_layers_from_layer_names(self):CODE
LOWair_llm/airllm/airllm_base.py459 def _restore_plain_weight_modules(self, state_dict):CODE
LOWair_llm/airllm/airllm_base.py657 def _param_names_from_state_dict(self, state_dict):CODE
LOWair_llm/airllm/airllm_base.py713 def _load_cpu_resident_modules(self):CODE
LOWair_llm/airllm/airllm_mistral.py16 def get_use_better_transformer(self):CODE
LOWair_llm/airllm/airllm_qwen2.py17 def get_use_better_transformer(self):CODE
LOWair_llm/airllm/utils.py88def uncompress_layer_state_dict(layer_state_dict):CODE
LOWair_llm/airllm/utils.py132def merge_ngram_embedding_shards(state_dict):CODE
LOWair_llm/airllm/utils.py158def load_merged_ngram_embedding(local_path, layer_name):CODE
LOWair_llm/airllm/utils.py379def cpu_resident_module_names(layer_names, index_keys):CODE
LOWair_llm/airllm/utils.py470def compress_layer_state_dict(layer_state_dict, compression=None):CODE
LOWair_llm/airllm/utils.py491def remove_real_and_linked_file(to_delete):CODE
LOWair_llm/airllm/utils.py793def find_or_create_local_splitted_path(model_local_path_or_repo_id, layer_shards_saving_path=None, compression=None,CODE
LOWair_llm/airllm/tokenization_baichuan.py172 def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None):CODE
LOWair_llm/airllm/tokenization_baichuan.py220 def create_token_type_ids_from_sequences(CODE
LOWair_llm/airllm/airllm_mixtral.py16 def get_use_better_transformer(self):CODE
LOWair_llm/airllm/chunked_ce.py121def chunked_linear_cross_entropy(CODE
LOWair_llm/airllm/airllm_llama_mlx.py53def get_model_args_from_config(config):CODE
9 more matches not shown…
Unused Imports50 hits · 50 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.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.py453except RuntimeError:CODE
HIGHair_llm/airllm/utils.py82except Exception as ex:CODE
HIGHair_llm/airllm/utils.py517except OSError:CODE
HIGHair_llm/airllm/utils.py522except OSError:CODE
HIGHair_llm/airllm/utils.py679except ValueError:CODE
HIGHair_llm/airllm/utils.py707except 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.py217def get_generation_config(self):CODE
LOWair_llm/airllm/airllm_base.py161 except Exception:CODE
LOWair_llm/airllm/airllm_base.py220 except Exception:CODE
LOWair_llm/airllm/airllm_base.py314 except Exception as e: # noqa: BLE001 - try the next factoryCODE
LOWair_llm/airllm/airllm_base.py317 except Exception as e: # noqa: BLE001 - try the next factoryCODE
LOWair_llm/airllm/airllm_base.py340 except Exception as e:CODE
LOWair_llm/airllm/airllm_base.py809 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.py296CODE
LOWair_llm/airllm/airllm_base.py429CODE
LOWair_llm/airllm/utils.py88CODE
LOWair_llm/airllm/utils.py223CODE
LOWair_llm/airllm/utils.py528CODE
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.py210CODE
LOWanima_100k/modeling_flash_llama.py624CODE
LOWanima_100k/modeling_flash_llama.py772CODE
LOWanima_100k/modeling_flash_llama.py948CODE
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippetContext
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