A 4B model fine-tuned to
author and repair DCL — the
Declarative Capability
Language created by
Russell East, a closed-vocabulary language for modelling
business-system capabilities. This model is an open thank-you back to DCL's author, who
wrote about our production use of the
language.
It is small enough to run on an ordinary developer laptop (the
GGUF build is ~2.5 GB).
Its one measured skill: making the first authoring attempt compile clean. On our
frozen, compiler-graded exam the stock base model never produced a first attempt that
compiled (0/9, with a bounded repair pass rescuing only 2); this fine-tune passed 7/9 —
every pass a first-attempt clean compile, the repair pass contributing nothing — while
keeping the base's perfect 3/3 repair skill. Full receipts:
RESULTS
·
base-selection COMPARISON.
The model was trained — and examined — under one serving contract. Use the same one:
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4m = AutoModelForCausalLM.from_pretrained("RichWoollcott/DCL-Qwen3-4B-Instruct-2507",
5 dtype=torch.bfloat16, device_map="auto")
6t = AutoTokenizer.from_pretrained("RichWoollcott/DCL-Qwen3-4B-Instruct-2507")
7msgs = [
8 {"role": "system", "content": "Output ONLY the DCL source. No prose, no explanation, no markdown fences."},
9 {"role": "user", "content": "## Feature brief\n<your brief>\n\n## DCL vocabulary reference (closed — author using ONLY these literals)\n<paste the reference sheet>"},
10]
11enc = t.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(m.device)
12out = m.generate(**enc, max_new_tokens=800)
13print(t.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))
QLoRA (r=16, α=32, attention+MLP targets) on 507 compiler-verified, fully synthetic rows
(87 authoring + 420 repair; authoring rows oversampled ×2), 2 epochs, ~25 minutes on a
DGX Spark. The corpus is kept private to protect the integrity of the frozen evaluation
exam — a training set in the wild eventually leaks into future base models and quietly
inflates their "stock" scores. Every training label was fixed by the DCL compiler, never by a model or a human.
The full runbook — including the three failure modes we hit and fixed (a silently-swapped
chat template; training targets on near-untrained special tokens, invisible to training
loss; fenced targets that broke the serving contract) — is public:
RUNBOOK-dcl-fine-tune.md.