|
@echo off |
|
|
|
setlocal |
|
|
|
|
|
if not exist "venv\" ( |
|
python -m venv venv |
|
) else ( |
|
echo venv directory already exists. If something is broken, delete everything but exl2-quant.py and run this script again. |
|
pause |
|
exit |
|
) |
|
|
|
|
|
set /p gitinst="Do you have git installed? (y/n) " |
|
|
|
if "%gitinst%"=="y" ( |
|
echo Setting up environment |
|
) else ( |
|
echo Please install git before running this script. |
|
pause |
|
exit |
|
) |
|
|
|
|
|
echo CUDA path: %CUDA_HOME% |
|
set /p cuda_version="Please enter your CUDA version (11 or 12): " |
|
|
|
if "%cuda_version%"=="11" ( |
|
echo Installing PyTorch for CUDA 11.8... |
|
venv\scripts\python.exe -m pip install torch --index-url https://download.pytorch.org/whl/cu118 --upgrade |
|
) else if "%cuda_version%"=="12" ( |
|
echo Installing PyTorch for CUDA 12.1... |
|
venv\scripts\python.exe -m pip install torch --index-url https://download.pytorch.org/whl/cu121 --upgrade |
|
) else ( |
|
echo Invalid CUDA version. Please enter 11 or 12. |
|
pause |
|
exit |
|
) |
|
|
|
|
|
echo Downloading files... |
|
git clone https://github.com/turboderp/exllamav2 |
|
|
|
echo Installing pip packages... |
|
|
|
venv\scripts\python.exe -m pip install -r exllamav2/requirements.txt |
|
venv\scripts\python.exe -m pip install huggingface-hub |
|
venv\scripts\python.exe -m pip install .\exllamav2 |
|
|
|
move download-model.bat exllamav2 |
|
move convert-model-auto.bat exllamav2 |
|
move download-model.py exllamav2 |
|
move venv exllamav2 |
|
|
|
powershell -c (New-Object Media.SoundPlayer "C:\Windows\Media\tada.wav").PlaySync(); |
|
echo Environment setup complete. Read instructions.txt for further instructions. |
|
pause |