[PR #10052] feat: enhance pull command to support pulling multiple models in one go #18401

Open
opened 2026-04-16 06:33:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10052
Author: @pwntr
Created: 3/30/2025
Status: 🔄 Open

Base: mainHead: main


📝 Commits (3)

  • 310e312 feat: enhance pull command to support pulling multiple models in one go
  • 7dac8af refactor: extract pull request execution into a separate function for improved readability while maintaining proper deferred progress stop
  • 9ee191a refactor: simplify error check and return for execPullRequest

📊 Changes

1 file changed (+29 additions, -16 deletions)

View changed files

📝 cmd/cmd.go (+29 -16)

📄 Description

Addresses #4351, #5141

This allows the pull command to be used with a list of models instead of only a single model, without having to resort to external scripting efforts.

Previous pull behavior and output for single model argument is unaffected. For a given argument list of models, the output shows a requested model summary and a short header line before each model pull for a better overview on long model lists during pulls.

Examples:

Single model pull: ollama pull qwen2.5:0.5b (unchanged from before)

pulling manifest
pulling c5396e06af29... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 397 MB
pulling 66b9ea09bd5b... 100% ▕███████████████████████████████████████████████████████████████████████████████▏   68 B
pulling eb4402837c78... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 1.5 KB
pulling 832dd9e00a68... 100% ▕███████████████████████████████████████████████████████████████████████████████▏  11 KB
pulling 005f95c74751... 100% ▕███████████████████████████████████████████████████████████████████████████████▏  490 B
verifying sha256 digest
writing manifest
success

Multi model pull: ollama pull qwen2.5:0.5b qwen2.5:1.5b

pulling 2 models: qwen2.5:0.5b, qwen2.5:1.5b
pulling model 1: qwen2.5:0.5b
pulling manifest
pulling c5396e06af29... 100% ▕█████████████████████████████████████████████████████████████████████████████���█▏ 397 MB
pulling 66b9ea09bd5b... 100% ▕███████████████████████████████████████████████████████████████████████████████▏   68 B
pulling eb4402837c78... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 1.5 KB
pulling 832dd9e00a68... 100% ▕███████████████████████████████████████████████████████████████████████████████▏  11 KB
pulling 005f95c74751... 100% ▕███████████████████████████████████████████████████████████████████████████████▏  490 B
verifying sha256 digest
writing manifest
success
pulling model 2: qwen2.5:1.5b
pulling manifest
pulling 183715c43589... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 986 MB
pulling 66b9ea09bd5b... 100% ▕███████████████████████████████████████████████████████████████████████████████▏   68 B
pulling eb4402837c78... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 1.5 KB
pulling 832dd9e00a68... 100% ▕███████████████████████████████████████████████████████████████████████████████▏  11 KB
pulling 377ac4d7aeef... 100% ▕███████████████████████████████████████████████████████████████████████████████▏  487 B
verifying sha256 digest
writing manifest
success

This is very useful for bootstrapping new deployments or updating an existing model pool in one command.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/10052 **Author:** [@pwntr](https://github.com/pwntr) **Created:** 3/30/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`310e312`](https://github.com/ollama/ollama/commit/310e3129cd62eec2b8f067b94bc04fd8a6008644) feat: enhance pull command to support pulling multiple models in one go - [`7dac8af`](https://github.com/ollama/ollama/commit/7dac8af118625242d89fbe3b6f6a7c911c8772bb) refactor: extract pull request execution into a separate function for improved readability while maintaining proper deferred progress stop - [`9ee191a`](https://github.com/ollama/ollama/commit/9ee191aae43b61e090219718f0d8957eb0d80434) refactor: simplify error check and return for execPullRequest ### 📊 Changes **1 file changed** (+29 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+29 -16) </details> ### 📄 Description Addresses #4351, #5141 This allows the pull command to be used with a list of models instead of only a single model, without having to resort to external scripting efforts. Previous pull behavior and output for single model argument is unaffected. For a given argument list of models, the output shows a requested model summary and a short header line before each model pull for a better overview on long model lists during pulls. **Examples:** Single model pull: `ollama pull qwen2.5:0.5b` (unchanged from before) ``` pulling manifest pulling c5396e06af29... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 397 MB pulling 66b9ea09bd5b... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 68 B pulling eb4402837c78... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 1.5 KB pulling 832dd9e00a68... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 11 KB pulling 005f95c74751... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 490 B verifying sha256 digest writing manifest success ``` Multi model pull: `ollama pull qwen2.5:0.5b qwen2.5:1.5b` ``` pulling 2 models: qwen2.5:0.5b, qwen2.5:1.5b pulling model 1: qwen2.5:0.5b pulling manifest pulling c5396e06af29... 100% ▕█████████████████████████████████████████████████████████████████████████████���█▏ 397 MB pulling 66b9ea09bd5b... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 68 B pulling eb4402837c78... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 1.5 KB pulling 832dd9e00a68... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 11 KB pulling 005f95c74751... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 490 B verifying sha256 digest writing manifest success pulling model 2: qwen2.5:1.5b pulling manifest pulling 183715c43589... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 986 MB pulling 66b9ea09bd5b... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 68 B pulling eb4402837c78... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 1.5 KB pulling 832dd9e00a68... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 11 KB pulling 377ac4d7aeef... 100% ▕███████████████████████████████████████████████████████████████████████████████▏ 487 B verifying sha256 digest writing manifest success ``` This is very useful for bootstrapping new deployments or updating an existing model pool in one command. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 06:33:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#18401