[PR #3044] [MERGED] convert: fix shape #73337

Closed
opened 2026-05-05 05:07:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/3044
Author: @mxyng
Created: 3/10/2024
Status: Merged
Merged: 3/11/2024
Merged by: @mxyng

Base: mainHead: mxyng/fix-convert-shape


📝 Commits (1)

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 convert/convert.go (+3 -3)

📄 Description

This commit reverts 18979ad4a1 which was merged in #3014

#3014 broke convert by setting dimensions to an array filled with 1s which is incorrect. while this is how the reader works, the writer only writes the array items if it's greater than zero1 . filling with 1s incorrectly potentially adds extra dimensions

the root cause is the way dimensions are encoded. using a slice is less error prone


🔄 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/3044 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 3/10/2024 **Status:** ✅ Merged **Merged:** 3/11/2024 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/fix-convert-shape` --- ### 📝 Commits (1) - [`9ea492f`](https://github.com/ollama/ollama/commit/9ea492f1ce255e81b08f25b781b3104bebd5765e) convert: fix shape ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `convert/convert.go` (+3 -3) </details> ### 📄 Description This commit reverts 18979ad4a1d40d04e3b981a477fa6323a40304b6 which was merged in #3014 #3014 broke convert by setting dimensions to an array filled with 1s which is incorrect. while this is how the reader works, the writer only writes the array items if it's greater than zero[^1]. filling with 1s incorrectly potentially adds extra dimensions the root cause is the way dimensions are encoded. using a slice is less error prone [^1]: https://github.com/ollama/ollama/blob/main/llm/gguf.go#L427 --- <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-05-05 05:07:25 -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#73337