[GH-ISSUE #1981] Feature request - support symlink to GGUF in custom model instead of GGUF 1:1 copy #1143

Closed
opened 2026-04-12 10:53:41 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @mirekjany on GitHub (Jan 13, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/1981

Hello there,

maybe I'm missing something from the documentation. I am working with lots of custom models where the only difference is in System prompts but the custom models are always based on the same GGUF file. So, having ollama to always copy/duplicate it again and again when I create new model is

  1. time-consuming
  2. eats disk-space very quickly

Now, after model is created, I delete the duplicate blob and manually symlink it to the source GGUF, which is a little bit inconvenient.

Would it be possible to implement this? Something like a parameter called SYMLINK (besides FROM).

Thanks!

Originally created by @mirekjany on GitHub (Jan 13, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/1981 Hello there, maybe I'm missing something from the documentation. I am working with lots of custom models where the only difference is in System prompts but the custom models are always based on the same GGUF file. So, having ollama to always copy/duplicate it again and again when I create new model is 1) time-consuming 2) eats disk-space very quickly Now, after model is created, I delete the duplicate blob and manually symlink it to the source GGUF, which is a little bit inconvenient. Would it be possible to implement this? Something like a parameter called SYMLINK (besides FROM). Thanks!
Author
Owner

@easp commented on GitHub (Jan 15, 2024):

You only need to specify the GGUF once, for the first model you create. Any time you create a new model, reference that model by name, rather than the location of the GGUF.

For example, say you first ollama create my-base .... If you want to create another model based on the same GGUF, use FROM my-base, not the path to the GGUF.

Beyond that, Ollama tracks the uploaded weights using a hash of the actual data. If you upload the same file twice, they'll have the same hash and so only a single copy of the data will be stored.

<!-- gh-comment-id:1891186925 --> @easp commented on GitHub (Jan 15, 2024): You only need to specify the GGUF once, for the first model you create. Any time you create a new model, reference that model by name, rather than the location of the GGUF. For example, say you first `ollama create my-base ...`. If you want to create another model based on the same GGUF, use `FROM my-base`, not the path to the GGUF. Beyond that, Ollama tracks the uploaded weights using a hash of the actual data. If you upload the same file twice, they'll have the same hash and so only a single copy of the data will be stored.
Author
Owner

@pdevine commented on GitHub (Jan 15, 2024):

@mirekjany as @easp was saying, Ollama does de-duplication automatically for any layer. If a layer is the same between models, only one copy will be saved. It does this using content addressability; the layers are stored by their sha256 hashes in the models/blobs/ directory, and the manifest for the model always references the data by that hash.

<!-- gh-comment-id:1892833471 --> @pdevine commented on GitHub (Jan 15, 2024): @mirekjany as @easp was saying, Ollama does de-duplication automatically for any layer. If a layer is the same between models, only one copy will be saved. It does this using content addressability; the layers are stored by their sha256 hashes in the `models/blobs/` directory, and the manifest for the model always references the data by that hash.
Author
Owner

@mirekjany commented on GitHub (Feb 15, 2024):

Appreciate the clarification, works as expected, closing the issue.

<!-- gh-comment-id:1945711026 --> @mirekjany commented on GitHub (Feb 15, 2024): Appreciate the clarification, works as expected, closing the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1143