Let the SemIf decision engine run on a GPU via llama.cpp. SemIf's llamacpp backend is CPU-only by construction (it hardcodes n_gpu_layers=0), so the agent wraps `_cpu_model_params` for the duration of the load and restores it after — no patch to the re-cloned engine source. - `engine.gpu_layers` / `gpu_device` / `gpu_split` in config (default 0 = CPU). - On the GPU path, force a full cache reset (`llama_memory_clear(mem, True)`): SemIf's metadata-only clear leaves stale hybrid-attention state on Vulkan, so repeated scores drift (0.08 -> 0.36 -> 0.43) and return wrong probabilities. - Fail loudly when `gpu_layers` is set but the build has no GPU backend. - bootstrap.sh: opt-in `--gpu auto|vulkan|rocm|cuda|cpu`. A GPU build is opt-in because llama.cpp's Vulkan backend splits the graph across CPU and Vulkan even at `n_gpu_layers=0`, roughly halving CPU throughput, so a CPU-only host must keep the CPU wheel. Detects the backend, installs the Vulkan build prereqs, and rebuilds when offload support disagrees (pip's wheel cache otherwise serves the CPU wheel back). - Bump the SemIf pin 1f2dea3 -> 23cf1f3. - Tests: unit coverage for the config mapping + loader patches; an integration test asserting GPU determinism and CPU parity. - Offload needs the accelerator to itself (~2.9 GiB for the 4B Q4 model): a GPU already holding another model makes the engine slower than CPU and can abort with `vk::DeviceLostError`.
17 lines
1.2 KiB
JSON
17 lines
1.2 KiB
JSON
{
|
|
"_comment": "Committed pin manifest for the external artifacts this repo downloads: the SemIf engine ref, the pinned GGUF, the HF tokenizer revision, and the simplex-chat binary. These are code-owned, deployment-independent values bumped by a git change and picked up on the next `scripts/bootstrap.sh` run. They are deliberately NOT in config.json (per-machine user config): a ref that changes with every update is not user configuration. The agent reads engine.source/revision from here; the GGUF path is derived from engine.gguf_url unless config.json overrides engine.gguf.",
|
|
"engine": {
|
|
"semif_repo": "https://github.com/TheoLeeCJ/SemIf.git",
|
|
"semif_ref": "23cf1f39fc9534fe81437200959b6dfc7106e45a",
|
|
"gguf_url": "https://huggingface.co/bartowski/Qwen_Qwen3.5-4B-GGUF/resolve/main/Qwen_Qwen3.5-4B-Q4_K_M.gguf",
|
|
"gguf_sha256": "13c16f426047e2de38cd075bdade4a7bcbc8c774384876f677740cda65f8a983",
|
|
"source": "Qwen/Qwen3.5-4B",
|
|
"revision": "851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a"
|
|
},
|
|
"simplex_chat": {
|
|
"version": "v7.0.3",
|
|
"bin_url": "https://github.com/simplex-chat/simplex-chat/releases/download/v7.0.3/simplex-chat-ubuntu-24_04-x86_64",
|
|
"sha256": "895fb14cfaa662d1c0947f2f871141fc89680fe3e70bff64c366cbe9e59aa4f0"
|
|
}
|
|
}
|