models: download outside Documents so iCloud cannot evict them - #12
Open
andredezzy wants to merge 1 commit into
Open
models: download outside Documents so iCloud cannot evict them#12andredezzy wants to merge 1 commit into
andredezzy wants to merge 1 commit into
Conversation
WhisperKit's downloadBase defaults to ~/Documents/huggingface. With iCloud Desktop & Documents sync on, the model weights are replicated and, once the disk fills, evicted to dataless placeholders (SF_DATALESS, st_blocks=0). CoreML mmap()s the weight blob during ANE compilation, and mmap of an evicted file blocks indefinitely: the daemon prints "loading <model>..." and never reaches "listening on fn hold". A partially materialised read instead fails as CoreML error 3, "Failed to read first word from AudioEncoder.mlmodelc/ coremldata.bin. It is not a valid .mlmodelc file." Observed on macOS 26.4.1 with whisper-large-v3-turbo (1.6 GB) on a 94%-full disk. Point downloadBase at Application Support, which is neither user-visible nor sync-managed. Existing installs keep their Documents copy; note it on load so the space is reclaimable rather than silently abandoned.
andredezzy
force-pushed
the
fix/models-outside-documents
branch
from
July 31, 2026 00:03
f3b4c8e to
4a6e3d6
Compare
FernandoGomes83
added a commit
to FernandoGomes83/parrot
that referenced
this pull request
Jul 31, 2026
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.
Problem
WhisperKit's
downloadBasedefaults to~/Documents/huggingface(inherited fromswift-transformers'HubApi). With iCloud Desktop & Documents sync enabled, model weights are replicated to iCloud and, once the disk fills, evicted to dataless placeholders —st_flagscarriesSF_DATALESSandst_blocks == 0while the logical size stays intact.CoreML
mmap()s the weight blob during ANE compilation, andmmapof an evicted file blocks indefinitely. The daemon printsloading <model>...and never reacheslistening on fn hold:When materialisation partially succeeds instead, the load fails outright:
The files are not corrupt — all 24 verified byte-clean against their HuggingFace etags. Only the read path is broken.
Because the LaunchAgent sets
KeepAlive{SuccessfulExit: false}, each failed load is relaunched, so this presents as a daemon that either hangs forever or restarts in a loop.Observed on macOS 26.4.1 (M2, 16 GB) with
whisper-large-v3-turboon a 94%-full disk.whisper-base.en(145 MB) stayed resident and kept working, so this only bites on larger models — exactly the ones a user switches to deliberately.Fix
Point
downloadBaseat~/Library/Application Support/parrot/huggingface. Model weights are machine-local cache, not user documents: Application Support is neither user-visible, nor treated as documents by backup, nor sync-managed.Existing installs are left alone rather than silently re-downloading gigabytes — the old
Documentscopy is reported once on load so the space is reclaimable.Verification
Built release, replaced the installed binary, deleted
~/Documents/huggingface, then:Daemon reaches
listening on fn holdwith~/Documentsclean.Note
The underlying default belongs to
swift-transformers, whoseHubApiplaces every embedding app's models underDocuments. That deserves its own issue upstream; this change makes parrot correct regardless of whatHubApidefaults to.Why Application Support and not Caches
Model weights are re-downloadable, which argues for
Caches— but the system maypurge
Cachesunder disk pressure, and on this hardware that means a surprise1.6 GB re-download plus a multi-minute ANE recompile before the next dictation.
Application Supportis the correct home for large, app-managed data the usernever browses and cannot cheaply recreate.
Notes for review
private; nothing outside the actor needs them.one here would widen a bugfix PR.
release.ymlonly runs onv*tags andworkflow_dispatch), so this was validated locally withswift build -c release— clean, no warnings.The common case, not just the exotic one
The infinite
mmapabove needs disk pressure to trigger, but the everyday harmdoes not: with Desktop & Documents sync enabled, these weights are uploaded
to the user's iCloud account and counted against their quota. The free tier is
5 GB;
whisper-large-v3-turboalone is ~1.6 GB of it, pushed over the networkwithout ever being mentioned. They also show up in Finder under Documents and
are carried into backups.
So this is not only about the hang — it is about a dictation tool quietly
placing gigabytes of re-downloadable machine-local cache into the user's
document storage.