mirror of
https://github.com/Niko1221/Strata.git
synced 2026-11-07 14:21:06 -10:00
DeepSeek: IST-DAS 1.75 bpw (IQ1_M), the smallest official set, as model ist-das-1.75bpw: pins at ISTA-DASLab cb02422c (the 9 earlier files are unchanged there), fit numbers, setup recommends it where 2.00 is tight in memory or disk (warn, never refuse), catalog/TUI text, docs, tests
This commit is contained in:
1 parent
eec705cc98
commit
c5e0e14823
7 files changed
+118
-23
No files matched your search
+4
-2
@@ -26,15 +26,16 @@ with an out-of-memory message. Both are said before anything is downloaded.
|
||||
|
||||
## The official 2-bit versions (the ones for a normal PC)
|
||||
|
||||
Setup offers two official sets (ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF, pinned): **IST-DAS 2.00 bpw** (138 GB) and **IST-DAS 2.25 bpw** (155 GB). Both use the
|
||||
Setup offers three official sets (ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF, pinned): **IST-DAS 2.00 bpw** (138 GB), **IST-DAS 2.25 bpw** (155 GB) and the smallest, **IST-DAS 1.75 bpw** (121 GB, slightly lower quality; setup recommends it where 2.00 is tight in memory or disk). All use the
|
||||
same 111 GB n-gram table (downloaded once into `models/deepseek-v4.1-flash-shared`) and the 8 GB DSpark drafter: 257 GB of disk for
|
||||
2.00, 274 GB for 2.25, 412 GB for both. Quality against the original model: perplexity +16% on 2.00, +8% on 2.25 (code and agent work
|
||||
2.00, 274 GB for 2.25, 239 GB for 1.75, 412 GB for 2.00 and 2.25 together. Quality against the original model: perplexity +16% on 2.00, +8% on 2.25 (code and agent work
|
||||
about +3.5% / +2.5% on 2.25).
|
||||
|
||||
| File | Size | What it is |
|
||||
| --- | ---: | --- |
|
||||
| IQ2_XXS shards (2.00 bpw), 4 files | 138 GB | the model, first set |
|
||||
| IQ2_XS shards (2.25 bpw), 4 files | 155 GB | the model, second set |
|
||||
| IQ1_M shards (1.75 bpw), 4 files | 121 GB | the model, smallest set |
|
||||
| IQ4_NL: `DeepSeek-V4.1-Flash-Engram-IQ4_NL.gguf` | 111 GB | the 4-bit Engram lookup table the model reads from RAM or SSD. Not a third model: both sets use this one file, and it is already in their download sizes |
|
||||
| DSpark drafter (Q8_0) | 8 GB | the small draft model (Unsloth) |
|
||||
|
||||
@@ -56,6 +57,7 @@ and its 7 GB of experts take the graphics memory); the RAM store sizes itself. L
|
||||
```
|
||||
./setup.sh --family deepseek41 --model IST-DAS-2.00bpw # 257 GB: the official 2.00 set + Engram + drafter (resumable, SHA-256 checked)
|
||||
./setup.sh --family deepseek41 --model IST-DAS-2.25bpw # 274 GB (the Engram is shared with 2.00)
|
||||
./setup.sh --family deepseek41 --model IST-DAS-1.75bpw # 239 GB, the smallest
|
||||
./setup.sh --family deepseek41 --model UD-Q8_K_XL # Unsloth's 508 GB set, for hundreds of GB of RAM or several cards
|
||||
./setup.sh --family deepseek41 --gguf-dir DIR # files you already have: the shards (or the folder with 2.00bpw / 2.25bpw / UD-Q8_K_XL inside); the Engram and drafter are looked for beside them
|
||||
strata launch --model ist-das-2.00bpw --plan # where it would go on this computer, nothing changed
|
||||
|
||||
@@ -99,7 +99,7 @@ HF_REVISIONS = {
|
||||
"unsloth/Qwen3.6-35B-A3B-MTP-GGUF": "5bc3e238d916f48a861bac2f8a1990a0e9b7e98d", # 2026-10-12
|
||||
"agentionai/Qwen3.8-Flash-Next-Gyro-GGUF": "1ada08422e404aca51ab9df665f089f34c419c6b", # 2026-10-13
|
||||
"unsloth/DeepSeek-V4.1-Flash-1017-GGUF": "f924b94f19c1fea02c06a65c8475b0a45e2b88b1", # 2026-10-20 (the port's reference)
|
||||
"ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF": "0d8f49fb15df73789a9c237a1b8b7b088423dbc0", # 2026-10-24 (ISTA-DASLab's final 2.00 / 2.25 bpw sets and Engram)
|
||||
"ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF": "cb02422c900df489cea5833e8a92171224059b3c", # 2026-10-24 (ISTA-DASLab's final 1.75 / 2.00 / 2.25 bpw sets and Engram)
|
||||
}
|
||||
|
||||
|
||||
@@ -679,7 +679,7 @@ DSV41_FILES = {
|
||||
"mmproj-BF16.gguf": (972208288, "9a1ef7c40d0d702c7ed8c5f863f60abae64091387ba3fce0ad19ce9beeda3bf9"),
|
||||
}
|
||||
# The two OFFICIAL IST-DAS sets (ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF at the revision above, a flat repository; Hub LFS sha256 = what the
|
||||
# files hash to): IQ2_XXS is the 2.00 bpw set and IQ2_XS the 2.25 bpw set, 4 shards each, plus ONE Engram table (110.6 GB, the same file for both sets:
|
||||
# files hash to): IQ2_XXS is the 2.00 bpw set, IQ2_XS the 2.25 bpw set and IQ1_M the 1.75 bpw set, 4 shards each, plus ONE Engram table (110.6 GB, the same file for both sets:
|
||||
# downloaded once into the shared folder) and the DSpark drafter and the 5.8 MB metadata shard of Unsloth's set that pack_gguf --engram-meta reads
|
||||
# (both pinned in DSV41_FILES above). This is the set a normal PC runs (64 GB RAM + a 12 GB card; docs/DEEPSEEK41.md); the UD-Q8_K_XL entry stays
|
||||
# for the big machines.
|
||||
@@ -688,6 +688,10 @@ DSV41_ISTA_ENGRAM = "DeepSeek-V4.1-Flash-Engram-IQ4_NL.gguf"
|
||||
DSV41_ISTA_SHARD = "DeepSeek-V4.1-Flash-1017-GSQ-RCO-{quant}-{i:05d}-of-00004.gguf"
|
||||
DSV41_DSPARK = "dspark-DeepSeek-V4.1-Flash-1017-Q8_0.gguf"
|
||||
DSV41_ISTA_FILES = {
|
||||
"DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00001-of-00004.gguf": (39358830464, "6e3f0d5ff53d00428ec32c079db9e8255cb410ccaa435e5342aaa8a47fe1339d"),
|
||||
"DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00002-of-00004.gguf": (39176113248, "34d68c99fdae9948f9f0af0dafe308e805ce0a78d2c48641b24cc57242fdc0af"),
|
||||
"DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00003-of-00004.gguf": (39997334720, "a08468c83955e0c4d3a9eb3f7b86c45b7bbac55d99c4640039a296a8a4b327ea"),
|
||||
"DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-00004-of-00004.gguf": (2188841824, "b05f26a92325aa6845cebcb3ec1f93d2e65ebf89bdc3f805695960d2f0681832"),
|
||||
"DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00001-of-00004.gguf": (39535776992, "4c65307992ab586c527ca1f6f64062aa96a33b23c02b7fed103f45f75e854798"),
|
||||
"DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00002-of-00004.gguf": (39494617536, "933461a974fcccee741bf2f9798201e72ab4aa3f8a952be56f849896ca6ea30e"),
|
||||
"DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ2_XS-00003-of-00004.gguf": (39423838496, "bbf91fa346a85ebaf32dd4fd5c456b534d780d381e54f46ac90783a481373240"),
|
||||
@@ -757,6 +761,13 @@ MULTI_FILE_FAMILIES["deepseek41"]["models"] = {
|
||||
"ram_gb": 44, "recipe": "ista", "subdir": None, "legacy_subdir": "2.25bpw", "profile": "profile-2.25.bin", "hf": hf(DSV41_ISTA_REPO),
|
||||
"shards": [DSV41_ISTA_SHARD.format(quant="IQ2_XS", i=i) for i in range(1, 5)],
|
||||
"shared": [DSV41_ISTA_ENGRAM, DSV41_SHARD.format(i=1), DSV41_DSPARK]},
|
||||
"IST-DAS-1.75bpw": {
|
||||
"label": "IST-DAS 1.75 bpw",
|
||||
"about": "the smallest official version: 121 GB of model + 111 GB n-gram table + 8 GB drafter (239 GB of disk, 18 GB less than 2.00). Runs "
|
||||
"where 2.00 is tight (a 12 GB card and 32-40 GB of RAM); slightly lower quality than 2.00",
|
||||
"ram_gb": 34, "recipe": "ista", "subdir": None, "legacy_subdir": None, "profile": "profile-2.00.bin", "hf": hf(DSV41_ISTA_REPO),
|
||||
"shards": [DSV41_ISTA_SHARD.format(quant="IQ1_M", i=i) for i in range(1, 5)],
|
||||
"shared": [DSV41_ISTA_ENGRAM, DSV41_SHARD.format(i=1), DSV41_DSPARK]},
|
||||
"UD-Q8_K_XL": {
|
||||
"label": "Unsloth UD-Q8_K_XL",
|
||||
"about": "Unsloth Dynamic 8-bit: the experts in MXFP4 as DeepSeek made them, the rest in BF16 (the checkpoint's own precision); "
|
||||
@@ -7917,9 +7928,14 @@ def install_dsv41(a, family, gpu, hip, amd, cuda_tk, multi, port, ram, adopted,
|
||||
if a.model:
|
||||
model = a.model
|
||||
else:
|
||||
try:
|
||||
room = free_gb(Path(a.models_dir) if Path(a.models_dir).exists() else Path(a.models_dir).parent)
|
||||
except Exception: # noqa: BLE001 - the disk is only a hint here
|
||||
room = None
|
||||
rec = dsv41_fit.recommend(ram, room) # the best version this computer's memory and disk suit; warn-never-refuse
|
||||
for i, m in enumerate(names, 1):
|
||||
say(f" {i}) {fam['models'][m].get('label', m)}: {fam['models'][m]['about']}" + (" (recommended)" if i == 1 else ""))
|
||||
model = names[int(ask("Which version?", [str(i) for i in range(1, len(names) + 1)], "1", a.yes)) - 1]
|
||||
say(f" {i}) {fam['models'][m].get('label', m)}: {fam['models'][m]['about']}" + (" (recommended)" if m == rec else ""))
|
||||
model = names[int(ask("Which version?", [str(i) for i in range(1, len(names) + 1)], str(names.index(rec) + 1), a.yes)) - 1]
|
||||
ok(f"size: {model}")
|
||||
md = fam["models"][model]
|
||||
say(" Its GGUF files: " + ("IST-DAS / ISTA-DASLab (huggingface.co/ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF), with the DSpark drafter and a small metadata file from Unsloth"
|
||||
@@ -8363,7 +8379,7 @@ def main() -> int:
|
||||
ap.add_argument("--family", choices=list(FAMILIES) + list(PREVIEW_FAMILIES) + list(MULTI_FILE_FAMILIES),
|
||||
help="qwen = Qwen3.8-Flash-Next, swift = Swift 1.5, qwen36 = Qwen3.6-35B-A3B (pictures with --vision, "
|
||||
"several requests at once with --parallel; docs/QWEN36.md), deepseek41 = DeepSeek-V4.1-Flash "
|
||||
"(the official 2.00 / 2.25 bpw versions, 257 / 274 GB; docs/DEEPSEEK41.md)")
|
||||
"(the official 1.75 / 2.00 / 2.25 bpw versions, 239 / 257 / 274 GB; docs/DEEPSEEK41.md)")
|
||||
ap.add_argument("--model", choices=list(dict.fromkeys([*MODELS, *(m for f in PREVIEW_FAMILIES.values()
|
||||
for m in f["models"]),
|
||||
*(m for f in MULTI_FILE_FAMILIES.values() for m in f["models"])])))
|
||||
@@ -8830,7 +8846,7 @@ def main() -> int:
|
||||
try: # DeepSeek-V4.1-Flash: a line, from the real numbers (strata_control/dsv41_fit.py)
|
||||
from strata_control import dsv41_fit
|
||||
cards_ok = amd_ok if hip else [g for g in found if gpu_problem(g) is None]
|
||||
for mname in ("IST-DAS-2.00bpw", "IST-DAS-2.25bpw", "UD-Q8_K_XL"):
|
||||
for mname in ("IST-DAS-2.00bpw", "IST-DAS-2.25bpw", "IST-DAS-1.75bpw", "UD-Q8_K_XL"):
|
||||
ds = dsv41_fit.plan(cards_ok, ram, None, model=mname)
|
||||
tail = {"fits": f"fits ({ds['experts_in_vram']:,} of {ds['experts_total']:,} experts in graphics memory, the rest on the CPU)",
|
||||
"tight": ("runs, with the experts RAM cannot hold read from the SSD (about 5-7 tokens a second measured)"
|
||||
|
||||
@@ -61,6 +61,11 @@ ISTA_SETS = {
|
||||
"IST-DAS-2.00bpw": {"title": "IST-DAS 2.00 bpw", "set_bytes": 138_238_893_056, "experts_gb": 132.07, "profile": "profile-2.00.bin",
|
||||
"ppl": "16%", "ram_ok_gb": 40.0, "ram_great_gb": 160.0, "disk_total": 257.0,
|
||||
"quality": "about 16% above the original model's perplexity (the 2-bit price)"},
|
||||
# IQ1_M (1.75 bpw): 120,721,120,256 bytes of shards; experts = the shards minus the 6.16 GB of dense weights. RAM class from the experts' size against
|
||||
# the 2.00 set's measured 40 GB (not measured on a computer yet); quality: placeholder until the H100 score is in.
|
||||
"IST-DAS-1.75bpw": {"title": "IST-DAS 1.75 bpw", "set_bytes": 120_721_120_256, "experts_gb": 114.56, "profile": "profile-2.00.bin",
|
||||
"ram_ok_gb": 34.0, "disk_total": 239.0,
|
||||
"quality": "slightly lower than the 2.00 version (the smallest; a quality figure follows when it is measured)"},
|
||||
"IST-DAS-2.25bpw": {"title": "IST-DAS 2.25 bpw", "set_bytes": 155_225_824_256, "experts_gb": 149.06, "profile": "profile-2.25.bin",
|
||||
"ppl": "8%", "ram_ok_gb": 44.0, "ram_great_gb": 176.0, "disk_total": 274.0,
|
||||
"quality": "about 8% above the original model's perplexity (code and agent work about 2.5-3.5% above), "
|
||||
@@ -89,6 +94,20 @@ def ista_download_bytes(model: str, have_engram: bool = False) -> int:
|
||||
return v["set_bytes"] + ISTA_DSPARK_BYTES + ISTA_META_BYTES + (0 if have_engram else ISTA_ENGRAM_BYTES)
|
||||
|
||||
|
||||
def recommend(ram_gb: float | None, disk_free_gb: float | None = None) -> str:
|
||||
"""The official set that suits this computer: 2.00 bpw, unless its memory (under the measured 40 GB of RAM) or its disk (under 2.00's need but
|
||||
enough for the smaller one) make the 1.75 bpw set the better start. Only a recommendation: every set can still be chosen."""
|
||||
big, small = "IST-DAS-2.00bpw", "IST-DAS-1.75bpw"
|
||||
if ram_gb is not None and float(ram_gb) < ISTA_SETS[big]["ram_ok_gb"]:
|
||||
return small
|
||||
if disk_free_gb is not None:
|
||||
need_big = ista_download_bytes(big) / GB + DISK_HEADROOM_GB
|
||||
need_small = ista_download_bytes(small) / GB + DISK_HEADROOM_GB
|
||||
if float(disk_free_gb) < need_big and float(disk_free_gb) >= need_small:
|
||||
return small
|
||||
return big
|
||||
|
||||
|
||||
def _round1(x: float) -> float:
|
||||
return round(float(x) * 10) / 10
|
||||
|
||||
@@ -153,7 +172,7 @@ def _plan_ista(model: str, cards: list[dict] | None, ram_gb: float | None, disk_
|
||||
lines.append(f"DeepSeek-V4.1-Flash, {v['title']}: a {download:.0f} GB download ({set_gb:.0f} GB of model, {ISTA_ENGRAM_BYTES / GB:.0f} GB "
|
||||
f"n-gram table, {ISTA_DSPARK_BYTES / GB:.0f} GB drafter). Quality: {v['quality']}.")
|
||||
lines.append("The n-gram table stays on the SSD and is read a few rows for each word: use an NVMe drive for the model files (a slow "
|
||||
"disk makes every word slower). The same table serves both IST-DAS sets, so installing the second one downloads it once.")
|
||||
"disk makes every word slower). The same table serves every IST-DAS set, so installing another one downloads it once.")
|
||||
if n == 0:
|
||||
out["verdict"] = "no_card"
|
||||
warns.append("No graphics card Strata can use was found: this model needs one or more cards (8 GB or more; 12 GB is what it was "
|
||||
@@ -219,7 +238,7 @@ def plan(cards: list[dict] | None, ram_gb: float | None, disk_free_gb: float | N
|
||||
vendor: str | None = None, model: str | None = None) -> dict[str, Any]:
|
||||
"""Where the model goes on this computer. `cards`: the graphics cards ({"index", "name", "vram_gb", ...}, as gpu_fit takes them),
|
||||
`ram_gb` the RAM, `disk_free_gb` the free space where the files go (None: not checked). `model`: an official IST-DAS set
|
||||
(ISTA_SETS: "IST-DAS-2.00bpw" / "IST-DAS-2.25bpw") gets its own numbers; None or "UD-Q8_K_XL" is Unsloth's 508 GB set.
|
||||
(ISTA_SETS: "IST-DAS-2.00bpw" / "IST-DAS-2.25bpw" / "IST-DAS-1.75bpw") gets its own numbers; None or "UD-Q8_K_XL" is Unsloth's 508 GB set.
|
||||
|
||||
Keys: cards (per card: index, name, vram_gb, layers, dense_gb, experts_gb, experts), experts_in_vram, experts_total, vram_experts_gb,
|
||||
cpu_experts_gb, ram_needed_gb, spill_gb, spare_ram_gb, verdict (fits / tight / spills / unknown / no_card), tp, args,
|
||||
|
||||
@@ -110,7 +110,7 @@ class CatalogRules(unittest.TestCase):
|
||||
self.assertEqual(source, "setup.py") # the same tables setup.py and the app read
|
||||
for r in rows:
|
||||
if r.family == "deepseek41": # its sizes are in MULTI_FILE_FAMILIES (shards + shared files), not in MODELS
|
||||
self.assertAlmostEqual(r.download_gb, {"UD-Q8_K_XL": 508.4, "IST-DAS-2.00bpw": 256.8, "IST-DAS-2.25bpw": 273.8}[r.model], delta=0.1)
|
||||
self.assertAlmostEqual(r.download_gb, {"UD-Q8_K_XL": 508.4, "IST-DAS-2.00bpw": 256.8, "IST-DAS-2.25bpw": 273.8, "IST-DAS-1.75bpw": 239.3}[r.model], delta=0.1)
|
||||
continue
|
||||
self.assertAlmostEqual(r.download_gb, models[r.model]["download_gb"])
|
||||
rec = [r for r in rows if r.recommended]
|
||||
|
||||
@@ -36,10 +36,10 @@ class LaunchDeepSeek(unittest.TestCase):
|
||||
|
||||
def test_the_model_is_in_the_list(self):
|
||||
rows = [r for r in catalog(self.hw).rows() if r.family == "deepseek41"]
|
||||
self.assertEqual([r.model for r in rows], ["IST-DAS-2.00bpw", "IST-DAS-2.25bpw", "UD-Q8_K_XL"])
|
||||
self.assertEqual([r.download_gb for r in rows[:2]], [256.8, 273.8])
|
||||
self.assertEqual([r.model for r in rows], ["IST-DAS-2.00bpw", "IST-DAS-2.25bpw", "IST-DAS-1.75bpw", "UD-Q8_K_XL"])
|
||||
self.assertEqual([r.download_gb for r in rows[:3]], [256.8, 273.8, 239.3])
|
||||
self.assertEqual(catalog(self.hw).resolve("ist-das-2.25bpw"), ("deepseek41", "IST-DAS-2.25bpw"))
|
||||
r = rows[2]
|
||||
r = rows[3]
|
||||
self.assertEqual((r.id, r.download_gb, r.verdict, r.images), ("deepseek-v4.1-flash-ud-q8_k_xl", 508.4, "fits", False))
|
||||
self.assertEqual(catalog(self.hw).resolve("ud-q8_k_xl"), ("deepseek41", "UD-Q8_K_XL"))
|
||||
self.assertEqual(catalog(self.hw).max_context("deepseek41", "UD-Q8_K_XL"), 8192)
|
||||
|
||||
+2
-1
@@ -1290,7 +1290,8 @@ class Strata:
|
||||
if pl.get("variant"): # an official IST-DAS set (strata_control/dsv41_fit.py): measured on 46-64 GB, never a refusal
|
||||
if v == "spills":
|
||||
return (f"slow here: this computer has {pl['ram_gb']:.0f} GB of RAM and the set was measured with 46-64 GB, so most of its "
|
||||
"experts are read from the SSD; it can still be installed")
|
||||
"experts are read from the SSD; it can still be installed"
|
||||
+ ("" if pl["variant"] == "IST-DAS-1.75bpw" else " (the smaller 1.75 bpw version suits this computer better)"))
|
||||
if v == "tight":
|
||||
return ("tight: runs, with the experts RAM cannot hold read from the SSD (about 5-7 tokens a second measured on 46-64 GB "
|
||||
"of RAM and a 12 GB card)")
|
||||
|
||||
@@ -288,7 +288,7 @@ class Catalog(unittest.TestCase):
|
||||
s = M.Strata(ROOT)
|
||||
fam = next(f for f in s.model_table({"ram_gb": 251.0, "gpus": [{**c, "usable": True} for c in FOUR], "engine_vendor": "amd"})
|
||||
if f["family"] == "deepseek41")
|
||||
self.assertEqual([x["model"] for x in fam["sizes"]], ["IST-DAS-2.00bpw", "IST-DAS-2.25bpw", "UD-Q8_K_XL"])
|
||||
self.assertEqual([x["model"] for x in fam["sizes"]], ["IST-DAS-2.00bpw", "IST-DAS-2.25bpw", "IST-DAS-1.75bpw", "UD-Q8_K_XL"])
|
||||
small_sets = {x["model"]: x for x in fam["sizes"]}
|
||||
self.assertEqual((small_sets["IST-DAS-2.00bpw"]["download_gb"], small_sets["IST-DAS-2.25bpw"]["download_gb"]), (256.8, 273.8))
|
||||
self.assertTrue(small_sets["IST-DAS-2.00bpw"]["on_this_pc"].startswith("fits"))
|
||||
@@ -326,21 +326,22 @@ class OfficialSets(unittest.TestCase):
|
||||
|
||||
def test_the_pinned_files(self):
|
||||
fam = setup.MULTI_FILE_FAMILIES["deepseek41"]
|
||||
self.assertEqual(list(fam["models"]), ["IST-DAS-2.00bpw", "IST-DAS-2.25bpw", "UD-Q8_K_XL"]) # the official sets first
|
||||
self.assertEqual(list(fam["models"]), ["IST-DAS-2.00bpw", "IST-DAS-2.25bpw", "IST-DAS-1.75bpw", "UD-Q8_K_XL"]) # the official sets first
|
||||
repo = "ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF"
|
||||
self.assertEqual(setup.HF_REVISIONS[repo], "0d8f49fb15df73789a9c237a1b8b7b088423dbc0")
|
||||
self.assertEqual(setup.HF_REVISIONS[repo], "cb02422c900df489cea5833e8a92171224059b3c")
|
||||
self.assertIs(setup.REPO_PINS[repo], setup.DSV41_ISTA_FILES)
|
||||
self.assertNotIn("helcig/tmp-oct26-2", setup.HF_REVISIONS) # the first release's repository is only remembered as local names
|
||||
self.assertEqual(setup.DSV41_ISTA_REPO, repo)
|
||||
self.assertEqual(len(setup.DSV41_ISTA_FILES), 9) # 2 x 4 shards + the Engram
|
||||
self.assertEqual(len(setup.DSV41_ISTA_FILES), 13) # 3 x 4 shards + the Engram
|
||||
for n, (size, sha) in setup.DSV41_ISTA_FILES.items():
|
||||
self.assertRegex(sha, r"^[0-9a-f]{64}$", n)
|
||||
eng = setup.DSV41_ISTA_FILES["DeepSeek-V4.1-Flash-Engram-IQ4_NL.gguf"]
|
||||
self.assertEqual(eng, (110_595_290_816, "eb19f30d368d393784e1fc54fdfaffc427ebb2110bf3762fdf5a8fbb9a2d740a"))
|
||||
self.assertEqual(setup.DSV41_ALL_FILES["dspark-DeepSeek-V4.1-Flash-1017-Q8_0.gguf"],
|
||||
(7_976_914_240, "6ba6ac1b331c540691a209e7fc97dec2a24e295acb1e755c84c7d24a4373927a"))
|
||||
sums = {m: sum(setup.DSV41_ALL_FILES[n][0] for n in fam["models"][m]["shards"]) for m in list(fam["models"])[:2]}
|
||||
self.assertEqual(sums, {"IST-DAS-2.00bpw": 138238893056, "IST-DAS-2.25bpw": 155225824256})
|
||||
sums = {m: sum(setup.DSV41_ALL_FILES[n][0] for n in fam["models"][m]["shards"]) for m in list(fam["models"])[:3]}
|
||||
self.assertEqual(sums, {"IST-DAS-2.00bpw": 138238893056, "IST-DAS-2.25bpw": 155225824256, "IST-DAS-1.75bpw": 120721120256})
|
||||
self.assertEqual(sums["IST-DAS-1.75bpw"], dsv41_fit.ISTA_SETS["IST-DAS-1.75bpw"]["set_bytes"])
|
||||
self.assertEqual(sums["IST-DAS-2.00bpw"], dsv41_fit.ISTA_SETS["IST-DAS-2.00bpw"]["set_bytes"])
|
||||
self.assertEqual(sums["IST-DAS-2.25bpw"], dsv41_fit.ISTA_SETS["IST-DAS-2.25bpw"]["set_bytes"])
|
||||
self.assertEqual(setup.DSV41_ISTA_FILES["DeepSeek-V4.1-Flash-Engram-IQ4_NL.gguf"][0], dsv41_fit.ISTA_ENGRAM_BYTES)
|
||||
@@ -349,8 +350,8 @@ class OfficialSets(unittest.TestCase):
|
||||
for n in fam["models"][m]["shared"]:
|
||||
self.assertIn(n, setup.DSV41_SHARED)
|
||||
self.assertIn(n, setup.DSV41_ALL_FILES)
|
||||
self.assertRegex(setup.DSV41_SHARED[setup.DSV41_ISTA_ENGRAM], r"ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF/resolve/0d8f49fb[0-9a-f]{32}/$")
|
||||
self.assertRegex(fam["models"]["IST-DAS-2.25bpw"]["hf"], r"ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF/resolve/0d8f49fb[0-9a-f]{32}/$")
|
||||
self.assertRegex(setup.DSV41_SHARED[setup.DSV41_ISTA_ENGRAM], r"ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF/resolve/cb02422c[0-9a-f]{32}/$")
|
||||
self.assertRegex(fam["models"]["IST-DAS-2.25bpw"]["hf"], r"ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF/resolve/cb02422c[0-9a-f]{32}/$")
|
||||
|
||||
def test_shipped_profiles_match_their_hashes(self):
|
||||
import hashlib
|
||||
@@ -468,6 +469,49 @@ class LegacyFiles(unittest.TestCase):
|
||||
self.assertEqual(got, old)
|
||||
|
||||
|
||||
class Smallest(unittest.TestCase):
|
||||
"""IST-DAS 1.75 bpw (IQ1_M): the smallest official set, recommended where 2.00 is tight, never forced."""
|
||||
|
||||
def test_the_files_the_pins_and_the_recipe(self):
|
||||
fam = setup.MULTI_FILE_FAMILIES["deepseek41"]
|
||||
d = fam["models"]["IST-DAS-1.75bpw"]
|
||||
self.assertEqual(d["recipe"], "ista")
|
||||
self.assertEqual(d["shards"], [f"DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-{i:05d}-of-00004.gguf" for i in range(1, 5)])
|
||||
self.assertEqual(d["shared"], fam["models"]["IST-DAS-2.00bpw"]["shared"]) # the same Engram, drafter and metadata shard
|
||||
self.assertEqual(setup.DSV41_ISTA_FILES[d["shards"][0]],
|
||||
(39358830464, "6e3f0d5ff53d00428ec32c079db9e8255cb410ccaa435e5342aaa8a47fe1339d"))
|
||||
self.assertEqual(setup.DSV41_ISTA_FILES[d["shards"][3]][0], 2188841824)
|
||||
self.assertEqual(sum(setup.DSV41_ISTA_FILES[n][0] for n in d["shards"]), 120_721_120_256)
|
||||
self.assertTrue(all(n not in setup.DSV41_LEGACY_NAMES.values() for n in d["shards"])) # no first-release names for it
|
||||
cmd = setup.dsv41_pack_cmd(Path("/m"), d["shards"], Path("/s/e.gguf"), Path("/s/m.gguf"), Path("/s/d.gguf"), Path("/p"))
|
||||
self.assertIn("--dspark-noise-token", cmd)
|
||||
self.assertNotIn("--skip-tensors", cmd)
|
||||
|
||||
def test_it_is_the_smallest_and_warns_never_refuses(self):
|
||||
sizes = {m: dsv41_fit.ista_download_bytes(m) / 1e9 for m in dsv41_fit.ISTA_SETS}
|
||||
self.assertEqual(min(sizes, key=sizes.get), "IST-DAS-1.75bpw")
|
||||
self.assertAlmostEqual(sizes["IST-DAS-1.75bpw"], 239.3, delta=0.1)
|
||||
for ram in (24.0, 36.0, 64.0):
|
||||
p = dsv41_fit.plan([RTX5070], ram, None, model="IST-DAS-1.75bpw")
|
||||
self.assertIn(p["verdict"], ("fits", "tight", "spills"))
|
||||
self.assertTrue(p["lines"])
|
||||
self.assertEqual(dsv41_fit.plan([RTX5070], 36.0, None, model="IST-DAS-1.75bpw")["verdict"], "tight") # runs where 2.00 spills
|
||||
self.assertEqual(dsv41_fit.plan([RTX5070], 36.0, None, model="IST-DAS-2.00bpw")["verdict"], "spills")
|
||||
|
||||
def test_it_is_recommended_where_2_00_is_tight(self):
|
||||
self.assertEqual(dsv41_fit.recommend(64.0, 900.0), "IST-DAS-2.00bpw")
|
||||
self.assertEqual(dsv41_fit.recommend(None, None), "IST-DAS-2.00bpw") # unknown: the usual one
|
||||
self.assertEqual(dsv41_fit.recommend(32.0, 900.0), "IST-DAS-1.75bpw") # less RAM than 2.00 was measured with
|
||||
self.assertEqual(dsv41_fit.recommend(64.0, 250.0), "IST-DAS-1.75bpw") # disk fits 1.75 (239 + 6) but not 2.00 (257 + 6)
|
||||
self.assertEqual(dsv41_fit.recommend(64.0, 100.0), "IST-DAS-2.00bpw") # fits neither: no reason to prefer it
|
||||
|
||||
def test_the_menu_marks_the_recommendation_and_still_lets_anyone_choose(self):
|
||||
import io
|
||||
names = list(setup.MULTI_FILE_FAMILIES["deepseek41"]["models"])
|
||||
self.assertIn("IST-DAS-1.75bpw", names)
|
||||
self.assertEqual(names.index(dsv41_fit.recommend(32.0, 900.0)) + 1, 3)
|
||||
|
||||
|
||||
class InstallOfficial(Install):
|
||||
"""install_dsv41 for an official set, the engine and the tools mocked."""
|
||||
|
||||
@@ -581,5 +625,18 @@ class InstallOfficial(Install):
|
||||
self.assertIn("not enough free disk space", out)
|
||||
|
||||
|
||||
class InstallSmallest(InstallOfficial):
|
||||
def test_downloads_the_iq1_m_files_and_the_shared_ones(self):
|
||||
rc, out = self.install_ista(model="IST-DAS-1.75bpw", ram=36.0)
|
||||
self.assertEqual(rc, 0, out)
|
||||
get = [c for c in self.calls if c[0] == "get"]
|
||||
self.assertEqual([c[2].name for c in get][:4], [f"DeepSeek-V4.1-Flash-1017-GSQ-RCO-IQ1_M-{i:05d}-of-00004.gguf" for i in range(1, 5)])
|
||||
self.assertTrue(get[0][1].startswith(setup.hf(setup.DSV41_ISTA_REPO)))
|
||||
self.assertIn("cb02422c900df489cea5833e8a92171224059b3c", get[0][1])
|
||||
self.assertIn("239 GB", out)
|
||||
a = self.cfg["args"]
|
||||
self.assertEqual(a[a.index("--dspark") + 1], "auto")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user