Gemma open-weight LLM library, from Google DeepMind
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 487 finding(s).
Are imports declared and package/API names verified? 189 finding(s).
Are wrappers, guards, and repeated structures necessary? 328 finding(s).
Which changes need focused human review? 760 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | gemma/research/t5gemma/modules.py | 0 | returns the scalar to multiply the query by before attention. | STRING |
| HIGH | gemma/gm/nn/_config.py | 0 | returns the scalar to multiply the query by before attention. | STRING |
| HIGH | gemma/gm/nn/gemma3n/_config.py | 0 | returns the scalar to multiply the query by before attention. | STRING |
| HIGH | gemma/gm/nn/_lora.py | 0 | kauldron keys when calling `kontext.get_from_keys_obj`. | STRING |
| HIGH | gemma/gm/nn/_policy.py | 0 | kauldron keys when calling `kontext.get_from_keys_obj`. | STRING |
| HIGH | gemma/gm/nn/_quantization.py | 0 | kauldron keys when calling `kontext.get_from_keys_obj`. | STRING |
| HIGH | gemma/gm/nn/_layers.py | 0 | einsum is a convenience module for parameterized tensor multiplication. | STRING |
| HIGH | gemma/gm/nn/gemma4/_layers.py | 0 | einsum is a convenience module for parameterized tensor multiplication. | STRING |
| HIGH | gemma/gm/nn/gemma3n/_layers.py | 0 | einsum is a convenience module for parameterized tensor multiplication. | STRING |
| HIGH | gemma/gm/nn/_transformer_like.py | 0 | output of the gemma model. attributes: logits: predicted logits of the model. cache: updated cache if the input cache is | STRING |
| HIGH | gemma/gm/nn/_transformer.py | 0 | output of the gemma model. attributes: logits: predicted logits of the model. cache: updated cache if the input cache is | STRING |
| HIGH | gemma/gm/nn/gemma4/_transformer.py | 0 | output of the gemma model. attributes: logits: predicted logits of the model. cache: updated cache if the input cache is | STRING |
| HIGH | gemma/gm/nn/gemma3n/_transformer.py | 0 | output of the gemma model. attributes: logits: predicted logits of the model. cache: updated cache if the input cache is | STRING |
| HIGH | gemma/gm/nn/_transformer_like.py | 0 | model information. used to auto-load the model tokenizer and params. | STRING |
| HIGH | gemma/gm/nn/_transformer.py | 0 | model information. used to auto-load the model tokenizer and params. | STRING |
| HIGH | gemma/gm/nn/gemma4/_transformer.py | 0 | model information. used to auto-load the model tokenizer and params. | STRING |
| HIGH | gemma/gm/nn/gemma3n/_transformer.py | 0 | model information. used to auto-load the model tokenizer and params. | STRING |
| HIGH | gemma/gm/nn/_transformer.py | 0 | gemma3n transformer class. attributes: return_last_only: if `true`, only compute and return the last token. otherwise, r | STRING |
| HIGH | gemma/gm/nn/gemma4/_transformer.py | 0 | gemma3n transformer class. attributes: return_last_only: if `true`, only compute and return the last token. otherwise, r | STRING |
| HIGH | gemma/gm/nn/gemma3n/_transformer.py | 0 | gemma3n transformer class. attributes: return_last_only: if `true`, only compute and return the last token. otherwise, r | STRING |
| HIGH | gemma/gm/nn/_transformer.py | 0 | encode the text tokens, eventually including the vision embeddings. | STRING |
| HIGH | gemma/gm/nn/gemma4/_transformer.py | 0 | encode the text tokens, eventually including the vision embeddings. | STRING |
| HIGH | gemma/gm/nn/gemma3n/_transformer.py | 0 | encode the text tokens, eventually including the vision embeddings. | STRING |
| HIGH | gemma/gm/nn/_transformer.py | 0 | update the embeddings to include the vision embeddings. | STRING |
| HIGH | gemma/gm/nn/gemma4/_transformer.py | 0 | update the embeddings to include the vision embeddings. | STRING |
| HIGH | gemma/gm/nn/gemma3n/_transformer.py | 0 | update the embeddings to include the vision embeddings. | STRING |
| HIGH | gemma/gm/nn/_transformer.py | 0 | encode images into the same space as the text embeddings. | STRING |
| HIGH | gemma/gm/nn/gemma3n/_transformer.py | 0 | encode images into the same space as the text embeddings. | STRING |
| HIGH | gemma/gm/nn/gemma4/_transformer.py | 0 | encode images into the same space as the text embeddings. | STRING |
| HIGH | gemma/gm/nn/_transformer.py | 0 | merge `return_last_only` from the config and input. | STRING |
| HIGH | gemma/gm/nn/gemma4/_transformer.py | 0 | merge `return_last_only` from the config and input. | STRING |
| HIGH | gemma/gm/nn/gemma3n/_transformer.py | 0 | merge `return_last_only` from the config and input. | STRING |
| HIGH | gemma/gm/nn/_config.py | 0 | returns the list of attention types for every layers. | STRING |
| HIGH | gemma/gm/nn/gemma4/_config.py | 0 | returns the list of attention types for every layers. | STRING |
| HIGH | gemma/gm/nn/gemma3n/_config.py | 0 | returns the list of attention types for every layers. | STRING |
| HIGH | gemma/gm/nn/_modules.py | 0 | encodes the input tokens. args: x: input shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. t: input tokens | STRING |
| HIGH | gemma/gm/nn/gemma4/_modules.py | 0 | encodes the input tokens. args: x: input shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. t: input tokens | STRING |
| HIGH | gemma/gm/nn/gemma3n/_modules.py | 0 | encodes the input tokens. args: x: input shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. t: input tokens | STRING |
| HIGH | gemma/gm/nn/_modules.py | 0 | decodes the input vectors. args: x: array of shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. returns: ar | STRING |
| HIGH | gemma/gm/nn/gemma4/_modules.py | 0 | decodes the input vectors. args: x: array of shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. returns: ar | STRING |
| HIGH | gemma/gm/nn/gemma3n/_modules.py | 0 | decodes the input vectors. args: x: array of shape [seq_len, embed_dim] or [batch_size, seq_len, embed_dim]. returns: ar | STRING |
| HIGH | gemma/gm/nn/_modules.py | 0 | applies multi-head attention to the inputs. args: x: input sequence of shape [batch_size, seq_len, embed_dim]. segment_p | STRING |
| HIGH | gemma/gm/nn/gemma4/_modules.py | 0 | applies multi-head attention to the inputs. args: x: input sequence of shape [batch_size, seq_len, embed_dim]. segment_p | STRING |
| HIGH | gemma/gm/nn/gemma3n/_modules.py | 0 | applies multi-head attention to the inputs. args: x: input sequence of shape [batch_size, seq_len, embed_dim]. segment_p | STRING |
| HIGH | gemma/gm/nn/_modules.py | 0 | applies the feed forward module. args: x: input sequence of shape [batch_size, seq_len, features]. returns: output seque | STRING |
| HIGH | gemma/gm/nn/gemma4/_modules.py | 0 | applies the feed forward module. args: x: input sequence of shape [batch_size, seq_len, features]. returns: output seque | STRING |
| HIGH | gemma/gm/nn/gemma4/vision/_modules.py | 0 | applies the feed forward module. args: x: input sequence of shape [batch_size, seq_len, features]. returns: output seque | STRING |
| HIGH | gemma/gm/nn/gemma3n/_modules.py | 0 | applies the feed forward module. args: x: input sequence of shape [batch_size, seq_len, features]. returns: output seque | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gemma/research/t5gemma/config.py | 273 | def get_checkpoint_from_kaggle( | CODE |
| LOW | gemma/research/t5gemma/t5gemma.py | 95 | def compute_encoder_activations( | CODE |
| LOW | gemma/research/t5gemma/t5gemma.py | 110 | def compute_decoder_activations( | CODE |
| LOW | gemma/research/t5gemma/t5gemma.py | 212 | def make_bidirectional_attn_mask( | CODE |
| LOW | gemma/research/t5gemma/t5gemma.py | 220 | def build_positions_from_mask( | CODE |
| LOW | gemma/research/t5gemma/sampling.py | 298 | def _normalized_forbidden_tokens(self) -> tuple[int, ...] | None: | CODE |
| LOW | gemma/research/t5gemma/sampling.py | 553 | def _mask_tokens_after_end_tokens( | CODE |
| LOW | gemma/diffusion/_models_test.py | 26 | def test_can_instantiate_from_default_config(self): | CODE |
| LOW | gemma/diffusion/_models_test.py | 31 | def test_multiple_token_generation(self): | CODE |
| LOW | gemma/diffusion/_chat_sampler_test.py | 47 | def test_chat_sampler_instantiation(self): | CODE |
| LOW | gemma/diffusion/_chat_sampler_test.py | 98 | def test_chat_sampler_instantiation_overrides(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 265 | def test_sample_from_predictions_final_step(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 366 | def test_sample_next_canvas_unpadded_positions(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 457 | def test_append_tokens_to_cache(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 535 | def test_make_global_attention_no_cache(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 549 | def test_make_global_attention_mask_batched_edge_cases(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 631 | def test_make_global_attention_mask_with_full_attention_mask(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 685 | def test_make_causal_attention_mask_no_cache(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 702 | def test_make_causal_attention_mask_batched_edge_cases(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 789 | def test_diffusion_sample_step_runs(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 998 | def tracking_sample_next_canvas(*args, **kwargs): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 1024 | def test_sample_next_canvas_while_loop_matches_for_loop(self, use_cache): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 1109 | def test_early_stopping_terminates_after_one_step(self): | CODE |
| LOW | gemma/diffusion/_sampler_test.py | 1199 | def test_token_stability_early_stop(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 57 | def test_stops_when_argmax_matches_previous(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 70 | def test_does_not_stop_when_argmax_differs(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 83 | def test_partial_mismatch_does_not_stop(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 96 | def test_per_batch_independence(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 113 | def test_stops_below_threshold(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 125 | def test_does_not_stop_above_threshold(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 137 | def test_exact_threshold_stops(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 154 | def test_handles_zero_probability(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 166 | def test_per_batch_independence(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 185 | def test_requires_all_to_agree(self): | CODE |
| LOW | gemma/diffusion/_early_stopping_test.py | 204 | def test_stops_when_all_agree(self): | CODE |
| LOW | gemma/diffusion/_transformer.py | 86 | def call_with_self_conditioning( | CODE |
| LOW | gemma/diffusion/_sampler.py | 49 | def derivative_noise_probability(self, noise_proportion: Float) -> Float: # pyrefly: ignore[not-a-type] | CODE |
| LOW | gemma/diffusion/_sampler.py | 295 | def _truncate_canvas_at_stop_tokens( | CODE |
| LOW | gemma/diffusion/_sampler.py | 665 | def _make_global_attention_mask( | CODE |
| LOW | gemma/diffusion/_sampler.py | 711 | def _make_causal_attention_mask( | CODE |
| LOW | gemma/diffusion/_sampler.py | 771 | def _make_block_local_attention_mask( | CODE |
| LOW | …able_diffusion_adapter/hd/hd_gemma_ar_state_handler.py | 403 | def create_conditioning_from_state( | CODE |
| LOW | …able_diffusion_adapter/hd/hd_gemma_ar_state_handler.py | 432 | def truncate_canvas_at_stop_tokens( | CODE |
| LOW | …iffusion/hackable_diffusion_adapter/hd/mask_helpers.py | 69 | def build_positions_from_mask(mask: Int['*B L']) -> Int['*B L']: | CODE |
| LOW | …iffusion/hackable_diffusion_adapter/hd/mask_helpers.py | 183 | def make_causal_attention_mask_right_pad( | CODE |
| LOW | …iffusion/hackable_diffusion_adapter/hd/mask_helpers.py | 247 | def create_decoder_attention_mask( | CODE |
| LOW | …sion/hackable_diffusion_adapter/hd/hd_gemma_network.py | 52 | def prefill_kv_cache_with_encoder( | CODE |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 256 | def _init_and_run_sft_diffusion( | CODE |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 504 | def test_denoiser_sensitivity_to_prompt(self): | CODE |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 564 | def _make_inference_fn_and_conditioning(self, prompt_len=6, canvas_size=4): | CODE |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 718 | def test_inference_fn_produces_logits(self): | CODE |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 731 | def test_inference_fn_matches_bound_path(self): | CODE |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 776 | def test_inference_fn_sc_logits_squeeze(self): | CODE |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 799 | def test_inference_fn_sensitive_to_cache(self): | CODE |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 994 | def test_encoder_logits_gradient_flows_to_params(self): | CODE |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 1069 | def test_decoder_logits_gradient_flows_to_params(self): | CODE |
| LOW | …ckable_diffusion_adapter/hd/gemma_checkpointer_test.py | 45 | def test_remap_strips_w_when_model_has_no_w(self): | CODE |
| LOW | …ckable_diffusion_adapter/hd/gemma_checkpointer_test.py | 101 | def test_exact_match_no_remapping(self): | CODE |
| LOW | …ckable_diffusion_adapter/hd/gemma_checkpointer_test.py | 116 | def test_checkpoint_only_keys_discarded(self): | CODE |
| LOW | …ckable_diffusion_adapter/hd/gemma_checkpointer_test.py | 166 | def test_non_lora_model_only_keys_raise(self): | CODE |
| 165 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gemma/__init__.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/research/t5gemma/config.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/research/t5gemma/t5gemma.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/research/t5gemma/__init__.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/research/t5gemma/sampling.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/research/t5gemma/modules.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_models_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_chat_sampler_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_sampler_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_paths.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_early_stopping_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_chat_sampler.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/__init__.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_transformer.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_models.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_sampler.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/_early_stopping.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/hackable_diffusion_adapter/eval_main.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …n/hackable_diffusion_adapter/checkpointed_evaluator.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …ma/diffusion/hackable_diffusion_adapter/safe_writer.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …able_diffusion_adapter/hd/hd_gemma_ar_state_handler.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …a/diffusion/hackable_diffusion_adapter/hd/sft_model.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …a/diffusion/hackable_diffusion_adapter/hd/sft_model.py | 301 | """ | COMMENT |
| LOW | …iffusion/hackable_diffusion_adapter/hd/mask_helpers.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …sion/hackable_diffusion_adapter/hd/hd_gemma_network.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …fusion/hackable_diffusion_adapter/hd/sft_model_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …ckable_diffusion_adapter/hd/gemma_checkpointer_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …diffusion_adapter/hd/hd_gemma_ar_state_handler_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …on/hackable_diffusion_adapter/hd/gemma_checkpointer.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …on/hackable_diffusion_adapter/hd/gemma_checkpointer.py | 81 | """ | COMMENT |
| LOW | …ion/hackable_diffusion_adapter/hd/mask_helpers_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …a/diffusion/hackable_diffusion_adapter/hd/lora_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …ion/hackable_diffusion_adapter/configs/sft_pubmedqa.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …usion/hackable_diffusion_adapter/configs/sft_sudoku.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …/hackable_diffusion_adapter/configs/sft_sudoku_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …ackable_diffusion_adapter/configs/sft_pubmedqa_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …/hackable_diffusion_adapter/configs/sft_sudoku_full.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …ffusion/hackable_diffusion_adapter/eval/sudoku_eval.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …on/hackable_diffusion_adapter/eval/base_metric_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …usion/hackable_diffusion_adapter/eval/pubmedqa_eval.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …/hackable_diffusion_adapter/eval/pubmedqa_eval_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …ffusion/hackable_diffusion_adapter/eval/base_metric.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …ffusion/hackable_diffusion_adapter/eval/text_metric.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …on/hackable_diffusion_adapter/eval/text_metric_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …a/diffusion/hackable_diffusion_adapter/eval/ar_eval.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …diffusion/hackable_diffusion_adapter/data/data_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/diffusion/hackable_diffusion_adapter/data/data.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …/hackable_diffusion_adapter/data/sudoku/sudoku_data.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …ckable_diffusion_adapter/data/sudoku/convert_sudoku.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …able_diffusion_adapter/data/sudoku/sudoku_data_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …kable_diffusion_adapter/data/pubmedqa/pubmedqa_data.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …_diffusion_adapter/data/pubmedqa/pubmedqa_data_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | …le_diffusion_adapter/data/pubmedqa/convert_pubmedqa.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/peft/_interceptors_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/peft/_lora.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/peft/_quantization_test.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/peft/_quantization_utils.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| LOW | gemma/peft/__init__.py | 1 | # Copyright 2026 DeepMind Technologies Limited. | COMMENT |
| 139 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gemma/research/t5gemma/__init__.py | 23 | CODE | |
| LOW | gemma/research/t5gemma/__init__.py | 24 | CODE | |
| LOW | gemma/research/t5gemma/__init__.py | 25 | CODE | |
| LOW | gemma/research/t5gemma/__init__.py | 28 | CODE | |
| LOW | gemma/research/t5gemma/__init__.py | 29 | CODE | |
| LOW | gemma/research/t5gemma/__init__.py | 30 | CODE | |
| LOW | gemma/research/t5gemma/__init__.py | 31 | CODE | |
| LOW | gemma/research/t5gemma/__init__.py | 34 | CODE | |
| LOW | gemma/diffusion/__init__.py | 24 | CODE | |
| LOW | gemma/diffusion/__init__.py | 27 | CODE | |
| LOW | gemma/diffusion/__init__.py | 30 | CODE | |
| LOW | gemma/diffusion/__init__.py | 31 | CODE | |
| LOW | gemma/diffusion/__init__.py | 34 | CODE | |
| LOW | gemma/diffusion/__init__.py | 35 | CODE | |
| LOW | gemma/diffusion/__init__.py | 36 | CODE | |
| LOW | gemma/diffusion/__init__.py | 39 | CODE | |
| LOW | gemma/diffusion/__init__.py | 40 | CODE | |
| LOW | gemma/diffusion/__init__.py | 43 | CODE | |
| LOW | gemma/diffusion/__init__.py | 44 | CODE | |
| LOW | gemma/diffusion/__init__.py | 45 | CODE | |
| LOW | gemma/diffusion/__init__.py | 48 | CODE | |
| LOW | gemma/diffusion/__init__.py | 49 | CODE | |
| LOW | gemma/diffusion/__init__.py | 50 | CODE | |
| LOW | gemma/diffusion/__init__.py | 51 | CODE | |
| LOW | gemma/diffusion/__init__.py | 52 | CODE | |
| LOW | gemma/diffusion/hackable_diffusion_adapter/eval_main.py | 21 | CODE | |
| LOW | …n/hackable_diffusion_adapter/checkpointed_evaluator.py | 21 | CODE | |
| LOW | …sion/hackable_diffusion_adapter/hd/hd_gemma_network.py | 25 | CODE | |
| LOW | …ffusion/hackable_diffusion_adapter/eval/sudoku_eval.py | 17 | CODE | |
| LOW | …usion/hackable_diffusion_adapter/eval/pubmedqa_eval.py | 17 | CODE | |
| LOW | …ffusion/hackable_diffusion_adapter/eval/base_metric.py | 17 | CODE | |
| LOW | …ffusion/hackable_diffusion_adapter/eval/text_metric.py | 17 | CODE | |
| LOW | gemma/diffusion/hackable_diffusion_adapter/data/data.py | 17 | CODE | |
| LOW | …kable_diffusion_adapter/data/pubmedqa/pubmedqa_data.py | 17 | CODE | |
| LOW | gemma/peft/_quantization_test.py | 22 | CODE | |
| LOW | gemma/peft/__init__.py | 20 | CODE | |
| LOW | gemma/peft/__init__.py | 21 | CODE | |
| LOW | gemma/peft/__init__.py | 24 | CODE | |
| LOW | gemma/peft/__init__.py | 25 | CODE | |
| LOW | gemma/peft/__init__.py | 26 | CODE | |
| LOW | gemma/peft/__init__.py | 27 | CODE | |
| LOW | gemma/peft/__init__.py | 28 | CODE | |
| LOW | gemma/peft/__init__.py | 29 | CODE | |
| LOW | gemma/peft/__init__.py | 30 | CODE | |
| LOW | gemma/peft/__init__.py | 31 | CODE | |
| LOW | gemma/peft/__init__.py | 32 | CODE | |
| LOW | gemma/peft/__init__.py | 33 | CODE | |
| LOW | gemma/peft/__init__.py | 36 | CODE | |
| LOW | gemma/peft/__init__.py | 37 | CODE | |
| LOW | gemma/peft/__init__.py | 38 | CODE | |
| LOW | gemma/peft/__init__.py | 39 | CODE | |
| LOW | gemma/peft/__init__.py | 40 | CODE | |
| LOW | gemma/peft/__init__.py | 41 | CODE | |
| LOW | gemma/peft/__init__.py | 42 | CODE | |
| LOW | gemma/peft/__init__.py | 43 | CODE | |
| LOW | gemma/peft/_tree_utils.py | 17 | CODE | |
| LOW | gemma/peft/_interceptors.py | 17 | CODE | |
| LOW | gemma/gm/__init__.py | 23 | CODE | |
| LOW | gemma/gm/__init__.py | 24 | CODE | |
| LOW | gemma/gm/__init__.py | 25 | CODE | |
| 126 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 57 | # ── 1. All linear layers (default) ────────────────────────────────── | COMMENT |
| MEDIUM⚡ | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 66 | # ── 2. Attention-only LoRA ────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 76 | # ── 3. MLP-only LoRA ─────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 86 | # ── 4. Attention + MLP (everything inside transformer blocks) ────── | COMMENT |
| MEDIUM⚡ | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 94 | # ── 5. Specific layers only ──────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 108 | # ── 6. Combining layer and module filters ────────────────────────── | COMMENT |
| MEDIUM⚡ | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 116 | # ── 7. Query/Value only (classic LoRA recipe) ────────────────────── | COMMENT |
| MEDIUM⚡ | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 123 | # ── 8. Router projections only (MoE layers) ─────────────────────── | COMMENT |
| MEDIUM⚡ | …a/diffusion/hackable_diffusion_adapter/hd/lora_test.py | 519 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …a/diffusion/hackable_diffusion_adapter/hd/lora_test.py | 521 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …a/diffusion/hackable_diffusion_adapter/hd/lora_test.py | 31 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …a/diffusion/hackable_diffusion_adapter/hd/lora_test.py | 33 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …a/diffusion/hackable_diffusion_adapter/hd/lora_test.py | 448 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …a/diffusion/hackable_diffusion_adapter/hd/lora_test.py | 450 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 64 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 66 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 132 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 134 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 155 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 157 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 199 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 201 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 242 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 244 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 23 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 25 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 292 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 294 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 309 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 311 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | gemma/gm/nn/_lora_test.py | 107 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | gemma/gm/nn/_lora_test.py | 109 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …diffusion_adapter/hd/hd_gemma_ar_state_handler_test.py | 762 | # Create a mock Kauldron context | COMMENT |
| MEDIUM | …able_diffusion_adapter/data/sudoku/sudoku_data_test.py | 26 | # Create a serialized tf.train.Example | COMMENT |
| MEDIUM | …_diffusion_adapter/data/pubmedqa/pubmedqa_data_test.py | 25 | # Create a temporary JSONL file | COMMENT |
| MEDIUM | gemma/peft/_interceptors_test.py | 36 | # Create an extra param. | COMMENT |
| MEDIUM | gemma/gm/nn/gemma4/vision/_images.py | 66 | # Create a mask of all invalid positions by finding the zero values | COMMENT |
| MEDIUM | gemma/gm/nn/gemma4/audio/_modules.py | 940 | # This function is a streamlined re-implementation of tf.signal.frame with | COMMENT |
| MEDIUM | gemma/gm/utils/_file_cache_test.py | 45 | # Create the cache directory and write a file in it. | COMMENT |
| MEDIUM | gemma/gm/data/_tasks.py | 162 | # Create the model inputs/targets/loss_mask. | COMMENT |
| MEDIUM | gemma/gm/data/_functional.py | 140 | # Create the loss mask. | COMMENT |
| MEDIUM | examples/sharding.py | 115 | # Create the model inputs/targets/loss_mask. | STRING |
| MEDIUM | examples/multimodal.py | 141 | # Create a new constant field | STRING |
| MEDIUM | examples/multimodal.py | 143 | # Create the model inputs/targets/loss_mask. | STRING |
| MEDIUM | examples/npo.py | 117 | # Create the model inputs/targets/mask. | COMMENT |
| MEDIUM | examples/lora.py | 136 | # Create the model inputs/targets/loss_mask. | STRING |
| MEDIUM | examples/dpo.py | 107 | # Create the model inputs and loss mask. | COMMENT |
| MEDIUM | examples/seq2seq.py | 129 | # Create the model inputs/targets/loss_mask. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …iffusion/hackable_diffusion_adapter/hd/mask_helpers.py | 95 | Creates a causal attention mask for right-padded prefill. Builds a lower-triangular causal mask, multiplied by ``toke | STRING |
| HIGH | …on/hackable_diffusion_adapter/hd/gemma_checkpointer.py | 57 | Remaps checkpoint keys and merges them into the model param dict. This is the core logic of checkpoint-to-model param | STRING |
| HIGH | gemma/diffusion/hackable_diffusion_adapter/hd/lora.py | 335 | Fuse LoRA weights into base weights, returning a base-only param tree. Takes a param tree that contains both base wei | STRING |
| HIGH | gemma/gm/utils/_attention_mask.py | 29 | Make the attention mask for the transformer. Gemma transformer attention mask is a little complicated, as the text | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gemma/diffusion/_transformer.py | 78 | CODE | |
| LOW | …able_diffusion_adapter/hd/hd_gemma_ar_state_handler.py | 143 | CODE | |
| LOW | …diffusion_adapter/hd/hd_gemma_ar_state_handler_test.py | 93 | CODE | |
| LOW | gemma/gm/nn/gemma4/_moe.py | 214 | CODE | |
| LOW | gemma/gm/nn/gemma4/_moe.py | 242 | CODE | |
| LOW | gemma/gm/nn/gemma4/_moe.py | 379 | CODE | |
| LOW | gemma/gm/nn/gemma4/_moe.py | 407 | CODE | |
| LOW | gemma/gm/nn/gemma4/_transformer.py | 235 | CODE | |
| LOW | gemma/gm/nn/gemma4/vision/_modules.py | 210 | CODE | |
| LOW | gemma/gm/nn/gemma4/audio/_modules.py | 204 | CODE | |
| LOW | gemma/gm/utils/_jax_utils.py | 104 | CODE | |
| LOW | gemma/gm/text/_gemma4_sampler.py | 98 | CODE | |
| LOW | gemma/gm/text/_chat_sampler.py | 479 | CODE | |
| LOW | gemma/gm/text/_chat_sampler.py | 261 | CODE | |
| LOW | gemma/gm/text/_tool_sampler.py | 54 | CODE | |
| LOW | gemma/gm/text/_sampler.py | 169 | CODE | |
| LOW | gemma/gm/text/_sampler.py | 186 | CODE | |
| LOW | gemma/gm/text/_sampler.py | 204 | CODE | |
| LOW | gemma/gm/text/_sampler.py | 238 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gemma/research/t5gemma/modules.py | 631 | CODE | |
| LOW | …ffusion/hackable_diffusion_adapter/eval/sudoku_eval.py | 69 | CODE | |
| LOW | …ffusion/hackable_diffusion_adapter/eval/sudoku_eval.py | 351 | CODE | |
| LOW | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 317 | CODE | |
| LOW | …on/hackable_diffusion_adapter/eval/sudoku_eval_test.py | 321 | CODE | |
| LOW | gemma/gm/nn/gemma4/_config.py | 55 | CODE | |
| LOW | gemma/gm/nn/gemma4/audio/_model.py | 86 | CODE | |
| LOW | gemma/gm/nn/gemma3n/_config.py | 54 | CODE | |
| LOW | gemma/gm/ckpts/_checkpoint.py | 509 | CODE | |
| LOW | gemma/gm/ckpts/_checkpoint.py | 140 | CODE | |
| LOW | gemma/gm/ckpts/_compat.py | 112 | CODE | |
| LOW | gemma/gm/text/_chat_sampler.py | 261 | CODE | |
| LOW | gemma/gm/text/_tokenizer.py | 203 | CODE | |
| LOW | gemma/gm/text/_tokenizer.py | 264 | CODE | |
| LOW | gemma/gm/text/_tokenizer.py | 322 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …n/hackable_diffusion_adapter/checkpointed_evaluator.py | 57 | except Exception: | CODE |
| HIGH | …n/hackable_diffusion_adapter/checkpointed_evaluator.py | 64 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | gemma/diffusion/_sampler.py | 833 | # Combine: attend to context window OR canvas self-attention. | COMMENT |
| MEDIUM | examples/classification.py | 118 | # information, so even zero-shot prediction without any | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gemma/gm/nn/gemma4/vision/_images.py | 32 | # Step 1: Calculate the target dimensions preserving aspect ratio | COMMENT |
| LOW⚡ | gemma/gm/nn/gemma4/vision/_images.py | 44 | # Step 2: Normalize image pixels to [0, 1] range | COMMENT |
| LOW⚡ | gemma/gm/nn/gemma4/vision/_images.py | 47 | # Step 3: Resize the image to the target dimensions using bicubic | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gemma/gm/nn/gemma4/vision/_images.py | 32 | # Step 1: Calculate the target dimensions preserving aspect ratio | COMMENT |
| LOW⚡ | gemma/gm/nn/gemma4/vision/_images.py | 44 | # Step 2: Normalize image pixels to [0, 1] range | COMMENT |
| LOW⚡ | gemma/gm/nn/gemma4/vision/_images.py | 47 | # Step 3: Resize the image to the target dimensions using bicubic | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | gemma/gm/nn/vision/_vision.py | 99 | dummy_data = jnp.copy(input_data) | CODE |
| LOW⚡ | gemma/gm/nn/vision/_vision.py | 101 | dummy_data = dummy_data.at[jnp.arange(len(dummy_data)), position_offset].set( | CODE |
| LOW⚡ | gemma/gm/nn/vision/_vision.py | 105 | dummy_data[jnp.arange(len(input_data)), start_positions + position_offset] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | gemma/gm/nn/gemma4/audio/_modules.py | 940 | # This function is a streamlined re-implementation of tf.signal.frame with | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …n/hackable_diffusion_adapter/checkpointed_evaluator.py | 57 | except Exception: | CODE |
| LOW | …n/hackable_diffusion_adapter/checkpointed_evaluator.py | 64 | except Exception: | CODE |