RichWoollcott/architect-agent-gemma4-26b-moe
Architect Agent (Gemma-4-26B-A4B MoE)
A fine-tune of unsloth/gemma-4-26b-a4b-it that emulates a senior software architect: applies DDD strategic patterns, surfaces architectural tensions, and reasons explicitly via <think> blocks before recommending.
Fine-tuned from unsloth/gemma-4-26b-a4b-it using Unsloth + TRL on a single NVIDIA DGX Spark GB10 (121 GB unified memory).
Intended use
Pairing with a developer on architecture decisions: bounded-context design, integration patterns, sequencing legacy-system migrations, and articulating trade-offs in writing. Built to be served behind llama-swap / Ollama / vLLM as part of a multi-agent system.
Sample prompt
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
repo = "RichWoollcott/architect-agent-gemma4-26b-moe"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo, torch_dtype=torch.bfloat16, device_map="cuda"
)
messages = [{"role": "user", "content": "I'm building a new payments service that needs to integrate with five legacy systems. Which DDD strategic patterns should I apply first and why?"}]
inputs = tok.apply_chat_template(
messages, return_tensors="pt", add_generation_prompt=True
).to("cuda")
out = model.generate(inputs, max_new_tokens=600, do_sample=False)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=False))The model is trained to open every response with a <think>...</think> reasoning block followed by the visible answer. If you do not see the tags, add Begin every response with <think>...</think> to the system prompt.
Limitations
Trained on ~900 synthetic dialogues generated by an adversarial Player-Coach pipeline; coverage is biased towards the 10 architect-dimension categories enumerated in the dataset-factory generation plan. The model has no first-hand engineering experience and will confidently reason from incorrect premises if those premises are accepted. Always pair with a RAG layer over authoritative architecture sources for factual grounding.
Training data
894 reasoning-style (<think>...</think> then answer) dialogues covering 10 DDD-flavoured architect dimensions, accepted by an LLM Coach with a structured-JSON rubric. Generated by the agentic-dataset-factory Player-Coach pipeline. 83.2% acceptance rate; zero chat-template-token leaks; 100% <think> coverage.
The data is not released alongside the weights pending a license review of source material referenced during generation. The generator (agentic-dataset-factory, Player-Coach adversarial pipeline) is open-source and reproducible.
Training procedure
- Framework: Unsloth + TRL (SFT)
- Precision: bfloat16
- PEFT: LoRA, rank 16
- Optimiser: AdamW (Unsloth defaults)
- Epochs: 1, effective batch size 4, max-seq-length 2048
- Hardware: NVIDIA DGX Spark GB10 (single device, unified memory)
- Container:
nvcr.io/nvidia/pytorch:25.11-py3 - Verified-compatible pins:
transformers==5.5.4,accelerate==1.10.0,trl==0.26.1,datasets==4.3.0, latestunsloth/unsloth_zoo/bitsandbytes.
Loss trajectory and reproduction recipe: see the source runbook in appmilla/agentic-dataset-factory — domains/architect-agent/RUNBOOK-architect-fine-tune.md.
Artefacts in this repo
- `/` (root) — merged-16bit weights (full standalone model, ~49 GB). Load with
AutoModelForCausalLM.from_pretrained(repo_id). - `lora-adapter/` — the LoRA adapter (~1.9 GB). Apply on top of the base model with
PeftModel.from_pretrained(base, repo_id, subfolder="lora-adapter").
GGUF quantisations (q4km, BF16) live in a separate repo: `RichWoollcott/architect-agent-gemma4-26b-moe-GGUF`.
License
Released under the Gemma Terms of Use, as required by the base model.
Citation
If you use this model, please cite the base model, TRL, and Unsloth:
@misc{vonwerra2022trl,
title = {TRL: Transformer Reinforcement Learning},
author = {Leandro von Werra and others},
year = 2020,
url = {https://github.com/huggingface/trl}
}