Issues / #2587

#2587 UD-Q5_K_XL shard 1 rejected: check_shards and UNSLOTH_BIG_SHARDS disagree on expected size

open · @DrLove73 · 1 コメント · GitHub で見る

Setup & installNVIDIA / CUDAModels & quantsLinux

本文

**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.

関連リンク

インストール・モデル・リリースへの站内リンク。