[GH-ISSUE #2587] UD-Q5_K_XL shard 1 rejected: check_shards and UNSLOTH_BIG_SHARDS disagree on expected size #1035

Closed
opened 2026-11-04 01:47:54 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @DrLove73 on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2587

Describe the bug

setup.sh rejects Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf with an inconsistent error. The verification logic in setup.py compares the file against two different expected sizes depending on the check.

To Reproduce

Download Qwen3.8-Flash-Next-UD-Q5_K_XL via ./setup.sh.

The download of shard 1 completes.

Run ./setup.sh again to continue the installation.

Setup stops with the following error:
text

[X] Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf is short: 10,946,618 of 10,946,624 bytes (6 missing)

Following the suggested fix (truncate -s 10946624 ), the file size becomes exactly 10,946,624 bytes.

Run ./setup.sh again. A new, different error appears:
text

[X] Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf is 10,946,624 bytes, not 10,946,618

Expected behavior

Setup should accept the shard as valid and continue the installation. The file size is correct according to both the GGUF header and the UNSLOTH_BIG_SHARDS dictionary.

Analysis / Root Cause

There is an inconsistency in setup.py between two sources of truth for the expected file size:

The check_shards() function (around line 1958) calculates the expected size (need) by reading the GGUF header and summing the tensor data offsets. For this file, it computes 10,946,624 bytes.

The UNSLOTH_BIG_SHARDS dictionary (around line 335) defines the expected size for the same file as 10,946,618 bytes.

The file on disk, as downloaded from Hugging Face, matches the size in UNSLOTH_BIG_SHARDS (10,946,618 bytes). However, the GGUF header inside the file declares a data size of 10,946,624 bytes, likely due to missing alignment padding at the end of the last tensor. Because check_shards does not tolerate this small discrepancy, it rejects the file. After manually padding the file to 10,946,624 bytes to pass check_shards, a subsequent, different check (using UNSLOTH_BIG_SHARDS) now fails because the file is larger than the declared size.

This makes it impossible to satisfy both checks simultaneously with a single file size.

Suggested Fix

The verification logic should be made consistent. One of the following changes would resolve the issue:

Update UNSLOTH_BIG_SHARDS: Change the expected size for Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf from 10,946,618 to 10,946,624 bytes to match the GGUF header. This is the most robust solution.

Add a tolerance in check_shards(): Modify the check_shards function to allow a small tolerance (e.g., up to 32 bytes) when have < need, accounting for alignment padding. The condition could be changed to if have < need - 32: or similar.

Either fix would allow the setup to proceed.

Environment

**OS**: Linux (RHEL-based, kernel 6.12.0-211.49.1.el10_2.x86_64)

**Strata Version**: 0.1.44.1 (commit 296b59d2)

**Model**: Qwen3.8-Flash-Next (Unsloth) UD-Q5_K_XL

**GPU**: NVIDIA RTX PRO 4000 Blackwell

Workaround

None, as the two checks are mutually exclusive. A code fix is required.

Originally created by @DrLove73 on GitHub (Oct 15, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2587 **Describe the bug** setup.sh rejects Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf with an inconsistent error. The verification logic in setup.py compares the file against two different expected sizes depending on the check. **To Reproduce** Download Qwen3.8-Flash-Next-UD-Q5_K_XL via ./setup.sh. The download of shard 1 completes. Run ./setup.sh again to continue the installation. Setup stops with the following error: text [X] Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf is short: 10,946,618 of 10,946,624 bytes (6 missing) Following the suggested fix (truncate -s 10946624 <file>), the file size becomes exactly 10,946,624 bytes. Run ./setup.sh again. A new, different error appears: text [X] Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf is 10,946,624 bytes, not 10,946,618 **Expected behavior** Setup should accept the shard as valid and continue the installation. The file size is correct according to both the GGUF header and the UNSLOTH_BIG_SHARDS dictionary. **Analysis / Root Cause** There is an inconsistency in setup.py between two sources of truth for the expected file size: The check_shards() function (around line 1958) calculates the expected size (need) by reading the GGUF header and summing the tensor data offsets. For this file, it computes 10,946,624 bytes. The UNSLOTH_BIG_SHARDS dictionary (around line 335) defines the expected size for the same file as 10,946,618 bytes. The file on disk, as downloaded from Hugging Face, matches the size in UNSLOTH_BIG_SHARDS (10,946,618 bytes). However, the GGUF header inside the file declares a data size of 10,946,624 bytes, likely due to missing alignment padding at the end of the last tensor. Because check_shards does not tolerate this small discrepancy, it rejects the file. After manually padding the file to 10,946,624 bytes to pass check_shards, a subsequent, different check (using UNSLOTH_BIG_SHARDS) now fails because the file is larger than the declared size. This makes it impossible to satisfy both checks simultaneously with a single file size. **Suggested Fix** The verification logic should be made consistent. One of the following changes would resolve the issue: Update UNSLOTH_BIG_SHARDS: Change the expected size for Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf from 10,946,618 to 10,946,624 bytes to match the GGUF header. This is the most robust solution. Add a tolerance in check_shards(): Modify the check_shards function to allow a small tolerance (e.g., up to 32 bytes) when have < need, accounting for alignment padding. The condition could be changed to if have < need - 32: or similar. Either fix would allow the setup to proceed. **Environment** **OS**: Linux (RHEL-based, kernel 6.12.0-211.49.1.el10_2.x86_64) **Strata Version**: 0.1.44.1 (commit 296b59d2) **Model**: Qwen3.8-Flash-Next (Unsloth) UD-Q5_K_XL **GPU**: NVIDIA RTX PRO 4000 Blackwell **Workaround** None, as the two checks are mutually exclusive. A code fix is required.
Author
Owner

@qiuzan2001 commented on GitHub (Oct 15, 2026):

Same bug as #2346 and #2470. The downloaded file (10,946,618 bytes) is the correct one: it matches the pinned size and SHA-256, and it holds no tensors, so the "aligned data start" that check_shards() computes (10,946,624) lies past the end of a correct file. Truncating it to 10,946,624 changes the bytes, so the size/hash check then rejects it; restore the original (delete it and let setup download it again) rather than padding it. Two open PRs fix the check: #2505 (check_shards, with a test) and #2491 (check_shards and whole_shard); on main 296b59d2 a metadata-only GGUF reproduces the "short" stop.

<!-- gh-comment-id:6189103508 --> @qiuzan2001 commented on GitHub (Oct 15, 2026): Same bug as #2346 and #2470. The downloaded file (10,946,618 bytes) is the correct one: it matches the pinned size and SHA-256, and it holds no tensors, so the "aligned data start" that `check_shards()` computes (10,946,624) lies past the end of a correct file. Truncating it to 10,946,624 changes the bytes, so the size/hash check then rejects it; restore the original (delete it and let setup download it again) rather than padding it. Two open PRs fix the check: #2505 (`check_shards`, with a test) and #2491 (`check_shards` and `whole_shard`); on main 296b59d2 a metadata-only GGUF reproduces the "short" stop.
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6271121025 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1035
No description provided.