Download start.bat from ryugyosoft/onwx: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/ryugyosoft/onwx/resolve/main/start.bat
- Command line
-
hf download hf://ryugyosoft/onwx/start.bat
-
curl -L -o start.bat https://huggingface.co/ryugyosoft/onwx/resolve/main/start.bat
1.56 kB
| @echo off | |
| rem onwx - LLMs on the AMD Ryzen AI NPU: run the server once from a console (Windows). | |
| rem start.bat Ternary Bonsai 2 27B (default) | |
| rem start.bat MODEL any onwx model: a Hugging Face repo id or a local folder | |
| rem start.bat MODEL --port 8080 further options go to "onwx serve" | |
| rem First run: finds / installs Python, creates .venv, downloads the model (7.5 GB). | |
| rem For the resident tray app with a model manager use setup.bat instead. | |
| setlocal | |
| cd /d "%~dp0" | |
| set PYTHONUTF8=1 | |
| set "MODEL=ryugyosoft/Ternary-Bonsai-2-27B-onwx" | |
| set "FIRST=%~1" | |
| if not "%FIRST%"=="" if not "%FIRST:~0,1%"=="-" ( | |
| set "MODEL=%FIRST%" | |
| shift | |
| ) | |
| if exist ".venv\installed.txt" goto args | |
| if exist ".venv\Scripts\python.exe" goto install | |
| call "%~dp0find_python.bat" | |
| if not defined PY ( | |
| pause | |
| exit /b 1 | |
| ) | |
| echo [setup] creating Python environment in .venv ... | |
| %PY% -m venv .venv | |
| if errorlevel 1 ( | |
| echo [setup] could not create the Python environment. | |
| pause | |
| exit /b 1 | |
| ) | |
| :install | |
| ".venv\Scripts\python.exe" -m pip install -U pip | |
| ".venv\Scripts\python.exe" -m pip install -e . | |
| if errorlevel 1 ( | |
| echo [setup] package installation failed. | |
| pause | |
| exit /b 1 | |
| ) | |
| echo ok> ".venv\installed.txt" | |
| :args | |
| set "ARGS=" | |
| :collect | |
| if "%~1"=="" goto run | |
| set "ARGS=%ARGS% %1" | |
| shift | |
| goto collect | |
| :run | |
| echo [start] %MODEL% (first time: download, please wait) ... | |
| ".venv\Scripts\onwx.exe" serve "%MODEL%" --open %ARGS% | |
| pause | |