[GH-ISSUE #1202] creating Modelfile from predownloaded gguf model #62650

Closed
opened 2026-05-03 09:52:24 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @kikoferrer on GitHub (Nov 20, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1202

Originally assigned to: @BruceMacD on GitHub.

I have updated my ollama to the latest version thank you! I ran the modelfile again and it seems to process something which is nice. I used the command ollama create zyphyrbeta -f Modelfile using the path to my zephyr beta gguf model. The issue is it returned this error instead.

transferring context Error: rename /tmp/sha256:37894e5b171bd7228f4af7bd5bb0758dd29d6f07fb8e4742e387720f66bac4342528832202 /usr/share/ollama/.ollama/models/blobs/sha256:37894e5b171bd7228f4af7bd5bb0758dd29d6f07fb8e4742e387720f66bac434: invalid cross-device link

The only thing I have in Modelfile is FROM /home/path/to/models/zephyr-7b-beta.Q5_K_M.gguf

Originally created by @kikoferrer on GitHub (Nov 20, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1202 Originally assigned to: @BruceMacD on GitHub. I have updated my ollama to the latest version thank you! I ran the modelfile again and it seems to process something which is nice. I used the command `ollama create zyphyrbeta -f Modelfile` using the path to my zephyr beta gguf model. The issue is it returned this error instead. ```transferring context Error: rename /tmp/sha256:37894e5b171bd7228f4af7bd5bb0758dd29d6f07fb8e4742e387720f66bac4342528832202 /usr/share/ollama/.ollama/models/blobs/sha256:37894e5b171bd7228f4af7bd5bb0758dd29d6f07fb8e4742e387720f66bac434: invalid cross-device link``` The only thing I have in Modelfile is `FROM /home/path/to/models/zephyr-7b-beta.Q5_K_M.gguf`
GiteaMirror added the bug label 2026-05-03 09:52:24 -05:00
Author
Owner

@BruceMacD commented on GitHub (Nov 20, 2023):

Hi @SmoothBrainApe, thanks again for brining this to our attention. This will be fixed in the next release by #1186, so marking this as resolved.

<!-- gh-comment-id:1819413842 --> @BruceMacD commented on GitHub (Nov 20, 2023): Hi @SmoothBrainApe, thanks again for brining this to our attention. This will be fixed in the next release by #1186, so marking this as resolved.
Author
Owner

@briancleland commented on GitHub (Nov 22, 2023):

Hi, I'm still having this problem in v0.1.11. Everything up to and including v0.1.9 works fine. Should I create a new issue?

<!-- gh-comment-id:1822670363 --> @briancleland commented on GitHub (Nov 22, 2023): Hi, I'm still having this problem in v0.1.11. Everything up to and including v0.1.9 works fine. Should I create a new issue?
Author
Owner

@BruceMacD commented on GitHub (Nov 22, 2023):

@briancleland is the error message the same "invalid cross-device link"? If so I'll re-open this one, otherwise a new issue might be better. I'll keep an eye out in any case, thanks!

<!-- gh-comment-id:1823007968 --> @BruceMacD commented on GitHub (Nov 22, 2023): @briancleland is the error message the same "invalid cross-device link"? If so I'll re-open this one, otherwise a new issue might be better. I'll keep an eye out in any case, thanks!
Author
Owner

@briancleland commented on GitHub (Nov 22, 2023):

@BruceMacD Thanks The error message is basically identical.

Error: rename /tmp/sha256:61e9e801d9e60f61a4bf1cad3e29d975ab6866f027bcef51d1550f9cc7d2cca62366314381 /home/bcleland/.ollama/models/blobs/sha256:61e9e801d9e60f61a4bf1cad3e29d975ab6866f027bcef51d1550f9cc7d2cca6: invalid cross-device link

<!-- gh-comment-id:1823190342 --> @briancleland commented on GitHub (Nov 22, 2023): @BruceMacD Thanks The error message is basically identical. `Error: rename /tmp/sha256:61e9e801d9e60f61a4bf1cad3e29d975ab6866f027bcef51d1550f9cc7d2cca62366314381 /home/bcleland/.ollama/models/blobs/sha256:61e9e801d9e60f61a4bf1cad3e29d975ab6866f027bcef51d1550f9cc7d2cca6: invalid cross-device link`
Author
Owner

@BruceMacD commented on GitHub (Nov 22, 2023):

Is the instance of Ollama you are connecting to up to date (ex: a remote Ollama instance running on a server or in a Docker container) some logic changed around here which makes this error message surprising. It may be that a docker container needs to be pulled/restarted.

<!-- gh-comment-id:1823204909 --> @BruceMacD commented on GitHub (Nov 22, 2023): Is the instance of Ollama you are connecting to up to date (ex: a remote Ollama instance running on a server or in a Docker container) some logic changed around here which makes this error message surprising. It may be that a docker container needs to be pulled/restarted.
Author
Owner

@briancleland commented on GitHub (Nov 22, 2023):

I've uninstalled it and reinstalled it several times, according to the instructions here: https://github.com/jmorganca/ollama/blob/main/docs/linux.md. As I said, every version after v0.1.9 breaks. One thing that might be relevant is that the /home folder is symlinked to a folder on another partition, which is on a different drive from /tmp?

<!-- gh-comment-id:1823236944 --> @briancleland commented on GitHub (Nov 22, 2023): I've uninstalled it and reinstalled it several times, according to the instructions here: https://github.com/jmorganca/ollama/blob/main/docs/linux.md. As I said, every version after v0.1.9 breaks. One thing that might be relevant is that the /home folder is symlinked to a folder on another partition, which is on a different drive from /tmp?
Author
Owner

@marcin-cenkier-wttech commented on GitHub (Nov 23, 2023):

I get the same error message:

$ ollama create yi -f Modelfile 

⠸ transferring context  Error: rename /tmp/sha256:ff28ee072591931a038b0ed239d949ed0015a6aa849ac692359548ced664d2fe3954153341 /usr/share/ollama/.ollama/models/blobs/sha256:ff28ee072591931a038b0ed239d949ed0015a6aa849ac692359548ced664d2fe: invalid cross-device link

but in my case /tmp and /usr reside on different devices (different disks). It looks like ollama is using rename instead of mv?

<!-- gh-comment-id:1824649592 --> @marcin-cenkier-wttech commented on GitHub (Nov 23, 2023): I get the same error message: ``` $ ollama create yi -f Modelfile ⠸ transferring context Error: rename /tmp/sha256:ff28ee072591931a038b0ed239d949ed0015a6aa849ac692359548ced664d2fe3954153341 /usr/share/ollama/.ollama/models/blobs/sha256:ff28ee072591931a038b0ed239d949ed0015a6aa849ac692359548ced664d2fe: invalid cross-device link ``` but in my case /tmp and /usr reside on different devices (different disks). It looks like ollama is using rename instead of mv?
Author
Owner

@notmugi commented on GitHub (Nov 26, 2023):

looks like both me and another user are reporting the exact same issue. converted a model from safetensors to gguf via the guide on the github, and everything worked fine up until the part where i needed to create a model using the modelfile i created with it. we are both using the latest version of ollama (0.1.11) and have uninstalled and reinstalled to be absolutely sure its the latest. i am not running on a server or via a docker container, i am exclusively running it on my local machine. my error is as follows:

transferring model data
Error: rename /tmp/sha256:9a40e4c9c784160bca6d8e3dc720513ea738ea45547c48380a5134b46585d3861925214550 /root/.ollama/models/blobs/sha256:9a40e4c9c784160bca6d8e3dc720513ea738ea45547c48380a5134b46585d386: invalid cross-device link

and my /etc/fstab looks like this.

  • UUID=2066-4688 /boot/efi vfat umask=0077 0 2
  • UUID=c77c9641-32a3-4c6f-af0a-a120e0b30d04 / ext4 defaults,noatime 0 1
  • tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

EDIT:
i got it to work by actually cloning the github repo and building the source with go manually. i no longer got the error and instead recieved:

transferring model data creating model layer creating template layer using already created layer sha256:9a40e4c9c784160bca6d8e3dc720513ea738ea45547c48380a5134b46585d386 writing layer sha256:68693db5eb3e0501c644080a545730fc93d2ca2dfddf03633642b99f3a1f0e3c writing layer sha256:a29719ee8e47fd2c1d3c91047b17233e1ab628bd5617aad69108fa6ce9c735c0 writing manifest success

<!-- gh-comment-id:1826876793 --> @notmugi commented on GitHub (Nov 26, 2023): looks like both me and another user are reporting the exact same issue. converted a model from safetensors to gguf via the guide on the github, and everything worked fine up until the part where i needed to create a model using the modelfile i created with it. we are both using the latest version of ollama (0.1.11) and have uninstalled and reinstalled to be absolutely sure its the latest. i am not running on a server or via a docker container, i am exclusively running it on my local machine. my error is as follows: > transferring model data Error: rename /tmp/sha256:9a40e4c9c784160bca6d8e3dc720513ea738ea45547c48380a5134b46585d3861925214550 /root/.ollama/models/blobs/sha256:9a40e4c9c784160bca6d8e3dc720513ea738ea45547c48380a5134b46585d386: invalid cross-device link and my /etc/fstab looks like this. - UUID=2066-4688 /boot/efi vfat umask=0077 0 2 - UUID=c77c9641-32a3-4c6f-af0a-a120e0b30d04 / ext4 defaults,noatime 0 1 - tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 EDIT: i got it to work by actually cloning the github repo and building the source with go manually. i no longer got the error and instead recieved: ` transferring model data creating model layer creating template layer using already created layer sha256:9a40e4c9c784160bca6d8e3dc720513ea738ea45547c48380a5134b46585d386 writing layer sha256:68693db5eb3e0501c644080a545730fc93d2ca2dfddf03633642b99f3a1f0e3c writing layer sha256:a29719ee8e47fd2c1d3c91047b17233e1ab628bd5617aad69108fa6ce9c735c0 writing manifest success `
Author
Owner

@mxyng commented on GitHub (Jan 18, 2024):

This should be fixed. The temporary file is no longer stored in /tmp but in the target directory. There shouldn't be any more issues with cross device link

<!-- gh-comment-id:1897518564 --> @mxyng commented on GitHub (Jan 18, 2024): This should be fixed. The temporary file is no longer stored in `/tmp` but in the target directory. There shouldn't be any more issues with cross device link
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#62650