AI Slop Code RIsk Monitor

google-deepmind/gemma

Gemma open-weight LLM library, from Google DeepMind

26.1 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for google-deepmind/gemma, a Python project with 5,782 GitHub stars. SynthScan examined 42,035 lines of code across 230 source files, recording 760 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 26.1 (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.

26.1
Adjusted Signal
26.1
Raw Pattern Score
100%
Time Factor
2026-10-06
Last Push
5.8K
Stars
Python
Language
42.0K
Lines of Code
230
Files
760
Pattern Hits
2026-10-12
Scan Date
0.23
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 47.0/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 19.6/100 · LOW

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

Agent Over-Engineering Ratio 52.4/100 · HIGH

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

PR Review Velocity Impact 74.0/100 · HIGH

Which changes need focused human review? 760 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 54MEDIUM 51LOW 655

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 760 distinct pattern matches across 16 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.

Cross-File Repetition48 hits · 240 pts
SeverityFileLineSnippetContext
HIGHgemma/research/t5gemma/modules.py0returns the scalar to multiply the query by before attention.STRING
HIGHgemma/gm/nn/_config.py0returns the scalar to multiply the query by before attention.STRING
HIGHgemma/gm/nn/gemma3n/_config.py0returns the scalar to multiply the query by before attention.STRING
HIGHgemma/gm/nn/_lora.py0kauldron keys when calling `kontext.get_from_keys_obj`.STRING
HIGHgemma/gm/nn/_policy.py0kauldron keys when calling `kontext.get_from_keys_obj`.STRING
HIGHgemma/gm/nn/_quantization.py0kauldron keys when calling `kontext.get_from_keys_obj`.STRING
HIGHgemma/gm/nn/_layers.py0einsum is a convenience module for parameterized tensor multiplication.STRING
HIGHgemma/gm/nn/gemma4/_layers.py0einsum is a convenience module for parameterized tensor multiplication.STRING
HIGHgemma/gm/nn/gemma3n/_layers.py0einsum is a convenience module for parameterized tensor multiplication.STRING
HIGHgemma/gm/nn/_transformer_like.py0output of the gemma model. attributes: logits: predicted logits of the model. cache: updated cache if the input cache isSTRING
HIGHgemma/gm/nn/_transformer.py0output of the gemma model. attributes: logits: predicted logits of the model. cache: updated cache if the input cache isSTRING
HIGHgemma/gm/nn/gemma4/_transformer.py0output of the gemma model. attributes: logits: predicted logits of the model. cache: updated cache if the input cache isSTRING
HIGHgemma/gm/nn/gemma3n/_transformer.py0output of the gemma model. attributes: logits: predicted logits of the model. cache: updated cache if the input cache isSTRING
HIGHgemma/gm/nn/_transformer_like.py0model information. used to auto-load the model tokenizer and params.STRING
HIGHgemma/gm/nn/_transformer.py0model information. used to auto-load the model tokenizer and params.STRING
HIGHgemma/gm/nn/gemma4/_transformer.py0model information. used to auto-load the model tokenizer and params.STRING
HIGHgemma/gm/nn/gemma3n/_transformer.py0model information. used to auto-load the model tokenizer and params.STRING
HIGHgemma/gm/nn/_transformer.py0gemma3n transformer class. attributes: return_last_only: if `true`, only compute and return the last token. otherwise, rSTRING
HIGHgemma/gm/nn/gemma4/_transformer.py0gemma3n transformer class. attributes: return_last_only: if `true`, only compute and return the last token. otherwise, rSTRING
HIGHgemma/gm/nn/gemma3n/_transformer.py0gemma3n transformer class. attributes: return_last_only: if `true`, only compute and return the last token. otherwise, rSTRING
HIGHgemma/gm/nn/_transformer.py0encode the text tokens, eventually including the vision embeddings.STRING
HIGHgemma/gm/nn/gemma4/_transformer.py0encode the text tokens, eventually including the vision embeddings.STRING
HIGHgemma/gm/nn/gemma3n/_transformer.py0encode the text tokens, eventually including the vision embeddings.STRING
HIGHgemma/gm/nn/_transformer.py0update the embeddings to include the vision embeddings.STRING
HIGHgemma/gm/nn/gemma4/_transformer.py0update the embeddings to include the vision embeddings.STRING
HIGHgemma/gm/nn/gemma3n/_transformer.py0update the embeddings to include the vision embeddings.STRING
HIGHgemma/gm/nn/_transformer.py0encode images into the same space as the text embeddings.STRING
HIGHgemma/gm/nn/gemma3n/_transformer.py0encode images into the same space as the text embeddings.STRING
HIGHgemma/gm/nn/gemma4/_transformer.py0encode images into the same space as the text embeddings.STRING
HIGHgemma/gm/nn/_transformer.py0merge `return_last_only` from the config and input.STRING
HIGHgemma/gm/nn/gemma4/_transformer.py0merge `return_last_only` from the config and input.STRING
HIGHgemma/gm/nn/gemma3n/_transformer.py0merge `return_last_only` from the config and input.STRING
HIGHgemma/gm/nn/_config.py0returns the list of attention types for every layers.STRING
HIGHgemma/gm/nn/gemma4/_config.py0returns the list of attention types for every layers.STRING
HIGHgemma/gm/nn/gemma3n/_config.py0returns the list of attention types for every layers.STRING
HIGHgemma/gm/nn/_modules.py0encodes the input tokens. args: x: input shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. t: input tokensSTRING
HIGHgemma/gm/nn/gemma4/_modules.py0encodes the input tokens. args: x: input shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. t: input tokensSTRING
HIGHgemma/gm/nn/gemma3n/_modules.py0encodes the input tokens. args: x: input shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. t: input tokensSTRING
HIGHgemma/gm/nn/_modules.py0decodes the input vectors. args: x: array of shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. returns: arSTRING
HIGHgemma/gm/nn/gemma4/_modules.py0decodes the input vectors. args: x: array of shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. returns: arSTRING
HIGHgemma/gm/nn/gemma3n/_modules.py0decodes the input vectors. args: x: array of shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. returns: arSTRING
HIGHgemma/gm/nn/_modules.py0applies multi-head attention to the inputs. args: x: input sequence of shape [batch_size, seq_len, embed_dim]. segment_pSTRING
HIGHgemma/gm/nn/gemma4/_modules.py0applies multi-head attention to the inputs. args: x: input sequence of shape [batch_size, seq_len, embed_dim]. segment_pSTRING
HIGHgemma/gm/nn/gemma3n/_modules.py0applies multi-head attention to the inputs. args: x: input sequence of shape [batch_size, seq_len, embed_dim]. segment_pSTRING
HIGHgemma/gm/nn/_modules.py0applies the feed forward module. args: x: input sequence of shape [batch_size, seq_len, features]. returns: output sequeSTRING
HIGHgemma/gm/nn/gemma4/_modules.py0applies the feed forward module. args: x: input sequence of shape [batch_size, seq_len, features]. returns: output sequeSTRING
HIGHgemma/gm/nn/gemma4/vision/_modules.py0applies the feed forward module. args: x: input sequence of shape [batch_size, seq_len, features]. returns: output sequeSTRING
HIGHgemma/gm/nn/gemma3n/_modules.py0applies the feed forward module. args: x: input sequence of shape [batch_size, seq_len, features]. returns: output sequeSTRING
Hyper-Verbose Identifiers225 hits · 224 pts
SeverityFileLineSnippetContext
LOWgemma/research/t5gemma/config.py273 def get_checkpoint_from_kaggle(CODE
LOWgemma/research/t5gemma/t5gemma.py95 def compute_encoder_activations(CODE
LOWgemma/research/t5gemma/t5gemma.py110 def compute_decoder_activations(CODE
LOWgemma/research/t5gemma/t5gemma.py212def make_bidirectional_attn_mask(CODE
LOWgemma/research/t5gemma/t5gemma.py220def build_positions_from_mask(CODE
LOWgemma/research/t5gemma/sampling.py298 def _normalized_forbidden_tokens(self) -> tuple[int, ...] | None:CODE
LOWgemma/research/t5gemma/sampling.py553def _mask_tokens_after_end_tokens(CODE
LOWgemma/diffusion/_models_test.py26 def test_can_instantiate_from_default_config(self):CODE
LOWgemma/diffusion/_models_test.py31 def test_multiple_token_generation(self):CODE
LOWgemma/diffusion/_chat_sampler_test.py47 def test_chat_sampler_instantiation(self):CODE
LOWgemma/diffusion/_chat_sampler_test.py98 def test_chat_sampler_instantiation_overrides(self):CODE
LOWgemma/diffusion/_sampler_test.py265 def test_sample_from_predictions_final_step(self):CODE
LOWgemma/diffusion/_sampler_test.py366 def test_sample_next_canvas_unpadded_positions(self):CODE
LOWgemma/diffusion/_sampler_test.py457 def test_append_tokens_to_cache(self):CODE
LOWgemma/diffusion/_sampler_test.py535 def test_make_global_attention_no_cache(self):CODE
LOWgemma/diffusion/_sampler_test.py549 def test_make_global_attention_mask_batched_edge_cases(self):CODE
LOWgemma/diffusion/_sampler_test.py631 def test_make_global_attention_mask_with_full_attention_mask(self):CODE
LOWgemma/diffusion/_sampler_test.py685 def test_make_causal_attention_mask_no_cache(self):CODE
LOWgemma/diffusion/_sampler_test.py702 def test_make_causal_attention_mask_batched_edge_cases(self):CODE
LOWgemma/diffusion/_sampler_test.py789 def test_diffusion_sample_step_runs(self):CODE
LOWgemma/diffusion/_sampler_test.py998 def tracking_sample_next_canvas(*args, **kwargs):CODE
LOWgemma/diffusion/_sampler_test.py1024 def test_sample_next_canvas_while_loop_matches_for_loop(self, use_cache):CODE
LOWgemma/diffusion/_sampler_test.py1109 def test_early_stopping_terminates_after_one_step(self):CODE
LOWgemma/diffusion/_sampler_test.py1199 def test_token_stability_early_stop(self):CODE
LOWgemma/diffusion/_early_stopping_test.py57 def test_stops_when_argmax_matches_previous(self):CODE
LOWgemma/diffusion/_early_stopping_test.py70 def test_does_not_stop_when_argmax_differs(self):CODE
LOWgemma/diffusion/_early_stopping_test.py83 def test_partial_mismatch_does_not_stop(self):CODE
LOWgemma/diffusion/_early_stopping_test.py96 def test_per_batch_independence(self):CODE
LOWgemma/diffusion/_early_stopping_test.py113 def test_stops_below_threshold(self):CODE
LOWgemma/diffusion/_early_stopping_test.py125 def test_does_not_stop_above_threshold(self):CODE
LOWgemma/diffusion/_early_stopping_test.py137 def test_exact_threshold_stops(self):CODE
LOWgemma/diffusion/_early_stopping_test.py154 def test_handles_zero_probability(self):CODE
LOWgemma/diffusion/_early_stopping_test.py166 def test_per_batch_independence(self):CODE
LOWgemma/diffusion/_early_stopping_test.py185 def test_requires_all_to_agree(self):CODE
LOWgemma/diffusion/_early_stopping_test.py204 def test_stops_when_all_agree(self):CODE
LOWgemma/diffusion/_transformer.py86 def call_with_self_conditioning(CODE
LOWgemma/diffusion/_sampler.py49 def derivative_noise_probability(self, noise_proportion: Float) -> Float: # pyrefly: ignore[not-a-type]CODE
LOWgemma/diffusion/_sampler.py295def _truncate_canvas_at_stop_tokens(CODE
LOWgemma/diffusion/_sampler.py665def _make_global_attention_mask(CODE
LOWgemma/diffusion/_sampler.py711def _make_causal_attention_mask(CODE
LOWgemma/diffusion/_sampler.py771def _make_block_local_attention_mask(CODE
LOW…able_diffusion_adapter/hd/hd_gemma_ar_state_handler.py403 def create_conditioning_from_state(CODE
LOW…able_diffusion_adapter/hd/hd_gemma_ar_state_handler.py432def truncate_canvas_at_stop_tokens(CODE
LOW…iffusion/hackable_diffusion_adapter/hd/mask_helpers.py69def build_positions_from_mask(mask: Int['*B L']) -> Int['*B L']:CODE
LOW…iffusion/hackable_diffusion_adapter/hd/mask_helpers.py183def make_causal_attention_mask_right_pad(CODE
LOW…iffusion/hackable_diffusion_adapter/hd/mask_helpers.py247def create_decoder_attention_mask(CODE
LOW…sion/hackable_diffusion_adapter/hd/hd_gemma_network.py52def prefill_kv_cache_with_encoder(CODE
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py256def _init_and_run_sft_diffusion(CODE
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py504 def test_denoiser_sensitivity_to_prompt(self):CODE
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py564 def _make_inference_fn_and_conditioning(self, prompt_len=6, canvas_size=4):CODE
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py718 def test_inference_fn_produces_logits(self):CODE
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py731 def test_inference_fn_matches_bound_path(self):CODE
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py776 def test_inference_fn_sc_logits_squeeze(self):CODE
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py799 def test_inference_fn_sensitive_to_cache(self):CODE
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py994 def test_encoder_logits_gradient_flows_to_params(self):CODE
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py1069 def test_decoder_logits_gradient_flows_to_params(self):CODE
LOW…ckable_diffusion_adapter/hd/gemma_checkpointer_test.py45 def test_remap_strips_w_when_model_has_no_w(self):CODE
LOW…ckable_diffusion_adapter/hd/gemma_checkpointer_test.py101 def test_exact_match_no_remapping(self):CODE
LOW…ckable_diffusion_adapter/hd/gemma_checkpointer_test.py116 def test_checkpoint_only_keys_discarded(self):CODE
LOW…ckable_diffusion_adapter/hd/gemma_checkpointer_test.py166 def test_non_lora_model_only_keys_raise(self):CODE
165 more matches not shown…
Over-Commented Block199 hits · 198 pts
SeverityFileLineSnippetContext
LOWgemma/__init__.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/research/t5gemma/config.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/research/t5gemma/t5gemma.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/research/t5gemma/__init__.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/research/t5gemma/sampling.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/research/t5gemma/modules.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_models_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_chat_sampler_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_sampler_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_paths.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_early_stopping_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_chat_sampler.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/__init__.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_transformer.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_models.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_sampler.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/_early_stopping.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/hackable_diffusion_adapter/eval_main.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…n/hackable_diffusion_adapter/checkpointed_evaluator.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…ma/diffusion/hackable_diffusion_adapter/safe_writer.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…able_diffusion_adapter/hd/hd_gemma_ar_state_handler.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…a/diffusion/hackable_diffusion_adapter/hd/sft_model.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…a/diffusion/hackable_diffusion_adapter/hd/sft_model.py301 """COMMENT
LOW…iffusion/hackable_diffusion_adapter/hd/mask_helpers.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…sion/hackable_diffusion_adapter/hd/hd_gemma_network.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…fusion/hackable_diffusion_adapter/hd/sft_model_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…ckable_diffusion_adapter/hd/gemma_checkpointer_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…diffusion_adapter/hd/hd_gemma_ar_state_handler_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…on/hackable_diffusion_adapter/hd/gemma_checkpointer.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…on/hackable_diffusion_adapter/hd/gemma_checkpointer.py81 """COMMENT
LOW…ion/hackable_diffusion_adapter/hd/mask_helpers_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/hackable_diffusion_adapter/hd/lora.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…a/diffusion/hackable_diffusion_adapter/hd/lora_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…ion/hackable_diffusion_adapter/configs/sft_pubmedqa.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…usion/hackable_diffusion_adapter/configs/sft_sudoku.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…/hackable_diffusion_adapter/configs/sft_sudoku_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…ackable_diffusion_adapter/configs/sft_pubmedqa_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…/hackable_diffusion_adapter/configs/sft_sudoku_full.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…ffusion/hackable_diffusion_adapter/eval/sudoku_eval.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…on/hackable_diffusion_adapter/eval/base_metric_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…usion/hackable_diffusion_adapter/eval/pubmedqa_eval.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…/hackable_diffusion_adapter/eval/pubmedqa_eval_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…ffusion/hackable_diffusion_adapter/eval/base_metric.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…ffusion/hackable_diffusion_adapter/eval/text_metric.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…on/hackable_diffusion_adapter/eval/text_metric_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…a/diffusion/hackable_diffusion_adapter/eval/ar_eval.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…diffusion/hackable_diffusion_adapter/data/data_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/diffusion/hackable_diffusion_adapter/data/data.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…/hackable_diffusion_adapter/data/sudoku/sudoku_data.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…ckable_diffusion_adapter/data/sudoku/convert_sudoku.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…able_diffusion_adapter/data/sudoku/sudoku_data_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…kable_diffusion_adapter/data/pubmedqa/pubmedqa_data.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…_diffusion_adapter/data/pubmedqa/pubmedqa_data_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOW…le_diffusion_adapter/data/pubmedqa/convert_pubmedqa.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/peft/_interceptors_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/peft/_lora.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/peft/_quantization_test.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/peft/_quantization_utils.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
LOWgemma/peft/__init__.py1# Copyright 2026 DeepMind Technologies Limited.COMMENT
139 more matches not shown…
Unused Imports186 hits · 179 pts
SeverityFileLineSnippetContext
LOWgemma/research/t5gemma/__init__.py23CODE
LOWgemma/research/t5gemma/__init__.py24CODE
LOWgemma/research/t5gemma/__init__.py25CODE
LOWgemma/research/t5gemma/__init__.py28CODE
LOWgemma/research/t5gemma/__init__.py29CODE
LOWgemma/research/t5gemma/__init__.py30CODE
LOWgemma/research/t5gemma/__init__.py31CODE
LOWgemma/research/t5gemma/__init__.py34CODE
LOWgemma/diffusion/__init__.py24CODE
LOWgemma/diffusion/__init__.py27CODE
LOWgemma/diffusion/__init__.py30CODE
LOWgemma/diffusion/__init__.py31CODE
LOWgemma/diffusion/__init__.py34CODE
LOWgemma/diffusion/__init__.py35CODE
LOWgemma/diffusion/__init__.py36CODE
LOWgemma/diffusion/__init__.py39CODE
LOWgemma/diffusion/__init__.py40CODE
LOWgemma/diffusion/__init__.py43CODE
LOWgemma/diffusion/__init__.py44CODE
LOWgemma/diffusion/__init__.py45CODE
LOWgemma/diffusion/__init__.py48CODE
LOWgemma/diffusion/__init__.py49CODE
LOWgemma/diffusion/__init__.py50CODE
LOWgemma/diffusion/__init__.py51CODE
LOWgemma/diffusion/__init__.py52CODE
LOWgemma/diffusion/hackable_diffusion_adapter/eval_main.py21CODE
LOW…n/hackable_diffusion_adapter/checkpointed_evaluator.py21CODE
LOW…sion/hackable_diffusion_adapter/hd/hd_gemma_network.py25CODE
LOW…ffusion/hackable_diffusion_adapter/eval/sudoku_eval.py17CODE
LOW…usion/hackable_diffusion_adapter/eval/pubmedqa_eval.py17CODE
LOW…ffusion/hackable_diffusion_adapter/eval/base_metric.py17CODE
LOW…ffusion/hackable_diffusion_adapter/eval/text_metric.py17CODE
LOWgemma/diffusion/hackable_diffusion_adapter/data/data.py17CODE
LOW…kable_diffusion_adapter/data/pubmedqa/pubmedqa_data.py17CODE
LOWgemma/peft/_quantization_test.py22CODE
LOWgemma/peft/__init__.py20CODE
LOWgemma/peft/__init__.py21CODE
LOWgemma/peft/__init__.py24CODE
LOWgemma/peft/__init__.py25CODE
LOWgemma/peft/__init__.py26CODE
LOWgemma/peft/__init__.py27CODE
LOWgemma/peft/__init__.py28CODE
LOWgemma/peft/__init__.py29CODE
LOWgemma/peft/__init__.py30CODE
LOWgemma/peft/__init__.py31CODE
LOWgemma/peft/__init__.py32CODE
LOWgemma/peft/__init__.py33CODE
LOWgemma/peft/__init__.py36CODE
LOWgemma/peft/__init__.py37CODE
LOWgemma/peft/__init__.py38CODE
LOWgemma/peft/__init__.py39CODE
LOWgemma/peft/__init__.py40CODE
LOWgemma/peft/__init__.py41CODE
LOWgemma/peft/__init__.py42CODE
LOWgemma/peft/__init__.py43CODE
LOWgemma/peft/_tree_utils.py17CODE
LOWgemma/peft/_interceptors.py17CODE
LOWgemma/gm/__init__.py23CODE
LOWgemma/gm/__init__.py24CODE
LOWgemma/gm/__init__.py25CODE
126 more matches not shown…
Decorative Section Separators32 hits · 129 pts
SeverityFileLineSnippetContext
MEDIUM⚡gemma/diffusion/hackable_diffusion_adapter/hd/lora.py57 # ── 1. All linear layers (default) ──────────────────────────────────COMMENT
MEDIUM⚡gemma/diffusion/hackable_diffusion_adapter/hd/lora.py66 # ── 2. Attention-only LoRA ──────────────────────────────────────────COMMENT
MEDIUM⚡gemma/diffusion/hackable_diffusion_adapter/hd/lora.py76 # ── 3. MLP-only LoRA ───────────────────────────────────────────────COMMENT
MEDIUM⚡gemma/diffusion/hackable_diffusion_adapter/hd/lora.py86 # ── 4. Attention + MLP (everything inside transformer blocks) ──────COMMENT
MEDIUM⚡gemma/diffusion/hackable_diffusion_adapter/hd/lora.py94 # ── 5. Specific layers only ────────────────────────────────────────COMMENT
MEDIUM⚡gemma/diffusion/hackable_diffusion_adapter/hd/lora.py108 # ── 6. Combining layer and module filters ──────────────────────────COMMENT
MEDIUM⚡gemma/diffusion/hackable_diffusion_adapter/hd/lora.py116 # ── 7. Query/Value only (classic LoRA recipe) ──────────────────────COMMENT
MEDIUM⚡gemma/diffusion/hackable_diffusion_adapter/hd/lora.py123 # ── 8. Router projections only (MoE layers) ───────────────────────COMMENT
MEDIUM⚡…a/diffusion/hackable_diffusion_adapter/hd/lora_test.py519# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…a/diffusion/hackable_diffusion_adapter/hd/lora_test.py521# ---------------------------------------------------------------------------COMMENT
MEDIUM…a/diffusion/hackable_diffusion_adapter/hd/lora_test.py31# ---------------------------------------------------------------------------COMMENT
MEDIUM…a/diffusion/hackable_diffusion_adapter/hd/lora_test.py33# ---------------------------------------------------------------------------COMMENT
MEDIUM…a/diffusion/hackable_diffusion_adapter/hd/lora_test.py448# ---------------------------------------------------------------------------COMMENT
MEDIUM…a/diffusion/hackable_diffusion_adapter/hd/lora_test.py450# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py64# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py66# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py132# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py134# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py155# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py157# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py199# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py201# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py242# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py244# ---------------------------------------------------------------------------COMMENT
MEDIUM…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py23# ---------------------------------------------------------------------------COMMENT
MEDIUM…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py25# ---------------------------------------------------------------------------COMMENT
MEDIUM…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py292# ---------------------------------------------------------------------------COMMENT
MEDIUM…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py294# ---------------------------------------------------------------------------COMMENT
MEDIUM…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py309# ---------------------------------------------------------------------------COMMENT
MEDIUM…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py311# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡gemma/gm/nn/_lora_test.py107# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡gemma/gm/nn/_lora_test.py109# ---------------------------------------------------------------------------COMMENT
Self-Referential Comments16 hits · 38 pts
SeverityFileLineSnippetContext
MEDIUM…diffusion_adapter/hd/hd_gemma_ar_state_handler_test.py762 # Create a mock Kauldron contextCOMMENT
MEDIUM…able_diffusion_adapter/data/sudoku/sudoku_data_test.py26 # Create a serialized tf.train.ExampleCOMMENT
MEDIUM…_diffusion_adapter/data/pubmedqa/pubmedqa_data_test.py25 # Create a temporary JSONL fileCOMMENT
MEDIUMgemma/peft/_interceptors_test.py36 # Create an extra param.COMMENT
MEDIUMgemma/gm/nn/gemma4/vision/_images.py66 # Create a mask of all invalid positions by finding the zero valuesCOMMENT
MEDIUMgemma/gm/nn/gemma4/audio/_modules.py940 # This function is a streamlined re-implementation of tf.signal.frame withCOMMENT
MEDIUMgemma/gm/utils/_file_cache_test.py45 # Create the cache directory and write a file in it.COMMENT
MEDIUMgemma/gm/data/_tasks.py162 # Create the model inputs/targets/loss_mask.COMMENT
MEDIUMgemma/gm/data/_functional.py140 # Create the loss mask.COMMENT
MEDIUMexamples/sharding.py115 # Create the model inputs/targets/loss_mask.STRING
MEDIUMexamples/multimodal.py141 # Create a new constant fieldSTRING
MEDIUMexamples/multimodal.py143 # Create the model inputs/targets/loss_mask.STRING
MEDIUMexamples/npo.py117 # Create the model inputs/targets/mask.COMMENT
MEDIUMexamples/lora.py136 # Create the model inputs/targets/loss_mask.STRING
MEDIUMexamples/dpo.py107 # Create the model inputs and loss mask.COMMENT
MEDIUMexamples/seq2seq.py129 # Create the model inputs/targets/loss_mask.STRING
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGH…iffusion/hackable_diffusion_adapter/hd/mask_helpers.py95Creates a causal attention mask for right-padded prefill. Builds a lower-triangular causal mask, multiplied by ``tokeSTRING
HIGH…on/hackable_diffusion_adapter/hd/gemma_checkpointer.py57Remaps checkpoint keys and merges them into the model param dict. This is the core logic of checkpoint-to-model paramSTRING
HIGHgemma/diffusion/hackable_diffusion_adapter/hd/lora.py335Fuse LoRA weights into base weights, returning a base-only param tree. Takes a param tree that contains both base weiSTRING
HIGHgemma/gm/utils/_attention_mask.py29Make the attention mask for the transformer. Gemma transformer attention mask is a little complicated, as the text STRING
AI Structural Patterns19 hits · 18 pts
SeverityFileLineSnippetContext
LOWgemma/diffusion/_transformer.py78CODE
LOW…able_diffusion_adapter/hd/hd_gemma_ar_state_handler.py143CODE
LOW…diffusion_adapter/hd/hd_gemma_ar_state_handler_test.py93CODE
LOWgemma/gm/nn/gemma4/_moe.py214CODE
LOWgemma/gm/nn/gemma4/_moe.py242CODE
LOWgemma/gm/nn/gemma4/_moe.py379CODE
LOWgemma/gm/nn/gemma4/_moe.py407CODE
LOWgemma/gm/nn/gemma4/_transformer.py235CODE
LOWgemma/gm/nn/gemma4/vision/_modules.py210CODE
LOWgemma/gm/nn/gemma4/audio/_modules.py204CODE
LOWgemma/gm/utils/_jax_utils.py104CODE
LOWgemma/gm/text/_gemma4_sampler.py98CODE
LOWgemma/gm/text/_chat_sampler.py479CODE
LOWgemma/gm/text/_chat_sampler.py261CODE
LOWgemma/gm/text/_tool_sampler.py54CODE
LOWgemma/gm/text/_sampler.py169CODE
LOWgemma/gm/text/_sampler.py186CODE
LOWgemma/gm/text/_sampler.py204CODE
LOWgemma/gm/text/_sampler.py238CODE
Deep Nesting15 hits · 14 pts
SeverityFileLineSnippetContext
LOWgemma/research/t5gemma/modules.py631CODE
LOW…ffusion/hackable_diffusion_adapter/eval/sudoku_eval.py69CODE
LOW…ffusion/hackable_diffusion_adapter/eval/sudoku_eval.py351CODE
LOW…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py317CODE
LOW…on/hackable_diffusion_adapter/eval/sudoku_eval_test.py321CODE
LOWgemma/gm/nn/gemma4/_config.py55CODE
LOWgemma/gm/nn/gemma4/audio/_model.py86CODE
LOWgemma/gm/nn/gemma3n/_config.py54CODE
LOWgemma/gm/ckpts/_checkpoint.py509CODE
LOWgemma/gm/ckpts/_checkpoint.py140CODE
LOWgemma/gm/ckpts/_compat.py112CODE
LOWgemma/gm/text/_chat_sampler.py261CODE
LOWgemma/gm/text/_tokenizer.py203CODE
LOWgemma/gm/text/_tokenizer.py264CODE
LOWgemma/gm/text/_tokenizer.py322CODE
Empty Error Handlers2 hits · 10 pts
SeverityFileLineSnippetContext
HIGH…n/hackable_diffusion_adapter/checkpointed_evaluator.py57except Exception:CODE
HIGH…n/hackable_diffusion_adapter/checkpointed_evaluator.py64except Exception:CODE
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMgemma/diffusion/_sampler.py833 # Combine: attend to context window OR canvas self-attention.COMMENT
MEDIUMexamples/classification.py118 # information, so even zero-shot prediction without anyCOMMENT
Verbosity Indicators3 hits · 6 pts
SeverityFileLineSnippetContext
LOWgemma/gm/nn/gemma4/vision/_images.py32 # Step 1: Calculate the target dimensions preserving aspect ratioCOMMENT
LOW⚡gemma/gm/nn/gemma4/vision/_images.py44 # Step 2: Normalize image pixels to [0, 1] rangeCOMMENT
LOW⚡gemma/gm/nn/gemma4/vision/_images.py47 # Step 3: Resize the image to the target dimensions using bicubicCOMMENT
Structural Annotation Overuse3 hits · 6 pts
SeverityFileLineSnippetContext
LOWgemma/gm/nn/gemma4/vision/_images.py32 # Step 1: Calculate the target dimensions preserving aspect ratioCOMMENT
LOW⚡gemma/gm/nn/gemma4/vision/_images.py44 # Step 2: Normalize image pixels to [0, 1] rangeCOMMENT
LOW⚡gemma/gm/nn/gemma4/vision/_images.py47 # Step 3: Resize the image to the target dimensions using bicubicCOMMENT
Fake / Example Data3 hits · 4 pts
SeverityFileLineSnippetContext
LOW⚡gemma/gm/nn/vision/_vision.py99 dummy_data = jnp.copy(input_data)CODE
LOW⚡gemma/gm/nn/vision/_vision.py101 dummy_data = dummy_data.at[jnp.arange(len(dummy_data)), position_offset].set(CODE
LOW⚡gemma/gm/nn/vision/_vision.py105 dummy_data[jnp.arange(len(input_data)), start_positions + position_offset]CODE
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMgemma/gm/nn/gemma4/audio/_modules.py940 # This function is a streamlined re-implementation of tf.signal.frame withCOMMENT
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippetContext
LOW…n/hackable_diffusion_adapter/checkpointed_evaluator.py57except Exception:CODE
LOW…n/hackable_diffusion_adapter/checkpointed_evaluator.py64except Exception:CODE