@echo off
setlocal enabledelayedexpansion
taskkill /F /IM llama-server.exe /T >nul 2>&1
echo ==============================================================
echo [V4] OS-FRIENDLY - 5 Threads + Realtime Priority
echo Goal: Leave 1 physical core for OS to minimize I/O jitter
echo ==============================================================

SET "ROOT_DIR=C:\Users\vatutin_n_a\sch-qwen\"
SET "BIN_DIR=%ROOT_DIR%llama-cpp-turbo\build_turbo\bin\Release"
SET "MODEL_PATH=%ROOT_DIR%models\Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf"

"%BIN_DIR%\llama-server.exe" ^
    -m "%MODEL_PATH%" ^
    --host 0.0.0.0 --port 8080 ^
    -c 16384 -t 5 -ub 1024 -b 2048 ^
    --flash-attn on --cache-type-k turbo3 --cache-type-v turbo4 ^
    --no-mmap --prio 3 -np 1 --slots
pause
