Repository Analysis

lyogavin/airllm

AirLLM 70B inference with single 4GB GPU

19.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of lyogavin/airllm, a Jupyter Notebook project with 32,942 GitHub stars. SynthScan v2.0 examined 10,065 lines of code across 55 source files, recording 166 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 19.3 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

19.3
Adjusted Score
19.3
Raw Score
100%
Time Factor
2026-08-28
Last Push
32.9K
Stars
Jupyter Notebook
Language
10.1K
Lines of Code
55
Files
166
Pattern Hits
2026-08-29
Scan Date
0.11
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 6MEDIUM 3LOW 157

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 166 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers60 hits · 63 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
LOWair_llm/tests/test_kimi_k3_split.py110 def test_every_module_is_split_out(self):CODE
LOWair_llm/tests/test_kimi_k3_split.py118 def test_one_shard_per_layer_is_linked_not_copied(self):CODE
LOWair_llm/tests/test_kimi_k3_split.py126 def test_projector_and_vision_tower_are_linked(self):CODE
LOWair_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_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
LOWair_llm/tests/test_qwen38_flash_next_split.py212 def test_packed_experts_stay_on_the_decoder_layer(self):CODE
LOWair_llm/tests/test_qwen38_flash_next_split.py218 def test_output_mix_is_the_norm_slot(self):CODE
LOWair_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/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.py221 def _propagate_attn_implementation(self, impl):CODE
LOWair_llm/airllm/airllm_base.py241 def _model_matches_layer_names(self, model):CODE
LOWair_llm/airllm/airllm_base.py394 def set_layers_from_layer_names(self):CODE
LOWair_llm/airllm/airllm_base.py449 def _restore_plain_weight_modules(self, state_dict):CODE
LOWair_llm/airllm/airllm_base.py647 def _param_names_from_state_dict(self, state_dict):CODE
LOWair_llm/airllm/airllm_base.py703 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/airllm_llama_mlx.py53def get_model_args_from_config(config):CODE
LOWrlhf/qlora_dpo.py429def print_trainable_parameters(args, model):CODE
LOWrlhf/qlora_dpo.py446def smart_tokenizer_and_embedding_resize(CODE
LOWrlhf/qlora_dpo.py516def extract_unnatural_instructions_data(examples, extract_reformulations=False):CODE
LOWanima_100k/longer_training.py99def get_sample_gen_test_examples():CODE
LOWanima_100k/longer_training.py454def print_trainable_parameters(args, model):CODE
LOWanima_100k/longer_training.py471def smart_tokenizer_and_embedding_resize(CODE
LOWanima_100k/longer_training.py546def extract_unnatural_instructions_data(examples, extract_reformulations=False):CODE
LOWanima_100k/modeling_flash_llama.py523 def _set_gradient_checkpointing(self, module, value=False):STRING
LOWanima_100k/modeling_flash_llama.py878 def prepare_inputs_for_generation(CODE
Unused Imports49 hits · 49 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/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
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
Deep Nesting23 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/airllm_base.py286CODE
LOWair_llm/airllm/airllm_base.py419CODE
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
Excessive Try-Catch Wrapping14 hits · 16 pts
SeverityFileLineSnippetContext
LOWair_llm/airllm/__init__.py41 except Exception as _e: # noqa: BLE001 - optional family, keep package importableCODE
MEDIUMair_llm/airllm/airllm_base.py207def get_generation_config(self):CODE
LOWair_llm/airllm/airllm_base.py153 except Exception:CODE
LOWair_llm/airllm/airllm_base.py210 except Exception:CODE
LOWair_llm/airllm/airllm_base.py304 except Exception as e: # noqa: BLE001 - try the next factoryCODE
LOWair_llm/airllm/airllm_base.py307 except Exception as e: # noqa: BLE001 - try the next factoryCODE
LOWair_llm/airllm/airllm_base.py330 except Exception as e:CODE
LOWair_llm/airllm/airllm_base.py799 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
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
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