llama.cpp b9936 binaries for x86_64 (Linux Ubuntu + Windows CPU) Dynamic model selection from models/ dir GGUF models: Gemma-4-E2B, Qwen2.5-1.5B, Qwen3.5-4B Cross-platform start.sh / start.bat scripts Deploy script for USB stick export
66 lines
1.4 KiB
Batchfile
66 lines
1.4 KiB
Batchfile
@echo off
|
|
:: MiniLlama — Portable LLM Chat Launcher (Windows)
|
|
:: Erkennt automatisch alle .gguf-Modelle im models/-Ordner und zeigt ein Menü.
|
|
cd /d "%~dp0"
|
|
|
|
echo.
|
|
echo =======================================
|
|
echo MiniLlama — Modellauswahl
|
|
echo =======================================
|
|
echo.
|
|
|
|
setlocal enabledelayedexpansion
|
|
|
|
:: --- Modelle einsammeln ---
|
|
set count=0
|
|
for %%f in (models\*.gguf) do (
|
|
set /a count+=1
|
|
set "model[!count!]=%%f"
|
|
set "modelname[!count!]=%%~nxf"
|
|
)
|
|
|
|
if %count% equ 0 (
|
|
echo Fehler: Keine .gguf-Modelle im models/-Ordner gefunden.
|
|
echo Legen Sie GGUF-Dateien in das models/-Verzeichnis.
|
|
echo.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
:: --- Menü anzeigen ---
|
|
for /l %%i in (1,1,%count%) do (
|
|
echo %%i^) !modelname[%%i]!
|
|
)
|
|
echo.
|
|
|
|
:: --- Auswahl ---
|
|
:choose
|
|
set /p sel="Auswahl [1-%count%] oder q=beenden: "
|
|
if /i "!sel!"=="q" exit /b 0
|
|
|
|
:: Prüfen ob Zahl
|
|
set "isnum="
|
|
for /f "delims=0123456789" %%a in ("!sel!") do set isnum=%%a
|
|
if defined isnum goto badchoice
|
|
if !sel! lss 1 goto badchoice
|
|
if !sel! gtr %count% goto badchoice
|
|
|
|
set idx=!sel!
|
|
goto launch
|
|
|
|
:badchoice
|
|
echo Bitte eine Zahl zwischen 1 und %count% eingeben.
|
|
goto choose
|
|
|
|
:: --- Starten ---
|
|
:launch
|
|
echo.
|
|
echo Starte: !modelname[%idx%]!
|
|
echo.
|
|
bin\win\llama-cli.exe -m "!model[%idx%]!" -cnv
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo Fehler beim Start. Druecken Sie eine Taste.
|
|
pause
|
|
)
|
|
endlocal
|