[GH-ISSUE #3808] Pull multiple chunks in parallel #48864

Closed
opened 2026-04-28 09:55:41 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @frankhart2018 on GitHub (Apr 22, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3808

I am not sure if this has been proposed earlier or not, but having the capability of pulling models using multiple parallel processes would be very useful, especially for larger models which takes quite a lot of time (at least in my network bandwidth) to download. If this is accepted, I'd love to work on this feature :)

Originally created by @frankhart2018 on GitHub (Apr 22, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3808 I am not sure if this has been proposed earlier or not, but having the capability of pulling models using multiple parallel processes would be very useful, especially for larger models which takes quite a lot of time (at least in my network bandwidth) to download. If this is accepted, I'd love to work on this feature :)
GiteaMirror added the feature request label 2026-04-28 09:55:41 -05:00
Author
Owner

@igorschlum commented on GitHub (Apr 22, 2024):

Hi @frankhart2018
I can do that on MacOS, I open two Terminal Windows and type ollama pull llama3 on the first one and ollama pull llama2 on the second one. I don't know how to do that by script as I do not need it.
If this answer your request please close the issue.

<!-- gh-comment-id:2068390993 --> @igorschlum commented on GitHub (Apr 22, 2024): Hi @frankhart2018 I can do that on MacOS, I open two Terminal Windows and type ollama pull llama3 on the first one and ollama pull llama2 on the second one. I don't know how to do that by script as I do not need it. If this answer your request please close the issue.
Author
Owner

@pdevine commented on GitHub (Apr 22, 2024):

Hi @frankhart2018 thanks for the issue. The pull command already pulls multiple chunks of the same blob in parallel, which is why the we often saturate network connections (particularly with Windows). This is how we can get > 400MB/sec transfers if you've got multi-gig fibre, but it's also kinda brutal for people on slow links where we'll steal all of the available bandwidth.

We've been working on trying to tune that better with better ramp-up/prediction, but it's a bit of an art. If you have experience with that I'd love to get some feedback.

I'm going to go ahead and close the issue, but feel free to keep commenting.

<!-- gh-comment-id:2070597278 --> @pdevine commented on GitHub (Apr 22, 2024): Hi @frankhart2018 thanks for the issue. The `pull` command already pulls multiple chunks of the _same_ blob in parallel, which is why the we often saturate network connections (particularly with Windows). This is how we can get > 400MB/sec transfers if you've got multi-gig fibre, but it's also kinda brutal for people on slow links where we'll steal all of the available bandwidth. We've been working on trying to _tune_ that better with better ramp-up/prediction, but it's a bit of an art. If you have experience with that I'd love to get some feedback. I'm going to go ahead and close the issue, but feel free to keep commenting.
Author
Owner

@frankhart2018 commented on GitHub (Apr 22, 2024):

Hi @pdevine can you point me to the part of the source where this happens? Also if this happens, can this be exposed possibly using a flag to specify the number of parallel threads/processes to use?

<!-- gh-comment-id:2070987091 --> @frankhart2018 commented on GitHub (Apr 22, 2024): Hi @pdevine can you point me to the part of the source where this happens? Also if this happens, can this be exposed possibly using a flag to specify the number of parallel threads/processes to use?
Author
Owner

@igorschlum commented on GitHub (Apr 22, 2024):

@frankhart2018 do you want to increase or decrease this number of threads? For what goal?

<!-- gh-comment-id:2071078994 --> @igorschlum commented on GitHub (Apr 22, 2024): @frankhart2018 do you want to increase or decrease this number of threads? For what goal?
Author
Owner

@pdevine commented on GitHub (Apr 22, 2024):

Hi @pdevine can you point me to the part of the source where this happens? Also if this happens, can this be exposed possibly using a flag to specify the number of parallel threads/processes to use?

Look in server/download.go, specifically in (b *blobDownload) run(...). It's not exposed right now; ideally it "just works" so that people don't have to fiddle with it, but potentially as an advanced feature. If everyone starts using it, we're definitely doing something wrong.

<!-- gh-comment-id:2071131204 --> @pdevine commented on GitHub (Apr 22, 2024): > Hi @pdevine can you point me to the part of the source where this happens? Also if this happens, can this be exposed possibly using a flag to specify the number of parallel threads/processes to use? Look in `server/download.go`, specifically in `(b *blobDownload) run(...)`. It's not exposed right now; ideally it "just works" so that people don't have to fiddle with it, but potentially as an advanced feature. If everyone starts using it, we're definitely doing something wrong.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48864