Instructions to use josephmayo/gemma-4-E4B-it-coding-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use josephmayo/gemma-4-E4B-it-coding-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-E4B-it") model = PeftModel.from_pretrained(base_model, "josephmayo/gemma-4-E4B-it-coding-lora") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,51 +1,40 @@
|
|
| 1 |
-
---
|
| 2 |
-
base_model: google/gemma-4-E4B-it
|
| 3 |
-
library_name: peft
|
| 4 |
-
license: apache-2.0
|
| 5 |
-
tags:
|
| 6 |
-
- gemma4
|
| 7 |
-
- coding
|
| 8 |
-
- qlora
|
| 9 |
-
- kaggle-proof
|
| 10 |
-
---
|
| 11 |
-
|
| 12 |
-
# Gemma 4 E4B IT Coding LoRA
|
| 13 |
-
|
| 14 |
-
QLoRA adapter for `google/gemma-4-E4B-it`, trained on filtered benign coding instructions.
|
| 15 |
-
|
| 16 |
-
## Training
|
| 17 |
-
|
| 18 |
-
- Runtime: Kaggle 2x Tesla T4
|
| 19 |
-
- Data: filtered benign coding instruction data
|
| 20 |
-
- Safe rows used: 1024
|
| 21 |
-
- Steps: 200
|
| 22 |
-
- LoRA: r=16, alpha=32, target_modules=`all-linear`
|
| 23 |
-
- Trainable parameters: 50,499,584
|
| 24 |
-
- Final train loss: 1.1427
|
| 25 |
-
|
| 26 |
-
## Proof
|
| 27 |
-
|
| 28 |
-
- HumanEval subset
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
`eval_before_after.csv`
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
Artifacts included:
|
| 42 |
-
|
| 43 |
-
- `eval_before_after.csv`
|
| 44 |
-
- `executable_eval.json`
|
| 45 |
-
- `trainer_log_history.json`
|
| 46 |
-
- `summary.json`
|
| 47 |
-
- `proof_summary.json`
|
| 48 |
-
- `nvidia_smi.txt`
|
| 49 |
-
- `evaluation_scope.json`
|
| 50 |
-
|
| 51 |
-
This adapter is for benign coding assistance only. It was not trained on malware, phishing, exploit, credential theft, evasion, or destructive automation examples.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-4-E4B-it
|
| 3 |
+
library_name: peft
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- gemma4
|
| 7 |
+
- coding
|
| 8 |
+
- qlora
|
| 9 |
+
- kaggle-proof
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Gemma 4 E4B IT Coding LoRA
|
| 13 |
+
|
| 14 |
+
QLoRA adapter for `google/gemma-4-E4B-it`, trained on filtered benign coding instructions.
|
| 15 |
+
|
| 16 |
+
## Training
|
| 17 |
+
|
| 18 |
+
- Runtime: Kaggle 2x Tesla T4
|
| 19 |
+
- Data: filtered benign coding instruction data
|
| 20 |
+
- Safe rows used: 1024
|
| 21 |
+
- Steps: 200
|
| 22 |
+
- LoRA: r=16, alpha=32, target_modules=`all-linear`
|
| 23 |
+
- Trainable parameters: 50,499,584
|
| 24 |
+
- Final train loss: 1.1427
|
| 25 |
+
|
| 26 |
+
## 50-Problem HumanEval Proof
|
| 27 |
+
|
| 28 |
+
This adapter was merged into `josephmayo/gemma-4-E4B-it-Coder` and evaluated on Kaggle with 2x Tesla T4 GPUs using an executable 50-task HumanEval subset. Full generated before/after code is published in `eval50_before_after_full_code.csv`.
|
| 29 |
+
|
| 30 |
+
| Metric | Base `google/gemma-4-E4B-it` | Coder merge |
|
| 31 |
+
|---|---:|---:|
|
| 32 |
+
| Pass count | 34 / 50 | 42 / 50 |
|
| 33 |
+
| Absolute lift | - | +16.0 pp |
|
| 34 |
+
| Relative pass-count lift | - | +23.53% |
|
| 35 |
+
|
| 36 |
+
Proof files included here: `eval50_summary.json`, `eval50_before_after_full_code.csv`, `EVAL50_README.md`, `nvidia_smi.txt`.
|
| 37 |
+
|
| 38 |
+
Earlier 8-task smoke artifacts are still included for reproducibility (`eval_before_after.csv`, `executable_eval.json`, `trainer_log_history.json`, `summary.json`, `proof_summary.json`, `evaluation_scope.json`), but the headline proof is the 50-task executable run above.
|
| 39 |
+
|
| 40 |
+
This adapter is for benign coding assistance only. It was not trained on malware, phishing, exploit, credential theft, evasion, or destructive automation examples.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|