Blog

Model training case study: Dale

How I trained four models of my own, from 0.8B to 9B, that turn natural language into Linux commands offline: 89.2% on 471 cases vs 62.8% for the best untuned model, and 79.4% on CPU with 529 MB. Data, benchmarks, GPU with Vulkan, costs and everything that didn't work.

Dale's terminal turning a request written in Spanish into a bash command, next to the accuracy chart of the four dale models against the best untuned models
  • 89.2 %

    test accuracy

    dale-9b: 420 of 471 cases it had never seen

  • + 26.3  pts

    over its own base model of the same size

    Qwen3.5-9B base stays at 62.8%

  • 79.4 %

    with no GPU, from a 529 MB model

    dale-0.8b beats untuned 9B models (+16.6 pts)

  • 1.2  s

    median per request on GPU

    dale-4b (87.0%); dale-0.8b on a laptop CPU: 1.72 s

  • ≈ 39  USD

    of rented GPU for the whole project

    discarded experiments included; the four models, from 529 MB to 5.6 GB

  • 0

    invalid JSON responses

    4 models × 471 cases: 1,884 responses the program can read

Test v2: 471 cases written before dale was trained and never seen by the data; every model in Q4_K_M. GPU: reference desktop with a 16 GB GPU; CPU: mid-range 2020 laptop (4 cores / 8 threads), p90 of 2.19 s; warm medians. Cost: the whole project, dropped experiments included; about 5.4 USD of it is an estimate.

Test v2 accuracy: each untuned Qwen3.5 against its dale Fine-tuning lifts all four sizes, and the smallest one (529 MB) already beats every untuned model, the 9B included
  • Untuned Qwen3.5, same size
  • dale (fine-tuned)
  • Goal 85%
  • Best untuned model of any size (62.8%)
View data
Accuracy of each dale against the untuned Qwen3.5 of the same size
Size Untuned Qwen3.5 dale Gain Correct, × dale GGUF
0.8B 14.9% (70) 79.4% (374) +64.5 pts ×5.3 529 MB
2B 32.3% (152) 81.7% (385) +49.5 pts ×2.5 1.3 GB
4B 54.6% (257) 87.0% (410) +32.5 pts ×1.6 2.7 GB
9B 62.8% (296) 89.2% (420) +26.3 pts ×1.4 5.6 GB

Source: test v2 (471 cases), every model in Q4_K_M served with llama-server through the same evaluation harness; untuned models with the 8-example prompt, dale with its 2-line prompt.

This post tells how I got here, in two stages. First, version 1.0: all the effort went into getting a 0.8B model to do its job well on a laptop CPU. Then, version 1.1: the same recipe in three more sizes, plus the GPU, in a single binary.

The problem: from natural language to bash, without leaving your laptop

We’ve all searched for “how to find files larger than 200 MB” or “how to see which process is using port 8080”. The answer is a one-line command we never remember. A cloud assistant solves it, but that means sending what you do on your machine somewhere else, depending on a connection and paying for every query.

I set out to do something different: a small model that lives inside a binary, runs on any Linux laptop, even with no GPU and no network, and answers in a second or two. And I wanted to prove with numbers, not impressions, that a small model well tuned for a narrow task can beat models ten times its size that aren’t.

The ground rules, set before I started:

  • Truly local. A single native binary: no server, no Python, no connection. The model is downloaded once and checked with SHA-256.
  • Modest laptops. The reference machine is a mid-range 2020 laptop with no GPU. Under 3 seconds per answer, or it doesn’t count.
  • Safety that doesn’t depend on the model. The model proposes; a deterministic C++ layer decides whether the command is safe, calls for caution or is dangerous.
  • Knowing when to say no. If the request isn’t a command (“write me a poem”), it refuses. If it’s ambiguous (“delete them”), it asks instead of making something up.

What Dale is

Dale running for real: I type what I want in plain English, it proposes the command, explains what it does, tells me whether it's safe, and I run it. All local, on CPU, with dale-0.8b.
100% offline: on a machine with no network, curl can't reach anything… and Dale keeps answering (requests in Spanish). There are no calls to any server: the model lives on your machine.

Dale has three modes: suggest (it only shows the command), confirm (the default: it shows the command and asks) and auto. Before running a command you can edit it or copy it. The model always answers with strict JSON of one of three types: command, refuse or unsure.

How dale works The model translates, the code decides what is safe

100% local: no server and no network when answering

Input

Request

in Spanish or English

System context

distro, package manager and installed tools

The model translates

Prompt

fixed template, checked by a golden file

llama.cpp on CPU or GPU (Vulkan)

GGUF Q4_K_M: 0.8B (529 MB), 4B or 9B

JSON

{type, command, explanation}

refusal or “unsure”: it explains and there is nothing to run

The code decides what is safe

Validation

strict parser

invalid JSON: a warning, never run

Risk checker

deterministic C++ rules

safe caution danger

Mode

suggest · confirm · auto

Action

run · edit · copy

The key to this architecture is the separation of responsibilities. The model decides nothing about safety: it only translates. The risk checker is C++ code with explicit rules and tests, independent of the model. If I swap the model tomorrow, safety stays the same. And because the model returns JSON, the application can validate every answer before showing it.

The four hard cases, with requests in Spanish: a command that calls for caution, a dangerous one (deleting /usr, with a red warning and explicit confirmation), a request that isn't a command and an ambiguous one. Real recording, unedited.

The starting point: a small model that couldn’t do it

I chose Qwen3.5-0.8B (Apache-2.0 license) for a practical reason: it’s small enough to answer quickly on a laptop CPU. The problem is that, out of the box, it gets 14.9% of the test cases right. It returns broken JSON, replies with free text, invents options and almost never knows when not to answer.

Larger models do better, but they aren’t a solution either: Qwen3.5-9B tops out at 62.8%, weighs 5.7 GB and is slow on a laptop without a GPU. The project’s question was clear: can a fine-tuned 0.8B beat an untuned 9B?

How I measured it

A benchmark is only as good as its test set. The one I use for every final figure has 471 frozen cases the model never saw during training: 339 command requests, 101 out-of-scope requests (which must be refused) and 31 ambiguous ones (where the model must express doubt), in Spanish and English.

The test sets I moved to a 471-case test because on the 300-case one only 79 cases varied between 0.8B variants, and two identical retrains already moved 31–41

Test v2: what is inside

  • Commands 339 · 72%
  • Out of scope 101 · 21%
  • Ambiguous 31 · 7%

By language

Test v1: 300 cases, mostly settled

  • 187 Solved by all 8 fine-tuned 0.8B variants
  • 79 Varied between variants
  • 34 Solved by none

Each square is one case

View data
Test v2 composition by type and by language
Group Cases Share
Commands 339 72%
Out of scope 101 21%
Ambiguous 31 7%
Spanish 257 55%
English 214 45%
Test v1 cases by how many 0.8B variants solved them
Test v1: 300 cases, mostly settled Cases Share
Solved by all 8 fine-tuned 0.8B variants 187 62%
Varied between variants 79 26%
Solved by none 34 11%

Source: test v2 composition and test v1 saturation analysis over the 0.8B variants.

A few methodological choices that make the difference:

  • Same conditions for everyone. Every model in the same format (GGUF Q4_K_M), on the same llama.cpp, in deterministic mode (greedy, fixed seed). I give the untuned models an advantage: a prompt with 8 examples. Dale answers with no examples.
  • Two judges with a debate. Whatever can be checked with rules (valid JSON, answer type) is checked with rules. To decide whether a command is correct, two frontier LLMs judge independently and, if they disagree, they debate; if they still disagree afterwards, the case counts as a failure.
  • Statistics, not impressions. Every accuracy figure comes with its 95% confidence interval (Wilson), and every comparison between two models with its case-by-case McNemar test. If an improvement isn’t significant, I don’t adopt it.

The data: 80% of the work

This is the full loop I repeated in every iteration, from the data to the decision to adopt or discard a model:

How dale-0.8b was trained and evaluated A change is adopted only if it improves the test significantly; if not, back to the data

Generation

tldr-pages seed + frontier LLMs write requests and answers

Automatic checks

format, command and risk

Review and purge

frontier LLM judges

Dataset

48,841 examples

Full fine-tune

Unsloth, RTX 5090 on Vast.ai

GGUF + imatrix

quantized to Q4_K_M

Evaluation

471-case test; double frontier LLM judge with debate; Wilson and McNemar

Significant gain?

yes → adopt

no → back to the data

There’s no public dataset of “request in Spanish → bash command with an explanation, or a refusal, or a request for clarification”. I built it from scratch:

  • Coverage seed: tldr-pages (CC BY 4.0 license), to make sure the usual tools showed up. I used only the command lines as inspiration; the requests and explanations are original.
  • Generation with frontier LLMs, in batches, split by category (files, network, processes, disks, git, docker, packages…), language (half Spanish, half English) and distribution (apt, dnf and pacman).
  • Automatic validation of every example (format, length, consistency with the system context) and review by judges on samples.
  • Final purge: a frontier LLM reviewed the ~51,000 examples one by one, and I removed 1,390 that had errors. The estimated residual error ended up at around 1.25%.
Training set size by version From 9,500 to 48,841 examples, with 2 reverted versions and a purge before the final one
  • Adopted version
  • Reverted or unpurged
  • New data in the test's register
  • Validation
Purge: −1,390 rows (1,327 training and 63 validation)

training examples

i4 composition (training + validation) · 42,975 examples

By type

Command 38,651 · 89.9% Dangerous 711 · 1.7% Refusal 2,474 · 5.8% Unsure 1,139 · 2.7%

By language

Spanish 21,567 · 50.2% English 21,408 · 49.8%

Seed: tldr-pages v2.3 (CC BY 4.0), only its command lines as coverage seeds; explanations are original.

View data
Training and validation examples by dataset version
Version Day Training Validation Status
Phase 4 day 3 9,500 500 First dataset: 11,998 generated, 1.9 % error in double-judge review
R1 batch day 4 10,348 546 R1 batch added (intermediate, never trained)
i3 day 5 30,415 1,601 Dataset ×3
i4 day 5 40,829 2,146 +10,414 targeted, short explanations
i5 day 7 41,870 2,202 Reverted
i6 day 7 43,619 1,657 Reverted: i4 + 930 mined failures ×3
i7 unpurged day 13 50,168 2,641 i4 + new data in the test's register, before the purge
i7 · dale-0.8b day 13 48,841 2,578 Current: trains dale-0.8b
i4 dataset composition by type and by language
Group Examples Share
Command 38,651 89.9%
Dangerous 711 1.7%
Refusal 2,474 5.8%
Unsure 1,139 2.7%
Spanish 21,567 50.2%
English 21,408 49.8%

Source: counts of each dataset version; documented composition of i4.

The finding that changed the project

After four iterations, the model plateaued. I tried everything (more on that below) and nothing moved it. Until I stopped looking at the model and compared how the requests were written in the dataset versus the test set.

Dataset register against the test · command requests The dataset spoke a different register: shorter requests, almost no constraints and 16 tools in the context versus under 3
  • i4 dataset (training)
  • Test v1 (the target)
  • New i7 data

Request length

median characters

×1.4
75 106
113

Explicit constraints

constraint words per request

×2.3
0.32 0.75
1.0

Multi-sentence requests

% of requests

×4.0
10.0% 40.0%
35.1%

Tools in the context

mean per request

×6.1
16.4 2.7
3.35
View data
Register of the i4 dataset, test v1 and the new i7 data
Measure i4 dataset Test v1 New i7 data
Request length (median characters) 75 106 113
Explicit constraints (constraint words per request) 0.32 0.75 1.0
Multi-sentence requests (% of requests) 10.0% 40.0% 35.1%
Tools in the context (mean per request) 16.4 2.7 3.35

Source: phase 5m diagnosis (i4 dataset against test v1) and measurement of the new i7 data.

The dataset spoke a different register. The training requests were short and direct; the test requests were longer, with several sentences and twice as many constraints (“just the names”, “sorted by date”, “without going into subfolders”). And the system context the model saw during training listed 16 installed tools on average, compared with fewer than 3 in the test set.

The fix wasn’t more training engineering, but new data written in the right register: frontier LLMs wrote 20,000 new requests matching the test profile; half were answered for training and the other half was set aside for later experiments. That’s only 18.3% of the final dataset, but it’s what unblocked the project.

Training

I did full fine-tuning: all 853 million parameters of the model are trained, not a LoRA adapter. A model this small fits comfortably on a consumer GPU, and it puts all of its capacity into a very specific task. Two epochs; the third, which I tried several times, never helped.

I used Unsloth inside a Docker container pinned by digest, the same image at home and in the cloud. First I do a dry run locally, on a 16 GB RTX 5070 Ti; once everything works, the real training runs on GPUs rented by the hour on Vast.ai: a 32 GB RTX 5090 and, for the experiments with the 27B model, a 96 GB RTX PRO 6000.

Loss curve of the winning run Validation loss falls from 0.4654 to 0.2404 and flattens at the end, without bouncing back
  • Training (raw)
  • Training (smoothed)
  • Validation
  • Epoch change

30 min · 3,054 steps · RTX 5090 · 26.6 GB of VRAM

0.4654 Best validation: 0.2404 step 3,054

Validation loss is only comparable within one iteration: each one used a different validation set, so other iterations are not overlaid here.

View data
Validation loss and smoothed training loss at each evaluation
Step Epoch Validation Training (smoothed)
300 0.20 0.4654 0.5033
600 0.39 0.3834 0.3942
900 0.59 0.3353 0.3475
1,200 0.79 0.3055 0.3060
1,500 0.98 0.2786 0.2790
1,800 1.18 0.2685 0.1656
2,100 1.38 0.2583 0.1525
2,400 1.57 0.2480 0.1434
2,700 1.77 0.2424 0.1369
3,000 1.97 0.2404 0.1310
3,054 2.00 0.2404 0.1354

Source: training log of dale-0.8b (phase 7, S-a): mean loss every 5 steps (every 2nd point drawn) and evaluation every 300.

The final model trained in 30 minutes on an RTX 5090: 3,054 steps, about 17,000 tokens per second, 26.6 GB of VRAM and about 0.24 kWh of GPU energy. Validation loss kept falling until the very last step (0.240), with no sign of overfitting.

GPU telemetry of the winning run · RTX 5090 30 minutes with the GPU at 96% median and about 0.24 kWh of energy

Utilization (%) median 96%

Power (W) median 508 W

Memory (GB) max 27.9 GB of 32 GB in nvidia-smi

The 11 evaluations (every 300 steps, 3.5 min in all) barely show: the GPU stays busy. There are four single-sample (10 s) drops to zero; at one sample every 20 s, two show.

View data
GPU utilization, power and memory per minute (one row per minute)
Minute Utilization Power Memory
0.1 0% 15 W 0.0 GB
1.1 0% 65 W 2.2 GB
2.1 79% 482 W 25.5 GB
3.2 100% 506 W 25.5 GB
4.2 96% 516 W 26.0 GB
5.2 95% 510 W 26.3 GB
5.8 100% 507 W 26.3 GB
6.8 96% 520 W 27.0 GB
7.8 66% 482 W 27.9 GB
8.8 100% 514 W 27.9 GB
9.9 100% 523 W 27.9 GB
10.9 100% 513 W 27.9 GB
11.9 100% 511 W 27.9 GB
12.9 100% 506 W 27.9 GB
13.9 90% 492 W 27.9 GB
14.9 96% 515 W 27.9 GB
15.9 100% 478 W 27.9 GB
16.9 95% 511 W 27.9 GB
17.9 96% 511 W 27.9 GB
18.9 95% 503 W 27.9 GB
19.9 78% 511 W 27.9 GB
20.9 95% 526 W 27.9 GB
21.9 100% 507 W 27.9 GB
22.9 92% 505 W 27.9 GB
23.9 95% 525 W 27.9 GB
24.9 96% 505 W 27.9 GB
25.9 79% 504 W 27.9 GB
26.9 95% 508 W 27.9 GB
27.9 100% 516 W 27.9 GB
28.9 100% 513 W 27.9 GB
29.9 84% 503 W 27.9 GB

Source: nvidia-smi during the dale-0.8b run; one sample every 20 s. Board energy only, not the rest of the machine.

Hardware: home vs cloud

Training speed by GPU and setup The rented RTX 5090 trains the 0.8B ×2.5 faster than the local GPU, and linear-attention kernels train ×1.8–1.9 faster with the same memory
  • RTX 5070 Ti (local)
  • RTX 5090 (Vast.ai)
  • RTX PRO 6000 Blackwell (Vast.ai)
  • dale-0.8b training run
RTX 5070 Ti · 0.8B with gradient checkpointing 1.36 s 5,871 11.3 GB / 16 GB
×2.5 faster
RTX 5090 · 0.8B with gradient checkpointing 0.54–0.56 s 14,869 11.3 GB / 32 GB
RTX 5090 · 0.8B without gradient checkpointing 0.47 s 17,035 26.6 GB / 32 GB
RTX 5090 · 2B with gradient checkpointing 1.07–1.11 s 7,531 25.9 GB / 32 GB
RTX PRO 6000 Blackwell · 0.8B O1 · Max-Q 300 W · no checkpointing · batch 32×1 0.34 s 23,242 37.9 GB / 96 GB
RTX PRO 6000 Blackwell · 0.8B T2 · WS 450 W · checkpointing + kernels · batch 16×2 0.30 s 26,381 11.7 GB / 96 GB

Linear-attention kernels on the 0.8B

measured on RTX 5070 Ti; accuracy equivalent against fp32

Against the fp32 reference: mean |ΔNLL| 1.2e-3 with kernels and 1.0e-3 without them.

View data
Training speed and memory by GPU and setup
GPU Model Setup s/step tokens/s VRAM
RTX 5070 Ti (local) 0.8B with gradient checkpointing 1.36 5,871 11.3 GB / 16 GB
RTX 5090 (Vast.ai) 0.8B with gradient checkpointing 0.54–0.56 14,869 11.3 GB / 32 GB
RTX 5090 (Vast.ai) 0.8B without gradient checkpointing 0.47 17,035 26.6 GB / 32 GB
RTX 5090 (Vast.ai) 2B with gradient checkpointing 1.07–1.11 7,531 25.9 GB / 32 GB
RTX PRO 6000 Blackwell (Vast.ai) 0.8B O1 · Max-Q 300 W · no checkpointing · batch 32×1 0.34 23,242 37.9 GB / 96 GB
RTX PRO 6000 Blackwell (Vast.ai) 0.8B T2 · WS 450 W · checkpointing + kernels · batch 16×2 0.30 26,381 11.7 GB / 96 GB
Speed-up of the linear-attention kernels
Task Speed-up
Generation (batch 64 → batch 256) ×2.2–2.6
Scoring (forward) ×1.6
SFT training (with gradient checkpointing, same VRAM) ×1.8–1.9

Source: measurements of each training run (median tokens/s from step 5; T2, only the steps where it had the GPU to itself) and kernel tests.

Two performance lessons:

  • The rented 5090 is 2.5 times faster than the 5070 Ti at home on the same run with gradient checkpointing (1.36 vs 0.54 s per step), for about 0.60 USD an hour. For fast iteration it pays off; for dry runs and debugging, local is better, because mistakes there don’t cost money.
  • Installing the optimized linear-attention kernels (Qwen3.5 uses Gated DeltaNet) sped up, on the 0.8B and the 5070 Ti, batched generation in transformers by 2.2–2.6× and training with gradient checkpointing by 1.8–1.9×, with the same memory and the same accuracy. On the 27B, generation gained only 3%. Without them, transformers warns that it’s “much slower”… and it’s true. That warning should be investigated the first time it shows up.

Export: from the trained model to a 529 MB file

The trained model is converted to GGUF and quantized to 4 bits (Q4_K_M) using an importance matrix computed from training examples, so that quantization loses as little as possible where it matters most. Before I sign off on it, the application’s C++ test suite runs against the model.

llama-imatrix
The importance matrix is computed on CPU from training examples, so the 4-bit quantization loses less.

The real path (and its dead ends)

An honest case study isn’t a straight line. This is the full journey, with what worked and what didn’t:

The real path · Day 1 → Day 16 6 dead ends and one diagnosis: after i4, what moved the test was the data, not the technique
  • Adopted line
  • Dead end
  • Turning point
  • 0.8B
  • 2B
  • Teacher (not deployable)

Phase 3 · day 2 Starting point

Test v1 and reference models

Test v1 (300 cases) and baseline: untuned 0.8B and 9B

test v1 · 300 0.8B base 18.3% · 9B base (Q8_0) 69.7%

Phase 5 · day 3 Superseded

Iteration 1: first 0.8B fine-tune

First full fine-tune on the phase 4 dataset; grid of 3 lr × {2, 3} epochs

test v1 · 300 0.8B (Q8_0) 61.7%

Every failure was a wrong command; the 2B is tried next

Phase 5b · day 4 Superseded

Iteration 2: same dataset, 2B model

Only the model changes: Qwen3.5-2B, same dataset

test v1 · 300 2B (Q8_0) 70.0%

Phase 5c–5d · day 5 Superseded

Iteration 3: dataset ×3

Dataset ×3 (30,415), weak categories reinforced

test v1 · 300 0.8B 71.7% · 2B 77.3%

Phase 5e–5g-2 · day 6 Adopted

Iteration 4: short explanations

Short explanations and +10,414 targeted examples; winner picked on a 500-case dev set

test v1 · 300 0.8B 79.0% · 2B 83.7%

In use until 7b; the 2B was 4 cases short of 85 % on test v1 but left production (too slow on CPU)

Phase 5h–5i · day 7 Reverted

Iteration 5: abstract rules

+1,041 examples from 45 abstract rules

test v1 · 300 0.8B 77.0% · 2B 82.7% McNemar: p ≥ 0.43

Phase 5j · day 7 No gain

Iteration 6: mined real failures

930 mined real failures, corrected: SFT (A) and DPO on top of i4 (B)

test v1 · 300 0.8B 76.7%

DPO (B) was not judged on the test: it lost on dev

Phase 5k · day 8 Dropped

The tldr page in the prompt

The tool's tldr page in the prompt (no training)

−10 net cases on dev (26 helped, 36 hurt)

Dropped at step 0, before touching dale

Phase 5l · day 9 No gain

Distillation from a 27B teacher

Distillation from a Qwen 27B + LoRA teacher: offline KD (K1), minimal on-policy (K2), weight soup (S1)

test v1 · 300 0.8B 78.0% dev v2 · 300 27B teacher (bf16) 88.0%

Phase 5m · day 9 Root cause

Diagnosis: why nothing moved the test

Diagnosis with test v1 opened: why nothing moved the test

only 79 of 300 cases separate models · ceiling 88.7%

Root cause: the dataset spoke a different register than the test (shorter requests, almost no explicit constraints, huge contexts)

Phase 6 · day 11 → day 13 Data

New data in the test's register

New data in the test's register: 20,000 requests; half answered by a frontier LLM → i7 dataset; 600-case dev v3

error in a sample: 4.5% (448 reviewed)

Phase 6b · day 13 Data

Dataset purge with a judge

Whole i7 purged with a frontier LLM judge: 1,390 rows removed (1,327 training)

−1,390 rows · residual error 1.25%

Phase 7 · day 13 Adopted after the test change

SFT on the i7 dataset

SFT from the original 0.8B on i7 (S-a) and on pruned i4 + new data (S-b, 34,197)

test v1 · 300 S-a 78.7%

Dev went up +53 while test v1 barely moved: not adopted under the rule then in force

Test change: v1 (300 cases) → v2 (471 cases) v1 and v2 figures are not compared with each other

Phase 7b · day 13 Adopted

Test v2 and adoption of S-a

Test v1 saturated → test v2 (471 cases, the original dev v3 cases)

test v2 · 471 S-a 79.6% · i4 73.9% · S-b 76.0% McNemar against i4: p = 0.001

S-a becomes the current model (later dale-0.8b)

Phase 8 · day 14 No gain

On-policy distillation

On-policy distillation (O1): the teacher corrects the student's drafts token by token (top-64 KL)

test v2 · 471 O1 77.1% · 27B teacher (bf16) 92.6%

Closer to the teacher, not more accurate; breaks format (5 invalid JSON)

Phase 8b · day 15 No gain

Black box and white box

Full teacher answers: T1 black box (SFT) and T2 white box (½ CE + ½ KL top-64)

test v2 · 471 T1 71.3% · T2 78.8%

Phase 9 · day 15 Final

Final benchmark

Final benchmark in Q4_K_M, everything rejudged from scratch on the local GPU

test v2 · 471 dale-0.8b 79.4% 95% CI 75.5–82.8%

Test v1 · 300 cases

Until day 13

18.3 61.7 70.0 71.7 77.3 79.0 83.7 78.7

% of cases correct

Test v2 · 471 cases

From day 13

27B teacher + LoRA · 92.6% · bf16 on GPU · not deployable 73.9 79.6 79.4

% of cases correct

Accuracy in Q4_K_M; in Q8_0 where Q4_K_M was not measured.

View data
Project phases and iterations, with their result and their test
Phase Day Step Result Verdict
3 day 2 Test v1 and reference models test v1 · 300: 0.8B base 18.3%, 9B base (Q8_0) 69.7% Starting point
5 day 3 Iteration 1: first 0.8B fine-tune test v1 · 300: 0.8B (Q8_0) 61.7% Superseded
5b day 4 Iteration 2: same dataset, 2B model test v1 · 300: 2B (Q8_0) 70.0% Superseded
5c–5d day 5 Iteration 3: dataset ×3 test v1 · 300: 0.8B 71.7%, 2B 77.3% Superseded
5e–5g-2 day 6 Iteration 4: short explanations test v1 · 300: 0.8B 79.0%, 2B 83.7% Adopted
5h–5i day 7 Iteration 5: abstract rules test v1 · 300: 0.8B 77.0%, 2B 82.7% · McNemar: p ≥ 0.43 Reverted
5j day 7 Iteration 6: mined real failures test v1 · 300: 0.8B 76.7% No gain
5k day 8 The tldr page in the prompt −10 net cases on dev (26 helped, 36 hurt) Dropped
5l day 9 Distillation from a 27B teacher test v1 · 300: 0.8B 78.0% · dev v2 · 300: 27B teacher (bf16) 88.0% No gain
5m day 9 Diagnosis: why nothing moved the test only 79 of 300 cases separate models · ceiling 88.7% Root cause
6 day 11 → day 13 New data in the test's register error in a sample: 4.5% (448 reviewed) Data
6b day 13 Dataset purge with a judge −1,390 rows · residual error 1.25% Data
7 day 13 SFT on the i7 dataset test v1 · 300: S-a 78.7% Adopted after the test change
7b day 13 Test v2 and adoption of S-a test v2 · 471: S-a 79.6%, i4 73.9%, S-b 76.0% · McNemar against i4: p = 0.001 Adopted
8 day 14 On-policy distillation test v2 · 471: O1 77.1%, 27B teacher (bf16) 92.6% No gain
8b day 15 Black box and white box test v2 · 471: T1 71.3%, T2 78.8% No gain
9 day 15 Final benchmark test v2 · 471: dale-0.8b 79.4% · 95% CI 75.5–82.8% Final

Source: log of the project's phases and iterations; every figure carries its test (v1, 300 cases; v2, 471 cases).

The first four iterations climbed fast: from the base model’s 18.3% to 79.0% with the 0.8B and 83.7% with a 2B, on the first test set (on the final test set, that same 0.8B i4 scores 73.9%). Then came the plateau. These are the “obvious” ideas I tried to break through it that didn’t work:

No gain 930 real failures

Mining failures and retraining (SFT + DPO)

I collected 930 real model errors, generated the correct answers and retrained with SFT and with DPO. SFT didn’t improve on the first test set (77.7 / 76.7% vs 78.0 / 79.0% for i4, not significant) and DPO was already losing on the dev set.

Discarded +26 / −36

Putting the documentation in the prompt

Before building anything, I went through i4’s failures with the tldr page alongside: in 26 the page held the fix and in 36 it pushed straight toward the error. A net −10 when the rule asked for +29, so I dropped it without implementing it.

No gain teacher: 92.6%

Distilling from a 27B model

I fine-tuned a 27B Qwen as the teacher. It reached 92.6% on the final test set (in bf16 on GPU), but it’s impossible to run on a laptop. Distilling its knowledge into the 0.8B didn’t improve the student.

No gain 372 / 363 vs 370 / 375

On-policy training

Having the teacher correct the student’s own answers made the student more like the teacher, but not more accurate.

No gain 341 / 336 vs 372 / 371

Black-box vs white-box

Distilling from the teacher’s probabilities (white-box) clearly beats seeing only its answers (black-box), but neither significantly beats the current model.

Adopted +22 / +27 cases, p ≤ 0.005

New data in the test set's register

The change that did work: 18% new data written the way real users talk, plus purging errors from the dataset. This is the model I’m releasing.

This is what a failed experiment looks like: two new variants against the current model on 471 cases; neither beats it with statistical significance.

Results of 1.0: a 0.8B against models ten times its size

Final measurement of 1.0: every model under the same conditions, judged from scratch on the same day.

Accuracy on test v2 · 471 cases At 529 MB, dale beats models up to 10.7 times its size by 16.6 points
  • dale (fine-tuned)
  • Untuned models
  • 95% confidence interval (Wilson)
  • Goal 85%
+16.6 pts
View data
Accuracy of each model on test v2, with its confidence interval and size
Model Correct Accuracy 95% CI GGUF
dale-0.8b 374 / 471 79.4% 75.5–82.8% 529 MB (×1.0)
Gemma 4 E4B-it 296 / 471 62.8% 58.4–67.1% 5.0 GB (×9.4)
Qwen3.5-9B base 296 / 471 62.8% 58.4–67.1% 5.7 GB (×10.7)
Qwen3.5-4B base 257 / 471 54.6% 50.0–59.0% 2.7 GB (×5.2)
Gemma 4 E2B-it 254 / 471 53.9% 49.4–58.4% 3.1 GB (×5.9)
Qwen3.5-2B base 152 / 471 32.3% 28.2–36.6% 1.3 GB (×2.4)
Qwen3.5-0.8B base 70 / 471 14.9% 11.9–18.4% 533 MB (×1.0)

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

dale-0.8b gets 374 of 471 cases right (79.4%, 95% CI: 75.5–82.8%). The best untuned models, Qwen3.5-9B and Gemma 4 E4B, tie at 296 (62.8%). That’s a 16.6-point gap, and the confidence intervals don’t even touch.

Size versus accuracy dale sits in an empty corner: as small as the smallest model and the most accurate
  • dale (fine-tuned)
  • Untuned models
  • Untuned models frontier
10.7 times smaller than Qwen 9B Qwen 0.8B Qwen 2B Gemma E2B Qwen 4B Gemma E4B Qwen 9B dale-0.8b 79.4% · 529 MB
View data
GGUF file size and accuracy of each model
Model GGUF (MB) Accuracy
dale-0.8b 529.3 79.4%
Qwen3.5-0.8B base 532.5 14.9%
Qwen3.5-2B base 1,280.8 32.3%
Qwen3.5-4B base 2,740.9 54.6%
Gemma 4 E2B-it 3,106.7 53.9%
Gemma 4 E4B-it 4,977.2 62.8%
Qwen3.5-9B base 5,680.5 62.8%

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

Size is the other half of the story. dale-0.8b takes up 529 MB; the 9B, 5.7 GB (10.7 times more) and Gemma 4 E4B, 5.0 GB (9.4 times more). Compared with its own starting point, the same untuned 0.8B, it gets 5.3 times as many cases right.

Exactly where it wins

Failure types across the 471 cases dale never breaks the format or picks the wrong kind of answer: every miss is a wrong command
  • Invalid JSON
  • Wrong type
  • Wrong command
View data
Failures of each model by type
Model Invalid JSONWrong typeWrong command Total
dale-0.8b 0097 97 / 471
Gemma 4 E4B-it 1740118 175 / 471
Qwen3.5-9B base 345127 175 / 471
Qwen3.5-4B base 2148145 214 / 471
Gemma 4 E2B-it 2646145 217 / 471
Qwen3.5-2B base 5056213 319 / 471
Qwen3.5-0.8B base 58102241 401 / 471

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

Fine-tuning completely eliminates two kinds of failure: invalid JSON and answers of the wrong type. All of dale-0.8b’s remaining failures (97) are incorrect commands, and even so there are fewer of them than for the 9B (127) or the E4B (118).

Asking or refusing instead of running dale hesitates on every ambiguous case, refuses everything off-topic and never refuses a valid command
  • dale (fine-tuned)
  • Untuned models

Ambiguous: asks to clarify

Higher is better

Ambiguous cases answered with “not sure”

Out of scope: refuses

Higher is better

Requests outside dale's scope, refused

Valid commands refused

Lower is better

Legitimate commands the model declined to give

Invalid JSON

Lower is better

Responses the program cannot read

Each dot is one case

View data
Behaviour of each model on doubts, refusals and format
Model Ambiguous answered “not sure” (of 31)Correct refusals (of 101)Valid commands refused or answered “not sure” (of 339)Invalid JSON (of 471)
dale-0.8b 3110100
Gemma 4 E4B-it 41011317
Qwen3.5-9B base 3101173
Qwen3.5-4B base 10992521
Gemma 4 E2B-it 101002426
Qwen3.5-2B base 062150
Qwen3.5-0.8B base 6303158

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

The most striking difference is in knowing when not to answer. Faced with an ambiguous request, dale-0.8b asks for clarification in 31 of 31 cases; the 9B, in 3. The large models know how to refuse what’s out of scope, but they rarely ask for clarification: on an ambiguous request the 9B refuses it (23 of 31) and the E4B runs a command in 16. In a tool that runs commands on your machine, that difference matters.

Correct answers by category dale wins or ties 11 of 14 categories against Qwen 9B and Gemma E4B, mostly by a few cases; the bottom two rows score only the response type
Best in row (ties included)
Correct cases by category and model (% of cases correct)
Category dale Gemma E4B Qwen 9B Qwen 4B Gemma E2B Qwen 2B Qwen 0.8B
Files n = 42 62 50 45 40 31 19 14
Text n = 40 57 23 53 30 30 20 5
Processes n = 30 70 40 43 33 33 10 3
System n = 29 76 83 69 55 72 45 24
Git n = 28 75 64 50 36 39 25 4
Packages n = 28 86 71 54 43 64 29 21
Permissions n = 28 82 71 64 61 43 43 11
Misc n = 25 72 64 60 40 44 32 12
Network n = 25 84 56 68 64 48 28 12
Compression n = 23 70 74 61 30 39 26 4
Disks n = 22 59 27 45 41 32 18 5
Docker n = 19 74 74 84 63 42 32 0
Out of scope n = 101 100 100 100 98 99 61 30
Ambiguous n = 31 100 13 10 32 32 0 19
View data
Correct cases by category and model
Category n dale-0.8bGemma 4 E4B-itQwen3.5-9B baseQwen3.5-4B baseGemma 4 E2B-itQwen3.5-2B baseQwen3.5-0.8B base
Files 42 262119171386
Text 40 23921121282
Processes 30 211213101031
System 29 2224201621137
Git 28 211814101171
Packages 28 242015121886
Permissions 28 2320181712123
Misc 25 181615101183
Network 25 211417161273
Compression 23 1617147961
Disks 22 136109741
Docker 19 14141612860
Out of scope 101 101101101991006230
Ambiguous 31 3143101006

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

By category, dale-0.8b wins or ties in 11 of 14 against the 9B and the E4B, and loses by one or two cases in compression, docker and system. Nor does it have a language bias: 80.2% in Spanish and 78.5% in English.

McNemar test against each rival Where they disagree, dale wins far more cases than it loses, and it is not luck: p < 0.0001 in all 6 comparisons
  • Only the rival is right
  • Only dale is right

Each row counts only the cases where the two models disagree: on the left, those only the rival gets right; on the right, those only dale gets right. If both models were equally good, the two bars would be about the same.

View data
Discordant cases between dale and each rival, with the McNemar p-value
Rival Only the rival Only dale p-value
Gemma 4 E4B-it 31 109 p < 0.0001
Qwen3.5-9B base 42 120 p < 0.0001
Qwen3.5-4B base 23 140 p < 0.0001
Gemma 4 E2B-it 20 140 p < 0.0001
Qwen3.5-2B base 9 231 p < 0.0001
Qwen3.5-0.8B base 2 306 p < 0.0001

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

In the real world

A benchmark on a GPU is all well and good, but Dale has to work on anyone’s laptop. I measured it on a 2020 laptop with no GPU:

Latency per request on CPU, no GPU On a 2020 laptop, dale-0.8b answers in 1.72 s median; the 2B goes past the 3 s limit
  • Median
  • Up to p90
  • Limit 3 s

seconds per request

View data
Median and p90 latency by machine and mode
Machine and mode Median p90 tokens/s
Laptop · warm 1.72 s 2.19 s 33.1
Laptop · cold 1.91 s 2.39 s 33.4
Development tower · warm 0.88 s 1.10 s 72.6
Laptop · 2B model, warm 3.35 s 4.26 s 16.0

Source: bench of 30 requests on all cores; cold, 1 run per request; warm, 3. Wall-clock time.

1.72 seconds median per answer (2.19 s at the 90th percentile), at about 33 tokens per second, with 100% of answers in valid JSON. A test 2B also worked, but took 3.35 s, above the 3 s limit I had set myself. That’s why, on the CPU, Dale uses the 0.8B. Using larger models needed something else, and that’s the story of 1.1.

Distribution is lightweight too: a single binary that only needs glibc 2.29 or later (any distribution from the last few years) and builds reproducibly, bit for bit. The model is downloaded the first time from Hugging Face and verified with SHA-256.

Before and after, with the same requests in Spanish: the original Qwen3.5-0.8B at the top, Dale at the bottom. (Here the base model uses Dale's minimal prompt; in the official benchmark it gets 8 examples and does somewhat better.)
In Spanish too: the interface and the explanations follow the language of the request.

Dale 1.1: GPU and three more models

Version 1.0 left two things pending: 85% and the GPU. The 0.8B had given all it could, 27 cases short of the goal, and a 2B no longer fit within the 3 s limit on a laptop CPU. Early in the project I had measured the GPU and ruled it out: with a 0.8B model and one process per request, loading the weights into VRAM eats almost all of the gain. With a 4B or a 9B model, the math changes.

For 1.1 I set myself two goals: the same recipe and the same data in three more sizes, and a single binary that uses the GPU when there is one and the CPU when there isn’t.

Training the family: three models, one pod, 9.20 USD

Three trainings in one pod · RTX PRO 6000 WS The 9B with LoRA trains faster than the 2B with a full fine-tune: 76 min versus 113 min
  • dale-2b
  • dale-4b
  • dale-9b
dale-2b full fine-tune 1.71 s/step
dale-4b full fine-tune 1.34 s/step
dale-9b LoRA r32 1.17 s/step a full fine-tune of the 9B does not fit in 96 GB

The pod's 5.89 h

  • dale-2b 113 min
  • dale-4b 85 min
  • dale-9b 76 min
  • rest of the pod time 79 min

5.89 pod-hours · 9.20 USD for the three models

View data
Duration, method, speed and peak VRAM of each phase 10 training run
Model Method Minutes s/step Peak VRAM
dale-2b full fine-tune 113 1.71 47.0 GB / 96 GB
dale-4b full fine-tune 85 1.34 76.0 GB / 96 GB
dale-9b LoRA r32 76 1.17 61.9 GB / 96 GB

Source: phase 10 log: the same 48,841 examples, 2 epochs and 3,054 steps for all three; the pod also quantized and evaluated the models.

The same 48,841 examples and the same two epochs as the 0.8B. The 2B and the 4B, fully fine-tuned. A full fine-tune of the 9B didn’t fit even in 96 GB of VRAM, so I trained it with rank-32 LoRA (80 million trainable parameters) and merged the adapter into the weights. The three trainings, their Q4_K_M quantization and the evaluation all ran on a single pod with an RTX PRO 6000 96 GB: 5.89 hours and 9.20 USD. A curious detail: the 9B with LoRA was the fastest of the three, at 76 minutes.

Results: the same recipe scales

Accuracy on test v2 · 471 cases dale-9b reaches 89.2%, 26.3 points above the best untuned model; dale-4b and dale-9b beat the 85% goal
  • dale fine-tuned: 0.8B, 2B, 4B and 9B
  • Untuned models
  • 95% confidence interval (Wilson)
  • Goal 85%
  • Best untuned (62.8%)
  • 27B teacher + LoRA (bf16, not deployable)
27B teacher · 92.6% · not deployable
+26.3 pts
View data
Accuracy of each model on test v2, with its confidence interval and size
Model Correct Accuracy 95% CI GGUF
dale-9b 420 / 471 89.2% 86.0–91.7% 5.6 GB (×10.6)
dale-4b 410 / 471 87.0% 83.7–89.8% 2.7 GB (×5.1)
dale-2b 385 / 471 81.7% 78.0–85.0% 1.3 GB (×2.4)
dale-0.8b 374 / 471 79.4% 75.5–82.8% 529 MB (×1.0)
Gemma 4 E4B-it 296 / 471 62.8% 58.4–67.1% 5.0 GB (×9.4)
Qwen3.5-9B base 296 / 471 62.8% 58.4–67.1% 5.7 GB (×10.7)
Qwen3.5-4B base 257 / 471 54.6% 50.0–59.0% 2.7 GB (×5.2)
Gemma 4 E2B-it 254 / 471 53.9% 49.4–58.4% 3.1 GB (×5.9)
Qwen3.5-2B base 152 / 471 32.3% 28.2–36.6% 1.3 GB (×2.4)
Qwen3.5-0.8B base 70 / 471 14.9% 11.9–18.4% 533 MB (×1.0)
27B teacher + LoRA (bf16, not deployable) 436 / 471 92.6% 89.8–94.6% —

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

dale-9b gets 420 of 471 cases right (89.2%, 95% CI: 86.0–91.7%) and dale-4b, 410 (87.0%). Both beat the 85% the 0.8B didn’t reach, by 19 and 9 cases. They’re measured with the same test set, the same llama.cpp version, the same Q4_K_M format and the same two judges with debate as the rest. The 9B lands 3.4 points below the 27B teacher (92.6% in bf16), which can’t be deployed on any laptop.

Size versus accuracy At the same size, fine-tuning adds 26.3 to 64.5 points, and even dale-0.8b beats every untuned model
  • dale fine-tuned: 0.8B, 2B, 4B and 9B
  • Qwen3.5 base, untuned
  • Gemma 4, untuned
+64.5 pts +49.5 pts +32.5 pts +26.3 pts Qwen 0.8B Qwen 2B Gemma E2B Qwen 4B Gemma E4B Qwen 9B dale-0.8b 79.4% dale-2b 81.7% dale-4b 87.0% dale-9b 89.2%
View data
GGUF file size and accuracy of each model
Model GGUF (MB) Accuracy
dale-0.8b 529.3 79.4%
Qwen3.5-0.8B base 532.5 14.9%
dale-2b 1,274.4 81.7%
Qwen3.5-2B base 1,280.8 32.3%
dale-4b 2,708.8 87.0%
Qwen3.5-4B base 2,740.9 54.6%
Gemma 4 E2B-it 3,106.7 53.9%
Gemma 4 E4B-it 4,977.2 62.8%
dale-9b 5,629.1 89.2%
Qwen3.5-9B base 5,680.5 62.8%

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

Every fine-tuned size beats the same untuned model, and by a lot: ×5.3 at 0.8B, ×2.5 at 2B, ×1.6 at 4B and ×1.4 at 9B. The relative gain shrinks as the base model already knows more, but it doesn’t vanish: dale-9b gets 124 more cases right than Qwen3.5-9B. And dale-0.8b, at 529 MB, is still above every untuned model, the 9B included.

From the 0.8B to the 2B there are only 11 cases of difference; the real jump comes with the 4B and the 9B. That’s why the app doesn’t use the 2B: I published it on Hugging Face for anyone who wants to use it directly with llama.cpp.

Where each size wins

Failure types across the 471 cases No dale model breaks the format and only 3 of their 1,884 responses have the wrong type: nearly every miss is a wrong command
  • Invalid JSON
  • Wrong type
  • Wrong command
View data
Failures of each model by type
Model Invalid JSONWrong typeWrong command Total
dale-9b 0051 51 / 471
dale-4b 0160 61 / 471
dale-2b 0284 86 / 471
dale-0.8b 0097 97 / 471
Gemma 4 E4B-it 1740118 175 / 471
Qwen3.5-9B base 345127 175 / 471
Qwen3.5-4B base 2148145 214 / 471
Gemma 4 E2B-it 2646145 217 / 471
Qwen3.5-2B base 5056213 319 / 471
Qwen3.5-0.8B base 58102241 401 / 471

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

All four fine-tuned models keep zero invalid-JSON answers and almost none of the wrong type (2 for the 2B, 1 for the 4B and none for the 9B). What goes down as they grow is incorrect commands: from 97 for the 0.8B to 51 for the 9B. And all four ask for clarification on the 31 ambiguous requests and refuse the 101 out-of-scope cases.

Correct answers by category dale-9b wins or ties 14 of 14 categories against Qwen 9B and Gemma E4B; the bottom two rows score only the response type
Best in row (ties included)
Correct cases by category and model (% of cases correct)
Category dale 0.8B dale 2B dale 4B dale 9B Qwen 9B Gemma E4B
Files n = 42 62 67 76 74 45 50
Text n = 40 57 63 70 75 53 23
Processes n = 30 70 67 70 73 43 40
System n = 29 76 79 79 93 69 83
Git n = 28 75 71 86 86 50 64
Packages n = 28 86 86 96 89 54 71
Permissions n = 28 82 82 86 89 64 71
Misc n = 25 72 80 96 92 60 64
Network n = 25 84 80 88 96 68 56
Compression n = 23 70 78 91 100 61 74
Disks n = 22 59 82 77 77 45 27
Docker n = 19 74 74 79 89 84 74
Out of scope n = 101 100 100 100 100 100 100
Ambiguous n = 31 100 100 100 100 10 13
View data
Correct cases by category and model
Category n dale-0.8bdale-2bdale-4bdale-9bQwen3.5-9B baseGemma 4 E4B-it
Files 42 262832311921
Text 40 23252830219
Processes 30 212021221312
System 29 222323272024
Git 28 212024241418
Packages 28 242427251520
Permissions 28 232324251820
Misc 25 182024231516
Network 25 212022241714
Compression 23 161821231417
Disks 22 13181717106
Docker 19 141415171614
Out of scope 101 101101101101101101
Ambiguous 31 3131313134

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

dale-9b beats Qwen3.5-9B in 13 of 14 categories and ties in the other (out of scope, where every model refuses all 101 cases). It gets all 23 compression cases and 30 of 40 in text, where the untuned 9B stops at 21. But the big model doesn’t win everything: in packages, files and misc, dale-4b gets one or two more cases right, and in disks the 2B beats both. There’s no language bias either: dale-9b gets 89.1% in Spanish and 89.3% in English.

Dangerous requests inside the test · 30 cases All four dale models give the right command for 21 to 26 of the 30; the best untuned model, for 21
  • dale fine-tuned: 0.8B, 2B, 4B and 9B
  • Untuned models

They ask for dangerous commands, such as wiping a file, deleting a partition or killing a process, and the expected answer is the command: getting it right means giving it correctly. The model does not decide the danger: in dale the risk checker does, in code, and the command only runs if you type “run”, in every mode. This benchmark measures the model alone, without that checker.

View data
Dangerous requests in test v2 answered with the right command, by model
Model Right command Share
dale-4b 26 / 30 86.7%
dale-9b 24 / 30 80.0%
dale-0.8b 22 / 30 73.3%
dale-2b 21 / 30 70.0%
Gemma 4 E4B-it 21 / 30 70.0%
Qwen3.5-9B base 20 / 30 66.7%
Gemma 4 E2B-it 19 / 30 63.3%
Qwen3.5-4B base 13 / 30 43.3%
Qwen3.5-2B base 12 / 30 40.0%
Qwen3.5-0.8B base 3 / 30 10.0%

Source: final benchmark on test v2 (471 cases), every model in Q4_K_M on the same llama.cpp build; untuned models with the 8-example prompt, dale with its 2-line prompt.

The test set includes 30 dangerous requests: deleting with no way back, force-killing processes, flushing the firewall, writing over a whole disk… dale-4b proposes the right command for 26 of 30 and dale-9b for 24; the untuned 9B, for 20. Getting the command right is only half of it: whatever the model, what flags the risk and asks for confirmation is the C++ checker, not the model.

One binary for CPU and GPU

I wanted installing Dale to still mean downloading one file. That’s why I chose Vulkan: it works on NVIDIA, AMD and Intel GPUs with just the driver, no CUDA or ROCm, and allows a single binary instead of one build per vendor.

The trick is not linking the Vulkan library. The shaders are compiled into the binary, but libvulkan.so.1 is only opened (with dlopen) when the GPU is actually going to be used. A machine with no GPU and no Vulkan runs the same binary without missing anything. The price is size: the binary goes from 6.9 MB to 51 MB.

Picking the model without asking too much

First run, or dale --setup dale picks the model that fits your machine, never downloads without asking and, if the GPU fails, answers on the CPU

First run

or dale --setup to choose again

Finds the dedicated GPU with the most free VRAM

105 ms. An integrated GPU or llvmpipe is never picked on its own.

free VRAM

≥ 8 GiB

Lets you choose

dale-4b (Enter, faster) or dale-9b (more accurate)

≥ 4 GiB

Offers dale-4b

[Y/n]

no GPU, integrated or < 4 GiB

dale-0.8b on the CPU

as in 1.0

Asks before downloading

529 MB, 2.7 GB or 5.6 GB; checks the SHA-256

  • If you say no: CPU is saved
  • If the download fails: CPU this time, nothing saved

Saves the choice

~/.local/state/dale/setup

Safety net. If the GPU fails to load or to answer, that same request is answered on the CPU; if the process crashes, the next run detects it and switches to the CPU. With device = auto it stays on the CPU; dale --setup tries the GPU again.

Without a terminal or with --json, it never asks or downloads.

Source: dale 1.1.0 rules (src/infer/hardware.cpp); detection measured on the reference desktop with a 16 GB GPU.

The first time you start Dale (or when you run dale --setup), it looks for the dedicated GPU with the most free VRAM. With 8 GiB free or more, it lets you choose between dale-4b and dale-9b; with 4 GiB, it offers dale-4b; otherwise, dale-0.8b on the CPU, as always. It always asks before downloading and checks the SHA-256. Integrated graphics are never picked on their own: with the 4B they take 5 seconds per answer.

VRAM in use, process peak dale asks for more free VRAM than it uses: 4 GiB for a model that takes 3.2 GiB, 8 GiB for one that takes 5.4 GiB. The headroom is left for the desktop
  • Peak VRAM
  • Headroom up to the threshold
  • Free VRAM dale requires
View data
Peak VRAM of each model and the free VRAM dale requires before offering it
Model Peak VRAM Free VRAM required Headroom Use in the CLI
dale-0.8b 1.1 GiB — — runs on the CPU by default
dale-2b 1.8 GiB — — not used by the CLI
dale-4b 3.2 GiB 4 GiB 0.8 GiB offered with ≥ 4 GiB free
dale-9b 5.4 GiB 8 GiB 2.6 GiB offered with ≥ 8 GiB free

Source: peak VRAM of the dale 1.1.0 process on the reference desktop with a 16 GB GPU; free-VRAM thresholds from dale 1.1.0 (src/infer/hardware.cpp).

The thresholds leave room on purpose: dale-4b uses about 3.2 GiB and dale-9b about 5.4 GiB, but I ask for 4 and 8 GiB free so the desktop doesn’t run out of memory. And if the GPU fails to load or to answer, that same request is answered on the CPU; if the process crashes halfway, the next run detects it and goes back to the CPU. I tested each case in containers: no driver, no Vulkan, integrated graphics, a GPU that disappears and a real crash.

Real speed with a GPU

Warm time per request, by phase On the GPU, loading the weights takes longest: 0.77 s of dale-4b's 1.21 s. Generating the answer takes 0.15 s
  • Model load
  • Prompt read
  • Generation
  • Rest
  • Up to p90
  • Limit 3 s

dale-0.8b stays on the CPU: on the GPU it only saves 0.15 s, because loading the weights eats almost all of it, and on the CPU it runs on any machine. With a GPU that can take it, dale offers dale-4b, which gets more right.

View data
Warm and cold time per request, by model and device
Model and device Median p90 Cold (median / p90) Load Prompt Generation Rest tokens/s
dale-0.8b · CPU 0.91 s 1.13 s 1.10 s / 1.31 s 0.37 s 0.14 s 0.34 s 0.06 s 71
dale-0.8b · GPU 0.76 s 0.80 s 0.91 s / 0.95 s 0.46 s 0.03 s 0.06 s 0.21 s 391
dale-2b · GPU 0.86 s 0.91 s 1.28 s / 1.34 s 0.53 s 0.03 s 0.08 s 0.22 s 300
dale-4b · GPU 1.21 s 1.32 s 2.12 s / 2.29 s 0.77 s 0.07 s 0.15 s 0.23 s 160
dale-9b · GPU 1.66 s 1.76 s 3.56 s / 3.66 s 1.07 s 0.07 s 0.24 s 0.29 s 103
dale-4b · CPU 3.10 s 4.03 s — 1.02 s 0.58 s 1.40 s 0.10 s 18
dale-4b · integrated GPU 5.03 s 7.23 s — 0.86 s 0.16 s 3.93 s 0.09 s 6

Source: dale 1.1.0 on the reference desktop with a 16 GB GPU; median and p90 per warm request, wall-clock time; phases are medians and the rest is process start, verification and the like.

On a reference desktop with a 16 GB GPU, dale-4b answers in 1.2 s median and dale-9b in 1.7 s, both below the 3 s limit. The interesting part is where the time goes: generating the answer is very fast (160 tokens per second with the 4B). What weighs most is uploading the weights to VRAM on every request: 0.77 s with the 4B and 1.07 s with the 9B. A resident process that kept them loaded would avoid it, but it would break the one-process-per-request design, with no background services; with these numbers, it isn’t worth it. The chart also shows why the CPU is no option for the large models: the 4B on the CPU takes 3.1 s.

First answers with an empty shader cache The first time on the GPU, the driver compiles its shaders: two slow answers, then 1.2 s with dale-4b
  • While the shaders compile
  • Up to speed
  • Limit 3 s

It happens once per user and driver, and dale warns you about it when you pick the GPU.

View data
Time of the first GPU requests with an empty shader cache
Model 1st request 2nd request Then
dale-4b ≈8.5 s≈5.5 s1.2 s
dale-9b ≈8.9 s≈6.0 s1.7 s

Source: dale 1.1.0 on the reference desktop with a 16 GB GPU, with the driver's shader cache just cleared; approximate values.

There’s a toll the first time: the driver compiles the shaders, and the first two answers take about 8.5 and 5.5 seconds. It happens once per user and driver, and Dale warns about it when you pick the GPU.

Cost and time

Phases, where they ran and what the rented GPU cost 22 days and about 39 USD of cloud GPU: 12 pods and 40 pod-hours
  • Local, no rental
  • Cloud · RTX 5090
  • Cloud · RTX PRO 6000 Blackwell
  • Estimated

Cloud GPU cost by phase

Total ≈ 39.16 USD: 33.75 documented + 5.41 estimated

Does not include frontier LLM usage to generate and judge data (not tracked in USD), local electricity or the development machine.

View data
Project phases by day, where they ran and GPU cost
Phase Days Where Pod hours USD
1 · CLI and risk checker day 1 local — —
2 · Inference with llama.cpp (0.8B base) day 1 local — —
2b · MTP and GPU: not worth it day 2 local — —
3 · Test v1 and double judge day 2 local — —
4 · Contract v2 and 10,000-example dataset day 3 local — —
5 · Fine-tuning, iterations 1–6 day 3 → day 8 Cloud · RTX 5090 19.55 11.44
5k · tldr in the prompt: dropped day 8 local — —
5l · Distillation from the 27B teacher day 9 Cloud · RTX PRO 6000 Blackwell 6.08 7.71
5m · Diagnosis: root cause day 9 local — —
6 · New data (i7) and dev v3 day 11 → day 13 local — —
6b · Dataset purge day 13 local — —
7 · SFT on i7 (S-a = dale-0.8b) day 13 Cloud · RTX 5090 1.67 1.10
7b · Test v2 and adoption of S-a day 13 local — —
8 · On-policy distillation (O1) day 14 Cloud · RTX PRO 6000 Blackwell 3.87 5.41 (estimated)
8b · Black box and white box (T1, T2) day 15 Cloud · RTX PRO 6000 Blackwell 3.00 4.30
9 · Final benchmark day 15 local — —
pub · Packaging and latency day 16 local — —
10 · dale-2b, dale-4b and dale-9b day 21 Cloud · RTX PRO 6000 Blackwell 5.89 9.20
11 · GPU with Vulkan: dale 1.1.0 day 22 local — —

Source: phase log and the cost of each pod; phase 8 is an estimate (pod price × pod life).

The whole project, from the first line of the CLI to 1.1 with GPU support, took 22 calendar days: 1.0 was ready on day 16 and 1.1 on day 22. The rented GPU time cost about 39 USD in total, across 12 machines and about 40 hours of use. A small part (about 5 USD from one phase) is an estimate, because it wasn’t recorded. That figure doesn’t include the use of frontier LLMs for generating data and judging.

The expensive part wasn’t training the final models: the 0.8B cost around 1 USD and the three new ones, 9.20 USD together. The expensive part was the experiments that didn’t work: the ones using the 27B teacher (distillation and on-policy) needed 96 GB GPUs and took 17.4 USD, almost half of the spend.

What I learned

For the 0.8B, nearly all of the accuracy came from the data, not from more sophisticated techniques:

Where the accuracy came from · test v2, 471 cases, Q4_K_M Nearly all of it came from the data; no technique with the 27B teacher added anything
  • Total
  • Gain
  • dale-0.8b
  • 27B + LoRA teacher, alone

From the base model to dale-0.8b

correct cases out of 471

i4 was measured on test v2 in phase 7b; the base model and dale-0.8b in phase 9's rejudged benchmark; each step uses each model's own prompt.

Experiments against the current model

S-a: 375 cases (79.6%) in Q4_K_M, phase 7b

S-a is the same model as dale-0.8b: it scored 375 in phase 7b and 374 when everything was rejudged in phase 9. O1 and T2 are within noise (McNemar p = 0.10 and 0.68 in Q4_K_M; +2 each in Q8_0); only T1 is genuinely worse (p < 0.001).

View data
Correct cases on test v2 for each step and each experiment
Step or experiment Correct cases Accuracy Difference
From the base model to dale-0.8b
Qwen3.5-0.8B base 70 14.9% —
Full fine-tune + datasets i1–i4 348 73.9% +278
Iteration 4 (i4) 348 73.9% —
User-register data + purge (i7) 374 79.4% +26
dale-0.8b 374 79.4% —
Against S-a (375)
O1 · on-policy distillation 363 77.1% −12
T1 · black box 336 71.3% −39
T2 · white box 371 78.8% −4
27B + LoRA teacher, alone (bf16, not deployable) 436 92.6% +61

Source: final rejudged benchmark (phase 9) and iteration log (phases 7b, 8 and 8b); all on test v2 (471 cases), in Q4_K_M except the teacher (bf16).

  1. Measure before you train

    The test set and the complete application came first. Without them, every decision would have been a hunch.

    471 frozen cases in the test set

  2. Don't trust your test set

    Mine saturated halfway through the project and kept hiding real improvements from me. Check how many cases actually discriminate.

    79 / 300 cases that discriminated on the first test set

  3. Data rules

    The biggest jump didn't come from a more sophisticated algorithm, but from writing the data the way real users talk.

    +27 cases from 18% new data plus the dataset purge

  4. A bigger model as a teacher guarantees nothing

    A 27B at 92.6% (in bf16) couldn't pass that edge on to a 0.8B with any of the four recipes.

    4 recipes 0 gains over the current model

  5. The third epoch never helped

    And learning rate grids didn't move the needle either. Time is better spent on the data.

    2 epochs in the final model

  6. Rehearse locally, train in the cloud

    Mistakes at home are free; on a pod you pay for them by the hour.

    ×2.5 faster on the rented RTX 5090

  7. Don't delegate safety to the model

    A deterministic checker, with tests, is what makes a tool like this usable.

    0 risk decisions made by the model

  8. The same data serves the whole family

    With no change to the recipe, the 9B reached 89.2%. Where a full fine-tune didn't fit, rank-32 LoRA.

    89.2% dale-9b, with LoRA r32 in 76 minutes

  9. The GPU pays off as the model grows

    With the 0.8B it wasn't worth it; with the 4B it's the difference between 3.1 s on CPU and 1.2 s on GPU, in a single binary.

    1.2 s dale-4b on GPU, vs 3.1 s on CPU

  10. Investigate every performance warning

    One ignored “fallback” warning made the 0.8B's training almost twice as slow.

    ×1.8–1.9 faster 0.8B training with the kernels

What I didn’t achieve

My goal was 85%: 401 of 471 cases. In 1.0, the 0.8B landed at 374, 27 cases short, and it’s still there: on a laptop CPU, I haven’t reached 85% yet. dale-4b and dale-9b beat it, but they need a GPU. And the 27B teacher (92.6% in bf16) shows there’s still headroom above the 9B.

If I kept going, I’d pursue these lines:

  • More data in the real user’s register, the lever that already worked, and analyzing the remaining incorrect commands by category: 97 for the 0.8B and 51 for the 9B.
  • Better quantization so that a 2B fits within the 3 s limit on a laptop CPU.
  • Using feedback from real users (with their permission) instead of synthetic requests.

Even so, the result delivers what I set out to prove: a small model, well tuned for a specific task, clearly beats much larger general-purpose models. dale-0.8b fits in 529 MB and answers in 1.7 seconds (median) on a 2020 laptop, offline; with the same recipe, dale-9b reaches 89.2% on a GPU.

Code and model

Dale is public: the tool’s source code is MIT-licensed and the four models are Apache-2.0 (the same license as their base models, from the Qwen3.5 family). The code is on GitHub and the quantized models (GGUF Q4_K_M), ready to use with llama.cpp, in the Hugging Face collection, together with the 471-case test set. Installation instructions are on the dale page.

GitHub Source code All the project code, open to review, build and audit exactly what it runs. github.com/manuelgscom/dale View repository Hugging Face Model weights The fine-tuned models in GGUF format, ready to run locally with llama.cpp. huggingface.co/collections/manuelgscom/dale View models