Skip to content

mlx: refined model push behavior#15431

Merged
dhiltgen merged 3 commits into
ollama:mainfrom
dhiltgen:push_st
May 8, 2026
Merged

mlx: refined model push behavior#15431
dhiltgen merged 3 commits into
ollama:mainfrom
dhiltgen:push_st

Conversation

@dhiltgen
Copy link
Copy Markdown
Collaborator

@dhiltgen dhiltgen commented Apr 8, 2026

Refine the algorithm for parallel push of safetensors based models to get better reliability and throughput.

This reduces the default parallelism for pull and push for safetensor models to 4 so we put less burden on slow networks/routers. There is now an env var to adjust the server default.

% ollama serve --help
Start Ollama
...
      OLLAMA_MAX_TRANSFERS       Maximum number of parallel safetensors pull or push streams (default 4)
...

@dhiltgen dhiltgen changed the title mlx: faster model push with chunking mlx: refined model push behavior May 2, 2026
@dhiltgen dhiltgen marked this pull request as draft May 2, 2026 23:19
@dhiltgen dhiltgen marked this pull request as ready for review May 4, 2026 18:49
Comment thread x/transfer/upload.go
Comment thread x/imagegen/transfer/upload.go Outdated
Comment thread x/imagegen/transfer/upload.go Outdated
@dongluochen
Copy link
Copy Markdown
Contributor

LGTM. Please resolve conflicts.

dhiltgen added 2 commits May 8, 2026 11:43
Refine the algorithm for parallel push of safetensors based models to get
better reliability and throughput.
Copy link
Copy Markdown
Contributor

@pdevine pdevine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks fine, just some suggestions for naming/comments.

Comment thread cmd/cmd.go Outdated
Comment thread envconfig/config.go Outdated
Comment thread server/images.go Outdated
Comment thread x/transfer/transfer.go
@dhiltgen dhiltgen merged commit 1e1b34d into ollama:main May 8, 2026
8 checks passed
@dhiltgen dhiltgen deleted the push_st branch May 8, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants