fatihturker commited on
Commit
118ce23
·
verified ·
1 Parent(s): b1d72ea

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +99 -0
README.md ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: Qwen/Qwen2.5-Coder-7B-Instruct
4
+ base_model_relation: finetune
5
+ language:
6
+ - en
7
+ - code
8
+ library_name: mlx
9
+ pipeline_tag: text-generation
10
+ tags:
11
+ - go
12
+ - golang
13
+ - testing
14
+ - table-driven-tests
15
+ - guildlm
16
+ - code-guild
17
+ - mlx
18
+ ---
19
+
20
+ # GuildLM · go-test
21
+
22
+ **A small, sharp Go *testing* specialist from the GuildLM Code Guild.**
23
+
24
+ `go-test` writes thorough, **table-driven** Go tests with real assertions and meaningful edge cases — the kind of tests that actually fail when the code is wrong. It is one of three specialists in the GuildLM Code Guild ([`go-dev`](https://huggingface.co/guildlm/go-dev) · `go-test` · [`go-review`](https://huggingface.co/guildlm/go-review)) built to work together in a **verification-driven agent loop**.
25
+
26
+ > **Why a dedicated test model?** Across every GuildLM experiment, writing tests is the one job where targeted fine-tuning *clearly* beats the base. On a mutation benchmark — inject a bug, does the generated test catch it? — `go-test` catches **14/18 (78%)** versus **7/18 (39%)** for the untuned base. **It catches twice as many real bugs as the model it's built on.** Test-writing is genuinely where specialization pays. See the [research log, Report #2](https://guildlm.github.io/research/2026-06-28-go-test-mutation.html).
27
+
28
+ ---
29
+
30
+ ## Why this isn't "just Qwen with a name"
31
+
32
+ `go-test` is a **fused, standalone** model (no separate adapter) with its **own identity** — ask who it is and it answers *GuildLM go-test*. It is an honest Apache-2.0 derivative of [Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct), fine-tuned for one craft: testing Go.
33
+
34
+ ## What it's for
35
+
36
+ - Generating `*_test.go` files: table-driven cases, sub-tests, `httptest`, `sync/atomic` for concurrency checks.
37
+ - Covering the edges a tired human skips: empty input, zero values, negatives, inverted bounds, error paths.
38
+ - Acting as the *testing* role inside the [GuildLM Builder](https://github.com/guildlm/builder), so the code that `go-dev` writes is held to a real, executable contract.
39
+
40
+ ## Benchmarks
41
+
42
+ Measured locally with the real Go toolchain — tests are scored by whether they **compile, assert, and catch injected mutations**, not by an LLM judge.
43
+
44
+ <!-- BENCH:go-test -->
45
+ | Benchmark | Metric | **go-test** | base 7B |
46
+ |---|---|---|---|
47
+ | crucible `go_test_bench` (18 mutations) | bug-catch@1 | **14/18 · 78%** | 7/18 · 39% |
48
+
49
+ > This is the GuildLM specialist where the fine-tuning win is **real, large, and repeatable** — `go-test` catches 2× the injected bugs of its base. A guard in the [Builder](https://github.com/guildlm/builder) also rejects trivially-passing tests (no assertions), so its output is held to a real bar in the loop.
50
+
51
+ ## Quickstart
52
+
53
+ ### Apple Silicon (MLX)
54
+
55
+ ```bash
56
+ pip install mlx-lm
57
+ python -m mlx_lm generate --model guildlm/go-test \
58
+ --prompt "Write table-driven Go tests for func Clamp(x, lo, hi int) int covering below/inside/above range and inverted bounds." \
59
+ --max-tokens 400
60
+ ```
61
+
62
+ ### Ollama (GGUF)
63
+
64
+ ```bash
65
+ ollama run guildlm/go-test "Write httptest-based tests for a POST /echo JSON endpoint built with newMux()."
66
+ ```
67
+
68
+ ### Inside the agent loop (recommended)
69
+
70
+ ```bash
71
+ python -m mlx_lm server --model guildlm/go-test --port 8081
72
+ guildlm-build --spec specs/myservice.yaml --out ./out \
73
+ --base-url http://localhost:8080/v1 \
74
+ --test-model guildlm/go-test --test-base-url http://localhost:8081/v1 \
75
+ --candidates 3
76
+ ```
77
+
78
+ ## Prompting
79
+
80
+ Trained with the system prompt:
81
+
82
+ > *You are GuildLM go-test, a Go testing specialist from the GuildLM Code Guild.*
83
+
84
+ Give it a function signature or an implementation and ask for tests. It defaults to table-driven style with explicit `t.Errorf`/`t.Fatalf` assertions.
85
+
86
+ ## The Guild
87
+
88
+ | Specialist | Job |
89
+ |---|---|
90
+ | [**go-dev**](https://huggingface.co/guildlm/go-dev) | writes the implementation |
91
+ | [**go-test**](https://huggingface.co/guildlm/go-test) | writes thorough table-driven tests |
92
+ | [**go-review**](https://huggingface.co/guildlm/go-review) | audits for bugs a green build hides |
93
+
94
+ - Agent loop: **https://github.com/guildlm/builder**
95
+ - Research log: **https://guildlm.github.io/research/**
96
+
97
+ ## License & attribution
98
+
99
+ Apache-2.0, inherited from [Qwen2.5-Coder-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct) (© Alibaba Cloud). GuildLM fine-tuning, identity, and packaging under the same license. Trained locally on Apple Silicon with MLX — **total cloud spend: $0**.