fix minor bug

This commit is contained in:
John Smith 2023-03-23 08:43:18 +00:00
parent 619a177fbb
commit 60b227d0ba
3 changed files with 9 additions and 3 deletions

View File

@ -36,7 +36,7 @@ LEARNING_RATE = 2e-4
CUTOFF_LEN = 256
LORA_R = 8
LORA_ALPHA = 16
LORA_DROPOUT = 0.05
LORA_DROPOUT = 0.05 # should be 0 if gradient checkpointing is on
VAL_SET_SIZE = 0
TARGET_MODULES = [
"q_proj",
@ -49,6 +49,10 @@ save_steps = 50
save_total_limit = 3
logging_steps = 10
if LORA_DROPOUT > 0 and GRADIENT_CHECKPOINTING:
LORA_DROPOUT = 0
print('Disable Dropout.')
# Load Basic Model
model, tokenizer = load_llama_model_4bit_low_ram(config_path, model_path)

View File

@ -15,8 +15,9 @@ REM replace ./repository/GPTQ-for-LLaMa/quant_cuda.cpp and quant_cuda_kernel.cu
copy .\GPTQ-for-LLaMa\quant_cuda.cpp .\repository\GPTQ-for-LLaMa\quant_cuda.cpp /Y
copy .\GPTQ-for-LLaMa\quant_cuda_kernel.cu .\repository\GPTQ-for-LLaMa\quant_cuda_kernel.cu /Y
REM copy autograd_4bit.py into ./repository/GPTQ-for-LLaMa/autograd_4bit.py
REM copy files into ./repository/GPTQ-for-LLaMa/
copy .\GPTQ-for-LLaMa\autograd_4bit.py .\repository\GPTQ-for-LLaMa\autograd_4bit.py /Y
copy .\GPTQ-for-LLaMa\gradient_checkpointing.py .\repository\GPTQ-for-LLaMa\gradient_checkpointing.py /Y
REM install quant_cuda
cd .\repository\GPTQ-for-LLaMa

View File

@ -19,8 +19,9 @@ cp ./peft/tuners/lora.py ./repository/peft/src/peft/tuners/lora.py
cp ./GPTQ-for-LLaMa/quant_cuda.cpp ./repository/GPTQ-for-LLaMa/quant_cuda.cpp
cp ./GPTQ-for-LLaMa/quant_cuda_kernel.cu ./repository/GPTQ-for-LLaMa/quant_cuda_kernel.cu
# Copy autograd_4bit.py into ./repository/GPTQ-for-LLaMa/autograd_4bit.py
# Copy files into ./repository/GPTQ-for-LLaMa/
cp ./GPTQ-for-LLaMa/autograd_4bit.py ./repository/GPTQ-for-LLaMa/autograd_4bit.py
cp ./GPTQ-for-LLaMa/gradient_checkpointing.py ./repository/GPTQ-for-LLaMa/gradient_checkpointing.py
# Install quant_cuda and cd into ./repository/GPTQ-for-LLaMa
cd ./repository/GPTQ-for-LLaMa