Text Generation
Transformers
Safetensors
English
gemma4
image-text-to-text
code
code-generation
secure-coding
vulnerability-detection
security
code-review
static-analysis
qlora
unsloth
conversational
Instructions to use Monibee-Fudgekins/gemma-coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Monibee-Fudgekins/gemma-coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Monibee-Fudgekins/gemma-coder") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Monibee-Fudgekins/gemma-coder") model = AutoModelForMultimodalLM.from_pretrained("Monibee-Fudgekins/gemma-coder", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Monibee-Fudgekins/gemma-coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Monibee-Fudgekins/gemma-coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Monibee-Fudgekins/gemma-coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Monibee-Fudgekins/gemma-coder
- SGLang
How to use Monibee-Fudgekins/gemma-coder with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Monibee-Fudgekins/gemma-coder" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Monibee-Fudgekins/gemma-coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Monibee-Fudgekins/gemma-coder" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Monibee-Fudgekins/gemma-coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use Monibee-Fudgekins/gemma-coder with Docker Model Runner:
docker model run hf.co/Monibee-Fudgekins/gemma-coder
Update model card (full run, pass@1 100.00%)
Browse files
README.md
CHANGED
|
@@ -1,21 +1,84 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
-
-
|
| 5 |
-
-
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
| 14 |
|
| 15 |
-
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: gemma
|
| 3 |
+
base_model: google/gemma-4-26B-A4B-it
|
| 4 |
+
datasets:
|
| 5 |
+
- ise-uiuc/Magicoder-OSS-Instruct-75K
|
| 6 |
+
library_name: transformers
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
tags:
|
| 9 |
+
- code
|
| 10 |
+
- coding-assistant
|
| 11 |
+
- qlora
|
| 12 |
+
- unsloth
|
| 13 |
+
model-index:
|
| 14 |
+
- name: gemma-coder
|
| 15 |
+
results:
|
| 16 |
+
- task:
|
| 17 |
+
type: text-generation
|
| 18 |
+
name: Code generation
|
| 19 |
+
dataset:
|
| 20 |
+
type: code-eval
|
| 21 |
+
name: remote-agent-dev-platform coding_eval
|
| 22 |
+
metrics:
|
| 23 |
+
- type: pass@1
|
| 24 |
+
value: 1.0000
|
| 25 |
+
name: pass@1 (Python/JS/React/Go/Java/Swift)
|
| 26 |
---
|
| 27 |
|
| 28 |
+
# gemma-coder
|
| 29 |
|
| 30 |
+
Coding-focused fine-tune of [`google/gemma-4-26B-A4B-it`](https://huggingface.co/google/gemma-4-26B-A4B-it)
|
| 31 |
+
(**Gemma 4 26B A4B**, an MoE with ~4B active params), produced automatically by the
|
| 32 |
+
weekly retrain pipeline in [remote-agent-dev-platform](https://github.com/Monibee-Fudgekins/remote-agent-dev-platform).
|
| 33 |
+
**Last updated: 2026-07-22 16:45 UTC** · run mode: `full` · promoted: **True**.
|
| 34 |
|
| 35 |
+
## Model description
|
| 36 |
+
QLoRA fine-tune of google/gemma-4-26B-A4B-it specialized for coding assistance. It is the
|
| 37 |
+
default agent model for the remote-agent-dev-platform (served via vLLM on Modal).
|
| 38 |
|
| 39 |
+
## Intended uses & limitations
|
| 40 |
+
- **Intended:** code generation and assistance in Python, JavaScript/React, Go, Java,
|
| 41 |
+
and Swift, inside a sandboxed agent that runs/tests the output.
|
| 42 |
+
- **Not intended:** safety-critical use, or running generated code unreviewed.
|
| 43 |
+
- **Limitations:** a small, free-tier-trained model — it can produce incorrect or
|
| 44 |
+
insecure code. Always review and test. Quality tracks the training data, which is
|
| 45 |
+
still being built out.
|
| 46 |
+
|
| 47 |
+
## Training data
|
| 48 |
+
- Dataset: [`ise-uiuc/Magicoder-OSS-Instruct-75K`](https://huggingface.co/datasets/ise-uiuc/Magicoder-OSS-Instruct-75K)
|
| 49 |
+
|
| 50 |
+
## Training procedure
|
| 51 |
+
- Method: QLoRA (Unsloth), 4-bit base, LoRA r=8 / alpha=16 on
|
| 52 |
+
attention only, lr 2e-05,
|
| 53 |
+
max seq len 768, optimizer adamw_8bit.
|
| 54 |
+
- Progress: **cycle 1 — 2047 / 4000 steps** (trained
|
| 55 |
+
in weekly ~8h chunks on Kaggle's free 2×T4, resuming each week; training is
|
| 56 |
+
continuous — a finished cycle rolls into the next).
|
| 57 |
+
|
| 58 |
+
## Evaluation
|
| 59 |
+
Sandboxed multi-language **pass@1** harness (`finetune/evaluate.py`): the model
|
| 60 |
+
completes functions that are then compiled/run against unit tests. Languages whose
|
| 61 |
+
toolchain is unavailable are skipped.
|
| 62 |
+
|
| 63 |
+
**Overall pass@1: 100.00%** over 11 executed problems
|
| 64 |
+
(0 skipped). Promotion threshold: 80%.
|
| 65 |
+
|
| 66 |
+
| language | passed / run | pass@1 |
|
| 67 |
+
|---|---|---|
|
| 68 |
+
| javascript | 3/3 | 100.00% |
|
| 69 |
+
| python | 8/8 | 100.00% |
|
| 70 |
+
|
| 71 |
+
## How to use
|
| 72 |
+
```python
|
| 73 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 74 |
+
tok = AutoTokenizer.from_pretrained("Monibee-Fudgekins/gemma-coder")
|
| 75 |
+
model = AutoModelForCausalLM.from_pretrained("Monibee-Fudgekins/gemma-coder", device_map="auto")
|
| 76 |
+
msgs = [{"role": "user", "content": "Write a Python function that reverses a string."}]
|
| 77 |
+
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 78 |
+
print(tok.decode(model.generate(ids, max_new_tokens=256)[0]))
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
## Provenance
|
| 83 |
+
Generated by `finetune/kaggle/run.py` in [https://github.com/Monibee-Fudgekins/remote-agent-dev-platform](https://github.com/Monibee-Fudgekins/remote-agent-dev-platform); see that repo for
|
| 84 |
+
the full training + eval pipeline.
|