THE SWARM COOKBOOK
Verified recipes for fine-tuning AI models. Every recipe tested on real hardware.
Every ingredient weighed on dual scale. Pick your cake. Buy the ingredients. Bake.
What kind of cake? Cheesecake = Medical. Apple pie = Grants. Tiramisu = CRE.
Every ingredient weighed on dual scale. Pick your cake. Buy the ingredients. Bake.
What kind of cake? Cheesecake = Medical. Apple pie = Grants. Tiramisu = CRE.
BEFORE YOU BAKE — THE BASICS
THE OVEN
Any GPU with enough VRAM to hold your base model. RTX 3090 (24GB) for 7-12B. RTX 4500 (32GB) for 27B. RTX 6000 (96GB) for 31B full precision.THE INGREDIENTS
Class A weight from the Weight Shop. Measured by the pound. Dual-scale certified. Every pound has a deed.THE RECIPE
This cookbook. Tells you what to buy, how much, what temperature, how long. Tested and verified. Don't guess — follow the recipe.THE TOOTHPICK TEST
eval_loss. When it stops dropping, the cake is done. Don't overbake (overfitting). Don't underbake (undertrained). The recipe tells you the target.
MASTER WRITER — Grant & Business Specialist
VERIFIED — WE BAKED THIS
WHAT YOU GET
A 31B model that writes federal grants, 501(c)(3) applications, SBIR proposals, SBA loan packages, budget justifications, and business formation documents at consultant level. The model that wrote its own $4.2M DOE GRIP grant application.
INGREDIENTS
Base modelGemma 4 31B-it (or any 27B+ instruct model)
Weight35,957 lbs Class A GrantHash
Personas37 expert personas (grant writer, SBA specialist, 501(c)(3) attorney, pitch deck strategist, etc.)
MethodQLoRA r=64, alpha=32, 4-bit NF4
Epochs3
Learning rate1e-5
Max length4096 tokens
OVEN SETTINGS
GPURTX PRO 6000 Blackwell 96GB (or any 96GB+ card)
Power300W (power cap — memory-bound, core throttles to ~1000 MHz)
Memory clockPush to MAX (14,001 MHz on Blackwell). THIS is the hashrate.
Core clockLet it throttle. Cores are waiting on memory. Don't waste watts.
VRAM used~33 GB (4-bit quantized + gradients)
Temperature79-84°C (stay under 90°C)
BAKE TIME
Total steps3,204
Time37 hours at 300W
Energy$1.71 total ($0.10/kWh)
Eval every320 steps (~5.7 hours)
HOW TO BAKE
Download base model:
ollama pull gemma4:31b or from HuggingFaceBuy 35,957 lbs Class A GrantHash from Weight Shop
Set oven:
nvidia-smi -pl 300 — power cap for slow cook efficiencyStart baking:
python3 train.py --data grants_35957.jsonl --base gemma-4-31B-it --lr 1e-5 --epochs 3 --lora-r 64Check at each eval: watch eval_loss. Should drop from ~0.75 to ~0.52
Toothpick test: when delta between evals < 0.001, cake is done
Cool and serve: merge LoRA → quantize GGUF →
ollama create masterwriter -f ModelfileVERIFIED RESULT (we baked this April 5, 2026)
eval_loss0.7534 → 0.5158 (31.5% improvement)
ConvergenceStep 2,880 (last 324 steps gained 0.0001)
Output qualityWrote a $4.2M DOE GRIP grant application. Wrote its own OM case study.
ProofTry it live → swarmandbee.ai/writer
DON'T OVERBAKE: We ran to 3,204 steps. The model converged at 2,880. Last 324 steps = $0.17 wasted. Check the toothpick (eval_loss). When it flattens, stop.
BUY INGREDIENTS → $9,950
OWN YOUR AGENT — Sovereign, Secure, No API Dependency
EMERGENCY — ANTHROPIC CUT OFF OPENCLAW
THE PROBLEM (April 4, 2026)
Anthropic banned OpenClaw from Claude subscriptions. Your agent went from $20/month to $2,250/month overnight (112x increase). Plus: 9 CVEs, 135K exposed instances, 341 malicious skills, $45M stolen. Your agent is expensive AND compromised.
THE SOLUTION: OWN YOUR WEIGHTS
Fine-tune an open model on ClawHash security weight. Run on your own GPU. No API. No subscription. No dependency. Can never be cut off. Security baked into the weights, not bolted on.
INGREDIENTS
Base modelQwen 3.5 27B (best agent reasoning, native tool calling)
Weight5,000 lbs Class A ClawHash ($9.99/lb)
Sub-algosInjection defense, tool poison detection, RCE prevention, sandbox patterns, audit logging
MethodQLoRA r=64, 3 epochs, lr=5e-6
OVEN
GPURTX PRO 4500 Blackwell 32GB ($2,750) — Qwen 27B Q4 fits perfectly
Power150W (efficiency mode — this is inference, not training)
Bake time~12 hours to cook, then runs forever
Energy~$2/day inference cost. That's it. Forever.
THE MATH
Claude API$2,250/month ongoing. Dependent on Anthropic. Can be cut off again.
Own Your Agent$49,950 (weight) + $2,750 (GPU) = $52,700 one-time
Break-even23 days. After that: every token is FREE.
Year 1 savings$2,250 × 12 - $52,700 = -$25,700 (still investing)
Year 2+$27,000/year saved. GPU paid off. Weight is permanent.
SecurityBaked in. No external dependency. Travels with the model.
WHAT YOU GET
Agent brainQwen 3.5 27B fine-tuned on security + tool-use patterns
Runs onYour RTX 4500. Your rack. Your power. Your rules.
DetectsPrompt injection, tool poisoning, unauthorized access, rogue behavior
ProducesReliable JSON, correct tool calls, audit trails, error recovery
SovereignNo API key. No subscription. No TOS changes. Yours forever.
THE MARKET REALITY: Anthropic can change TOS anytime. OpenAI can change pricing anytime. Google can shut down APIs anytime. The only agent you truly own is the one running on your hardware with your weights. That's sovereignty. That's what we sell.
AGENT RELIABILITY — Fix Your AI Agent
2026 MARKET SIGNAL — HIGHEST DEMAND
THE MARKET PAIN
Every company is deploying AI agents. Every agent has the same problems: tool call hallucination, broken JSON output, prompt injection vulnerability, multi-step reasoning failure. This is SHA-256 for AI right now. The market is screaming for this.
PICK YOUR INGREDIENT (what's broken?)
ToolUseAgent calls wrong API, wrong params, misreads response → fix with AgentHash-ToolUse
StructureJSON breaks, schema violations, format drift → fix with AgentHash-Structure
SecurityPrompt injection, data leaks, auth bypass → fix with SecurityHash
MultiStepReasoning falls apart at step 4+ → fix with AgentHash-MultiStep
RecoveryOne error kills the chain → fix with AgentHash-Recovery
EvalCan't tell if it worked → fix with AgentHash-Eval
RECIPE
Base modelQwen 3.5 27B (best agentic reasoning) or Gemma 4 31B
Weight5,000 lbs Class A AgentHash ($5.99/lb) — pick your sub-algorithm
MethodQLoRA r=64, 3 epochs, lr=5e-6
Bake time~12 hours (complex multi-turn format)
Total cost$29,950 ingredients + $0.50 energy
WHY $5.99/lb (PREMIUM)
Agent reliability pairs are the hardest to generate and the hardest to weigh. Multi-turn tool-use format. Adversarial edge cases. Complex evaluation criteria. Low yield on the scale — only the heaviest survive. But the market demand is 10x any other domain. Like platinum vs copper — harder to mine, higher price.
DON'T BUY GENERIC "AGENT DATA": A bag of 10,000 "agent" pairs is like a bag of mixed produce — some good, mostly filler. Buy the SPECIFIC ingredient your agent needs. Tool calls broken? Buy ToolUse. JSON breaks? Buy Structure. Each sub-algorithm solves ONE pain point.
MEDICAL SPECIALIST — Clinical Domain Expert
TESTED — 4,115 lbs in stock
INGREDIENTS
Base modelGemma 4 31B-it or Qwen 3.5 27B (multimodal for imaging)
Weight5,000 lbs Class A MedHash ($4.99/lb)
SpecialtiesDrug interactions, dosing, reconciliation, surgical eval, clinical guidance
MethodQLoRA r=64, 3 epochs, lr=1e-5
OVEN SETTINGS
GPURTX 6000 96GB (bf16) or RTX 4500 32GB (Q4)
Power250-300W
Bake time~10 hours (5,000 pairs × 3 epochs)
Energy cost~$0.50
EXPECTED RESULT
Relocation+20% medical expertise (5,000 lbs sweet spot)
OutputBoard-certified-level clinical responses with drug interactions, dosing calculations
SHELF LIFE: Medical regulations change. Buy 5,000 lbs now, micro-cook 750 lbs of fresh virgin jelly weekly to stay current.
BUY INGREDIENTS → $24,950
CRE DEAL ANALYST — Commercial Real Estate Underwriting
GROWING — 863 lbs harvested
INGREDIENTS
Base modelQwen 3.5 27B (strong at structured/numeric data)
Weight5,000 lbs Class A CREHash ($2.99/lb)
Task typesIC memos, underwriting, T-12 normalization, lease abstracting, cap rate analysis, cost segregation
MethodQLoRA r=64, 3 epochs, lr=5e-6 (lower LR for numeric precision)
OVEN SETTINGS
GPURTX 4500 32GB (Q4) or RTX 6000 96GB
Flight sheetCore 1500 MHz | Mem MAX | 250W (CRE pairs are shorter, more compute-balanced)
Bake time~10 hours
STATUS
CREHash yield46% Class A (hardest domain — highest difficulty)
In stock863 lbs (GROWING — need 5,000 for full recipe)
ETATribunal is actively weighing CRE. ~2 weeks to 5,000 lbs Class A.
HIGH DIFFICULTY: CREHash is the hardest domain to mine. Only 46% of pairs make Class A. The weight that survives is DENSE. Worth the wait.
LEGAL COMPLIANCE — Credit Repair & Regulatory Expert
TESTED — 4,209 lbs in stock
INGREDIENTS
Base modelAny 12B+ instruct model (Gemma 12B sufficient)
Weight3,000 lbs Class A LegalHash ($1.99/lb)
SpecialtiesCFPB regulations, FDCPA, credit dispute, consumer protection, state compliance
WHY LEGAL IS CHEAP TO BAKE
Difficulty1.9 (easiest domain to mine after grants)
RJ yield98.1% — nearly everything passes the scale
Ingredient cost$5,970 for 3,000 lbs (cheapest recipe)
Bake time~6 hours on any 24GB+ GPU
WEEKLY MICRO-COOK — Keep Your Model Fresh
VERIFIED — THE VIRGIN JELLY RECIPE
THE CONCEPT
Don't bake once and freeze. Bake a little every week with fresh ingredients. Like sourdough — the starter stays alive. The model stays current. Yesterday's weight is stale. This week's weight is virgin jelly.
WEEKLY RECIPE
Weight750 lbs fresh Class A (any domain)
SourceThis week's regulations, rulings, market moves (virgin jelly)
MethodContinual LoRA — load last checkpoint, add fresh weight
Learning rate5e-6 (half of initial — gentle, don't overwrite)
Bake time~10 hours
Energy$0.31 per week
Annual cost$16.29 for a model that knows THIS WEEK
CADENCE
Monday: capture fresh signal (new regulations, rulings, market changes)
Tue-Wed: weigh on the scale (tribunal scores 750 pairs in ~2 hours)
Thursday: micro-cook (load checkpoint, train on fresh weight, 10 hours)
Friday: deploy + verify (merge, load in ollama, smoke test)
Weekend: model is LIVE with this week's knowledge
SHELF LIFE: A model updated 3 days ago beats a model trained 6 months ago. The Hedera timestamp on each deed proves WHEN the weight was captured. Freshness IS value.
BOARD MEMBER — Strategic Advisor (Internal)
BAKING NOW — 140/500 ingredients ready
THE CONCEPT
Not a domain expert. A company brain. Trained on every document the company ever wrote — glass-wall doctrine, wiki operations, experiment results, architecture decisions. Advises on strategy, not questions.
INGREDIENTS
Base modelQwen 3.5 27B (best agentic reasoning)
Weight500 lbs WikiHash (strategic Q&A from company doctrine)
Sourceglass-wall (23 docs) + Swarm-Wiki (116 docs) + 13 skills + experiment results
Bake time~4 hours (small batch, dense content)
DON'T HAVE AN OVEN?
We bake for you. Pick a recipe, we source the ingredients, bake on our Blackwell GPUs, deliver the model ready to serve.
SWARM PRIME — FULL SERVICE BAKING →
SWARM & BEE · Weight Shop · Deeds · Mining · Writer
Every recipe tested. Every ingredient weighed. Every pound has a deed.
Pick your cake. Buy the ingredients. Bake.
Every recipe tested. Every ingredient weighed. Every pound has a deed.
Pick your cake. Buy the ingredients. Bake.