Instructions to use RichWoollcott/DCL-Qwen3-4B-Instruct-2507 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Studio
How to use RichWoollcott/DCL-Qwen3-4B-Instruct-2507 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for RichWoollcott/DCL-Qwen3-4B-Instruct-2507 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for RichWoollcott/DCL-Qwen3-4B-Instruct-2507 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for RichWoollcott/DCL-Qwen3-4B-Instruct-2507 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="RichWoollcott/DCL-Qwen3-4B-Instruct-2507", max_seq_length=2048, )
DCL-Qwen3-4B-Instruct-2507
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.
| Candidate (Q4 GGUF) | Zero-shot authoring | Protocol authoring | Repair |
|---|---|---|---|
| 35B reference seat | 0/9 | 9/9 | 3/3 |
| Stock Qwen3-4B-Instruct-2507 | 0/9 | 2/9 | 3/3 |
| This model | 0/9 | 7/9 | 3/3 |
Protocol = the vocabulary reference in the prompt + at most one compiler-diagnostics repair pass; grading is by the DCL compiler only, on a frozen 4-task exam, 3 reps each.
How to use it (this matters)
The model was trained — and examined — under one serving contract. Use the same one:
- System prompt:
Output ONLY the DCL source. No prose, no explanation, no markdown fences. - Put the DCL vocabulary reference in the user prompt alongside your feature brief. DCL is a closed vocabulary; no model we tested (including a 35B) authors it from memory. The compiler-verified reference sheet ships with the language — see the Capability-Language repo and the reference used in training.
- For repair: give it the broken
.dclplus the compiler diagnostics and ask for the corrected source. - The model emits bare DCL source (no markdown fences) — pipe it straight to the compiler.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
m = AutoModelForCausalLM.from_pretrained("RichWoollcott/DCL-Qwen3-4B-Instruct-2507",
dtype=torch.bfloat16, device_map="auto")
t = AutoTokenizer.from_pretrained("RichWoollcott/DCL-Qwen3-4B-Instruct-2507")
msgs = [
{"role": "system", "content": "Output ONLY the DCL source. No prose, no explanation, no markdown fences."},
{"role": "user", "content": "## Feature brief\n<your brief>\n\n## DCL vocabulary reference (closed — author using ONLY these literals)\n<paste the reference sheet>"},
]
enc = t.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(m.device)
out = m.generate(**enc, max_new_tokens=800)
print(t.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))
Training
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.
Limitations — read before relying on it
- Zero-shot (no vocabulary sheet in the prompt) it scores 0/9 — as does every model we tested, including a 35B. The reference-in-prompt usage above is the model, not a tip.
- The hardest exam constructs (multi-outcome waiting/decision/recovery lifecycles) pass 1/3 — when its first attempt is dirty there, a repair pass rarely rescues it.
- Trained on English feature briefs across 77 synthetic business domains; DCL v1.0 only.
- Always run the output through the DCL compiler. The whole design assumes a compiler in the loop; the model's honesty comes from that loop, not from the model.
Variants
- GGUF Q4_K_M (~2.5 GB) + Ollama Modelfile — the laptop build
- LoRA adapter (~132 MB) — apply to the stock base yourself
Links & credit
- DCL is by Russell East: Capability-Language · why he created it · capabilities as a unit of architecture · his write-up of DCL meeting our AI factory
- Base model: Qwen/Qwen3-4B-Instruct-2507 (Apache-2.0 — LICENSE retained in this repo). Trained with Unsloth + TRL.
- Fine-tune, evaluation harness and corpus factory: Richard Woollcott, built with Claude-driven agent sessions on a local fleet.
- Downloads last month
- 17