[PR #4632] [CLOSED] [Other] Accept ISTA-DASLab's six-shard DeepSeek V4.1 Flash GGUF layout #5121

Closed
opened 2026-11-07 16:32:51 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4632
Author: @StackArc3
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: dsv41-ista-six-shard-layout


📝 Commits (1)

  • dfbd834 Accept ISTA-DASLab's six-shard DeepSeek V4.1 Flash GGUF layout

📊 Changes

12 files changed (+401 additions, -163 deletions)

View changed files

📝 docs/DEEPSEEK41.md (+10 -4)
📝 setup.py (+97 -66)
📝 strata_cli/launch/runner.py (+1 -1)
📝 strata_control/dsv41_fit.py (+5 -5)
📝 strata_control/models.py (+1 -1)
➕ tests/fixtures/dsv41/engram-converted-27oct-header.gguf (+0 -0)
📝 tests/terminal/test_dsv41_import_preview.py (+3 -3)
📝 tests/terminal/test_dsv41_own_files_and_mmproj.py (+1 -2)
📝 tests/terminal/test_dsv41_tui_items.py (+6 -13)
📝 tests/terminal/test_pack_gguf_engram.py (+80 -4)
📝 tools/dsv41/pack_gguf.py (+20 -3)
📝 tools/test_setup_dsv41.py (+177 -61)

📄 Description

Problem and result

on 27 October 2026 (23:16 UTC) ISTA-DASLab replaced the four-shard IST-DAS builds on the Hub's main with six-shard builds (llama.cpp b11870+ layout). --model-path with those files fails: "...-00001-of-00004.gguf is missing". The v0.2.7.1 pin (cb02422c, 23 October 2026, 23:26 UTC) still serves the old files with matching sizes and hashes. After this change the six-shard 2.00, 1.75 and 2.25 bpw sets each launched and answered a chat request on one machine.

#4237 (the scope question for Option A against Option B is open there; hurui200320 asked for this PR and prefers the six-shard pin), #4256. Hub commit: huggingface.co/ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF@a419d74cd2

Approach

this is Option A, a change to a default, so it stays a draft until scope agreement is answered in #4237. AGENTS.md says "A new feature is opt-in, and the default path stays byte-identical to the last release." Option A cannot keep that: it moves the pin to a419d74c, changing the default download. Option B (not implemented) leaves the pinned download untouched and teaches only the own-files path the six-shard set with its own pins. I can rework this branch into B.

  • Pin a419d74c: five shards per build named of-00006, the shared Engram as the sixth. The Engram was converted in place: same name and size, new hash.
  • pack_gguf.py counts a --engram file as the sixth shard only if it is one file, not already among the shards, number count-1 of the same split, and holds the one tensor per_layer_token_embd.weight.
  • An Engram whose finish mark names an old hash is fetched again in the same run. One whose mark has no hash (an interrupted run, an older setup) is hashed: a match is kept and marked, a mismatch is fetched again in the same run. A user's own old one is refused with the reason.
  • A pack from an earlier run is rebuilt unless it names this run's files.
  • Compatibility: six-shard only. Four-shard files are ignored and stay on disk. The first-release name tables are now empty, as other modules read them. No engine code changes.

Validation

Tree: v0.2.7.1, 46c152a1, plus this diff; bundled Python 3.12.15; Windows 11, RTX 5070 Ti 16 GB, 64 GB RAM, engine 0.1.52 cuda13.

Passed:

  • Passed, in a clean environment (empty LOCALAPPDATA, APPDATA, STRATA_HOME, STRATA_DATA_DIR; no other STRATA_* variable was set, env.txt below; network refused through a dead proxy, loopback exempt), patched tree: python tools/test_setup_dsv41.py 98 run, 98 pass; python -m unittest tests.terminal.<module> for test_pack_gguf_engram and test_dsv41_import_preview, _tui_items, _own_files_and_mmproj, _fit, _context, _prefill_chunk, _upgrade: 95 pass; python tools/test_setup_pins.py (23), test_setup_model_pins.py (16), test_setup_choices.py (54), test_setup_unsloth.py (57).
  • Passed, same environment and command, unmodified 46c152a1: python tools/test_setup_dsv41.py 87 run, 87 pass.
  • Passed: from the repository root, with the bundled Python, python setup.py --yes --no-start --family deepseek41 --model IST-DAS-1.75bpw --context 8192 --vision yes --data-dir <data-dir>, then the same with --model IST-DAS-2.25bpw, with these set: STRATA_CONTROL_INSTALL=1, STRATA_INSTALL_DIR=<scratch>\install, PYTHONPATH=<repo>, PYTHONNOUSERSITE=1, PYTHONUNBUFFERED=1, STRATA_DSV41_EXE=<install-dir>\engine-dsv41\0.1.52-windows-x86_64-cuda-cuda13\strata-dsv41.exe, STRATA_DSV41_NO_SMOKE=1, STRATA_PROFILE_DIR=<scratch>\profiles, STRATA_RUNTIME_DIR=<scratch>\runtime, STRATA_STATE_DIR=<scratch>\state, LOCALAPPDATA=<scratch>\appdata\Local, APPDATA=<scratch>\appdata\Roaming. Both exited 0 (54 and 64 minutes); setup reported every shard downloaded after its SHA-256 check and built both packs; the hard-linked Engram was accepted. No model was loaded. The run logs were lost before this text was written, so the files were hashed again afterwards: all 11 files (five IQ1_M shards, five IQ2_XS shards, the Engram) match their pinned size and SHA-256, log with the script, sizes and both hashes per file below (reverify.txt).
  • Passed: three launches in sequence on 29 October 2026, from the repository root, with the bundled Python, with STRATA_DSV41_EXE (the installed 0.1.52 cuda13 engine), STRATA_INSTALL_DIR, STRATA_PROFILE_DIR, STRATA_RUNTIME_DIR, STRATA_STATE_DIR set to folders under <scratch>, LOCALAPPDATA and APPDATA under <scratch>\appdata, PYTHONNOUSERSITE=1 and PYTHONUNBUFFERED=1. Each exited 0 and printed "The model is loaded and answering", then was stopped with strata launch --stop (its "Stopped" line is in each log):
    • python strata.py launch --family deepseek41 --model ist-das-2.00bpw --model-path <link-dir> --data-dir <data-dir> --context 8k --vision on --tune skip --access local --port 8080 --no-tui (answering 3.9 minutes after the start, 2.6 of them spent checking the files' SHA-256; 935 MiB of GPU memory used after the stop). <link-dir> holds hard links to the six files of the set, made with cmd /c mklink /H "<link-dir>\<name>" "<model-dir>\<name>" for each, so that setup's marker files stay out of the original folder.
    • python strata.py launch --family deepseek41 --model ist-das-1.75bpw --data-dir <data-dir> --context 8k --vision on --tune skip --access local --port 8080 --no-tui (1.0 minute; 861 MiB after the stop).
    • python strata.py launch --family deepseek41 --model ist-das-2.25bpw --data-dir <data-dir> --context 8k --vision on --tune skip --access local --port 8080 --no-tui (1.1 minutes; 822 MiB after the stop).
  • First chat send per build, after Strata's own 31-token readiness request (1 token generated), so the probe was the engine's second request; cached tokens 0 each time: prompt "In three sentences, explain what a mixture-of-experts model is.", 44 prompt tokens, max_tokens 200, finish reason stop each time. 2.00: 115 completion tokens, 21.4 s wall, 12.2 prompt and 6.5 decode tokens/s. 1.75: 139, 20.7 s, 14.0 and 7.9. 2.25: 131, 26.4 s, 10.7 and 5.9. The rates are the server's own timings fields; completion tokens include the model's reasoning text. Single observations after a fresh start, not benchmarks. JSON files below.

Failed:

  • With the network open and this machine's own state, patched tree: python tools/test_setup_dsv41.py 98 run, 94 pass. The four failures are copies of test_no_engine_stops_before_the_download, which also fail on unmodified 46c152a1. The test does not stub the engine download and reports GitHub as reachable, so setup reads the live update feed, downloads a real engine package and returns 0 instead of 1. Also one test_dsv41_tui_items test, because the default data folder held the downloaded sets. In the clean environment all 98 and all 22 pass.
  • python -m pytest tests/terminal -q on the final diff, bundled Python 3.12.15, clean environment, no network (pytest installed with pip into a folder outside the repo): Failed on both trees. Patched tree: 7 failed, 3 errors, 1918 passed, 62 skipped (1973 s). Pristine 46c152a1: 9 failed, 4 errors, 1910 passed, 62 skipped (2207 s). The two trees ran at the same time. Failing on both: test_bench_standard.py::RunTests::test_a_round_total_is_null_when_a_counted_request_has_no_token_count, test_bundle_imports.py::BundleImports::test_setup_py_and_each_of_its_tools_import_with_tools_limited_to_the_bundle, test_monitor_bundle.py::MonitorBundleTests::test_offline_install_plan_and_remove_touch_only_monitor_files. Failing on the patched tree only in that run: four tests in test_runtime.py (test_edited_source_migration_is_previewed_digest_pinned_and_verified, test_failed_edited_source_migration_uses_private_snapshot_for_rollback, test_local_management_bridge_and_cli_share_owner_and_journal, test_zero_token_completion_does_not_count_as_generation_ready). Failing on the pristine tree only in that run: test_docker_files.py::Scripts::test_build_script_exits_zero_after_assembling_a_context and five in test_runtime.py (test_a_reused_pid_with_another_creation_time_is_not_the_recorded_child, test_failed_source_switch_restores_prior_owned_launch, test_hard_killed_host_child_exits_and_next_start_recovers_private_state, test_owned_runtime_and_calibration_exclude_each_other_even_on_port_zero, test_restart_plan_compares_revision_without_stopping_instance). Re-running those ten tests one tree at a time: all 10 passed on the patched tree; on the pristine tree 2 failed (the docker build test and test_local_management_bridge_and_cli_share_owner_and_journal, a Windows PermissionError deleting a temp file) and 8 passed. No test failed on the patched tree in the re-run. The full outputs are not part of the diff.

Not run:

  • other GPUs, any backend build, any measurement beyond the one first send per build. Setup's own 16-word smoke-test result is not shown in the launch output, for any build.

Limits

  • 1.75 and 2.25 were each launched once and answered one request; nothing more was measured. Testing on other hardware is welcome.
  • Setup still passes the Unsloth shard 1 metadata argument; the packs built with it.
  • The stale-pack check compares file names only; it would miss a same-name in-place conversion.
  • ISTA's own mmproj is not pinned; the Unsloth one is used.
  • A byte-identical copy of the Engram under another name in --shards is counted as a shard.

Log excerpt

The whole launch log of the 2.00 run (38 lines), paths replaced by <link-dir>, <data-dir> and <scratch>. Timestamps are the wrapper's, in local time (UTC-5); every other time in this text is UTC. Removed: seven file-check progress lines of the form "Checking that the model files are complete ...: N of M GB" and one empty line.

[2026-10-29 02:44:22] command: python strata.py launch --family deepseek41 --model ist-das-2.00bpw --model-path <link-dir> --data-dir <data-dir> --context 8k --vision on --tune skip --access local --port 8080 --no-tui
[2026-10-29 02:44:22] start
[2026-10-29 02:44:22]     These files are DeepSeek-V4.1-Flash IST-DAS-2.00bpw; they are used where they are.
[2026-10-29 02:44:24]     DeepSeek runs on its own engine package, so the Strata engine is not downloaded for it.
[2026-10-29 02:44:24]     Preparing deepseek41 IST-DAS-2.00bpw from your model files…
[2026-10-29 02:44:25]     Getting your model ready
[2026-10-29 02:44:25]     Checking your computer
[2026-10-29 02:44:26]     Getting the helper packages ready
[2026-10-29 02:44:26]     Checking the engine for this PC
[2026-10-29 02:44:26]     Getting the model files
[2026-10-29 02:44:26]     Checking that the model files are complete (a few minutes for a big model; nothing is downloaded)
[2026-10-29 02:47:02]     Preparing your model for Strata (one time)
[2026-10-29 02:47:33]     Preparing your model for Strata (one time) (still working, 31 s so far)
[2026-10-29 02:47:47]     Preparing your model for Strata (one time)
[2026-10-29 02:47:47]     Saving the model's settings
[2026-10-29 02:47:47]     deepseek41 IST-DAS-2.00bpw is ready.
[2026-10-29 02:47:47]     Writing this launch's settings…
[2026-10-29 02:47:47]     Settings are saved.
[2026-10-29 02:47:48]     Starting the engine and loading the model. The first start can take a few minutes.
[2026-10-29 02:48:03]     Loading the model… 15 s
[2026-10-29 02:48:16]     The model is loaded and answering.
[2026-10-29 02:48:16]     Ready: http://127.0.0.1:8080
[2026-10-29 02:48:16]     Strata is serving.
[2026-10-29 02:48:16] Strata is serving.
[2026-10-29 02:48:16]   This computer  http://127.0.0.1:8080/v1
[2026-10-29 02:48:16]   Anthropic apps http://127.0.0.1:8080   (Claude Code: ANTHROPIC_BASE_URL, no /v1 at the end)
[2026-10-29 02:48:16]   Speed          Faster (default on this PC). Faster uses 5 of 6 experts per word: a small quality change, usually not noticeable.
[2026-10-29 02:48:16]   Engine log     <scratch>\appdata\Local\Strata\launch\ist-das-2-00bpw-8k.engine.log   (follow it: strata logs --follow)
[2026-10-29 02:48:16]   Watch it:    strata monitor --url http://127.0.0.1:8080
[2026-10-29 02:48:16]   Connect an app:  strata connect opencode      Stop:  strata launch --stop
[2026-10-29 02:48:16]   To keep these settings for next time, add --save-preset NAME.
[2026-10-29 02:48:17] launch exit code: 0
[2026-10-29 02:48:17] probe start (first send)
[2026-10-29 02:48:38] {"build": "2.00", "wall_seconds": 21.37, "prompt_tokens": 44, "completion_tokens": 115, "cached_tokens": 0, "finish_reason": "stop"}
[2026-10-29 02:48:38] stopping
[2026-10-29 02:48:41] Stopped ist-das-2-00bpw-8k.
[2026-10-29 02:48:49] nvidia-smi memory used after stop: 935 MiB, 16303 MiB
[2026-10-29 02:48:49] end

Files

env.txt (clean environment)
Python 3.12.15
APPDATA=<scratch>\cleanenv\roaming
HTTP_PROXY=http://127.0.0.1:9
HTTPS_PROXY=http://127.0.0.1:9
LOCALAPPDATA=<scratch>\cleanenv\local
NO_PROXY=127.0.0.1,localhost,::1
STRATA_DATA_DIR=<scratch>\cleanenv\data
STRATA_HOME=<scratch>\cleanenv\home
reverify.txt (hash check of all 11 files)
script: scratch/reverify.py (kept next to this log)
command (bundled Python 3.12.15, from the repository root; REPO is the repository root, DATA_DIR the data folder, both paths replaced here):
    REPO=<repo> DATA_DIR=<data-dir> python -I scratch/reverify.py
tree: v0.2.7.1 46c152a1 plus the diff

started 2026-10-29 01:59:34
match  IST-DAS-1.75bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00001-of-00006.gguf
    size on disk 5780704  pinned size 5780704
    computed SHA-256 3e8ddd11441edd4bc19bacaef5dbe38818af2cbdf0820fb70f1d2d851fcc192a
    pinned   SHA-256 3e8ddd11441edd4bc19bacaef5dbe38818af2cbdf0820fb70f1d2d851fcc192a
    (0 s)
match  IST-DAS-1.75bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00002-of-00006.gguf
    size on disk 39340012896  pinned size 39340012896
    computed SHA-256 be4ceb1caf1bed28e886860cf6a52adc8f5ca9eb0d2098ade39bb4179d48b323
    pinned   SHA-256 be4ceb1caf1bed28e886860cf6a52adc8f5ca9eb0d2098ade39bb4179d48b323
    (46 s)
match  IST-DAS-1.75bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00003-of-00006.gguf
    size on disk 38698805888  pinned size 38698805888
    computed SHA-256 758c66ba65236e8ce0820c21a7b6f9b2947681df8cc509f672a77722e8191b9a
    pinned   SHA-256 758c66ba65236e8ce0820c21a7b6f9b2947681df8cc509f672a77722e8191b9a
    (44 s)
match  IST-DAS-1.75bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00004-of-00006.gguf
    size on disk 39707055008  pinned size 39707055008
    computed SHA-256 04a5bea2b38eb576f49efc19c0a677768d6e2a8ea5772d72fb6cb79e1733a212
    pinned   SHA-256 04a5bea2b38eb576f49efc19c0a677768d6e2a8ea5772d72fb6cb79e1733a212
    (45 s)
match  IST-DAS-1.75bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00005-of-00006.gguf
    size on disk 2969539840  pinned size 2969539840
    computed SHA-256 7c8dbee99890f05dbc420eba6f44393f5228d06248fe61e1ae8ed002449c7549
    pinned   SHA-256 7c8dbee99890f05dbc420eba6f44393f5228d06248fe61e1ae8ed002449c7549
    (4 s)
match  IST-DAS-2.25bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00001-of-00006.gguf
    size on disk 5780704  pinned size 5780704
    computed SHA-256 0182a2a1f42d319a0dbc6e34aa82a063880c069fe3aafbbea86018f386e64e5f
    pinned   SHA-256 0182a2a1f42d319a0dbc6e34aa82a063880c069fe3aafbbea86018f386e64e5f
    (0 s)
match  IST-DAS-2.25bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00002-of-00006.gguf
    size on disk 39581533600  pinned size 39581533600
    computed SHA-256 5c88039fa640460a9fc3465a6dfcd162a4083dd738d55e5b52e025be14555a08
    pinned   SHA-256 5c88039fa640460a9fc3465a6dfcd162a4083dd738d55e5b52e025be14555a08
    (46 s)
match  IST-DAS-2.25bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00003-of-00006.gguf
    size on disk 39417972640  pinned size 39417972640
    computed SHA-256 0fddebfd05f0a36cfd107ba5dfd2547e64df61adbab39560a5a5f5521ca099a5
    pinned   SHA-256 0fddebfd05f0a36cfd107ba5dfd2547e64df61adbab39560a5a5f5521ca099a5
    (47 s)
match  IST-DAS-2.25bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00004-of-00006.gguf
    size on disk 39079187648  pinned size 39079187648
    computed SHA-256 c577a43c6e6e615838a1655a0b162541edeac6f36542f08c4a9593a70dcaf500
    pinned   SHA-256 c577a43c6e6e615838a1655a0b162541edeac6f36542f08c4a9593a70dcaf500
    (46 s)
match  IST-DAS-2.25bpw  DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00005-of-00006.gguf
    size on disk 37141423776  pinned size 37141423776
    computed SHA-256 851d8605bf504962054d17ea8a0d9e2e0a228d085d396bd865a4de9f16d90fbd
    pinned   SHA-256 851d8605bf504962054d17ea8a0d9e2e0a228d085d396bd865a4de9f16d90fbd
    (44 s)
match  shared  DeepSeek-V4.1-Flash-Engram-IQ4_NL.gguf
    size on disk 110595290816  pinned size 110595290816
    computed SHA-256 3dac4c54893ad7aa89103c0028500eadc78e74112cef3a2930a97e67dc9fb4f3
    pinned   SHA-256 3dac4c54893ad7aa89103c0028500eadc78e74112cef3a2930a97e67dc9fb4f3
    (131 s)
finished 2026-10-29 02:07:07 files: 11 mismatches: 0
chat-1.75.json (first chat send)
{
  "build": "1.75",
  "model": "deepseek-v4.1-flash",
  "started": "2026-10-29T02:49:49-0500",
  "prompt": "In three sentences, explain what a mixture-of-experts model is.",
  "max_tokens": 200,
  "first_send": true,
  "wall_seconds": 20.7,
  "prompt_tokens": 44,
  "completion_tokens": 139,
  "cached_tokens": 0,
  "finish_reason": "stop",
  "reply": "A mixture-of-experts model is a neural network architecture that contains several specialized sub-networks (“experts”) plus a routing or gating mechanism. For each input token, the router selects only a small subset of experts to process it, rather than activating all experts. This sparse activation allows the model to have much more capacity while keeping computation and training costs manageable.",
  "reasoning_chars": 337,
  "server_timings": {
    "cache_n": 0,
    "prompt_n": 44,
    "prompt_ms": 3150.6,
    "prompt_per_token_ms": 71.605,
    "prompt_per_second": 14.0,
    "predicted_n": 139,
    "predicted_ms": 17529.2,
    "predicted_per_token_ms": 126.109,
    "predicted_per_second": 7.9,
    "draft_n": 0,
    "draft_n_accepted": 0
  }
}
chat-2.00.json (first chat send)
{
  "build": "2.00",
  "model": "deepseek-v4.1-flash",
  "started": "2026-10-29T02:48:17-0500",
  "prompt": "In three sentences, explain what a mixture-of-experts model is.",
  "max_tokens": 200,
  "first_send": true,
  "wall_seconds": 21.37,
  "prompt_tokens": 44,
  "completion_tokens": 115,
  "cached_tokens": 0,
  "finish_reason": "stop",
  "reply": "A mixture-of-experts model is a neural network architecture that contains many specialized sub-networks (“experts”) plus a routing mechanism that selects which experts process each input. Rather than using all experts for every token, the router activates only a small subset, making the model more efficient and scalable. The experts are typically combined by weighted outputs, allowing different parts of the model to specialize in different patterns or tasks.",
  "reasoning_chars": 158,
  "server_timings": {
    "cache_n": 0,
    "prompt_n": 44,
    "prompt_ms": 3608.8,
    "prompt_per_token_ms": 82.018,
    "prompt_per_second": 12.2,
    "predicted_n": 115,
    "predicted_ms": 17739.8,
    "predicted_per_token_ms": 154.259,
    "predicted_per_second": 6.5,
    "draft_n": 0,
    "draft_n_accepted": 0
  }
}
chat-2.25.json (first chat send)
{
  "build": "2.25",
  "model": "deepseek-v4.1-flash",
  "started": "2026-10-29T02:51:24-0500",
  "prompt": "In three sentences, explain what a mixture-of-experts model is.",
  "max_tokens": 200,
  "first_send": true,
  "wall_seconds": 26.35,
  "prompt_tokens": 44,
  "completion_tokens": 131,
  "cached_tokens": 0,
  "finish_reason": "stop",
  "reply": "A mixture-of-experts (MoE) model contains multiple specialized sub-networks, called experts, along with a routing mechanism that decides which experts process each input. For each token or example, the router activates only a small subset of experts, so the model can have many parameters while using relatively little computation per input. The selected experts’ outputs are combined—often weighted by the router—to produce the final prediction.",
  "reasoning_chars": 249,
  "server_timings": {
    "cache_n": 0,
    "prompt_n": 44,
    "prompt_ms": 4117.9,
    "prompt_per_token_ms": 93.589,
    "prompt_per_second": 10.7,
    "predicted_n": 131,
    "predicted_ms": 22212.2,
    "predicted_per_token_ms": 169.559,
    "predicted_per_second": 5.9,
    "draft_n": 0,
    "draft_n_accepted": 0
  }
}

🔄 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/4632 **Author:** [@StackArc3](https://github.com/StackArc3) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dsv41-ista-six-shard-layout` --- ### 📝 Commits (1) - [`dfbd834`](https://github.com/Niko1221/Strata/commit/dfbd8342e3695fc9499fb8b325af302e11b8961e) Accept ISTA-DASLab's six-shard DeepSeek V4.1 Flash GGUF layout ### 📊 Changes **12 files changed** (+401 additions, -163 deletions) <details> <summary>View changed files</summary> 📝 `docs/DEEPSEEK41.md` (+10 -4) 📝 `setup.py` (+97 -66) 📝 `strata_cli/launch/runner.py` (+1 -1) 📝 `strata_control/dsv41_fit.py` (+5 -5) 📝 `strata_control/models.py` (+1 -1) ➕ `tests/fixtures/dsv41/engram-converted-27oct-header.gguf` (+0 -0) 📝 `tests/terminal/test_dsv41_import_preview.py` (+3 -3) 📝 `tests/terminal/test_dsv41_own_files_and_mmproj.py` (+1 -2) 📝 `tests/terminal/test_dsv41_tui_items.py` (+6 -13) 📝 `tests/terminal/test_pack_gguf_engram.py` (+80 -4) 📝 `tools/dsv41/pack_gguf.py` (+20 -3) 📝 `tools/test_setup_dsv41.py` (+177 -61) </details> ### 📄 Description ## Problem and result on 27 October 2026 (23:16 UTC) ISTA-DASLab replaced the four-shard IST-DAS builds on the Hub's `main` with six-shard builds (llama.cpp b11870+ layout). `--model-path` with those files fails: "...-00001-of-00004.gguf is missing". The v0.2.7.1 pin (cb02422c, 23 October 2026, 23:26 UTC) still serves the old files with matching sizes and hashes. After this change the six-shard 2.00, 1.75 and 2.25 bpw sets each launched and answered a chat request on one machine. ## Related discussion #4237 (the scope question for Option A against Option B is open there; hurui200320 asked for this PR and prefers the six-shard pin), #4256. Hub commit: https://huggingface.co/ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF/commit/a419d74cd28d5b9f8c5e2b9077d11a609c17bc32 ## Approach this is Option A, a change to a default, so it stays a draft until scope agreement is answered in #4237. AGENTS.md says "A new feature is opt-in, and the default path stays byte-identical to the last release." Option A cannot keep that: it moves the pin to a419d74c, changing the default download. Option B (not implemented) leaves the pinned download untouched and teaches only the own-files path the six-shard set with its own pins. I can rework this branch into B. - Pin a419d74c: five shards per build named `of-00006`, the shared Engram as the sixth. The Engram was converted in place: same name and size, new hash. - `pack_gguf.py` counts a `--engram` file as the sixth shard only if it is one file, not already among the shards, number count-1 of the same split, and holds the one tensor `per_layer_token_embd.weight`. - An Engram whose finish mark names an old hash is fetched again in the same run. One whose mark has no hash (an interrupted run, an older setup) is hashed: a match is kept and marked, a mismatch is fetched again in the same run. A user's own old one is refused with the reason. - A pack from an earlier run is rebuilt unless it names this run's files. - Compatibility: six-shard only. Four-shard files are ignored and stay on disk. The first-release name tables are now empty, as other modules read them. No engine code changes. ## Validation Tree: v0.2.7.1, 46c152a1, plus this diff; bundled Python 3.12.15; Windows 11, RTX 5070 Ti 16 GB, 64 GB RAM, engine 0.1.52 cuda13. **Passed:** - Passed, in a clean environment (empty `LOCALAPPDATA`, `APPDATA`, `STRATA_HOME`, `STRATA_DATA_DIR`; no other `STRATA_*` variable was set, `env.txt` below; network refused through a dead proxy, loopback exempt), patched tree: `python tools/test_setup_dsv41.py` 98 run, 98 pass; `python -m unittest tests.terminal.<module>` for `test_pack_gguf_engram` and `test_dsv41_import_preview`, `_tui_items`, `_own_files_and_mmproj`, `_fit`, `_context`, `_prefill_chunk`, `_upgrade`: 95 pass; `python tools/test_setup_pins.py` (23), `test_setup_model_pins.py` (16), `test_setup_choices.py` (54), `test_setup_unsloth.py` (57). - Passed, same environment and command, unmodified 46c152a1: `python tools/test_setup_dsv41.py` 87 run, 87 pass. - Passed: from the repository root, with the bundled Python, `python setup.py --yes --no-start --family deepseek41 --model IST-DAS-1.75bpw --context 8192 --vision yes --data-dir <data-dir>`, then the same with `--model IST-DAS-2.25bpw`, with these set: `STRATA_CONTROL_INSTALL=1`, `STRATA_INSTALL_DIR=<scratch>\install`, `PYTHONPATH=<repo>`, `PYTHONNOUSERSITE=1`, `PYTHONUNBUFFERED=1`, `STRATA_DSV41_EXE=<install-dir>\engine-dsv41\0.1.52-windows-x86_64-cuda-cuda13\strata-dsv41.exe`, `STRATA_DSV41_NO_SMOKE=1`, `STRATA_PROFILE_DIR=<scratch>\profiles`, `STRATA_RUNTIME_DIR=<scratch>\runtime`, `STRATA_STATE_DIR=<scratch>\state`, `LOCALAPPDATA=<scratch>\appdata\Local`, `APPDATA=<scratch>\appdata\Roaming`. Both exited 0 (54 and 64 minutes); setup reported every shard downloaded after its SHA-256 check and built both packs; the hard-linked Engram was accepted. No model was loaded. The run logs were lost before this text was written, so the files were hashed again afterwards: all 11 files (five IQ1_M shards, five IQ2_XS shards, the Engram) match their pinned size and SHA-256, log with the script, sizes and both hashes per file below (`reverify.txt`). - Passed: three launches in sequence on 29 October 2026, from the repository root, with the bundled Python, with `STRATA_DSV41_EXE` (the installed 0.1.52 cuda13 engine), `STRATA_INSTALL_DIR`, `STRATA_PROFILE_DIR`, `STRATA_RUNTIME_DIR`, `STRATA_STATE_DIR` set to folders under `<scratch>`, `LOCALAPPDATA` and `APPDATA` under `<scratch>\appdata`, `PYTHONNOUSERSITE=1` and `PYTHONUNBUFFERED=1`. Each exited 0 and printed "The model is loaded and answering", then was stopped with `strata launch --stop` (its "Stopped" line is in each log): - `python strata.py launch --family deepseek41 --model ist-das-2.00bpw --model-path <link-dir> --data-dir <data-dir> --context 8k --vision on --tune skip --access local --port 8080 --no-tui` (answering 3.9 minutes after the start, 2.6 of them spent checking the files' SHA-256; 935 MiB of GPU memory used after the stop). `<link-dir>` holds hard links to the six files of the set, made with `cmd /c mklink /H "<link-dir>\<name>" "<model-dir>\<name>"` for each, so that setup's marker files stay out of the original folder. - `python strata.py launch --family deepseek41 --model ist-das-1.75bpw --data-dir <data-dir> --context 8k --vision on --tune skip --access local --port 8080 --no-tui` (1.0 minute; 861 MiB after the stop). - `python strata.py launch --family deepseek41 --model ist-das-2.25bpw --data-dir <data-dir> --context 8k --vision on --tune skip --access local --port 8080 --no-tui` (1.1 minutes; 822 MiB after the stop). - First chat send per build, after Strata's own 31-token readiness request (1 token generated), so the probe was the engine's second request; cached tokens 0 each time: prompt "In three sentences, explain what a mixture-of-experts model is.", 44 prompt tokens, `max_tokens` 200, finish reason `stop` each time. 2.00: 115 completion tokens, 21.4 s wall, 12.2 prompt and 6.5 decode tokens/s. 1.75: 139, 20.7 s, 14.0 and 7.9. 2.25: 131, 26.4 s, 10.7 and 5.9. The rates are the server's own `timings` fields; completion tokens include the model's reasoning text. Single observations after a fresh start, not benchmarks. JSON files below. **Failed:** - With the network open and this machine's own state, patched tree: `python tools/test_setup_dsv41.py` 98 run, 94 pass. The four failures are copies of `test_no_engine_stops_before_the_download`, which also fail on unmodified 46c152a1. The test does not stub the engine download and reports GitHub as reachable, so setup reads the live update feed, downloads a real engine package and returns 0 instead of 1. Also one `test_dsv41_tui_items` test, because the default data folder held the downloaded sets. In the clean environment all 98 and all 22 pass. - `python -m pytest tests/terminal -q` on the final diff, bundled Python 3.12.15, clean environment, no network (pytest installed with pip into a folder outside the repo): **Failed on both trees.** Patched tree: 7 failed, 3 errors, 1918 passed, 62 skipped (1973 s). Pristine 46c152a1: 9 failed, 4 errors, 1910 passed, 62 skipped (2207 s). The two trees ran at the same time. Failing on both: `test_bench_standard.py::RunTests::test_a_round_total_is_null_when_a_counted_request_has_no_token_count`, `test_bundle_imports.py::BundleImports::test_setup_py_and_each_of_its_tools_import_with_tools_limited_to_the_bundle`, `test_monitor_bundle.py::MonitorBundleTests::test_offline_install_plan_and_remove_touch_only_monitor_files`. Failing on the patched tree only in that run: four tests in `test_runtime.py` (`test_edited_source_migration_is_previewed_digest_pinned_and_verified`, `test_failed_edited_source_migration_uses_private_snapshot_for_rollback`, `test_local_management_bridge_and_cli_share_owner_and_journal`, `test_zero_token_completion_does_not_count_as_generation_ready`). Failing on the pristine tree only in that run: `test_docker_files.py::Scripts::test_build_script_exits_zero_after_assembling_a_context` and five in `test_runtime.py` (`test_a_reused_pid_with_another_creation_time_is_not_the_recorded_child`, `test_failed_source_switch_restores_prior_owned_launch`, `test_hard_killed_host_child_exits_and_next_start_recovers_private_state`, `test_owned_runtime_and_calibration_exclude_each_other_even_on_port_zero`, `test_restart_plan_compares_revision_without_stopping_instance`). Re-running those ten tests one tree at a time: all 10 passed on the patched tree; on the pristine tree 2 failed (the docker build test and `test_local_management_bridge_and_cli_share_owner_and_journal`, a Windows PermissionError deleting a temp file) and 8 passed. No test failed on the patched tree in the re-run. The full outputs are not part of the diff. **Not run:** - other GPUs, any backend build, any measurement beyond the one first send per build. Setup's own 16-word smoke-test result is not shown in the launch output, for any build. ## Limits - 1.75 and 2.25 were each launched once and answered one request; nothing more was measured. Testing on other hardware is welcome. - Setup still passes the Unsloth shard 1 metadata argument; the packs built with it. - The stale-pack check compares file names only; it would miss a same-name in-place conversion. - ISTA's own mmproj is not pinned; the Unsloth one is used. - A byte-identical copy of the Engram under another name in `--shards` is counted as a shard. ## Log excerpt The whole launch log of the 2.00 run (38 lines), paths replaced by `<link-dir>`, `<data-dir>` and `<scratch>`. Timestamps are the wrapper's, in local time (UTC-5); every other time in this text is UTC. Removed: seven file-check progress lines of the form "Checking that the model files are complete ...: N of M GB" and one empty line. ``` [2026-10-29 02:44:22] command: python strata.py launch --family deepseek41 --model ist-das-2.00bpw --model-path <link-dir> --data-dir <data-dir> --context 8k --vision on --tune skip --access local --port 8080 --no-tui [2026-10-29 02:44:22] start [2026-10-29 02:44:22] These files are DeepSeek-V4.1-Flash IST-DAS-2.00bpw; they are used where they are. [2026-10-29 02:44:24] DeepSeek runs on its own engine package, so the Strata engine is not downloaded for it. [2026-10-29 02:44:24] Preparing deepseek41 IST-DAS-2.00bpw from your model files… [2026-10-29 02:44:25] Getting your model ready [2026-10-29 02:44:25] Checking your computer [2026-10-29 02:44:26] Getting the helper packages ready [2026-10-29 02:44:26] Checking the engine for this PC [2026-10-29 02:44:26] Getting the model files [2026-10-29 02:44:26] Checking that the model files are complete (a few minutes for a big model; nothing is downloaded) [2026-10-29 02:47:02] Preparing your model for Strata (one time) [2026-10-29 02:47:33] Preparing your model for Strata (one time) (still working, 31 s so far) [2026-10-29 02:47:47] Preparing your model for Strata (one time) [2026-10-29 02:47:47] Saving the model's settings [2026-10-29 02:47:47] deepseek41 IST-DAS-2.00bpw is ready. [2026-10-29 02:47:47] Writing this launch's settings… [2026-10-29 02:47:47] Settings are saved. [2026-10-29 02:47:48] Starting the engine and loading the model. The first start can take a few minutes. [2026-10-29 02:48:03] Loading the model… 15 s [2026-10-29 02:48:16] The model is loaded and answering. [2026-10-29 02:48:16] Ready: http://127.0.0.1:8080 [2026-10-29 02:48:16] Strata is serving. [2026-10-29 02:48:16] Strata is serving. [2026-10-29 02:48:16] This computer http://127.0.0.1:8080/v1 [2026-10-29 02:48:16] Anthropic apps http://127.0.0.1:8080 (Claude Code: ANTHROPIC_BASE_URL, no /v1 at the end) [2026-10-29 02:48:16] Speed Faster (default on this PC). Faster uses 5 of 6 experts per word: a small quality change, usually not noticeable. [2026-10-29 02:48:16] Engine log <scratch>\appdata\Local\Strata\launch\ist-das-2-00bpw-8k.engine.log (follow it: strata logs --follow) [2026-10-29 02:48:16] Watch it: strata monitor --url http://127.0.0.1:8080 [2026-10-29 02:48:16] Connect an app: strata connect opencode Stop: strata launch --stop [2026-10-29 02:48:16] To keep these settings for next time, add --save-preset NAME. [2026-10-29 02:48:17] launch exit code: 0 [2026-10-29 02:48:17] probe start (first send) [2026-10-29 02:48:38] {"build": "2.00", "wall_seconds": 21.37, "prompt_tokens": 44, "completion_tokens": 115, "cached_tokens": 0, "finish_reason": "stop"} [2026-10-29 02:48:38] stopping [2026-10-29 02:48:41] Stopped ist-das-2-00bpw-8k. [2026-10-29 02:48:49] nvidia-smi memory used after stop: 935 MiB, 16303 MiB [2026-10-29 02:48:49] end ``` ## Files <details><summary>env.txt (clean environment)</summary> ``` Python 3.12.15 APPDATA=<scratch>\cleanenv\roaming HTTP_PROXY=http://127.0.0.1:9 HTTPS_PROXY=http://127.0.0.1:9 LOCALAPPDATA=<scratch>\cleanenv\local NO_PROXY=127.0.0.1,localhost,::1 STRATA_DATA_DIR=<scratch>\cleanenv\data STRATA_HOME=<scratch>\cleanenv\home ``` </details> <details><summary>reverify.txt (hash check of all 11 files)</summary> ``` script: scratch/reverify.py (kept next to this log) command (bundled Python 3.12.15, from the repository root; REPO is the repository root, DATA_DIR the data folder, both paths replaced here): REPO=<repo> DATA_DIR=<data-dir> python -I scratch/reverify.py tree: v0.2.7.1 46c152a1 plus the diff started 2026-10-29 01:59:34 match IST-DAS-1.75bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00001-of-00006.gguf size on disk 5780704 pinned size 5780704 computed SHA-256 3e8ddd11441edd4bc19bacaef5dbe38818af2cbdf0820fb70f1d2d851fcc192a pinned SHA-256 3e8ddd11441edd4bc19bacaef5dbe38818af2cbdf0820fb70f1d2d851fcc192a (0 s) match IST-DAS-1.75bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00002-of-00006.gguf size on disk 39340012896 pinned size 39340012896 computed SHA-256 be4ceb1caf1bed28e886860cf6a52adc8f5ca9eb0d2098ade39bb4179d48b323 pinned SHA-256 be4ceb1caf1bed28e886860cf6a52adc8f5ca9eb0d2098ade39bb4179d48b323 (46 s) match IST-DAS-1.75bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00003-of-00006.gguf size on disk 38698805888 pinned size 38698805888 computed SHA-256 758c66ba65236e8ce0820c21a7b6f9b2947681df8cc509f672a77722e8191b9a pinned SHA-256 758c66ba65236e8ce0820c21a7b6f9b2947681df8cc509f672a77722e8191b9a (44 s) match IST-DAS-1.75bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00004-of-00006.gguf size on disk 39707055008 pinned size 39707055008 computed SHA-256 04a5bea2b38eb576f49efc19c0a677768d6e2a8ea5772d72fb6cb79e1733a212 pinned SHA-256 04a5bea2b38eb576f49efc19c0a677768d6e2a8ea5772d72fb6cb79e1733a212 (45 s) match IST-DAS-1.75bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00005-of-00006.gguf size on disk 2969539840 pinned size 2969539840 computed SHA-256 7c8dbee99890f05dbc420eba6f44393f5228d06248fe61e1ae8ed002449c7549 pinned SHA-256 7c8dbee99890f05dbc420eba6f44393f5228d06248fe61e1ae8ed002449c7549 (4 s) match IST-DAS-2.25bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00001-of-00006.gguf size on disk 5780704 pinned size 5780704 computed SHA-256 0182a2a1f42d319a0dbc6e34aa82a063880c069fe3aafbbea86018f386e64e5f pinned SHA-256 0182a2a1f42d319a0dbc6e34aa82a063880c069fe3aafbbea86018f386e64e5f (0 s) match IST-DAS-2.25bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00002-of-00006.gguf size on disk 39581533600 pinned size 39581533600 computed SHA-256 5c88039fa640460a9fc3465a6dfcd162a4083dd738d55e5b52e025be14555a08 pinned SHA-256 5c88039fa640460a9fc3465a6dfcd162a4083dd738d55e5b52e025be14555a08 (46 s) match IST-DAS-2.25bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00003-of-00006.gguf size on disk 39417972640 pinned size 39417972640 computed SHA-256 0fddebfd05f0a36cfd107ba5dfd2547e64df61adbab39560a5a5f5521ca099a5 pinned SHA-256 0fddebfd05f0a36cfd107ba5dfd2547e64df61adbab39560a5a5f5521ca099a5 (47 s) match IST-DAS-2.25bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00004-of-00006.gguf size on disk 39079187648 pinned size 39079187648 computed SHA-256 c577a43c6e6e615838a1655a0b162541edeac6f36542f08c4a9593a70dcaf500 pinned SHA-256 c577a43c6e6e615838a1655a0b162541edeac6f36542f08c4a9593a70dcaf500 (46 s) match IST-DAS-2.25bpw DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00005-of-00006.gguf size on disk 37141423776 pinned size 37141423776 computed SHA-256 851d8605bf504962054d17ea8a0d9e2e0a228d085d396bd865a4de9f16d90fbd pinned SHA-256 851d8605bf504962054d17ea8a0d9e2e0a228d085d396bd865a4de9f16d90fbd (44 s) match shared DeepSeek-V4.1-Flash-Engram-IQ4_NL.gguf size on disk 110595290816 pinned size 110595290816 computed SHA-256 3dac4c54893ad7aa89103c0028500eadc78e74112cef3a2930a97e67dc9fb4f3 pinned SHA-256 3dac4c54893ad7aa89103c0028500eadc78e74112cef3a2930a97e67dc9fb4f3 (131 s) finished 2026-10-29 02:07:07 files: 11 mismatches: 0 ``` </details> <details><summary>chat-1.75.json (first chat send)</summary> ```json { "build": "1.75", "model": "deepseek-v4.1-flash", "started": "2026-10-29T02:49:49-0500", "prompt": "In three sentences, explain what a mixture-of-experts model is.", "max_tokens": 200, "first_send": true, "wall_seconds": 20.7, "prompt_tokens": 44, "completion_tokens": 139, "cached_tokens": 0, "finish_reason": "stop", "reply": "A mixture-of-experts model is a neural network architecture that contains several specialized sub-networks (“experts”) plus a routing or gating mechanism. For each input token, the router selects only a small subset of experts to process it, rather than activating all experts. This sparse activation allows the model to have much more capacity while keeping computation and training costs manageable.", "reasoning_chars": 337, "server_timings": { "cache_n": 0, "prompt_n": 44, "prompt_ms": 3150.6, "prompt_per_token_ms": 71.605, "prompt_per_second": 14.0, "predicted_n": 139, "predicted_ms": 17529.2, "predicted_per_token_ms": 126.109, "predicted_per_second": 7.9, "draft_n": 0, "draft_n_accepted": 0 } } ``` </details> <details><summary>chat-2.00.json (first chat send)</summary> ```json { "build": "2.00", "model": "deepseek-v4.1-flash", "started": "2026-10-29T02:48:17-0500", "prompt": "In three sentences, explain what a mixture-of-experts model is.", "max_tokens": 200, "first_send": true, "wall_seconds": 21.37, "prompt_tokens": 44, "completion_tokens": 115, "cached_tokens": 0, "finish_reason": "stop", "reply": "A mixture-of-experts model is a neural network architecture that contains many specialized sub-networks (“experts”) plus a routing mechanism that selects which experts process each input. Rather than using all experts for every token, the router activates only a small subset, making the model more efficient and scalable. The experts are typically combined by weighted outputs, allowing different parts of the model to specialize in different patterns or tasks.", "reasoning_chars": 158, "server_timings": { "cache_n": 0, "prompt_n": 44, "prompt_ms": 3608.8, "prompt_per_token_ms": 82.018, "prompt_per_second": 12.2, "predicted_n": 115, "predicted_ms": 17739.8, "predicted_per_token_ms": 154.259, "predicted_per_second": 6.5, "draft_n": 0, "draft_n_accepted": 0 } } ``` </details> <details><summary>chat-2.25.json (first chat send)</summary> ```json { "build": "2.25", "model": "deepseek-v4.1-flash", "started": "2026-10-29T02:51:24-0500", "prompt": "In three sentences, explain what a mixture-of-experts model is.", "max_tokens": 200, "first_send": true, "wall_seconds": 26.35, "prompt_tokens": 44, "completion_tokens": 131, "cached_tokens": 0, "finish_reason": "stop", "reply": "A mixture-of-experts (MoE) model contains multiple specialized sub-networks, called experts, along with a routing mechanism that decides which experts process each input. For each token or example, the router activates only a small subset of experts, so the model can have many parameters while using relatively little computation per input. The selected experts’ outputs are combined—often weighted by the router—to produce the final prediction.", "reasoning_chars": 249, "server_timings": { "cache_n": 0, "prompt_n": 44, "prompt_ms": 4117.9, "prompt_per_token_ms": 93.589, "prompt_per_second": 10.7, "predicted_n": 131, "predicted_ms": 22212.2, "predicted_per_token_ms": 169.559, "predicted_per_second": 5.9, "draft_n": 0, "draft_n_accepted": 0 } } ``` </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:32:51 +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#5121
No description provided.