[PR #2632] [CLOSED] fix(setup) v2: don't require tensor-data alignment for GGUF shards without #4180

Closed
opened 2026-11-07 15:33:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2632
Author: @OriginalMadman
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (3)

  • 86bf0aa fix(setup): don't require tensor-data alignment for GGUF shards with no tensors
  • e70f91f Revert "fix(setup): don't require tensor-data alignment for GGUF shards with no tensors"
  • c25bd41 fix(setup): don't require tensor-data alignment for GGUF shards with no tensors

📊 Changes

1 file changed (+7 additions, -0 deletions)

View changed files

📝 setup.py (+7 -0)

📄 Description

check_shards() and whole_shard() calculated the minimum GGUF shard size as
data_start + max(tensor end offsets). For a shard containing no tensors, this
incorrectly required the file to extend through the aligned tensor-data start,
even though no tensor payload exists.

This caused valid metadata-only GGUF shards to be rejected as truncated. For
example, Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf was reported as
six bytes short:

  • Actual file size: 10,946,618 bytes
  • Parsed tensor count: 0
  • Aligned data start: 10,946,624 bytes

The downloaded file matched the size and SHA-256 declared in setup.py.

Change

Skip the tensor-payload extent check when a successfully parsed GGUF shard has
no tensors. GGUF parsing, the existing checks for tensor-bearing shards, and
the separate pinned size/SHA-256 verification remain unchanged.

Issue: Resolves https://github.com/Niko1221/Strata/issues/2470 and https://github.com/Niko1221/Strata/issues/2346
#2491


🔄 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/Niko1221/Strata/pull/2632 **Author:** [@OriginalMadman](https://github.com/OriginalMadman) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`86bf0aa`](https://github.com/Niko1221/Strata/commit/86bf0aad69cfcb64f02a549ec9c7934085f10202) fix(setup): don't require tensor-data alignment for GGUF shards with no tensors - [`e70f91f`](https://github.com/Niko1221/Strata/commit/e70f91f42349082fc549f495c65a180ff477e53e) Revert "fix(setup): don't require tensor-data alignment for GGUF shards with no tensors" - [`c25bd41`](https://github.com/Niko1221/Strata/commit/c25bd41f38fcb8ba7f55038c606c4b5fe3d2b338) fix(setup): don't require tensor-data alignment for GGUF shards with no tensors ### 📊 Changes **1 file changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+7 -0) </details> ### 📄 Description `check_shards()` and `whole_shard()` calculated the minimum GGUF shard size as `data_start + max(tensor end offsets)`. For a shard containing no tensors, this incorrectly required the file to extend through the aligned tensor-data start, even though no tensor payload exists. This caused valid metadata-only GGUF shards to be rejected as truncated. For example, `Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf` was reported as six bytes short: - Actual file size: 10,946,618 bytes - Parsed tensor count: 0 - Aligned data start: 10,946,624 bytes The downloaded file matched the size and SHA-256 declared in `setup.py`. ## Change Skip the tensor-payload extent check when a successfully parsed GGUF shard has no tensors. GGUF parsing, the existing checks for tensor-bearing shards, and the separate pinned size/SHA-256 verification remain unchanged. Issue: Resolves https://github.com/Niko1221/Strata/issues/2470 and https://github.com/Niko1221/Strata/issues/2346 #2491 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:33:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4180
No description provided.