Untitled
unknown
plain_text
2 years ago
1.4 kB
29
Indexable
@echo off setlocal EnableDelayedExpansion :: Set name for -r option set /p username="Enter your name: " set "username=!username::=:!" :: Model selection echo. echo Available models: set /a i=1 for /d %%d in ("./models/*") do ( set "option[!i!]=%%d" echo !i!. %%~nd set /a i+=1 ) echo. set /p model_choice="Enter the number of the model you want to use: " if not defined option[%model_choice%] ( echo Invalid choice. exit /b 1 ) set "SUBDIR=!option[%model_choice%]!" set "BIN_COUNT=0" for %%f in (".\models\%SUBDIR%\*.bin") do ( set /a "BIN_COUNT+=1" set "MODEL=%%f" ) if %BIN_COUNT% gtr 1 ( echo Multiple .bin files found in "%SUBDIR%" directory. There should only be one. exit /b 1 ) else if %BIN_COUNT% equ 0 ( echo No .bin file found in "%SUBDIR%" directory. exit /b 1 ) else ( goto :MODEL_FOUND ) :MODEL_FOUND :: Prompt file selection echo. echo Available prompts: set /a i=1 for %%f in (prompts\*.txt) do ( set "option[!i!]=%%~f" echo !i!. %%~nxf set /a i+=1 ) echo. set /p prompt_choice="Enter the number of the prompt file you want to use: " if not defined option[%prompt_choice%] ( echo Invalid choice. exit /b 1 ) set PROMPT_FILE=!option[%prompt_choice%]! echo. main.exe -m "%MODEL%" --threads 8 --ctx_size 2048 --temp 0.72 --top_k 51 --top_p 0.73 --repeat_last_n 512 --batch_size 64 --repeat_penalty 1.1 --color -i -r "%username%:" -f "%PROMPT_FILE%"
Editor is loading...