AirLLM 70B inference with single 4GB GPU
This report presents the forensic synthetic code analysis of lyogavin/airllm, a Jupyter Notebook project with 22,559 GitHub stars. SynthScan v2.0 examined 8,170 lines of code across 49 source files, recording 132 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 19.4 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).
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.
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.
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.
The scanner identified 132 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | training/qlora.py | 4 | CODE | |
| LOW | air_llm/tests/test_automodel.py | 1 | CODE | |
| LOW | air_llm/airllm/__init__.py | 9 | CODE | |
| LOW | air_llm/airllm/__init__.py | 10 | CODE | |
| LOW | air_llm/airllm/__init__.py | 14 | CODE | |
| LOW | air_llm/airllm/__init__.py | 15 | CODE | |
| LOW | air_llm/airllm/__init__.py | 16 | CODE | |
| LOW | air_llm/airllm/__init__.py | 17 | CODE | |
| LOW | air_llm/airllm/airllm_base.py | 2 | CODE | |
| LOW | air_llm/airllm/airllm_base.py | 2 | CODE | |
| LOW | air_llm/airllm/airllm_base.py | 2 | CODE | |
| LOW | air_llm/airllm/airllm_base.py | 2 | CODE | |
| LOW | air_llm/airllm/airllm_base.py | 3 | CODE | |
| LOW | air_llm/airllm/airllm_base.py | 4 | CODE | |
| LOW | air_llm/airllm/airllm_base.py | 20 | CODE | |
| LOW | air_llm/airllm/airllm_qwen2.py | 2 | CODE | |
| LOW | air_llm/airllm/utils.py | 11 | CODE | |
| LOW | air_llm/airllm/utils.py | 11 | CODE | |
| LOW | air_llm/airllm/utils.py | 12 | CODE | |
| LOW | air_llm/airllm/utils.py | 12 | CODE | |
| LOW | air_llm/airllm/utils.py | 12 | CODE | |
| LOW | air_llm/airllm/utils.py | 12 | CODE | |
| LOW | air_llm/airllm/utils.py | 12 | CODE | |
| LOW | air_llm/airllm/utils.py | 22 | CODE | |
| LOW | air_llm/airllm/utils.py | 23 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 2 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 3 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 4 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 8 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 13 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 16 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 16 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 16 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 16 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 16 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 17 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 17 | CODE | |
| LOW | air_llm/airllm/persist/__init__.py | 1 | CODE | |
| LOW | air_llm/airllm/persist/mlx_model_persister.py | 10 | CODE | |
| LOW | air_llm/airllm/persist/mlx_model_persister.py | 12 | CODE | |
| LOW | rlhf/qlora_dpo.py | 4 | CODE | |
| LOW | rlhf/qlora_dpo.py | 5 | CODE | |
| LOW | rlhf/qlora_dpo.py | 13 | CODE | |
| LOW | rlhf/qlora_dpo.py | 43 | CODE | |
| LOW | rlhf/qlora_dpo.py | 43 | CODE | |
| LOW | rlhf/qlora_dpo.py | 43 | CODE | |
| LOW | scripts/test_cn_dataset_lenghts.py | 3 | CODE | |
| LOW | anima_100k/longer_training.py | 4 | CODE | |
| LOW | anima_100k/longer_training.py | 22 | CODE | |
| LOW | anima_100k/modeling_flash_llama.py | 21 | CODE | |
| LOW | anima_100k/modeling_flash_llama.py | 38 | CODE | |
| LOW | anima_100k/modeling_flash_llama.py | 38 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | training/qlora.py | 381 | def print_trainable_parameters(args, model): | CODE |
| LOW | training/qlora.py | 398 | def smart_tokenizer_and_embedding_resize( | CODE |
| LOW | training/qlora.py | 473 | def extract_unnatural_instructions_data(examples, extract_reformulations=False): | CODE |
| LOW | air_llm/tests/test_compression.py | 18 | def test_should_compress_uncompress(self): | CODE |
| LOW | air_llm/tests/test_automodel.py | 16 | def test_auto_model_should_return_correct_model(self): | CODE |
| LOW | air_llm/airllm/airllm_chatglm.py | 16 | def get_use_better_transformer(self): | CODE |
| LOW | air_llm/airllm/airllm_chatglm.py | 25 | def get_past_key_values_cache_seq_len(self, past_key_values): | CODE |
| LOW | air_llm/airllm/airllm_internlm.py | 16 | def get_use_better_transformer(self): | CODE |
| LOW | air_llm/airllm/airllm_qwen.py | 16 | def get_use_better_transformer(self): | CODE |
| LOW | air_llm/airllm/airllm_qwen.py | 22 | def get_past_key_values_cache_seq_len(self, past_key_values): | CODE |
| LOW | air_llm/airllm/airllm_baichuan.py | 18 | def get_use_better_transformer(self): | CODE |
| LOW | air_llm/airllm/airllm_base.py | 234 | def set_layers_from_layer_names(self): | CODE |
| LOW | air_llm/airllm/airllm_base.py | 307 | def _param_names_from_state_dict(self, state_dict): | CODE |
| LOW | air_llm/airllm/airllm_mistral.py | 16 | def get_use_better_transformer(self): | CODE |
| LOW | air_llm/airllm/airllm_qwen2.py | 17 | def get_use_better_transformer(self): | CODE |
| LOW | air_llm/airllm/utils.py | 85 | def uncompress_layer_state_dict(layer_state_dict): | CODE |
| LOW | air_llm/airllm/utils.py | 157 | def compress_layer_state_dict(layer_state_dict, compression=None): | CODE |
| LOW | air_llm/airllm/utils.py | 178 | def remove_real_and_linked_file(to_delete): | CODE |
| LOW | air_llm/airllm/utils.py | 372 | def find_or_create_local_splitted_path(model_local_path_or_repo_id, layer_shards_saving_path=None, compression=None, | CODE |
| LOW | air_llm/airllm/tokenization_baichuan.py | 172 | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None): | CODE |
| LOW | air_llm/airllm/tokenization_baichuan.py | 220 | def create_token_type_ids_from_sequences( | CODE |
| LOW | air_llm/airllm/airllm_mixtral.py | 16 | def get_use_better_transformer(self): | CODE |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 53 | def get_model_args_from_config(config): | CODE |
| LOW | rlhf/qlora_dpo.py | 429 | def print_trainable_parameters(args, model): | CODE |
| LOW | rlhf/qlora_dpo.py | 446 | def smart_tokenizer_and_embedding_resize( | CODE |
| LOW | rlhf/qlora_dpo.py | 516 | def extract_unnatural_instructions_data(examples, extract_reformulations=False): | CODE |
| LOW | anima_100k/longer_training.py | 99 | def get_sample_gen_test_examples(): | CODE |
| LOW | anima_100k/longer_training.py | 454 | def print_trainable_parameters(args, model): | CODE |
| LOW | anima_100k/longer_training.py | 471 | def smart_tokenizer_and_embedding_resize( | CODE |
| LOW | anima_100k/longer_training.py | 546 | def extract_unnatural_instructions_data(examples, extract_reformulations=False): | CODE |
| LOW | anima_100k/modeling_flash_llama.py | 523 | def _set_gradient_checkpointing(self, module, value=False): | STRING |
| LOW | anima_100k/modeling_flash_llama.py | 878 | def prepare_inputs_for_generation( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | training/qlora.py | 0 | prints the number of trainable parameters in the model. | STRING |
| HIGH | rlhf/qlora_dpo.py | 0 | prints the number of trainable parameters in the model. | STRING |
| HIGH | anima_100k/longer_training.py | 0 | prints the number of trainable parameters in the model. | STRING |
| HIGH | training/qlora.py | 0 | resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisible | STRING |
| HIGH | rlhf/qlora_dpo.py | 0 | resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisible | STRING |
| HIGH | anima_100k/longer_training.py | 0 | resize tokenizer and embedding. note: this is the unoptimized version that may make your embedding size not be divisible | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | training/qlora.py | 306 | CODE | |
| LOW | training/qlora.py | 473 | CODE | |
| LOW | training/qlora.py | 510 | CODE | |
| LOW | training/qlora.py | 525 | CODE | |
| LOW | training/qlora.py | 549 | CODE | |
| LOW | training/qlora.py | 579 | CODE | |
| LOW | air_llm/tests/test_compression.py | 18 | CODE | |
| LOW | air_llm/airllm/utils.py | 85 | CODE | |
| LOW | air_llm/airllm/utils.py | 188 | CODE | |
| LOW | rlhf/qlora_dpo.py | 354 | CODE | |
| LOW | rlhf/qlora_dpo.py | 516 | CODE | |
| LOW | rlhf/qlora_dpo.py | 553 | CODE | |
| LOW | anima_100k/longer_training.py | 83 | CODE | |
| LOW | anima_100k/longer_training.py | 368 | CODE | |
| LOW | anima_100k/longer_training.py | 546 | CODE | |
| LOW | anima_100k/longer_training.py | 583 | CODE | |
| LOW | anima_100k/longer_training.py | 598 | CODE | |
| LOW | anima_100k/longer_training.py | 627 | CODE | |
| LOW | anima_100k/modeling_flash_llama.py | 948 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | air_llm/airllm/__init__.py | 38 | except Exception as _e: # noqa: BLE001 - optional family, keep package importable | CODE |
| LOW | air_llm/airllm/airllm_base.py | 117 | except Exception: | CODE |
| LOW | air_llm/airllm/airllm_base.py | 167 | except Exception: | CODE |
| MEDIUM | air_llm/airllm/airllm_base.py | 164 | def get_generation_config(self): | CODE |
| LOW | air_llm/airllm/utils.py | 79 | except Exception as ex: | CODE |
| LOW | air_llm/airllm/persist/mlx_model_persister.py | 111 | except Exception as ex: | CODE |
| MEDIUM | air_llm/airllm/persist/mlx_model_persister.py | 91 | def load_model(self, layer_name, path): | CODE |
| LOW | rlhf/qlora_dpo.py | 588 | except Exception: | CODE |
| LOW | rlhf/qlora_dpo.py | 733 | except Exception as e: | CODE |
| LOW | anima_100k/longer_training.py | 95 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | air_llm/airllm/airllm_base.py | 50 | CODE | |
| LOW | air_llm/airllm/tokenization_baichuan.py | 57 | CODE | |
| LOW | air_llm/airllm/airllm_llama_mlx.py | 210 | CODE | |
| LOW | anima_100k/modeling_flash_llama.py | 624 | CODE | |
| LOW | anima_100k/modeling_flash_llama.py | 772 | CODE | |
| LOW | anima_100k/modeling_flash_llama.py | 948 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | training/qlora.py | 60 | logger = logging.getLogger(__name__) | CODE |
| LOW | rlhf/qlora_dpo.py | 62 | logger = logging.getLogger(__name__) | CODE |
| LOW | anima_100k/longer_training.py | 60 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | air_llm/airllm/tokenization_baichuan.py | 1 | # Copyright 2023 Baichuan Inc. All Rights Reserved. | COMMENT |
| LOW | .github/workflows/release.yml | 1 | name: Publish to PyPI | COMMENT |
| LOW | anima_100k/modeling_flash_llama.py | 1 | # coding=utf-8 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | anima_100k/extened_longchat_topiced_conversations.json | 1 | [{"TOPIC_ID": 1, "TOPIC": "The psychology of happiness", "CONVERSATION": "USER: I would like to discuss the topic of the | CODE |