Repository navigation
Promote fine-tuned LokalBot models to defaults with upgrade nudge - #561
Open
stevyhacker wants to merge 1 commit into
Open
stevyhacker wants to merge 1 commit into
stevyhacker wants to merge 1 commit into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
lokalbot | 13ae353 | Commit Preview URL Branch Preview URL |
Nov 22 2026, 06:00 AM |
stevyhacker
marked this pull request as ready for review
November 21, 2026 06:08
stevyhacker
marked this pull request as draft
November 22, 2026 05:29
stevyhacker
force-pushed
the
feat/gemma4-qwen3-asr-lokalbot-models
branch
from
November 22, 2026 05:59
253fb00 to
13ae353
Compare
stevyhacker
marked this pull request as ready for review
November 22, 2026 06:01
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rebased cleanly on
master(d92e1401). Promotes all four Apache-2.0 LokalBot fine-tuned models to the new built-in defaults and adds a dismissible upgrade nudge for existing users who are still on the previous stock defaults. This supersedes #557 (which addedQwen3.5-4B-LokalBot-v2as an opt-in entry).All four models were trained exclusively on open-license public and synthetic data (
Apache-2.0,ODC-By,CC0,CC-BY-4.0, zero private user data, zeroCC-BY-SA, disjoint from eval/holdout splits).New Default Models (Immutable Hugging Face Pins)
Qwen3.5 4B (LokalBot v3)(qwen3.5-4b-lokalbot-v3)stevyhacker/Qwen3.5-4B-LokalBot-GGUF@60f704305746c4390c3b207c156191c761cf66dbQwen3.5-4B-LokalBot-v3-Q4_K_M.gguf(2,741,241,984B, SHA-256ff8e5921a49c1a4d9cf8a22759fb83deac4b7670d95d659e268e565e7af1ec03)Qwen3.5 4B(qwen3.5-4b) stays available in the catalog.Gemma 4 E2B (LokalBot v4)(gemma4-e2b-lokalbot-v4)stevyhacker/Gemma-4-E2B-LokalBot-GGUF@e089648312aee558514a13dbbd4efb19a0b3eb25Gemma-4-E2B-LokalBot-v4-i1-Q6_K.gguf(3,845,323,008B, SHA-256ea8c01dd28abaae0a6664eb9c1324f6bf6cd0ffef99dace496510f7cceb40581)Gemma 4 E2B Base (Autocomplete)(gemma4-e2b-base-q6) stays available in the catalog.QwenLlamaASR.accuracy):Qwen3-ASR-1.7B-LokalBot-v3stevyhacker/Qwen3-ASR-1.7B-LokalBot-GGUF@33ca434ce773d56914f609cec80e843d085b5645Qwen3-ASR-1.7B-LokalBot-v3-Q8_0.gguf(2,165,035,040B, SHA-256a3611b68d5065e3984d0cf8a93adaf7cfaf5f4a09b33da8d68914a7ae85aee19)mmproj-Qwen3-ASR-1.7B-LokalBot-v3-Q8_0.gguf(355,709,376B, SHA-2560eb673620a73c412a0de2bb31a427ac5367f686e14db0922944023e44356c785)QwenLlamaASR.compact):Qwen3-ASR-0.6B-LokalBot-v1stevyhacker/Qwen3-ASR-0.6B-LokalBot-GGUF@4f9e435248343b208223ce33fa1a8b0b2f2e6bc6Qwen3-ASR-0.6B-LokalBot-v1-Q8_0.gguf(804,749,344B, SHA-256c7493d2b337bb351f1c562337e7c9fdfef0195a26d4e91cfae805a6416066c3c)mmproj-Qwen3-ASR-0.6B-Q8_0.gguf(214,392,480B, SHA-25641a342b5e4c514e968cb756de6cd1b7be39eff43c44c57a2ef5fc6522e36603d, bit-identical to stockggml-org)Upgrade Nudge & Non-Breaking Transition for Existing Users
qwen3.5-4b,gemma4-e2b-base-q6, or stockQwen3-ASRGGUF files keep working without surprise downloads or forced switches.QwenLlamaASRfalls back to verified legacy stockQwen3-ASRGGUF weights on disk when the new files are not downloaded yet, so offline transcription continues working until the user triggers an upgrade. Upgrading downloads the new weights, restarts the ASR server if the projector changed, and removes superseded stock decoder/projector files (preserving the shared stock0.6Bmmproj).qwen3.5-4b(built-in backend)gemma4-e2b-base-q6(built-in backend, only when Autocomplete is enabled or stockgemma4-e2b-base-q6is already on disk)qwen3-asr-1.7borqwen3-asr-0.6bwith legacy stock GGUFs on disk (macOS)dismissedDefaultModelUpgradeKey(registered as an internal settings key on both macOS and Linux/Windows). Clicking Upgrade downloads and switches in one step.LokalBot/Resources/*.lproj/Localizable.stringsfiles, synced toLinuxWindows/crates/lokalbot-i18n/src/catalogs.rs, and added Apache-2.0 provenance entries for all four repos inTHIRD_PARTY_NOTICES.md.Benchmark Summary (Apple M4 Max)
Qwen3.5-4B v3Memory Retention (120) · EN / SR recallQwen3.5-4B v3SparkX26 · Multi-StepQwen3.5-4B v3Golden6 dec / rej · Private12 dec mtgsQwen3.5-4B v3Private12 rej / rep · quote miss · med sGemma 4 E2B v4Engine (788) acc / prec / wrongGemma 4 E2B v4Memory (26) · Visible (30) · Email precGemma 4 E2B v4FH v1 (160) / SR-Latn · FH v2 (82)Gemma 4 E2B v4Med / Typing p95 msQwen3-ASR 1.7B v3AMI-400 ihm / sdm (200 ea)Qwen3-ASR 1.7B v3Silence Clean (24) · Code-Switch (17) ·hr(120)Qwen3-ASR 0.6B v1South Slavic (120) · OODhr(25) · Code-Switch (17)Qwen3-ASR 0.6B v1AMI-400 ihm / sdm · Vocab Recall (15)Known Tradeoffs
Qwen3.5-4B-LokalBot-v3: Emits fewer Private12 action items than stock (54vs74,35.7%vs50.0%segment recall) in exchange for6.7xfewer validator rejections (6vs40),0missing ownership quotes,8/8decision meetings (vs2/8), and42%lower median latency.Gemma-4-E2B-LokalBot-v4: Uses a stock-calibrated operating point (182wrong shown vs181stock) so memory and visible context stay56/56; conversation precision dips from48.6%to42.9%and formatting precision from61.5%to57.1%.Qwen3-ASR-1.7B-LokalBot-v3: Returns empty output on 2/200 very low-SNR AMI-400 SDM clips (stock 0/200); 5-language guard WER edges from4.35%to4.53%; requires its pairedv3mmproj.Qwen3-ASR-0.6B-LokalBot-v1: 5-language guard WER edges from6.64%to6.77%; 1/200 empty AMI-400 SDM clip.Validation
Local and remote non-UI checks completed on commit
13ae3537:python3 Scripts/ci/comment-ratchet.py --check: passed (Comment lines: 0 (baseline 0)).swiftlint lint --strict --quieton all 19 touched Swift files: passed (0warnings/errors).xcodebuild test(ModelCatalogTests,QwenLlamaASRTests,ModelRoleNamingTests,ModelStorageCopyTests,ModelRolesTests,ModelSettingsTests,CotypingSettingsTests,AppSettingsTests,SettingRegistryTests,OnboardingFlowTests,TodayLandingTests):194executed,0failures,1env-gated skip.LokalBotTestsrun (5,231tests): caughtOnboardingFlowTests/testBeforeDownloadingEachModelHasItsSizeAndTheTotalCountsOnlyWhatIsChosen, fixed and re-verified (24/24passing); the only other local failures were 4 macOS Vision OCR tests unrelated to model catalog changes.(cd LinuxWindows && cargo fmt --all -- --check): passed.(cd LinuxWindows && python3 -m unittest discover -s scripts/tests):9/9localization parity tests passed.cargo clippy --workspace --all-targets --locked -- -D warnings && cargo test --workspace --locked --no-fail-fast):0clippy warnings,2,762passed,0failed,28ignored.HTTP 302with exactx-linked-sizeand SHA-256x-linked-etag) on all 6 pinned URLs across all 4 repos.XCUITestandDay in the life) were not run locally perAGENTS.mdand will run on hosted CI now that this PR is marked ready for review.Changed test expectations
LokalBotTests/Engines/ModelCatalogTests.swift(testQualityCotypingModelIsPinnedAndOnlyOfferedForAutocomplete):gemma4-e2b-base-q6(gemma-4-E2B.i1-Q6_K.gguf,3,845,328,608B) changed togemma4-e2b-lokalbot-v4(Gemma-4-E2B-LokalBot-v4-i1-Q6_K.gguf,3,845,323,008B). Reason:Gemma 4 E2B (LokalBot v4)is now the default autocomplete model; the test still verifies that stockgemma4-e2b-base-q6stays in the catalog viapreviousQualityCotypingID.LokalBotTests/Engines/ModelCatalogTests.swift(testFreshSettingsDefaultToQwen35FourBOnEveryMac):ModelCatalog.defaultSummarizationID"qwen3.5-4b"changed to"qwen3.5-4b-lokalbot-v3"(Qwen3.5-4B-LokalBot-v3-Q4_K_M.gguf,2,741,241,984B). Reason:Qwen3.5 4B (LokalBot v3)is now the default Think model on fresh installs.LokalBotTests/Engines/ModelCatalogTests.swift(testDefaultPresetsHavePlainNamesAndPickActualModels):"Transcribe: Qwen3-ASR 1.7B, Think: Qwen3.5 4B, Autocomplete: Gemma 4 E2B Base (Autocomplete)"changed to"Transcribe: Qwen3-ASR 1.7B, Think: Qwen3.5 4B (LokalBot v3), Autocomplete: Gemma 4 E2B (LokalBot v4)". Reason: the default model stack preset uses the new Think and Autocomplete defaults.LokalBotTests/Engines/QwenLlamaASRTests.swift(testPinnedFilesLiveUnderTheQwenCacheAndPointAtTheRevision): stockggml-orgQwen3-ASR 1.7B/0.6B URLs and filenames changed to the pinnedstevyhacker/Qwen3-ASR-1.7B-LokalBot-GGUF(v3decoder and pairedv3mmproj) andstevyhacker/Qwen3-ASR-0.6B-LokalBot-GGUF(v1decoder and stock mmproj). Reason: both Qwen3-ASR tiers now pin the fine-tuned weights; new tests also cover legacy offline fallback and superseded weight cleanup.LokalBotTests/Cotyping/CotypingSettingsTests.swift(testLegacyCotypingFieldsDecodeWithoutErrorAndAreNotWrittenBack,testCorruptedValuesFallBackFieldByField): defaultcotypingBuiltInModelID"gemma4-e2b-base-q6"changed to"gemma4-e2b-lokalbot-v4". Reason: fresh and fallback settings now default to the fine-tuned autocomplete model.LokalBotTests/Models/Settings/AppSettingsTests.swift(testThinkModelDisplayNameFollowsSelectedBackendNotLeftoverLocalID):"Qwen3.5 4B"changed to"Qwen3.5 4B (LokalBot v3)". Reason:ModelCatalog.defaultSummarizationIDnow resolves to the v3 fine-tune.LokalBotTests/Models/Onboarding/OnboardingFlowTests.swift(testBeforeDownloadingEachModelHasItsSizeAndTheTotalCountsOnlyWhatIsChosen):["Qwen3-ASR 1.7B", "Qwen3.5 4B", "Gemma 4 E2B Base (Autocomplete)"]changed to["Qwen3-ASR 1.7B", "Qwen3.5 4B (LokalBot v3)", "Gemma 4 E2B (LokalBot v4)"]. Reason: onboarding displays the active default Think and Autocomplete model names.LinuxWindows/crates/lokalbot-core/src/settings.rs(tests::defaults_round_trip):"builtInModelID":"qwen3.5-4b"changed to"builtInModelID":"qwen3.5-4b-lokalbot-v3". Reason:Settings::default().built_in_model_idnow defaults toQwen3.5 4B (LokalBot v3).LinuxWindows/crates/lokalbot-ai/src/catalog.rs(tests::autocomplete_defaults_to_gemma_e2b_as_on_macos):QUALITY_AUTOCOMPLETE_ID"gemma4-e2b-base-q6"changed to"gemma4-e2b-lokalbot-v4". Reason: matches the new default autocomplete model on both platforms.LinuxWindows/crates/lokalbot-ai/src/think.rs(think::tests::built_in_client_names_the_model_on_this_pc):"Qwen3.5 4B · on this PC"changed to"Qwen3.5 4B (LokalBot v3) · on this PC". Reason:ThinkClient::newwithSettings::default()now resolves toQwen3.5 4B (LokalBot v3).LinuxWindows/crates/lokalbot-agent/src/endpoint.rs(endpoint::tests::built_in_resolves_to_its_model_id):"qwen3.5-4b"changed to"qwen3.5-4b-lokalbot-v3". Reason: default agent endpoint usesSettings::default().built_in_model_id.LinuxWindows/crates/lokalbot-engine/src/autocomplete.rs(tests::records_daily_stats_per_surface_and_model):Some("gemma4-e2b-base-q6")changed toSome("gemma4-e2b-lokalbot-v4"). Reason: autocomplete stats record the active default model ID fromSettings::default().Linked issues
Supersedes #557.
Risk / rollout notes
dismissedDefaultModelUpgradeKeydefaults to""on decode when missing from older settings files, and is registered inSettingRegistry.internalKeys(macOS) andINTERNAL_KEYS(Linux/Windows).Qwen3-ASRfiles inQwen3-ASR-1.7B-Q8_0/Qwen3-ASR-0.6B-Q8_0continue working offline until the user accepts the upgrade prompt.sherpa-onnxand is unchanged; the upgrade nudge there covers Think and Autocomplete.