TheOneWhoWill commited on
Commit
dca979c
·
verified ·
1 Parent(s): 024e5aa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -0
README.md CHANGED
@@ -1,3 +1,41 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ base_model: google/gemma-4-12B-it
4
+ library_name: peft
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - base_model:adapter:google/gemma-4-12B-it
8
+ - lora
9
+ - transformers
10
+ - unsloth
11
  ---
12
+
13
+ # Coding Monkey Gemma
14
+
15
+ Many people praise Gemma 4 26B for it's coding capabilities and for good reason. However the model is simply too large to run comfortable without heavy quantization compromises on a consumer GPU and so I turned to the 12B varient only to find that it fails at even basic coding tasks because it doesn't understand how to properly utilize the correct tools from the agent harness. So this model is a fine tune of Gemma 4 12B with reliable tool calling. The results speak for themselves showing a new 83% reliability on exact tool calling which means correct ChatML syntax and parameter placement. This is a huge improvement over the base model which only had a 31% reliability on exact tool calling. I also saw a 13% increase in the number of tool calls actually emitted by the model which means that the model is more likely to actually use the tools it has access to which is huge for coding tasks. This model is great for anyone who wants to do local coding but is tight on VRAM.
16
+
17
+ | Metric | Base `-it` | Fine-tuned | Δ |
18
+ | --- | ---: | ---: | ---: |
19
+ | Format Validity | 0.851 | 0.985 | **+0.134** |
20
+ | Relaxed Accuracy | 0.328 | 0.836 | **+0.508** |
21
+ | Exact Accuracy | 0.313 | 0.836 | **+0.522** |
22
+ | Emitted Calls Fraction | 0.851 | 0.985 | **+0.134** |
23
+
24
+ ## Training Details
25
+ For the training of this model I used the QLoRA method with a 16GB 5070 Ti. It 2 hours and 44 minutes to complete however previous protyping totaled 30 hours aggregate. The training loss went from 1.585 to 0.264 and the held-out eval loss was 0.225. I could've trained for much longer but I ran into overfitting issues on previous attempts so I decided that training on a small concentrated dataset was the best option. The training dataset consisted of 4,345 high-quality agentic/tool-calling examples, every one formatted with Gemma 4's own chat template. The glaiveai was the bulk of the data but I also included AgentInstruct examples because they had real world bash and terminal actions. I split it 98/2 into 4,259 train / 86 held-out val, and the eval set was built only from the val split so none of the 67 scored prompts were ever seen during training preventing contamination.
26
+
27
+ The breakdown by source:
28
+
29
+ | Source | Examples |
30
+ | --- | ---: |
31
+ | `glaiveai/glaive-function-calling-v2` (multi-turn, OpenAI-format) | 3,347 |
32
+ | `zai-org/AgentInstruct` — alfworld | 336 |
33
+ | `zai-org/AgentInstruct` — webshop | 351 |
34
+ | `zai-org/AgentInstruct` — os | 195 |
35
+ | `zai-org/AgentInstruct` — mind2web | 116 |
36
+ | **Total** | **4,345** |
37
+
38
+ That's ~3,432 actual tool-calling examples trained over 3 epochs with QLoRA `r=16/alpha=32`, LR 2e-4 cosine, and an effective batch size of 32.
39
+
40
+ ## Quantization
41
+ This model has fp16, Q8_0, Q6_K, Q5_K_M, and Q4_K_M quantization available in the gguf format. You can find them in this [repository](https://huggingface.co/TheOneWhoWill/Coding-Monkey-Gemma-GGUF)