LLama tokenizer settings

This commit is contained in:
Henk
2023-03-17 12:40:08 +01:00
parent 1235b71bb5
commit 90a7eb6153
2 changed files with 47 additions and 1 deletions

View File

@@ -3218,6 +3218,11 @@ def load_model(use_gpu=True, gpu_layers=None, disk_layers=None, initial_load=Fal
#for key in koboldai_vars.badwords:
# koboldai_vars.badwordsids.append([vocab[key]])
# These are model specific overrides if a model has bad defaults
if koboldai_vars.model_type == "llama":
tokenizer.decode_with_prefix_space = True
tokenizer.add_bos_token = False
logger.info(f"Pipeline created: {koboldai_vars.model}")
else:

View File

@@ -0,0 +1,41 @@
@echo off
cd /D %~dp0
SET CONDA_SHLVL=
TITLE KoboldAI - Git Transformers Installer
ECHO This script will replace the Transformers version with the latest Git Transformers which may contain breaking changes.
ECHO If you wish to return to the approved version of transformers you can run the install_requirements.bat script or KoboldAI Updater.
pause
SET /P M=<loader.settings
IF %M%==1 GOTO drivemap
IF %M%==2 GOTO subfolder
IF %M%==3 GOTO drivemap_B
:subfolder
ECHO Runtime launching in subfolder mode
SET TEMP=%~DP0MINICONDA3
SET TMP=%~DP0MINICONDA3
call miniconda3\condabin\activate
pip install git+https://github.com/huggingface/transformers
cmd /k
:drivemap
ECHO Runtime launching in K: drive mode
subst /D K: >nul
subst K: miniconda3 >nul
SET TEMP=K:\
SET TMP=K:\
call K:\python\condabin\activate
pip install git+https://github.com/huggingface/transformers
cmd /k
:drivemap_B
ECHO Runtime launching in B: drive mode
subst /D B: >nul
subst B: miniconda3 >nul
SET TEMP=B:\
SET TMP=B:\
call B:\python\condabin\activate
pip install git+https://github.com/huggingface/transformers
cmd /k