Skip to content

Specify Alternate Model Location #160

Closed

Description

@Ackfooey

I can't seem to find a way to specify a location for models that already exist locally. The app offers to search Huggingface and it will download models to ~/.cache/hugginface, but I can't find where this is specified in the code so I can change it.

There should be a way to specify and open models that are already present locally, but not in the standard location.

Activity

  1. changed the title [-]Specify Alternat Model Location[/-] [+]Specify Alternate Model Location[/+] on Aug 26, 2026
  2. solderzzc commented on Aug 26, 2026

    @solderzzc
    Member

    Thanks for filing this — a couple of clarifying notes depending on which you're using:

    If you're using the SwiftLM CLI binary directly, this already works: --model accepts a local directory path, not just a HuggingFace repo ID:

    ./SwiftLM --model /Users/you/models/my-local-model --port 5413

    One gotcha: the code does its own FileManager.fileExists(atPath:) check and does not expand ~ itself — if you pass a literal ~/models/... somewhere that doesn't get shell-expanded first, it'll silently fall through and get treated as an HF repo ID instead of a local path. Use an absolute path or make sure your shell expands the ~.

    If you're using the SwiftBuddy macOS app — "the app offers to search Huggingface" sounds like this is what you mean — there is currently no folder-browse UI to point it at an arbitrary local model directory; model selection there is keyed by HF repo ID only. That's a real gap, not something you're missing.

    Separately, I dug into where models actually download to for the CLI — it's ~/Library/Application Support/MLX/HuggingFace, not ~/.cache/huggingface (that path is only used for the progress-bar byte count display, which is actually a bit misleading as a result). There's currently no HF_HOME/--cache-dir override wired up for the CLI's own downloader, even though the underlying library used by SwiftBuddy does honor HF_HOME — that's an inconsistency worth fixing regardless of which app you're using.

    Could you confirm which you're using (CLI vs. SwiftBuddy app)? That'll tell us whether this issue is "docs need to mention --model <path> more clearly" or "SwiftBuddy needs a local-folder picker built."

  3. Ackfooey commented on Aug 27, 2026

    @Ackfooey
    Author

    Yes, I am using the SwiftBuddy MacOS app. I keep all my models on an external drive because the internal drive is only 256GB. I download with the "hf <repo/model> modelname --local-dir " command. I have a 40Gbps NVMe SSD + interface + fast cable that consistently sustains faster reads than the internal drive on the M4, so I can stream MoE models from the drive. It's expensive, but cheaper than the Apple storage tax.

    I tried to symlink the HF cache to my external drive, but that went down a huge rabbit hole that did not work.

    I'll try the CLI next. Thank-you very much for the response and the project.

  4. solderzzc commented on Aug 27, 2026

    @solderzzc
    Member

    Thanks for the details — makes sense, and the 40Gbps NVMe setup sounds like exactly the right call for MoE streaming given the storage tax.

    Rather than fighting the HF cache symlink, I've added proper support for this to SwiftBuddy: #161 adds an "Add Local Model…" button (next to "Search HuggingFace MLX Models" in the model management screen) that opens a folder picker — point it at your external drive's model folder directly, no symlinking or copying into the cache needed. It validates the folder has a real config.json + weights before accepting it, and the CLI's --model <path> behavior you were about to try also still works exactly as before.

    Will update here once it's merged.

  5. solderzzc commented on Aug 27, 2026

    @solderzzc
    Member

    Merged: #161. "Add Local Model…" is now in the model management screen — point it at your external drive's model folder directly. Let us know how it goes with your setup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions