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 8c7a753
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 22 deletions.
12 changes: 5 additions & 7 deletions backend/python/common-env/transformers/transformers-nvidia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ -86,11 +85,9 @@ dependencies:
- six==1.16.0
- sympy==1.12
- tokenizers==0.14.0
- torch==2.1.0
- torchaudio==2.1.0
- 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
1 change: 0 additions & 1 deletion backend/python/common-env/transformers/transformers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 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 8c7a753

Please sign in to comment.