[PR #14184] [MERGED] safetensors quantization for mlx #45804

Closed
opened 2026-04-25 01:26:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14184
Author: @pdevine
Created: 2/10/2026
Status: Merged
Merged: 2/10/2026
Merged by: @pdevine

Base: mainHead: pdevine/quants


📝 Commits (1)

  • 313b6a6 safetensors quantization for mlx

📊 Changes

14 files changed (+1619 additions, -440 deletions)

View changed files

📝 x/create/client/create.go (+66 -39)
📝 x/create/client/quantize.go (+170 -73)
📝 x/create/client/quantize_stub.go (+9 -2)
📝 x/create/create.go (+130 -57)
📝 x/create/create_test.go (+34 -1)
📝 x/create/imagegen.go (+5 -5)
x/imagegen/docs/blob-format.md (+158 -0)
📝 x/imagegen/manifest/manifest.go (+84 -13)
📝 x/imagegen/manifest/weights.go (+127 -99)
📝 x/imagegen/mlx/mlx.go (+47 -0)
📝 x/imagegen/safetensors/extractor.go (+80 -12)
📝 x/imagegen/safetensors/loader.go (+1 -1)
📝 x/server/show.go (+232 -118)
📝 x/server/show_test.go (+476 -20)

📄 Description

This change includes:

  • changes to the safetensors metadata format
  • changes to the create command to properly create the blobs with the new format
  • changes to load the new format
  • fixes ollama show to properly show each tensor

🔄 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/14184 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 2/10/2026 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `pdevine/quants` --- ### 📝 Commits (1) - [`313b6a6`](https://github.com/ollama/ollama/commit/313b6a6a32dfc1d06ff7968593cc9a7aabe9bc7a) safetensors quantization for mlx ### 📊 Changes **14 files changed** (+1619 additions, -440 deletions) <details> <summary>View changed files</summary> 📝 `x/create/client/create.go` (+66 -39) 📝 `x/create/client/quantize.go` (+170 -73) 📝 `x/create/client/quantize_stub.go` (+9 -2) 📝 `x/create/create.go` (+130 -57) 📝 `x/create/create_test.go` (+34 -1) 📝 `x/create/imagegen.go` (+5 -5) ➕ `x/imagegen/docs/blob-format.md` (+158 -0) 📝 `x/imagegen/manifest/manifest.go` (+84 -13) 📝 `x/imagegen/manifest/weights.go` (+127 -99) 📝 `x/imagegen/mlx/mlx.go` (+47 -0) 📝 `x/imagegen/safetensors/extractor.go` (+80 -12) 📝 `x/imagegen/safetensors/loader.go` (+1 -1) 📝 `x/server/show.go` (+232 -118) 📝 `x/server/show_test.go` (+476 -20) </details> ### 📄 Description This change includes: - changes to the safetensors metadata format - changes to the create command to properly create the blobs with the new format - changes to load the new format - fixes ollama show to properly show each tensor --- <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-25 01:26:17 -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#45804