fatihturker commited on
Commit
fa1d4df
·
verified ·
1 Parent(s): c80a08f

model card

Browse files
Files changed (1) hide show
  1. README.md +161 -0
README.md ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: mlx-community/Qwen2.5-Coder-7B-Instruct-4bit
4
+ base_model_relation: adapter
5
+ language:
6
+ - en
7
+ - code
8
+ library_name: mlx
9
+ pipeline_tag: text-generation
10
+ tags:
11
+ - go
12
+ - golang
13
+ - code-generation
14
+ - lora
15
+ - guildlm
16
+ - code-guild
17
+ - mlx
18
+ ---
19
+
20
+ # GuildLM · go-lora-adapters
21
+
22
+ **Every LoRA adapter the GuildLM Code Guild trained for Go, in one place, with the number each one scored.**
23
+
24
+ This is the *archive* behind the three fused specialists (`guildlm/go-dev` · `guildlm/go-test` · `guildlm/go-review`).
25
+ The fused models are convenient to run; the adapters are what was actually learned, and they are ~100× smaller.
26
+ Any fused model can be rebuilt from here in one command (see *Rebuild a fused model*).
27
+
28
+ > **Why publish the losers too.** GuildLM's bet is that a small specialist wins through the **algorithm** around
29
+ > it (compile-and-test loop, retrieval, deterministic gates), not through its weights. Measuring that honestly
30
+ > means keeping every adapter that *failed* to beat its base, with its score. Most of the adapters below are
31
+ > net-negative on the hard unit benchmark. That result is the finding, not a mistake to hide.
32
+
33
+ ## The headline measurement (go_dev_bench v2, 48 tasks, greedy, real `go build` + `go test`)
34
+
35
+ Same harness for every row (`crucible/mlx_bench.py`, direct MLX load, `<|im_end|>` registered as EOS,
36
+ generations committed and re-scorable offline with `rescore_dev_bench.py`).
37
+
38
+ | adapter | recipe | raw | +goimports | vs base (+goimports) |
39
+ |---|---|---|---|---|
40
+ | *(none — base Qwen2.5-Coder-7B-Instruct-4bit)* | — | **39** | **44** | — |
41
+ | `go-dev-mixed-v4` | SFT, mixed data, 1200 iters, r=8 | 33 | 40 | −4 |
42
+ | `go-dev-dapt-replay` | DAPT (Kaggle) + ~13% chat replay | 30 | 36 | −8 |
43
+ | `go-dev-final` | SFT | 32 | 35 | −9 |
44
+ | `go-dev-dapt600` | DAPT (Kaggle), 600 steps | 29 | 33 | −11 |
45
+ | `go-dev-mixed-v5` | SFT, mixed data v5 | 29 | 32 | −12 |
46
+ | `go-dev-dapt300` | DAPT (Kaggle), 300 steps | 26 | 31 | −13 |
47
+ | `go-dev-mined` | SFT on GitHub-mined data | 23 | 24 | −20 |
48
+ | *(none — base Qwen2.5-Coder-14B-Instruct-4bit)* | — | 36 | 43 | — |
49
+ | `go-dev-14b` | SFT on the 14B base | 27 | 40 | −3 |
50
+
51
+ **Reading:** every specialist ≤ its base at both 7B and 14B, and most of the deficit is Go hygiene
52
+ (`goimports` closes most of it), not reasoning. The one place the adapters earn their keep is as
53
+ *complementary* ensemble members: the union of base + all specialists solves 47/48, and adding the 14B
54
+ members reaches 48/48. No single adapter beats the base. Full log: `crucible/RESULT-go-dev-bench-v2.txt`
55
+ in [guildlm/guild-code](https://github.com/guildlm/guild-code).
56
+
57
+ Secondary benches (test / review / edit) tell the same story; `go-test`'s apparent +3/18 on the mutation
58
+ bench turned out to be a *validity* premium that `base + goimports` also captures (14/18 vs 11/18).
59
+ Details: `crucible/AUDIT-secondary-benchmarks.txt`.
60
+
61
+ ## What is in this repo
62
+
63
+ ```
64
+ adapters/<name>/adapter_config.json exact mlx_lm.lora config (base, data dir, iters, rank, lr)
65
+ adapters/<name>/adapters.safetensors the final adapter
66
+ adapters/<name>/NNNNNNN_adapters.safetensors intermediate checkpoints where they were kept
67
+ kaggle-dapt/session1, session2 HF-PEFT checkpoints from the Kaggle DAPT runs (free T4)
68
+ kaggle-dapt/replay-session1 the replay-mix DAPT run
69
+ kaggle-dapt/ckpt-dataset, replay-dataset the Kaggle dataset bundles those runs were resumed from
70
+ ```
71
+
72
+ ## Adapter inventory (from each `adapter_config.json`)
73
+
74
+ | adapter | base | data dir | iters | rank | lr | final weights | kept checkpoints |
75
+ |---|---|---|---|---|---|---|---|
76
+ | `go-dapt` | Qwen2.5-Coder-7B-Instruct-4bit | `dapt` | 6000 | 8 | 0.0001 | **no final** | 0 |
77
+ | `go-dapt-core-smoke` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-dapt-core-smoke` | 600 | 8 | 5e-05 | yes | 3 |
78
+ | `go-dapt-replay-smoke` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-dapt-replay-smoke` | 600 | 8 | 5e-05 | yes | 3 |
79
+ | `go-dev` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data` | 400 | 8 | 0.0001 | yes | 4 |
80
+ | `go-dev-0000200` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data` | 400 | 8 | 0.0001 | yes | 0 |
81
+ | `go-dev-0000300` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data` | 400 | 8 | 0.0001 | yes | 0 |
82
+ | `go-dev-14b` | Qwen2.5-Coder-14B-Instruct-4bit | `.mlx-data` | 300 | 8 | 8e-05 | yes | 3 |
83
+ | `go-dev-15b-mixed-v3` | Qwen2.5-Coder-1.5B-Instruct-4bit | `.mlx-data-godev-mixed-v3` | 1200 | 8 | 0.0001 | yes | 6 |
84
+ | `go-dev-dapt-replay` | /Users/fatihturker/Desktop/Personal/Dev/guildlm/.mlx-fused/go-dapt-replay-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 6 |
85
+ | `go-dev-dapt300` | /Users/fatihturker/Desktop/Personal/Dev/guildlm/.mlx-fused/go-dapt-7b-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 6 |
86
+ | `go-dev-dapt300-ck0000400` | /Users/fatihturker/Desktop/Personal/Dev/guildlm/.mlx-fused/go-dapt-7b-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 0 |
87
+ | `go-dev-dapt300-ck0000800` | /Users/fatihturker/Desktop/Personal/Dev/guildlm/.mlx-fused/go-dapt-7b-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 0 |
88
+ | `go-dev-dapt300-ck0001000` | /Users/fatihturker/Desktop/Personal/Dev/guildlm/.mlx-fused/go-dapt-7b-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 0 |
89
+ | `go-dev-dapt300-ck0001200` | /Users/fatihturker/Desktop/Personal/Dev/guildlm/.mlx-fused/go-dapt-7b-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 0 |
90
+ | `go-dev-dapt600` | /Users/fatihturker/Desktop/Personal/Dev/guildlm/.mlx-fused/go-dapt600-7b-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 6 |
91
+ | `go-dev-dapt600-ck0001000` | /Users/fatihturker/Desktop/Personal/Dev/guildlm/.mlx-fused/go-dapt600-7b-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 0 |
92
+ | `go-dev-dapt600-ck0001200` | /Users/fatihturker/Desktop/Personal/Dev/guildlm/.mlx-fused/go-dapt600-7b-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 0 |
93
+ | `go-dev-final` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-scaled` | 300 | 8 | 8e-05 | yes | 0 |
94
+ | `go-dev-id` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-id` | 200 | 8 | 0.0001 | yes | 0 |
95
+ | `go-dev-maint` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-maint` | 160 | 8 | 6e-05 | yes | 0 |
96
+ | `go-dev-mined` | Qwen2.5-Coder-7B-Instruct-4bit | `godev2048` | 4000 | 8 | 0.0001 | yes | 6 |
97
+ | `go-dev-mixed` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-mixed` | 1200 | 8 | 0.0001 | yes | 6 |
98
+ | `go-dev-mixed-v2` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-mixed2` | 1200 | 8 | 0.0001 | yes | 6 |
99
+ | `go-dev-mixed-v3` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-mixed-v3-7b` | 1200 | 8 | 0.0001 | yes | 6 |
100
+ | `go-dev-mixed-v4` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-mixed-v4-7b` | 1200 | 8 | 0.0001 | yes | 6 |
101
+ | `go-dev-mixed-v5` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-mixed-v5-7b` | 1200 | 8 | 0.0001 | yes | 1 |
102
+ | `go-dev-mixed-v5b` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-mixed-v5-7b` | 1000 | 8 | 0.0001 | yes | 5 |
103
+ | `go-dev-v2` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data` | 300 | 8 | 8e-05 | yes | 3 |
104
+ | `go-dev-v2-id` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-v2` | 260 | 8 | 0.0001 | yes | 0 |
105
+ | `go-dev-v3-id` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-godev-v2` | 90 | 8 | 4e-05 | yes | 0 |
106
+ | `go-review` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-review` | 180 | 8 | 0.0001 | yes | 2 |
107
+ | `go-review-id` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-review-id` | 150 | 8 | 0.0001 | yes | 0 |
108
+ | `go-review-mined` | Qwen2.5-Coder-7B-Instruct-4bit | `goreview` | 1200 | 8 | 0.0001 | yes | 6 |
109
+ | `go-review-mined-ck0000200` | Qwen2.5-Coder-7B-Instruct-4bit | `goreview` | 1200 | 8 | 0.0001 | yes | 0 |
110
+ | `go-review-mined-ck0000400` | Qwen2.5-Coder-7B-Instruct-4bit | `goreview` | 1200 | 8 | 0.0001 | yes | 0 |
111
+ | `go-review-mined-ck0000600` | Qwen2.5-Coder-7B-Instruct-4bit | `goreview` | 1200 | 8 | 0.0001 | yes | 0 |
112
+ | `go-review-mined-ck0001000` | Qwen2.5-Coder-7B-Instruct-4bit | `goreview` | 1200 | 8 | 0.0001 | yes | 0 |
113
+ | `go-review-mined-ck0001200` | Qwen2.5-Coder-7B-Instruct-4bit | `goreview` | 1200 | 8 | 0.0001 | yes | 0 |
114
+ | `go-review-scaled` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-goreview-scaled` | 200 | 8 | 0.0001 | yes | 0 |
115
+ | `go-test` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-test` | 150 | 8 | 0.0001 | yes | 2 |
116
+ | `go-test-id` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-test-id` | 150 | 8 | 0.0001 | yes | 0 |
117
+ | `go-test-scaled` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-gotest-scaled` | 220 | 8 | 0.0001 | yes | 0 |
118
+ | `go-test-v2` | Qwen2.5-Coder-7B-Instruct-4bit | `.mlx-data-test` | 120 | 8 | 8e-05 | yes | 2 |
119
+
120
+
121
+ ## Use an adapter directly (Apple Silicon, MLX)
122
+
123
+ ```bash
124
+ pip install mlx-lm huggingface_hub
125
+ hf download guildlm/go-lora-adapters --include "adapters/go-dev-mixed-v4/*" --local-dir ./go-lora
126
+ python -m mlx_lm.generate \
127
+ --model mlx-community/Qwen2.5-Coder-7B-Instruct-4bit \
128
+ --adapter-path ./go-lora/adapters/go-dev-mixed-v4 \
129
+ --prompt "Write an idiomatic Go function that reverses a string by runes."
130
+ ```
131
+
132
+ ## Rebuild a fused model
133
+
134
+ ```bash
135
+ python -m mlx_lm.fuse \
136
+ --model mlx-community/Qwen2.5-Coder-7B-Instruct-4bit \
137
+ --adapter-path ./go-lora/adapters/go-dev-mixed-v4 \
138
+ --save-path ./go-dev-mixed-v4-fused
139
+ ```
140
+
141
+ The `go-dev-14b` adapter fuses onto `mlx-community/Qwen2.5-Coder-14B-Instruct-4bit`; the `*-15b-*` and
142
+ `*-smoke` adapters were trained on the 1.5B base for pipeline smoke tests and carry no benchmark claim.
143
+ Each adapter's `adapter_config.json` names its base.
144
+
145
+ ## Reproduce a score
146
+
147
+ ```bash
148
+ git clone https://github.com/guildlm/guild-code && cd guild-code/go/crucible
149
+ python mlx_bench.py --model mlx-community/Qwen2.5-Coder-7B-Instruct-4bit \
150
+ --adapter ./go-lora/adapters/go-dev-mixed-v4 --save-generations out.jsonl
151
+ python rescore_dev_bench.py --generations out.jsonl --repair imports
152
+ ```
153
+
154
+ ## Provenance
155
+
156
+ - Base models: `mlx-community/Qwen2.5-Coder-{1.5B,7B,14B}-Instruct-4bit` (Apache-2.0).
157
+ - SFT data: compile-verified Go generated with Claude as teacher, plus GitHub-mined Go for the `mined` and DAPT runs.
158
+ - Compute: Apple M1 Max (MLX) for SFT and evaluation; Kaggle free T4 for DAPT. Total spend: $0.
159
+ - Every number above was produced by the real Go toolchain, never by an LLM judge.
160
+
161
+ Part of [GuildLM](https://github.com/guildlm) — small, sharp, open specialists, and an honest log of what they can and cannot do.