Skip to content

Commit

Permalink
join vllm, exllama, exllama2, split petals
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed Jan 6, 2024
1 parent 8a64ab8 commit df373a4
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 26 deletions.
16 changes: 7 additions & 9 deletions backend/python/common-env/transformers/transformers-nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies:
- fsspec==2023.6.0
- funcy==2.0
- grpcio==1.59.0
- huggingface-hub==0.16.4
- huggingface-hub
- idna==3.4
- jinja2==3.1.2
- jmespath==1.0.1
Expand All @@ -70,7 +70,6 @@ dependencies:
- packaging==23.2
- pandas
- peft==0.5.0
- git+https://github.com/bigscience-workshop/petals
- protobuf==4.24.4
- psutil==5.9.5
- pyarrow==13.0.0
Expand All @@ -85,12 +84,10 @@ dependencies:
- scipy==1.11.3
- six==1.16.0
- sympy==1.12
- tokenizers==0.14.0
- torch==2.1.0
- torchaudio==2.1.0
- tokenizers
- torch==2.1.2
- torchaudio==2.1.2
- tqdm==4.66.1
- transformers==4.34.0
- TTS==0.22.0
- triton==2.1.0
- typing-extensions==4.8.0
- tzdata==2023.3
Expand All @@ -114,6 +111,7 @@ dependencies:
- sudachipy
- sudachidict_core
- vocos
- vllm==0.2.0
- xformers==0.0.22
- vllm==0.2.7
- transformers>=4.36.0 # Required for Mixtral.
- xformers==0.0.23.post1
prefix: /opt/conda/envs/transformers
5 changes: 2 additions & 3 deletions backend/python/common-env/transformers/transformers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies:
- fsspec==2023.6.0
- funcy==2.0
- grpcio==1.59.0
- huggingface-hub==0.16.4
- huggingface-hub
- idna==3.4
- jinja2==3.1.2
- jmespath==1.0.1
Expand All @@ -59,7 +59,6 @@ dependencies:
- packaging==23.2
- pandas
- peft==0.5.0
- git+https://github.com/bigscience-workshop/petals
- protobuf==4.24.4
- psutil==5.9.5
- pyarrow==13.0.0
Expand All @@ -74,7 +73,7 @@ dependencies:
- scipy==1.11.3
- six==1.16.0
- sympy==1.12
- tokenizers==0.14.0
- tokenizers
- torch==2.1.2
- torchaudio==2.1.2
- tqdm==4.66.1
Expand Down
4 changes: 1 addition & 3 deletions backend/python/exllama/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.PHONY: exllama
exllama:
@echo "Creating virtual environment..."
@conda env create --name exllama --file exllama.yml
@echo "Virtual environment created."
$(MAKE) -C ../common-env/transformers
bash install.sh

.PHONY: run
Expand Down
2 changes: 1 addition & 1 deletion backend/python/exllama/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export PATH=$PATH:/opt/conda/bin

# Activate conda environment
source activate exllama
source activate transformers

echo $CONDA_PREFIX

Expand Down
2 changes: 1 addition & 1 deletion backend/python/exllama/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export PATH=$PATH:/opt/conda/bin

# Activate conda environment
source activate exllama
source activate transformers

# get the directory where the bash script is located
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
Expand Down
4 changes: 1 addition & 3 deletions backend/python/exllama2/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.PHONY: exllama2
exllama2:
@echo "Creating virtual environment..."
@conda env create --name exllama2 --file exllama2.yml
@echo "Virtual environment created."
$(MAKE) -C ../common-env/transformers
bash install.sh

.PHONY: run
Expand Down
2 changes: 1 addition & 1 deletion backend/python/exllama2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export PATH=$PATH:/opt/conda/bin

# Activate conda environment
source activate exllama2
source activate transformers

echo $CONDA_PREFIX

Expand Down
2 changes: 1 addition & 1 deletion backend/python/exllama2/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
export PATH=$PATH:/opt/conda/bin

# Activate conda environment
source activate exllama2
source activate transformers

# get the directory where the bash script is located
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
Expand Down
4 changes: 3 additions & 1 deletion backend/python/petals/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.PHONY: petals
petals:
$(MAKE) -C ../common-env/transformers
@echo "Creating virtual environment..."
@conda env create --name petals --file petals.yml
@echo "Virtual environment created."

.PHONY: run
run:
Expand Down
6 changes: 4 additions & 2 deletions backend/python/petals/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@

export PATH=$PATH:/opt/conda/bin

CONDA_ENV=petals

# Activate conda environment
# if source is available use it, or use conda
#
if [ -f /opt/conda/bin/activate ]; then
source activate transformers
source activate $CONDA_ENV
else
eval "$(conda shell.bash hook)"
conda activate transformers
conda activate $CONDA_ENV
fi

# get the directory where the bash script is located
Expand Down
11 changes: 10 additions & 1 deletion backend/python/petals/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
## A bash script wrapper that runs the transformers server with conda

# Activate conda environment
source activate transformers
CONDA_ENV=petals
# Activate conda environment
# if source is available use it, or use conda
#
if [ -f /opt/conda/bin/activate ]; then
source activate $CONDA_ENV
else
eval "$(conda shell.bash hook)"
conda activate $CONDA_ENV
fi

# get the directory where the bash script is located
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
Expand Down

0 comments on commit df373a4

Please sign in to comment.