Instinct-Python-Coder-Gemma4-12B-Qwen3.8-27B

Instinct-Python-Coder-Gemma4-12B-Qwen3.8-27B is a general-purpose Python coder that thinks briefly, then answers. Qwen3.8-27B is a dense 27B-parameter model that punches far above its weight: on several benchmarks it performs in the same range as Kimi K3 (a 2.8T-parameter MoE model with 104B active params) and GLM-5.2 (a 753B-parameter MoE model with 40B active params), despite being a fraction of their size and with no MoE routing at all. We distilled that reasoning efficiency into Gemma 4 12B, teaching it to perform better in Python coding with much more concise reasoning in its <think></think> channel, leading to faster inference, a shorter context window, and cost savings for the end user. The result is an extremely efficient and productive Python coder: a 12B dense model reasoning like a 27B one, working through the approach in a few lines before it hands back the code.

Evaluation

We measured first-attempt accuracy on a held-out set of 228 Python tasks: temperature 1.0, top_p 0.95, up to 12,288 tokens, each model given its own correct system prompt, each answer graded automatically.

Model Size (GB) Peak VRAM @ 16K ctx, 8 concurrent (GB) Solved
Qwen3.8-27B Q4_K_XL (4-bit) 17.56 25.8 137 / 228 (60.1%)
Qwen3.8-27B Q3_K_XL (3-bit) 13.15 21.9 134 / 228 (58.8%)
Qwen3.8-27B IQ1_M (1-bit) 6.73 16.6 45 / 228 (19.7%)
Instinct (ours) 12.67 17.8 110 / 228 (48.2%)

Against the Qwen 3.8 27B's 1-bit quantization, we more than double the accuracy (48.2% vs 19.7%) at a similar VRAM footprint. Against the Qwen 3.8 27B's healthier quantizations (3-bit and 4-bit), we trade a moderate accuracy gap for 25-28% less disk size and 18-24% less VRAM - a 12B dense model getting most of the way to a 27B dense model's coding accuracy.

Reasoning efficiency

Reasoning length matters as much as accuracy: it is most of what determines latency and cost per answer. We extracted each model's <think> block from the same eval run above and tokenized it directly (Qwen's server reports this natively; Gemma's chat template does not separate it from the answer, so we parsed it out).

Qwen3.8-27B (3/4-bit) Instinct (ours)
Avg. reasoning tokens 4,337 - 4,721 3,263 (median 2,114)

The finetuned Gemma model reasons in fewer tokens than the Qwen3.8-27B teacher model. Base Gemma 4 12B has no comparison here at all: it has no reasoning channel, and answers with one long, undifferentiated explanation instead.

Training

Fine-tuned on 5.67M post-training tokens, passed over twice for 11.34M tokens in total, at a sequence length of 16,384.

Limitations

This is one 12B model measured once at temperature 1.0, so treat the numbers above as a single reading with no error bar. It was tuned and tested on Python, and nothing else was measured here. It inherits Gemma 4's behavior and limitations.

License and lineage

Base model: unsloth/gemma-4-12b-it. This is a Gemma derivative, so it is governed by the Google Gemma Terms of Use and the Gemma Prohibited Use Policy. By using it you agree to both.

Usage

It ships as a single Q8_0 GGUF, roughly 13 GB on disk, and runs on a GPU or Mac with about 16 GB of memory. Serve it with llama.cpp:

llama-server -m Instinct-Python-Coder-Gemma4-12B-Qwen3.8-27B-Q8_0.gguf -ngl 99 -c 8192

That exposes an OpenAI-compatible endpoint at http://localhost:8080/v1, and the Gemma 4 chat template is baked into the GGUF, so turns and the thinking channel are formatted for you. It runs anywhere GGUF runs, and any tool that speaks the OpenAI chat API can drive it:

  • Runtimes and apps: llama.cpp, Ollama, LM Studio, Jan, KoboldCpp
  • Coding agents and harnesses: opencode, pi, Hermes, Aider, Cline, Continue

Describe what you want in plain language and it replies with a short pass of reasoning followed by the code:

User: Determine if the sum of digits at even indices equals the sum at odd indices.

<think>
Even indices: 0, 2, 4, ... Odd indices: 1, 3, 5, ... Sum each side and compare.
</think>

```python
class Solution:
    def isBalanced(self, num: str) -> bool:
        even_sum = sum(int(num[i]) for i in range(0, len(num), 2))
        odd_sum = sum(int(num[i]) for i in range(1, len(num), 2))
        return even_sum == odd_sum
```
Downloads last month
519
GGUF
Model size
12B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for projectj/Instinct-Python-Coder-Gemma4-12B-Qwen3.8-27B

Finetuned
(45)
this model