[GH-ISSUE #4351] Pulling Multiple Models at Once #49225

Open
opened 2026-04-28 10:57:21 -05:00 by GiteaMirror · 12 comments
Owner

Originally created by @gusanmaz on GitHub (May 11, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4351

It would be nice if it could be possible to pull multiple models in one go in Ollama.

Today, I tried to run

ollama pull llava-phi3 llava-llama3 llama3-gradient phi3 moondream codeqwen

and it gave following error:

Error: accepts 1 arg(s), received 6
Originally created by @gusanmaz on GitHub (May 11, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4351 It would be nice if it could be possible to pull multiple models in one go in Ollama. Today, I tried to run ``` ollama pull llava-phi3 llava-llama3 llama3-gradient phi3 moondream codeqwen ``` and it gave following error: ``` Error: accepts 1 arg(s), received 6 ```
GiteaMirror added the feature request label 2026-04-28 10:57:21 -05:00
Author
Owner

@taozhiyuai commented on GitHub (May 11, 2024):

open as many terminals as you can

<!-- gh-comment-id:2105662489 --> @taozhiyuai commented on GitHub (May 11, 2024): open as many terminals as you can
Author
Owner

@gusanmaz commented on GitHub (May 11, 2024):

open as many terminals as you can

I ended up typing this command:

ollama pull llava-phi3; ollama pull llava-llama3; ollama pull llama3-gradient; ollama pull phi3; ollama pull moondream; ollama pull codeqwen

but it would be convenient if pull command could accept multiple models.

<!-- gh-comment-id:2105666426 --> @gusanmaz commented on GitHub (May 11, 2024): > open as many terminals as you can I ended up typing this command: ``` ollama pull llava-phi3; ollama pull llava-llama3; ollama pull llama3-gradient; ollama pull phi3; ollama pull moondream; ollama pull codeqwen ``` but it would be convenient if pull command could accept multiple models.
Author
Owner

@kbump commented on GitHub (May 11, 2024):

Plus, one on this.
I can open multiple terminals but would have to revisit to re-run cmds for larger mdls that fail. Those that fail to download are due to slow net from the other downloading or just a slow net in gen. Multi download with recovery-restart options would be a nice added Feature.

<!-- gh-comment-id:2105737059 --> @kbump commented on GitHub (May 11, 2024): Plus, one on this. I can open multiple terminals but would have to revisit to re-run cmds for larger mdls that fail. Those that fail to download are due to slow net from the other downloading or just a slow net in gen. Multi download with recovery-restart options would be a nice added Feature.
Author
Owner

@taozhiyuai commented on GitHub (May 11, 2024):

open as many terminals as you can

I ended up typing this command:

ollama pull llava-phi3; ollama pull llava-llama3; ollama pull llama3-gradient; ollama pull phi3; ollama pull moondream; ollama pull codeqwen

but it would be convenient if pull command could accept multiple models.

save all this command into a .sh file, and run it. it would be .bat file in windows. it will download all one by one.

if you do not know how to use .sh or .bat, do some research on google. it is not difficult.

<!-- gh-comment-id:2105746330 --> @taozhiyuai commented on GitHub (May 11, 2024): > > open as many terminals as you can > > I ended up typing this command: > > ``` > ollama pull llava-phi3; ollama pull llava-llama3; ollama pull llama3-gradient; ollama pull phi3; ollama pull moondream; ollama pull codeqwen > ``` > > but it would be convenient if pull command could accept multiple models. save all this command into a .sh file, and run it. it would be .bat file in windows. it will download all one by one. if you do not know how to use .sh or .bat, do some research on google. it is not difficult.
Author
Owner

@gusanmaz commented on GitHub (May 12, 2024):

open as many terminals as you can

I ended up typing this command:

ollama pull llava-phi3; ollama pull llava-llama3; ollama pull llama3-gradient; ollama pull phi3; ollama pull moondream; ollama pull codeqwen

but it would be convenient if pull command could accept multiple models.

save all this command into a .sh file, and run it. it would be .bat file in windows. it will download all one by one.

if you do not know how to use .sh or .bat, do some research on google. it is not difficult.

Thank you for your suggestions. However, I'm curious about how you concluded that I might not know how to create script files based on my previous messages.

While I am aware that I can manage without this feature, I think that allowing multiple inputs for pull command could be a small but useful enhancement to Ollama.

<!-- gh-comment-id:2106146984 --> @gusanmaz commented on GitHub (May 12, 2024): > > > open as many terminals as you can > > > > > > I ended up typing this command: > > ``` > > ollama pull llava-phi3; ollama pull llava-llama3; ollama pull llama3-gradient; ollama pull phi3; ollama pull moondream; ollama pull codeqwen > > ``` > > > > > > > > > > > > > > > > > > > > > > > > but it would be convenient if pull command could accept multiple models. > > save all this command into a .sh file, and run it. it would be .bat file in windows. it will download all one by one. > > if you do not know how to use .sh or .bat, do some research on google. it is not difficult. Thank you for your suggestions. However, I'm curious about how you concluded that I might not know how to create script files based on my previous messages. While I am aware that I can manage without this feature, I think that allowing multiple inputs for pull command could be a small but useful enhancement to Ollama.
Author
Owner

@zanderlewis commented on GitHub (May 12, 2024):

You could create a python script that gets input for each model and it will pull each model provided (using argparse).

<!-- gh-comment-id:2106257839 --> @zanderlewis commented on GitHub (May 12, 2024): You could create a python script that gets input for each model and it will pull each model provided (using argparse).
Author
Owner

@chapterjason commented on GitHub (May 13, 2024):

Bash; anyone?

#!/usr/bin/env bash

MODELS="llama3:instruct
llama3:8b-instruct-q4_1
llama3:8b-instruct-q5_0
llama3:8b-instruct-q5_1
llama3:8b-instruct-q8_0
llama3:8b-instruct-q2_K
llama3:8b-instruct-q3_K_S
llama3:8b-instruct-q3_K_M
llama3:8b-instruct-q3_K_L
llama3:8b-instruct-q4_K_S
llama3:8b-instruct-q4_K_M
llama3:8b-instruct-q5_K_S
llama3:8b-instruct-q5_K_M
llama3:8b-instruct-q6_K
llama3:8b-instruct-fp16"

for MODEL in $MODELS; do
  ollama pull "$MODEL"
done
<!-- gh-comment-id:2108734880 --> @chapterjason commented on GitHub (May 13, 2024): Bash; anyone? ```bash #!/usr/bin/env bash MODELS="llama3:instruct llama3:8b-instruct-q4_1 llama3:8b-instruct-q5_0 llama3:8b-instruct-q5_1 llama3:8b-instruct-q8_0 llama3:8b-instruct-q2_K llama3:8b-instruct-q3_K_S llama3:8b-instruct-q3_K_M llama3:8b-instruct-q3_K_L llama3:8b-instruct-q4_K_S llama3:8b-instruct-q4_K_M llama3:8b-instruct-q5_K_S llama3:8b-instruct-q5_K_M llama3:8b-instruct-q6_K llama3:8b-instruct-fp16" for MODEL in $MODELS; do ollama pull "$MODEL" done ```
Author
Owner

@pykeras commented on GitHub (Jun 29, 2024):

You can run this command in your terminal or use it as a Bash script. This script will continue downloading models even if the connection drops in the middle.

MODELS=("llama3" "qwen2" "gemma2:27b")
for MODEL in $MODELS; do
  echo "Downloading model: $MODEL"
  while ! ollama pull "$MODEL"; do
    echo "Download failed for $MODEL. Retrying..."
    sleep 0.1
  done
  echo "Download successful for $MODEL."
done
<!-- gh-comment-id:2198357806 --> @pykeras commented on GitHub (Jun 29, 2024): _You can run this command in your terminal or use it as a Bash script. This script will continue downloading models even if the connection drops in the middle._ ```bash MODELS=("llama3" "qwen2" "gemma2:27b") for MODEL in $MODELS; do echo "Downloading model: $MODEL" while ! ollama pull "$MODEL"; do echo "Download failed for $MODEL. Retrying..." sleep 0.1 done echo "Download successful for $MODEL." done ```
Author
Owner

@hidara2000 commented on GitHub (Dec 9, 2024):

LLMS = {
            "mixtral": "mixtral:8x22b-instruct",
            "llama3_2": "llama3.2:latest",
            "openchat": "openchat:latest",
            "marco-o1": "marco-o1:latest",
            "qwen2_5": "qwen2.5:latest",
            "qwq-abliterated": "huihui_ai/qwq-abliterated:latest",
            "qwq-fusion": "huihui_ai/qwq-fusion:latest",
            "qwq": "qwq:latest",
            "qwen2_5_coder": "qwen2.5-coder:32b",
            "gemma2": "gemma2:27b",
            "llama3.1": "llama3.1",
        }
        
def pull_ollama():
    processes = []
    # Start all processes in parallel
    for name, image in Config.Models.LLMS.items():
        cmd = ["ollama", "pull", image]
        print(f"Starting pull for {name} ({image})...")
        p = subprocess.Popen(cmd)  # no stdout/stderr pipes, direct output
        processes.append((name, image, p))

    # Wait for all processes to complete
    for name, image, p in processes:
        ret = p.wait()
        if ret == 0:
            print(f"{name} ({image}) finished successfully.")
        else:
            print(f"{name} ({image}) failed with return code {ret}.")

max out download speeds by downloading all at once:)

<!-- gh-comment-id:2526697441 --> @hidara2000 commented on GitHub (Dec 9, 2024): ``` LLMS = { "mixtral": "mixtral:8x22b-instruct", "llama3_2": "llama3.2:latest", "openchat": "openchat:latest", "marco-o1": "marco-o1:latest", "qwen2_5": "qwen2.5:latest", "qwq-abliterated": "huihui_ai/qwq-abliterated:latest", "qwq-fusion": "huihui_ai/qwq-fusion:latest", "qwq": "qwq:latest", "qwen2_5_coder": "qwen2.5-coder:32b", "gemma2": "gemma2:27b", "llama3.1": "llama3.1", } ``` ``` def pull_ollama(): processes = [] # Start all processes in parallel for name, image in Config.Models.LLMS.items(): cmd = ["ollama", "pull", image] print(f"Starting pull for {name} ({image})...") p = subprocess.Popen(cmd) # no stdout/stderr pipes, direct output processes.append((name, image, p)) # Wait for all processes to complete for name, image, p in processes: ret = p.wait() if ret == 0: print(f"{name} ({image}) finished successfully.") else: print(f"{name} ({image}) failed with return code {ret}.") ``` max out download speeds by downloading all at once:)
Author
Owner

@valeriocomo commented on GitHub (Jan 29, 2025):

My solution is based on a bash script

MODELS="nomic-embed-text
mistral
deepseek-r1:7b
deepseek-r1:8b"

for MODEL in $MODELS; do
  echo "🔄 Downloading model: $MODEL..."
  ollama pull "$MODEL"
  echo "✅ Finished downloading: $MODEL"
  echo "-----------------------------------"
done
<!-- gh-comment-id:2620934177 --> @valeriocomo commented on GitHub (Jan 29, 2025): My solution is based on a bash script ``` MODELS="nomic-embed-text mistral deepseek-r1:7b deepseek-r1:8b" for MODEL in $MODELS; do echo "🔄 Downloading model: $MODEL..." ollama pull "$MODEL" echo "✅ Finished downloading: $MODEL" echo "-----------------------------------" done ```
Author
Owner

@pwntr commented on GitHub (Mar 30, 2025):

In case anyone is subscribed to this, I implemented this as an enhancement in PR #10052. Feels more natural than scripting. Fingers crossed 🤞.

<!-- gh-comment-id:2764599910 --> @pwntr commented on GitHub (Mar 30, 2025): In case anyone is subscribed to this, I implemented this as an enhancement in PR #10052. Feels more natural than scripting. Fingers crossed 🤞.
Author
Owner

@iamthekwan commented on GitHub (Aug 29, 2025):

Use && instead. Just copypaste into cmd:

ollama pull llava-phi3 && ollama pull llava-llama3 && ollama pull llama3-gradient && ollama pull phi3 && ollama pull moondream && ollama pull codeqwen

<!-- gh-comment-id:3237917514 --> @iamthekwan commented on GitHub (Aug 29, 2025): Use && instead. Just copypaste into cmd: `ollama pull llava-phi3 && ollama pull llava-llama3 && ollama pull llama3-gradient && ollama pull phi3 && ollama pull moondream && ollama pull codeqwen`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#49225