[PR #2491] [CLOSED] fix(setup): don't require tensor-data alignment for GGUF shards without … #4074

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

📋 Pull Request Information

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

Base: main ← Head: main


📝 Commits (1)

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

📊 Changes

1 file changed (+6867 additions, -6859 deletions)

View changed files

📝 setup.py (+6867 -6859)

📄 Description

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.

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.

Title

Issue: Resolves #2470 and #2346

Summary

What changed

Extra Notes


🔄 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/2491 **Author:** [@OriginalMadman](https://github.com/OriginalMadman) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`86bf0aa`](https://github.com/Niko1221/Strata/commit/86bf0aad69cfcb64f02a549ec9c7934085f10202) fix(setup): don't require tensor-data alignment for GGUF shards with no tensors ### 📊 Changes **1 file changed** (+6867 additions, -6859 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+6867 -6859) </details> ### 📄 Description ## 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. `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`. ## Title <!-- If Applicable, reference the GitHub issue --> Issue: Resolves #2470 and #2346 ## Summary <!-- Quick Summary of changes --> ## What changed <!-- Specifics on files changed, and what changes were made there --> ## Extra Notes <!-- Any extra notes, delete if there are none --> --- <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:00 +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#4074
No description provided.