--- license: gemma library_name: peft base_model: google/gemma-4-31b-it-qat-w4a16-ct pipeline_tag: text-generation tags: - gemma - gemma-4 - lora - peft - software-engineering - coding-agent --- # Gemma 4 Developer Agent — LoRA adapters Two PEFT LoRA adapters for [`google/gemma-4-31b-it-qat-w4a16-ct`](https://huggingface.co/google/gemma-4-31b-it-qat-w4a16-ct), trained for the **Google – The Gemma 4 Developer Agent** Kaggle competition (2026). The competition is closed; these weights are published as a research archive. These are the adapter weights excluded from the source repository [kelvinweijun/gemma-4-developer-agent](https://github.com/kelvinweijun/gemma-4-developer-agent) because of GitHub's file-size limit. ## Variants | Folder | Kaggle ref | Public score | Description | |---|---|---:|---| | `v7-verra/` | `59099835` | **0.18** | Compaction-aware LoRA r16; best public result | | `v9-edit/` | `59245737` | 0.13 | Continuation of v7 trained with changed-token NLL; 54/820 tensors changed | v8 (`59193994`, 0.13) reused the v7 adapter and is not duplicated. ## Adapter details - Format: PEFT LoRA - Rank: 16, alpha: 32, dropout: 0.0 - Target modules: `q_proj`, `k_proj`, `v_proj`, `o_proj`, `gate_proj`, `up_proj`, `down_proj` - Task type: causal language modelling - Base model: `google/gemma-4-31b-it-qat-w4a16-ct` (gated; accept the Gemma Terms on Hugging Face) ## Usage ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel base_id = "google/gemma-4-31b-it-qat-w4a16-ct" repo_id = "tensorhydra/gemma-4-developer-agent-adapters" model = AutoModelForCausalLM.from_pretrained(base_id, torch_dtype="auto", device_map="auto") model = PeftModel.from_pretrained(model, repo_id, subfolder="v7-verra") # or "v9-edit" tokenizer = AutoTokenizer.from_pretrained(base_id) ``` Download only one variant: ```bash hf download tensorhydra/gemma-4-developer-agent-adapters --include "v7-verra/*" --local-dir . ``` ## Results caveat The competition's public leaderboard is a noisy draw. An unchanged 31B bundle scored 7–12 of 58 public tasks across 11 reruns, and byte-identical reruns disagreed on 8.7% of paired task comparisons. v7's 0.18 is the best public result; v9's 0.13 is one draw, not evidence that the new adapter is worse. The v9 adapter reduced changed-token negative log-likelihood from 1.254 to 1.066 on eight held-out issues (7/8 improved), but the planned paired repair comparison was not completed before the GPU quota ran out. The repair effect is therefore unmeasured. See the [research findings](https://github.com/kelvinweijun/gemma-4-developer-agent/blob/main/docs/research-findings.md). ## Files and checksums | File | Bytes | SHA-256 | |---|---:|---| | `v7-verra/adapter_model.safetensors` | 489,840,784 | `45a4cd7337099603f701c9f58e8c77dc190e741911f878249598f956d52cc744` | | `v7-verra/adapter_config.json` | 423 | `3973549c06f885d38c0f63bd32f17fc34f4536b3d05841ffc08291cbaaaa8d4d` | | `v9-edit/adapter_model.safetensors` | 489,840,816 | `f0f724ecb32a4fee93ed7af61a6378a810e66fb4dd7040c226e9e4ff6e1e7dfb` | | `v9-edit/adapter_config.json` | 423 | `3973549c06f885d38c0f63bd32f17fc34f4536b3d05841ffc08291cbaaaa8d4d` | The same hashes are in `checksums.sha256`. ## License and attribution These adapters are Model Derivatives of Gemma 4 and are distributed under the [Gemma Terms of Use](https://ai.google.dev/gemma/terms); the [Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy) applies. The base model is gated on Hugging Face. See [`NOTICE.md`](NOTICE.md). The original training code, prompts, configuration and documentation are released under Apache-2.0 in the [source repository](https://github.com/kelvinweijun/gemma-4-developer-agent). No competition task text, repository snapshots, gold patches, hidden tests or per-task transcripts are included. ## Links - Source archive: https://github.com/kelvinweijun/gemma-4-developer-agent - Research findings: https://github.com/kelvinweijun/gemma-4-developer-agent/blob/main/docs/research-findings.md - Submission history: https://github.com/kelvinweijun/gemma-4-developer-agent/blob/main/docs/submission-history.md - Reproducibility: https://github.com/kelvinweijun/gemma-4-developer-agent/blob/main/docs/reproducibility.md