mirror of
https://github.com/Niko1221/Strata.git
synced 2026-11-08 17:35:22 -10:00
Engine 0.1.18; setup explains an engine that is not published yet (#58); SETUP.bat
This commit is contained in:
1 parent
55e05f585d
commit
f32577e3c2
5 files changed
+20
-10
No files matched your search
+1
-1
@@ -8,7 +8,7 @@
|
||||
# written against sm_120 (RTX 5000 / Blackwell) and silently building for an older arch would produce a
|
||||
# binary that runs and is wrong about its own performance, which is the worst of both outcomes.
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
project(strata VERSION 0.1.17 LANGUAGES CXX)
|
||||
project(strata VERSION 0.1.18 LANGUAGES CXX)
|
||||
add_compile_definitions(STRATA_VERSION="${PROJECT_VERSION}")
|
||||
# issue #31: release builds keep a PDB beside the exe (not shipped in it), so a minidump from a stalled engine can
|
||||
# be read back to the exact source line
|
||||
|
||||
@@ -69,7 +69,7 @@ lower the RAM needed.
|
||||
token, and about the same RAM as the same size of the original (no IQ3_S). Its own license applies (see its page).
|
||||
|
||||
Not sure? Take **IQ2_XS** - or the **Coder** if you mainly write code, or have 32-48 GB of RAM. You can add another
|
||||
one later with `START-HERE.bat --setup`.
|
||||
one later with `SETUP.bat` (the same as `START-HERE.bat --setup`; on Linux `./setup.sh --setup`).
|
||||
|
||||
## Install
|
||||
|
||||
@@ -151,7 +151,7 @@ Usually not enough RAM (on Linux the system then stops the engine). Just send yo
|
||||
engine by itself. If it keeps happening, close other programs or pick a smaller size.
|
||||
|
||||
**It says the prompt exceeds the context.**
|
||||
The conversation is longer than the context you chose. Start a new chat, or run `START-HERE.bat --setup` and pick more
|
||||
The conversation is longer than the context you chose. Start a new chat, or run `SETUP.bat` and pick more
|
||||
context.
|
||||
|
||||
**Still stuck?** Look in the [full troubleshooting table](docs/DETAILS.md#troubleshooting), or open an issue and
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
rem Change settings or install another model (the same as START-HERE.bat --setup).
|
||||
call "%~dp0START-HERE.bat" --setup %*
|
||||
@@ -193,6 +193,7 @@ downloaded again. Closing the window stops the model.
|
||||
|
||||
```
|
||||
START-HERE.bat --setup install another model, or change context / images
|
||||
SETUP.bat the same (double-click it)
|
||||
START-HERE.bat --model IQ2_XS --context 32768 --vision yes --yes no questions
|
||||
START-HERE.bat --gguf-dir D:\models\IQ2_XS use GGUF files you already have
|
||||
START-HERE.bat --data-dir E:\Strata-data keep the model files somewhere else
|
||||
|
||||
@@ -444,8 +444,9 @@ def driver_major(gpu):
|
||||
return 0
|
||||
|
||||
|
||||
def get_prebuilt(url_base, gpu, vision) -> Path | None:
|
||||
"""The ready-made engine in engine/ (kept between runs), or None when there is none for this PC."""
|
||||
def get_prebuilt(url_base, gpu, vision, updating=False) -> Path | None:
|
||||
"""The ready-made engine in engine/ (kept between runs), or None when there is none for this PC.
|
||||
updating: called to replace an installed engine, which starts instead when this fails (no compile)."""
|
||||
eng = ROOT / "engine"
|
||||
info = eng / "BUILD.json"
|
||||
if info.exists() and (eng / EXE).exists():
|
||||
@@ -465,7 +466,7 @@ def get_prebuilt(url_base, gpu, vision) -> Path | None:
|
||||
req = urllib.request.Request(base + PREBUILT_ASSET, method="HEAD", headers={"User-Agent": "strata-setup"})
|
||||
urllib.request.urlopen(req, timeout=60).close()
|
||||
except OSError as e:
|
||||
warn(f"no ready-made engine at {base} ({e}): compiling instead")
|
||||
warn(f"no ready-made engine at {base} ({e})" + ("" if updating else ": compiling instead"))
|
||||
return None
|
||||
say(" Downloading the ready-made Strata engine ...")
|
||||
download(base + PREBUILT_ASSET, z, "Strata engine")
|
||||
@@ -475,14 +476,19 @@ def get_prebuilt(url_base, gpu, vision) -> Path | None:
|
||||
f.extractall(tmp)
|
||||
meta = json.loads((tmp / "BUILD.json").read_text())
|
||||
if tuple(int(x) for x in str(meta.get("version", "0")).split(".")[:3] if x.isdigit()) < MIN_ENGINE:
|
||||
warn(f"the ready-made engine at {base} is version {meta.get('version')}; this setup needs "
|
||||
f"{'.'.join(map(str, MIN_ENGINE))}: compiling instead")
|
||||
need = ".".join(map(str, MIN_ENGINE))
|
||||
if updating: # these files are newer than the published release (#58)
|
||||
warn(f"engine {need} is not published yet (the release may still be uploading): run this again "
|
||||
f"in a few minutes to update it")
|
||||
else:
|
||||
warn(f"the ready-made engine at {base} is version {meta.get('version')}; this setup needs "
|
||||
f"{need}: compiling instead")
|
||||
shutil.rmtree(tmp, ignore_errors=True)
|
||||
return None
|
||||
archs = [int(a) for a in meta.get("archs", [])]
|
||||
arch = int(gpu["arch"])
|
||||
if arch not in archs and not (meta.get("ptx") and arch > max(archs)):
|
||||
warn(f"the ready-made engine is built for {', '.join(str(a) for a in archs)}; your GPU is {arch}: compiling instead")
|
||||
warn(f"the ready-made engine is built for {', '.join(str(a) for a in archs)}; your GPU is {arch}" + ("" if updating else ": compiling instead"))
|
||||
shutil.rmtree(tmp, ignore_errors=True)
|
||||
return None
|
||||
for p in tmp.iterdir():
|
||||
@@ -543,7 +549,7 @@ def update_installed_engine(url_base) -> None:
|
||||
new = None
|
||||
if gpu is not None:
|
||||
try:
|
||||
new = get_prebuilt(url_base, gpu, "gpu")
|
||||
new = get_prebuilt(url_base, gpu, "gpu", updating=True)
|
||||
except Exception as e: # a failed download must not stop the model from starting
|
||||
warn(f"updating the engine failed ({e})")
|
||||
if new is None:
|
||||
|
||||
Reference in new issue
Block a user