File size: 5,046 Bytes
d618eb6
 
cd25d1e
 
 
 
 
 
 
 
 
 
 
 
 
d618eb6
cd25d1e
 
 
 
 
 
 
 
271af5d
 
 
cd25d1e
 
 
 
 
 
 
 
 
 
 
271af5d
 
 
 
cd25d1e
 
 
 
 
 
 
271af5d
cd25d1e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271af5d
 
 
 
 
cd25d1e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
license: apache-2.0
base_model: openai/gpt-oss-120b
base_model_relation: finetune
library_name: mlx
tags:
  - coding-agent
  - agentic
  - mlx
  - gpt-oss
  - codex
  - apple-silicon
language:
  - en
pipeline_tag: text-generation
---

# GPT-OSS Coder

A **gpt-oss-120b** version focused on improving practical coding-agent behavior in repository-level software engineering tasks.

> Also available in **[GGUF for llama.cpp / LM Studio / Ollama →](https://huggingface.co/exalandru/GPT-OSS-Coder-GGUF)**


# Version 1.1
> This release adds three focused passes over re-curated data, each targeting a behaviour measured missing in the previous one: writing failure-injection regression tests before closing, iterating on multi-defect repositories past the first green suite, and honouring per-harness completion contracts. Every pass was gated by calibrated probes and a held-out benchmark ladder before being promoted.

## How it works

It digs deeper into the repository, follows evidence to the root cause, and keeps iterating until the fix holds under real tests instead of stopping at a plausible-looking patch.

- Fixes the bug, not the symptom : traces the actual defect, not the first thing that looks broken
- Inspects more before editing, and re-runs tests after : more reads, more checks, fewer false successes
- Emits tool calls the harness can actually run : dramatically fewer rejected calls
- Revisits files when new evidence appears
- Reasons about state and invariants across components
- Continues iterating when the first implementation is incomplete
- Ends its turns with a real report of what was done — no empty summaries, no truncated turns
- Writes its own failing test before declaring victory : adds regression tests that fail on the unfixed code, then proves the fix against them
- Iterates past the first green suite : coupled defects don't survive the second pass
- Follows each harness's closing convention : a Codex task ends with a final report, a Cline task ends with a proper `attempt_completion` call
- Tightens what a fix requires : removes deprecated or unauthorized call forms instead of quietly keeping them accepted

The fine-tune also significantly reduced malformed JSON arguments.

Works even better with my **[Adversarial Agent Engineering](https://github.com/exalandru/Adversarial-Agent-Engineering)** pack of skills and rules

## Runtime

<span style="color:orange;">Optimized for Codex.</span>

### Codex GPT-OSS Server

![QCS Screenshot](https://github.com/exalandru/Codex-GPT-OSS-Server/raw/main/assets/app-01.png)

It provides native Codex integration for GPT-OSS on MLX. Rather than exposing GPT-OSS only through a generic OpenAI-compatible compatibility layer, it is designed so that Codex can use GPT-OSS as a native local model while preserving the GPT-OSS/Codex protocol details.

This includes the native Codex Responses protocol, GPT-OSS Harmony handling, reasoning continuity across tool turns, and Codex-specific routing and metadata.

Agent loops work smoothly without the stalls and rejections you get with generic OpenAI-compatible endpoints.

**https://github.com/exalandru/Codex-GPT-OSS-Server**

### Or run it directly with MLX

```bash
mlx_lm.generate --model exalandru/GPT-OSS-Coder-MLX --prompt "Hello World!"
```

**Format:** MLX, MXFP4 experts + bf16 attention, ~61 GB on disk. Weights are consolidated — nothing to fuse or merge. Runs on Apple silicon with 96 GB unified memory; a full agent session peaks around 82 GB.

> **116.8B parameters** (MoE, ~5.1B active per token — which is why it decodes
> faster than much smaller dense models). The Hub badge shows ~24B because MLX
> packs eight 4-bit weights per uint32 element and the badge counts elements,
> not parameters.

---

## How it was trained

Supervised fine-tuning on ~10 000 steps carefully selected from real coding-agent sessions to isolate the targeted behavior : some of my personal sessions with Opus/Fable 5 and GPT 5.6 Sol, public SWE-agent, OpenHands, SWE-smith and Fable trajectories, keeping **only runs that actually resolved their issue**. A run that gave up, or ran out of context and submitted anyway, teaches exactly the habit this model is meant to shed, so those were filtered out.

Each training example is a real repository state plus the next action the successful agent took, so what is learned is the loop itself: look, edit, run, read the result, correct.

The fine-tune itself is deliberately small, a low-rank update on the last layers only, then consolidated back into the weights. The goal was to shift behaviour, not to overwrite what the base model already knows.

Custom small in-house benchmarks were used to validate the training. Models such as Qwen3.6, DeepSeek v4 Flash and other distilled gpt-oss variants all failed these benchmarks. Opus 5 and GPT 5.6 Sol served as references proving the tasks were solvable.

---

*Built by [exalandru](https://github.com/exalandru). If you use it in a real
agent loop, the failure reports are more useful than the success ones.*