[PR #10822] [MERGED] feat: incremental gguf parser #75673

Closed
opened 2026-05-05 08:05:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10822
Author: @mxyng
Created: 5/23/2025
Status: Merged
Merged: 6/12/2025
Merged by: @mxyng

Base: mainHead: mxyng/gguf


📝 Commits (10+)

📊 Changes

13 files changed (+1362 additions, -169 deletions)

View changed files

fs/gguf/gguf.go (+347 -0)
fs/gguf/gguf_test.go (+249 -0)
fs/gguf/keyvalue.go (+90 -0)
fs/gguf/keyvalue_test.go (+208 -0)
fs/gguf/lazy.go (+89 -0)
fs/gguf/reader.go (+23 -0)
fs/gguf/tensor.go (+288 -0)
📝 go.mod (+1 -1)
📝 go.sum (+2 -2)
📝 server/images.go (+11 -15)
📝 server/images_test.go (+44 -129)
📝 server/quantization_test.go (+2 -10)
📝 server/sched_test.go (+8 -12)

📄 Description

this change implements a new gguf file parser reading only what the user needs rather than the entire file. this significantly improves most operations since there are many cases where only a subset of the kvs or tensor info is required


🔄 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/10822 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 5/23/2025 **Status:** ✅ Merged **Merged:** 6/12/2025 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `mxyng/gguf` --- ### 📝 Commits (10+) - [`3ab8854`](https://github.com/ollama/ollama/commit/3ab8854373a834161c452c3118df410aee3adc06) wip: incremental gguf parser - [`0b9ee15`](https://github.com/ollama/ollama/commit/0b9ee15bd9b34c2596916baea095a60608afcc70) gguf: update test to not rely on gguf on disc - [`f144282`](https://github.com/ollama/ollama/commit/f144282ef7fdfd2b1da02c2487853b59e87a61ea) fix lint unneeded conversions - [`8509995`](https://github.com/ollama/ollama/commit/850999582f72210b2a33cddee096428637783d47) more type conversions - [`49039b1`](https://github.com/ollama/ollama/commit/49039b1a8f674737fb0539bb9986edbe0c64185c) Update gguf_test.go - [`0a2ffe2`](https://github.com/ollama/ollama/commit/0a2ffe2397af9ea902219d09c5aca502af930bea) re-use existing create gguf - [`90216d8`](https://github.com/ollama/ollama/commit/90216d8e4de04915bc3d554942df58bc16720f3c) pr feedback - [`983a0f6`](https://github.com/ollama/ollama/commit/983a0f694cc4a057642902fac46648bf9469fc99) Update gguf.go - [`2095506`](https://github.com/ollama/ollama/commit/2095506b4c2bcc627cb708abf614fa3bb44d5fa3) read capabilities from gguf kv - [`fb34936`](https://github.com/ollama/ollama/commit/fb349363505613fbda3e5e613a3ca83f8da36b65) kv exists ### 📊 Changes **13 files changed** (+1362 additions, -169 deletions) <details> <summary>View changed files</summary> ➕ `fs/gguf/gguf.go` (+347 -0) ➕ `fs/gguf/gguf_test.go` (+249 -0) ➕ `fs/gguf/keyvalue.go` (+90 -0) ➕ `fs/gguf/keyvalue_test.go` (+208 -0) ➕ `fs/gguf/lazy.go` (+89 -0) ➕ `fs/gguf/reader.go` (+23 -0) ➕ `fs/gguf/tensor.go` (+288 -0) 📝 `go.mod` (+1 -1) 📝 `go.sum` (+2 -2) 📝 `server/images.go` (+11 -15) 📝 `server/images_test.go` (+44 -129) 📝 `server/quantization_test.go` (+2 -10) 📝 `server/sched_test.go` (+8 -12) </details> ### 📄 Description this change implements a new gguf file parser reading only what the user needs rather than the entire file. this significantly improves most operations since there are many cases where only a subset of the kvs or tensor info is required --- <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 08:05:41 -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#75673