[PR #15724] convert: support fp8 safetensors import #41152

Open
opened 2026-04-23 01:52:36 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15724
Author: @dhiltgen
Created: 4/20/2026
Status: 🔄 Open

Base: mainHead: ggml_fp8


📝 Commits (1)

  • 799c0e9 convert: support fp8 safetensors import

📊 Changes

8 files changed (+884 additions, -33 deletions)

View changed files

📝 convert/convert.go (+4 -0)
📝 convert/reader_safetensors.go (+416 -13)
📝 convert/reader_test.go (+218 -0)
📝 convert/tensor.go (+52 -0)
📝 convert/tensor_test.go (+51 -5)
📝 server/create.go (+10 -3)
📝 server/quantization.go (+44 -12)
📝 server/quantization_test.go (+89 -0)

📄 Description

Decode HF F8_E4M3 safetensors with block scale companions into GGUF-supported tensor types, and record which output tensors came from FP8 source weights.

Use that source-precision metadata during create quantization: default FP8-sourced GGUFs to Q8_0, keep non-FP8 tensors at their original precision for Q8_0, and promote non-FP8 quantizable tensors to Q8_0 for Q4_K requests.


🔄 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/15724 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 4/20/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `ggml_fp8` --- ### 📝 Commits (1) - [`799c0e9`](https://github.com/ollama/ollama/commit/799c0e9cc578f1461b27144a6ceee5762b669f26) convert: support fp8 safetensors import ### 📊 Changes **8 files changed** (+884 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `convert/convert.go` (+4 -0) 📝 `convert/reader_safetensors.go` (+416 -13) 📝 `convert/reader_test.go` (+218 -0) 📝 `convert/tensor.go` (+52 -0) 📝 `convert/tensor_test.go` (+51 -5) 📝 `server/create.go` (+10 -3) 📝 `server/quantization.go` (+44 -12) 📝 `server/quantization_test.go` (+89 -0) </details> ### 📄 Description Decode HF F8_E4M3 safetensors with block scale companions into GGUF-supported tensor types, and record which output tensors came from FP8 source weights. Use that source-precision metadata during create quantization: default FP8-sourced GGUFs to Q8_0, keep non-FP8 tensors at their original precision for Q8_0, and promote non-FP8 quantizable tensors to Q8_0 for Q4_K requests. --- <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-23 01:52:36 -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#41152