Skip to content

Commit

Permalink
0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RevoIDE committed Apr 16, 2023
1 parent 9b8efbc commit 8a1fcae
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 deletions.
25 changes: 19 additions & 6 deletions en_flora.cpp_avx2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ title flora.cpp
echo Please select a model :
echo 1. ggml-alpaca-7b-q4.bin - alpaca
echo 2. ggml-vicuna-13b-4bit.bin - vicuna
set /p choix="choice : "
set /p choix="Choice : "
if %choix% equ 1 (
set MODEL=ggml-alpaca-7b-q4.bin
) else if %choix% equ 2 (
Expand All @@ -31,14 +31,27 @@ title flora.cpp
REM checks if the file already exists
if not exist %MODEL% (
REM if the file does not exist, download it
echo The template is not present on your computer, down
echo Download the template...
echo The model is not on your computer, down
echo Downloading the model...
powershell -Command "Invoke-WebRequest 'http://view.florahub.fr/models/%MODEL%' -OutFile '%MODEL%'"
echo Download complete.
cls
echo Download complete.
cls
)

if not exist "settings.json" (
REM if the file does not exist, download it
echo "settings.json" is not present on your computer, down
echo Download settings...
powershell -Command "Invoke-WebRequest 'http://view.florahub.fr/models/settings.json' -OutFile 'settings.json'"
echo Download complete.
)

set "json_file=settings.json"

for /f "tokens=2 delims=:," %%a in ('type "%json_file%" ^| findstr /c:"color"') do set "color=%%a"
for /f "tokens=2 delims=:," %%a in ('type "%json_file%" ^| findstr /c:"temp"') do set "temp=%%a"

REM runs the program with the selected model
main.exe -t %THREADS% --temp 1 -i --interactive-first --color -c 2048 -n -1 --ignore-eos --repeat_penalty 1.2 --instruct -m %MODEL%
main.exe -t %THREADS% --temp %temp% -i --interactive-first --color -c %color% -n -1 --ignore-eos --repeat_penalty 1.2 --instruct -m %MODEL%
pause
goto start
19 changes: 16 additions & 3 deletions fr_flora.cpp_avx2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,24 @@ title flora.cpp
echo Le modèle n'est pas présent sur votre ordinateur, down
echo Téléchargement du modèle...
powershell -Command "Invoke-WebRequest 'http://view.florahub.fr/models/%MODEL%' -OutFile '%MODEL%'"
echo Téléchargement terminé.
cls
echo Téléchargement terminé.
cls
)

if not exist "settings.json" (
REM si le fichier n'existe pas, télécharge-le
echo "settings.json" n'est pas présent sur votre ordinateur, down
echo Téléchargement des settings...
powershell -Command "Invoke-WebRequest 'http://view.florahub.fr/models/settings.json' -OutFile 'settings.json'"
echo Téléchargement terminé.
)

set "json_file=settings.json"

for /f "tokens=2 delims=:," %%a in ('type "%json_file%" ^| findstr /c:"color"') do set "color=%%a"
for /f "tokens=2 delims=:," %%a in ('type "%json_file%" ^| findstr /c:"temp"') do set "temp=%%a"

REM exécute le programme avec le modèle sélectionné
main.exe -t %THREADS% --temp 1 -i --interactive-first --color -c 2048 -n -1 --ignore-eos --repeat_penalty 1.2 --instruct -m %MODEL%
main.exe -t %THREADS% --temp %temp% -i --interactive-first --color -c %color% -n -1 --ignore-eos --repeat_penalty 1.2 --instruct -m %MODEL%
pause
goto start

0 comments on commit 8a1fcae

Please sign in to comment.