From e75f0cdf6b3db0b23a6e4742c42f567039318f10 Mon Sep 17 00:00:00 2001 From: Luca Bruni Date: Thu, 16 Jul 2026 09:26:09 -0400 Subject: [PATCH 1/3] LMStudio: select GPU runtime in CI, harden ping test Ping test timed out where LM Studio defaulted to the CPU (avx2) runtime. Add a hidden CI step that selects an installed Vulkan runtime before load, and make the ping robust: max_tokens 500 to 64, socket timeout 60s to 120s. --- playbooks/core/lmstudio-rocm-llms/README.md | 24 +++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/playbooks/core/lmstudio-rocm-llms/README.md b/playbooks/core/lmstudio-rocm-llms/README.md index c476a834..f7b07304 100644 --- a/playbooks/core/lmstudio-rocm-llms/README.md +++ b/playbooks/core/lmstudio-rocm-llms/README.md @@ -87,6 +87,22 @@ lms chat "$ID" -p "Reply with exactly: OK" + + +```bash +# CI: pin a GPU (Vulkan) runtime so tests don't fall back to the CPU engine. +lms runtime ls +GPU_RT="$(lms runtime ls 2>/dev/null | awk '/vulkan/{print $1; exit}')" +if [ -n "$GPU_RT" ]; then + lms runtime select "$GPU_RT" + lms runtime ls | grep -E 'ENGINE|✓' +else + echo "WARNING: no Vulkan runtime installed; GPU acceleration unavailable. Install with: lms get " +fi +``` + + + ```bash @@ -265,12 +281,12 @@ req = urllib.request.Request( "model": model_id, "messages": [{"role":"user","content":"What is 2 + 2? Reply with only the number."}], "temperature": 0, - "max_tokens": 500 + "max_tokens": 64 }).encode("utf-8"), headers={"Content-Type":"application/json"}, method="POST", ) -with urllib.request.urlopen(req, timeout=60) as r: +with urllib.request.urlopen(req, timeout=120) as r: print(r.read().decode("utf-8", "replace")) ``` @@ -290,12 +306,12 @@ req = urllib.request.Request( "model": model_id, "messages": [{"role":"user","content":"What is 47 + 42? Reply with only the number in words."}], "temperature": 0, - "max_tokens": 500 + "max_tokens": 64 }).encode("utf-8"), headers={"Content-Type":"application/json"}, method="POST", ) -with urllib.request.urlopen(req, timeout=60) as r: +with urllib.request.urlopen(req, timeout=120) as r: print(r.read().decode("utf-8", "replace")) ``` From 1c6aff5fff70e9e89f6ca22ca7a687b5d9c9dbf8 Mon Sep 17 00:00:00 2001 From: Luca Bruni Date: Thu, 16 Jul 2026 15:48:00 -0400 Subject: [PATCH 2/3] LMStudio: retry model load once on transient failure Large-model loads (e.g. gpt-oss-120b) can intermittently fail under memory pressure. Add a clean-unload + single retry to the load-model tests. --- playbooks/core/lmstudio-rocm-llms/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/playbooks/core/lmstudio-rocm-llms/README.md b/playbooks/core/lmstudio-rocm-llms/README.md index f7b07304..e3556203 100644 --- a/playbooks/core/lmstudio-rocm-llms/README.md +++ b/playbooks/core/lmstudio-rocm-llms/README.md @@ -80,7 +80,9 @@ lms unload --all lms ps $ID = "${lms_model}-$env:GITHUB_RUN_ID" Set-Content -Path "$env:TEMP\lmstudio_model_id.txt" -Value $ID -Encoding utf8 +# retry once: large-model loads can transiently fail under memory pressure lms load ${lms_model} --context-length 32768 --gpu max --identifier "$ID" -y +if ($LASTEXITCODE -ne 0) { lms unload --all; Start-Sleep 5; lms load ${lms_model} --context-length 32768 --gpu max --identifier "$ID" -y } lms ps lms chat "$ID" -p "Reply with exactly: OK" ``` @@ -110,7 +112,8 @@ lms unload --all || true lms ps ID="${lms_model}-${GITHUB_RUN_ID}" echo "$ID" > /tmp/lmstudio_model_id.txt -lms load ${lms_model} --context-length 32768 --gpu max --identifier "$ID" -y +# retry once: large-model loads can transiently fail under memory pressure +lms load ${lms_model} --context-length 32768 --gpu max --identifier "$ID" -y || { lms unload --all; sleep 5; lms load ${lms_model} --context-length 32768 --gpu max --identifier "$ID" -y; } lms ps # Verify model is really loaded lms chat "$ID" -p "Reply with exactly: OK" ``` From 495f298066e23e66be4c21ea2e96f59c8039f6b3 Mon Sep 17 00:00:00 2001 From: Luca Bruni Date: Thu, 16 Jul 2026 16:28:14 -0400 Subject: [PATCH 3/3] LMStudio: add Windows GPU-runtime-select step Mirror the Linux runtime-select for Windows (generic Vulkan detection), addressing PR review feedback. --- playbooks/core/lmstudio-rocm-llms/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/playbooks/core/lmstudio-rocm-llms/README.md b/playbooks/core/lmstudio-rocm-llms/README.md index e3556203..2755c9a1 100644 --- a/playbooks/core/lmstudio-rocm-llms/README.md +++ b/playbooks/core/lmstudio-rocm-llms/README.md @@ -73,6 +73,22 @@ Learn how to start chatting with a ChatGPT-grade LLM completely locally. 7. If not in the chat window, press `Ctrl + 1` or click on the 👾 button on the top left of the screen. 8. Send a message and start interacting with the model! + + +```powershell +# CI: pin a GPU (Vulkan) runtime so tests don't fall back to the CPU engine. +lms runtime ls +$rt = ((lms runtime ls) -match 'vulkan' | Select-Object -First 1) +if ($rt) { + lms runtime select (($rt.Trim() -split '\s+')[0]) + lms runtime ls | Select-String 'ENGINE|✓' +} else { + Write-Output "WARNING: no Vulkan runtime installed; GPU acceleration unavailable. Install with: lms get " +} +``` + + + ```powershell