[PR #4543] [MERGED] simplify safetensors reading #16790

Closed
opened 2026-04-16 05:43:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4543
Author: @mxyng
Created: 5/20/2024
Status: Merged
Merged: 5/21/2024
Merged by: @mxyng

Base: mainHead: mxyng/simple-safetensors


📝 Commits (1)

  • 171eb04 simplify safetensors reading

📊 Changes

6 files changed (+49 additions, -81 deletions)

View changed files

📝 convert/safetensors.go (+43 -72)
📝 go.mod (+0 -1)
📝 go.sum (+0 -2)
📝 llm/ggla.go (+1 -1)
📝 llm/ggml.go (+3 -3)
📝 llm/gguf.go (+2 -2)

📄 Description

mapstructure is unnecessary and the safetensors header can be read directly into a struct


🔄 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/4543 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 5/20/2024 **Status:** ✅ Merged **Merged:** 5/21/2024 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/simple-safetensors` --- ### 📝 Commits (1) - [`171eb04`](https://github.com/ollama/ollama/commit/171eb040fc3dd8a9bee377e4c9a0e847a847c22c) simplify safetensors reading ### 📊 Changes **6 files changed** (+49 additions, -81 deletions) <details> <summary>View changed files</summary> 📝 `convert/safetensors.go` (+43 -72) 📝 `go.mod` (+0 -1) 📝 `go.sum` (+0 -2) 📝 `llm/ggla.go` (+1 -1) 📝 `llm/ggml.go` (+3 -3) 📝 `llm/gguf.go` (+2 -2) </details> ### 📄 Description mapstructure is unnecessary and the safetensors header can be read directly into a struct --- <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 05:43:12 -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#16790