Fine-tuning

Fine-Tuning Four Small Local Models Against a Swift Validator Loop

LokalBot 0.14.0 replaces four stock small models with Apache-2.0 fine-tunes trained on open-license data and checked against the app's own Swift validator. Here are the gains, the regressions, and the weight-edit pilot that changed 5,120 weights with zero output change.

Why fine-tune four small models

Stock small models are trained to be decent at everything, which makes them shaky on narrow app contracts. Inside LokalBot, four models carry the whole local workflow on a laptop: Qwen3.5 4B writes source-linked meeting notes, decisions, actions, and Personal Context memories; Qwen3-ASR 1.7B and 0.6B handle meeting transcription and push-to-talk dictation; and Gemma 4 E2B drives inline autocomplete.

In version 0.14.0, all four defaults moved to Apache-2.0 fine-tunes published on Hugging Face. Every row in the training data comes from open-license sources (Apache-2.0, ODC-By-1.0, CC-BY-4.0, MIT, and CC0) plus open-weight teacher outputs. Zero private user meetings or recordings were used in training, and every previous stock model stays selectable in Settings > Models if you want to switch back.

1. Qwen3.5 4B (LokalBot v4): training inside the Swift validator loop

LokalBot's meeting pipeline already has a strict Swift evidence and ownership validator in MeetingNotesReplayTests. Every extracted action or decision must cite real transcript segments and assign an owner supported by the text. Early synthetic datasets looked fine to a generic judge and then failed inside the Swift app.

For v4, we ran every synthetic training meeting through the exact compiled Swift validator until all 4,117 rows passed with zero Swift rejections: 2,005 meetings (9,192 actions, 1.4% zero-action rate), 240 on-policy repair examples, 964 Personal Context memory cases (67.8% negative/empty traps), 338 Ask tool-calling trajectories, 170 Day Digest rows, and 400 general replay rows from allenai/tulu-3-sft-mixture.

That loop also exposed a real failure in v3: our synthetic meetings always had named speakers and a confirmed Me track, while real calls often arrive with unnamed diarized rosters (them 1..8, local 1..3, them unclear). That mismatch caused six zero-action collapses on our 28-meeting dev replay. Adding 487 unnamed diarized meetings in v4 brought those collapses to zero.

We trained a rank-32 bf16 LoRA across all 248 language-model linear projections, merged at scale=1.0 in fp32, and quantized to Q4_K_M (2.741 GB, matching stock byte range) with a 64-chunk bilingual English/Serbian/JSON imatrix. Same-GPU replay against stock Qwen3.5-4B-Q4_K_M on pinned llama.cpp v1.0.0 with enable_thinking=false:

Qwen3.5-4B stock vs LokalBot v4 benchmark results
Suite & metricStock Qwen3.5 4BQwen3.5-4B-LokalBot-v4
Memory120 (Personal Context, 120 cases)81/120 (67.5%, 12 unwanted)118/120 (98.3%, 1 unwanted)
Memory120 Serbian recall (13 gold)0/13 (9 unwanted)13/13 (0 unwanted)
Blind21 completed jobs (21 untouched EN calls)20/2121/21
Blind21 validator rejections175 (56 repair passes)69 (-60.6%, 28 repair passes)
Blind21 median latency (G4 GPU)24.24 s13.64 s (1.78x faster)
Blind21 decision overlap (40 ref)3/40 (7.5%)18/40 (45.0%)
Blind21 raw action recall (85 ref)47/85 (55.3%)40/85 (47.1%, McNemar p=0.2478)
Private28 dev action recall / rejections73/147 (49.7%) / 160 rej76/147 (51.7%) / 67 rej (-58.1%)
Golden6 Russian drift on Serbian21 drift hits0 drift hits

What did not work: honest negative results

Publishing only the green rows makes local model numbers useless, so here are the two clearest misses from this cycle:

2. Qwen3-ASR 1.7B (v3) and 0.6B (v1): killing silence ghosts and code-switching errors

Stock Qwen3-ASR 1.7B had two bugs that showed up immediately in daily use. First, holding the dictation shortcut in a quiet room with a custom vocabulary prompt caused it to echo the prompt or hallucinate speech (only 8.3% clean silence on our holdout, with 16 prompt echoes and 123 hallucinated words). Second, mid-sentence bilingual code-switching (sr+en and en+de) hit 37.12% WER.

A decoder-only LoRA (v2) fixed dictation silence, but far-field meeting audio barely budged. For Qwen3-ASR-1.7B-LokalBot-v3, we unlocked the top 4 audio_tower transformer layers (layers.20..23) plus audio_tower.proj1 and proj2 with a rank-16 LoRA at a 0.4x differential learning rate alongside the rank-32 decoder LoRA (scale=1.15), anchored with Forward KL on guard languages so English, German, French, Spanish, and Russian would not drift.

For smaller machines, Qwen3-ASR-0.6B-LokalBot-v1 (1.02 GB combined, 52.7x real-time on M4 Max Metal) keeps the audio_tower frozen so the stock mmproj stays bit-identical. On the same 466-clip blind holdout, it cut South Slavic auto WER from 52.26% to 30.57% (-21.69 pp), code-switching WER from 49.21% to 20.72% (-28.49 pp), raised custom vocabulary recall from 80.0% to 100.0% with 100% clean silence, and beat stock on AMI-400 (10.72% ihm, 26.23% sdm) while holding 7 guard languages within +0.13 pp.

3. Gemma 4 E2B (LokalBot v4): 56/56 context grounding at 20.2 ms

Inline autocomplete has the opposite problem from chat models: raising recall slightly too aggressively makes the ghost text annoying. Our earlier high-coverage checkpoint (v3) boosted word-boundary recall to 30.71%, but added +39 wrong-shown suggestions and missed 2 of 26 memory recall checks.

For Gemma-4-E2B-LokalBot-v4 (3.845 GB i1-Q6_K), we trained a rank-32 LoRA across 275 matrices in all 35 layers (including 70 Per-Layer Embedding projections) on 45,876 open-license rows using a three-regime Forward KL objective: soft-logit distillation from google/gemma-4-26B-A4B on ungrounded text, grounded window/memory rows, plus 13,400 KL-only calibration anchor rows against stock E2B starting at body token 0.

Download the Apache-2.0 GGUFs

All four checkpoints are Apache-2.0 and work directly with llama-server, Ollama, or LokalBot 0.14.0:

Fresh installs of LokalBot 0.14.0 pick these defaults automatically. Existing installs keep their current models until you click Upgrade on Today or in Settings > Models. See the full reproducible numbers across every local role on our Local Desktop AI Leaderboard.

Try it locally

Meeting notes that stay on your computer by default.

Free, open source, and no account. For Mac, with Windows and Linux in alpha.

Download for macOS

Apple Silicon · macOS 15+ · or with Homebrew: brew install --cask stevyhacker/tap/lokalbot

macOS · Windows · Linux (alpha) · requirements