[PR #3028] [CLOSED] setup: --skip-gguf-sha256, for a model file that is another build of the model setup pins #4408

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3028
Author: @iMilnb
Created: 10/18/2026
Status: ❌ Closed

Base: main ← Head: skip-gguf-sha256


📝 Commits (1)

  • b567751 setup: --skip-gguf-sha256 keeps a model file whose size and SHA-256 are not the pinned ones (another build of the same GGUF: Huihui's abliterated shards #1979, a repository that moved its file #2635 #2346; the engine archive keeps its own STRATA_SKIP_SHA256)

📊 Changes

6 files changed (+85 additions, -12 deletions)

View changed files

📝 docs/DETAILS.md (+2 -0)
📝 docs/INSTALL.md (+2 -0)
📝 docs/TROUBLESHOOTING.md (+7 -0)
📝 setup.py (+30 -8)
📝 tools/test_setup_qwen36.py (+2 -1)
📝 tools/test_setup_unsloth.py (+42 -3)

📄 Description

What this adds

One opt-in setup flag: python setup.py --skip-gguf-sha256. With it, verify_sha256
compares neither the pinned size nor the pinned SHA-256 of the model files (GGUF shards
and the mmproj), warns with the size on disk next to the pinned size and the pinned
hash prefix, and keeps the file instead of deleting it. Without the flag the default
path is byte-identical to v0.1.45.

Why

We often want to run a variant of a model Strata officially supports instead of the
pinned repository file: for example huihui-ai's
Huihui-Qwen3.8-Flash-Next-abliterated-v2-GGUF
instead of unsloth's Qwen3.8-Flash-Next-GGUF
(the same model, refusal answers edited out, re-sharded: same architecture, so the
engine runs it, but neither the file sizes nor the hashes match the pins in setup.py).
Today setup deletes such a file and stops, and the only workaround is editing
verify_sha256 out of setup.py by hand. Same symptom from #2635 and #2346, where a
repository moved its file after the pin was taken; see also #1979 and #2842.

What it leaves alone

  • The ready-made engine keeps its own separate switch (STRATA_SKIP_SHA256,
    check_engine_digest); neither one implies the other, and a test pins that.
  • check_shards still reads the GGUF headers, so a truncated or incompatible file is
    refused even with the flag.
  • A skipped file's .done mark records sha256 skipped (N bytes), so a later run
    without the flag hashes it again and re-arms the normal check.
  • ModelScope's published-hash check, the Vulkan SDK archive and metal/setup_mac.py
    keep verifying as before (the Mac path does not take the flag yet).

How I checked

  • New tests in tools/test_setup_unsloth.py: the skip accepts a different build and
    keeps the file, skips the hashing, re-hashes a mark from an earlier skipped run, and
    STRATA_SKIP_SHA256=1 alone does not relax the model-file check; one end-to-end test
    shows the flag reaching every pinned model file (main() with --skip-gguf-sha256).
  • All 41 tools/test_setup_*.py suites pass on this branch, except
    test_setup_engine_hash (2) and test_setup_golden (8), which fail identically on a
    clean 477ac13c in the same checkout (verified with the branch's changes stashed).
  • Docs: one line in docs/INSTALL.md and the docs/DETAILS.md option list, plus a
    docs/TROUBLESHOOTING.md entry for "setup says a model file has the wrong SHA-256,
    or the wrong size" that spells out the two separate switches.

🔄 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/3028 **Author:** [@iMilnb](https://github.com/iMilnb) **Created:** 10/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `skip-gguf-sha256` --- ### 📝 Commits (1) - [`b567751`](https://github.com/Niko1221/Strata/commit/b5677512175eb2ec64058067101f1d08da74d15e) setup: --skip-gguf-sha256 keeps a model file whose size and SHA-256 are not the pinned ones (another build of the same GGUF: Huihui's abliterated shards #1979, a repository that moved its file #2635 #2346; the engine archive keeps its own STRATA_SKIP_SHA256) ### 📊 Changes **6 files changed** (+85 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `docs/DETAILS.md` (+2 -0) 📝 `docs/INSTALL.md` (+2 -0) 📝 `docs/TROUBLESHOOTING.md` (+7 -0) 📝 `setup.py` (+30 -8) 📝 `tools/test_setup_qwen36.py` (+2 -1) 📝 `tools/test_setup_unsloth.py` (+42 -3) </details> ### 📄 Description ## What this adds One opt-in setup flag: `python setup.py --skip-gguf-sha256`. With it, `verify_sha256` compares neither the pinned size nor the pinned SHA-256 of the model files (GGUF shards and the mmproj), warns with the size on disk next to the pinned size and the pinned hash prefix, and keeps the file instead of deleting it. Without the flag the default path is byte-identical to v0.1.45. ## Why We often want to run a variant of a model Strata officially supports instead of the pinned repository file: for example huihui-ai's [Huihui-Qwen3.8-Flash-Next-abliterated-v2-GGUF](https://huggingface.co/huihui-ai/Huihui-Qwen3.8-Flash-Next-abliterated-v2-GGUF) instead of unsloth's [Qwen3.8-Flash-Next-GGUF](https://huggingface.co/unsloth/Qwen3.8-Flash-Next-GGUF) (the same model, refusal answers edited out, re-sharded: same architecture, so the engine runs it, but neither the file sizes nor the hashes match the pins in `setup.py`). Today setup deletes such a file and stops, and the only workaround is editing `verify_sha256` out of `setup.py` by hand. Same symptom from #2635 and #2346, where a repository moved its file after the pin was taken; see also #1979 and #2842. ## What it leaves alone - The ready-made engine keeps its own separate switch (`STRATA_SKIP_SHA256`, `check_engine_digest`); neither one implies the other, and a test pins that. - `check_shards` still reads the GGUF headers, so a truncated or incompatible file is refused even with the flag. - A skipped file's `.done` mark records `sha256 skipped (N bytes)`, so a later run without the flag hashes it again and re-arms the normal check. - ModelScope's published-hash check, the Vulkan SDK archive and `metal/setup_mac.py` keep verifying as before (the Mac path does not take the flag yet). ## How I checked - New tests in `tools/test_setup_unsloth.py`: the skip accepts a different build and keeps the file, skips the hashing, re-hashes a mark from an earlier skipped run, and `STRATA_SKIP_SHA256=1` alone does not relax the model-file check; one end-to-end test shows the flag reaching every pinned model file (`main()` with `--skip-gguf-sha256`). - All 41 `tools/test_setup_*.py` suites pass on this branch, except `test_setup_engine_hash` (2) and `test_setup_golden` (8), which fail identically on a clean `477ac13c` in the same checkout (verified with the branch's changes stashed). - Docs: one line in `docs/INSTALL.md` and the `docs/DETAILS.md` option list, plus a `docs/TROUBLESHOOTING.md` entry for "setup says a model file has the wrong SHA-256, or the wrong size" that spells out the two separate switches. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:35:30 +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#4408
No description provided.