AirLLM 70B inference with single 4GB GPU
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).
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 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.
| 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_kimi_k3_split.py | 110 | def test_every_module_is_split_out(self): | CODE |
| LOW⚡ | air_llm/tests/test_kimi_k3_split.py | 118 | def test_one_shard_per_layer_is_linked_not_copied(self): | CODE |
| LOW⚡ | air_llm/tests/test_kimi_k3_split.py | 126 | def test_projector_and_vision_tower_are_linked(self): | CODE |
| LOW⚡ | air_llm/tests/test_kimi_k3_split.py | 132 | def test_shared_shard_modules_are_materialised_separately(self): | CODE |
| LOW | air_llm/tests/test_kimi_k3_split.py | 145 | def test_contents_match_the_original_checkpoint(self): | CODE |
| LOW | air_llm/tests/test_kimi_k3_split.py | 203 | def test_all_modules_written_as_real_files(self): | 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/tests/test_qwen3_8_split.py | 114 | def test_every_streamed_and_resident_module_is_split_out(self): | CODE |
| LOW | air_llm/tests/test_qwen3_8_split.py | 122 | def test_vision_tower_is_one_shard_and_excludes_decoder_weights(self): | CODE |
| LOW | air_llm/tests/test_qwen3_8_split.py | 139 | def test_decoder_and_head_round_trip(self): | CODE |
| LOW | air_llm/tests/test_qwen3_8_split.py | 154 | def test_shared_shards_are_copied_not_linked(self): | CODE |
| LOW | air_llm/tests/test_qwen38_flash_next_split.py | 123 | def test_file_loader_concatenates_without_keeping_shard_keys(self): | CODE |
| LOW | air_llm/tests/test_qwen38_flash_next_split.py | 143 | def test_rejects_gapped_shard_indices(self): | CODE |
| LOW | air_llm/tests/test_qwen38_flash_next_split.py | 150 | def test_marker_discovers_the_parent_layer(self): | CODE |
| LOW | air_llm/tests/test_qwen38_flash_next_split.py | 187 | def test_every_streamed_and_resident_module_is_split_out(self): | CODE |
| LOW | air_llm/tests/test_qwen38_flash_next_split.py | 197 | def test_ngram_table_is_peeled_out_of_its_decoder_layer(self): | CODE |
| LOW⚡ | air_llm/tests/test_qwen38_flash_next_split.py | 212 | def test_packed_experts_stay_on_the_decoder_layer(self): | CODE |
| LOW⚡ | air_llm/tests/test_qwen38_flash_next_split.py | 218 | def test_output_mix_is_the_norm_slot(self): | CODE |
| LOW⚡ | air_llm/tests/test_qwen38_flash_next_split.py | 223 | def test_vision_tower_is_one_shard_and_excludes_decoder_weights(self): | CODE |
| LOW | air_llm/tests/test_qwen38_flash_next_split.py | 258 | def test_shared_shards_are_copied_not_linked(self): | CODE |
| LOW | air_llm/tests/test_qwen38_flash_next_split.py | 271 | def test_huge_embedding_is_born_on_meta(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 | 41 | def restore_relocated_transformers_symbols(): | CODE |
| LOW | air_llm/airllm/airllm_base.py | 221 | def _propagate_attn_implementation(self, impl): | CODE |
| LOW | air_llm/airllm/airllm_base.py | 241 | def _model_matches_layer_names(self, model): | CODE |
| LOW | air_llm/airllm/airllm_base.py | 394 | def set_layers_from_layer_names(self): | CODE |
| LOW | air_llm/airllm/airllm_base.py | 449 | def _restore_plain_weight_modules(self, state_dict): | CODE |
| LOW | air_llm/airllm/airllm_base.py | 647 | def _param_names_from_state_dict(self, state_dict): | CODE |
| LOW | air_llm/airllm/airllm_base.py | 703 | def _load_cpu_resident_modules(self): | 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 | 88 | def uncompress_layer_state_dict(layer_state_dict): | CODE |
| LOW | air_llm/airllm/utils.py | 132 | def merge_ngram_embedding_shards(state_dict): | CODE |
| LOW | air_llm/airllm/utils.py | 158 | def load_merged_ngram_embedding(local_path, layer_name): | CODE |
| LOW | air_llm/airllm/utils.py | 379 | def cpu_resident_module_names(layer_names, index_keys): | CODE |
| LOW | air_llm/airllm/utils.py | 470 | def compress_layer_state_dict(layer_state_dict, compression=None): | CODE |
| LOW | air_llm/airllm/utils.py | 491 | def remove_real_and_linked_file(to_delete): | CODE |
| LOW | air_llm/airllm/utils.py | 793 | 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 |
|---|---|---|---|---|
| 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 | 24 | CODE | |
| LOW | air_llm/airllm/airllm_qwen2.py | 2 | CODE | |
| LOW | air_llm/airllm/utils.py | 12 | CODE | |
| LOW | air_llm/airllm/utils.py | 14 | CODE | |
| LOW | air_llm/airllm/utils.py | 14 | CODE | |
| LOW | air_llm/airllm/utils.py | 14 | CODE | |
| LOW | air_llm/airllm/utils.py | 14 | CODE | |
| LOW | air_llm/airllm/utils.py | 14 | CODE | |
| LOW | air_llm/airllm/utils.py | 26 | 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 |
|---|---|---|---|---|
| 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/airllm_base.py | 286 | CODE | |
| LOW | air_llm/airllm/airllm_base.py | 419 | CODE | |
| LOW | air_llm/airllm/utils.py | 88 | CODE | |
| LOW | air_llm/airllm/utils.py | 223 | CODE | |
| LOW | air_llm/airllm/utils.py | 528 | CODE | |
| LOW | rlhf/qlora_dpo.py | 354 | CODE | |
| LOW | rlhf/qlora_dpo.py | 516 | CODE | |
| LOW | rlhf/qlora_dpo.py | 553 | CODE | |
| LOW | scripts/gen_star_history.py | 46 | 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 | 41 | except Exception as _e: # noqa: BLE001 - optional family, keep package importable | CODE |
| MEDIUM | air_llm/airllm/airllm_base.py | 207 | def get_generation_config(self): | CODE |
| LOW | air_llm/airllm/airllm_base.py | 153 | except Exception: | CODE |
| LOW | air_llm/airllm/airllm_base.py | 210 | except Exception: | CODE |
| LOW | air_llm/airllm/airllm_base.py | 304 | except Exception as e: # noqa: BLE001 - try the next factory | CODE |
| LOW | air_llm/airllm/airllm_base.py | 307 | except Exception as e: # noqa: BLE001 - try the next factory | CODE |
| LOW | air_llm/airllm/airllm_base.py | 330 | except Exception as e: | CODE |
| LOW | air_llm/airllm/airllm_base.py | 799 | except Exception: | CODE |
| LOW | air_llm/airllm/utils.py | 82 | 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 | 84 | 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 | 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 | .github/workflows/star-history.yml | 1 | name: Refresh Star History | COMMENT |
| LOW | anima_100k/modeling_flash_llama.py | 1 | # coding=utf-8 | COMMENT |
| 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 |
|---|---|---|---|---|
| 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 |