mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-29 10:59:32 +01:00
Merge branch 'main' of github.com:oobabooga/text-generation-webui
This commit is contained in:
commit
ec3e869c27
@ -26,7 +26,7 @@ LABEL maintainer="Your Name <your.email@example.com>"
|
|||||||
LABEL description="Docker image for GPTQ-for-LLaMa and Text Generation WebUI"
|
LABEL description="Docker image for GPTQ-for-LLaMa and Text Generation WebUI"
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install --no-install-recommends -y git python3 python3-pip make g++ && \
|
apt-get install --no-install-recommends -y libportaudio2 libasound-dev git python3 python3-pip make g++ && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip pip3 install virtualenv
|
RUN --mount=type=cache,target=/root/.cache/pip pip3 install virtualenv
|
||||||
|
@ -66,8 +66,14 @@ def preprocess(string):
|
|||||||
|
|
||||||
|
|
||||||
def remove_surrounded_chars(string):
|
def remove_surrounded_chars(string):
|
||||||
# this expression matches to 'as few symbols as possible (0 upwards) between any asterisks' OR
|
# first this expression will check if there is a string nested exclusively between a alt=
|
||||||
# 'as few symbols as possible (0 upwards) between an asterisk and the end of the string'
|
# and a style= string. This would correspond to only a the alt text of an embedded image
|
||||||
|
# If it matches it will only keep that part as the string, and rend it for further processing
|
||||||
|
# Afterwards this expression matches to 'as few symbols as possible (0 upwards) between any
|
||||||
|
# asterisks' OR' as few symbols as possible (0 upwards) between an asterisk and the end of the string'
|
||||||
|
if re.search(r'(?<=alt=)(.*)(?=style=)', string, re.DOTALL):
|
||||||
|
m = re.search(r'(?<=alt=)(.*)(?=style=)', string, re.DOTALL)
|
||||||
|
string = m.group(0)
|
||||||
return re.sub(r'\*[^*]*?(\*|$)', '', string)
|
return re.sub(r'\*[^*]*?(\*|$)', '', string)
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ sentencepiece
|
|||||||
pyyaml
|
pyyaml
|
||||||
tqdm
|
tqdm
|
||||||
git+https://github.com/huggingface/peft
|
git+https://github.com/huggingface/peft
|
||||||
transformers==4.28.0
|
transformers==4.28.1
|
||||||
bitsandbytes==0.38.1; platform_system != "Windows"
|
bitsandbytes==0.38.1; platform_system != "Windows"
|
||||||
llama-cpp-python==0.1.34; platform_system != "Windows"
|
llama-cpp-python==0.1.34; platform_system != "Windows"
|
||||||
https://github.com/abetlen/llama-cpp-python/releases/download/v0.1.34/llama_cpp_python-0.1.34-cp310-cp310-win_amd64.whl; platform_system == "Windows"
|
https://github.com/abetlen/llama-cpp-python/releases/download/v0.1.34/llama_cpp_python-0.1.34-cp310-cp310-win_amd64.whl; platform_system == "Windows"
|
||||||
|
Loading…
Reference in New Issue
Block a user