From ba703c1db689267421824e0d2fd644036a741b44 Mon Sep 17 00:00:00 2001 From: Li Bo Date: Sun, 3 Dec 2023 00:16:15 +0800 Subject: [PATCH] Add missing import statement and update requirements.txt --- otter/modeling_otter.py | 2 +- pipeline/serve/gradio_patch.py | 1 - requirements.txt | 45 +++++++++++----------------------- requirements_model_serving.txt | 35 ++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 33 deletions(-) create mode 100644 requirements_model_serving.txt diff --git a/otter/modeling_otter.py b/otter/modeling_otter.py index 304ca0c8..f8c31f5b 100644 --- a/otter/modeling_otter.py +++ b/otter/modeling_otter.py @@ -530,7 +530,7 @@ class OtterPreTrainedModel(PreTrainedModel): config_class = OtterConfig base_model_prefix = "otter" supports_gradient_checkpointing = True - _no_split_modules = ["OtterPerceiverBlock", "CLIPEncoderLayer", "OtterLayer"] + _no_split_modules = ["OtterPerceiverBlock", "CLIPEncoderLayer", "OtterLayer", "CLIPVisionModel"] def _init_weights(self, module): """Otter requires no specific initialization""" diff --git a/pipeline/serve/gradio_patch.py b/pipeline/serve/gradio_patch.py index cabfe79b..74a68e5d 100644 --- a/pipeline/serve/gradio_patch.py +++ b/pipeline/serve/gradio_patch.py @@ -7,7 +7,6 @@ from gradio.components import * from markdown2 import Markdown - class _Keywords(Enum): NO_VALUE = "NO_VALUE" # Used as a sentinel to determine if nothing is provided as a argument for `value` in `Component.update()` FINISHED_ITERATING = "FINISHED_ITERATING" # Used to skip processing of a component's value (needed for generators + state) diff --git a/requirements.txt b/requirements.txt index e8909905..58d1e0a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,31 +1,14 @@ -accelerate>=0.19.0 -braceexpand>=0.1.7 -einops>=0.6.1 -einops_exts>=0.0.4 -fastapi>=0.95.2 -gradio>=3.33.1 -horovod>=0.27.0 -huggingface_hub>=0.13.3 -importlib_metadata>=6.6.0 -inflection>=0.5.1 -markdown2>=2.4.8 -more_itertools>=9.1.0 -nltk>=3.8.1 -numpy>=1.23.5 -open_clip_torch>=2.16.0 -opencv_python_headless>=4.5.5.64 -Pillow>=9.5.0 -pycocoevalcap>=1. -pycocotools>=2.0.6 -Requests>=2.31.0 -scipy>=1.10.1 -timm>=0.9.2 -tqdm>=4.65.0 -transformers>=4.29.0 -uvicorn>=0.22.0 -webdataset>=0.2.48 -xformers>=0.0.20 -natsort>=8.4.0 -peft>=0.4.0 -ijson>=3.2.3 -yajl>=0.3.5 +braceexpand==0.1.7 +einops==0.6.1 +einops_exts==0.0.4 +fastapi==0.95.2 +gradio==3.33.1 +horovod==0.27.0 +huggingface_hub==0.14.0 +importlib_metadata==6.6.0 +inflection==0.5.1 +markdown2==2.4.8 +Requests==2.31.0 +tqdm==4.65.0 +uvicorn==0.22.0 +natsort==8.4.0 diff --git a/requirements_model_serving.txt b/requirements_model_serving.txt new file mode 100644 index 00000000..ae0a542d --- /dev/null +++ b/requirements_model_serving.txt @@ -0,0 +1,35 @@ +accelerate==0.25.0 +braceexpand==0.1.7 +deepspeed==0.12.4 +einops==0.7.0 +fastapi==0.104.1 +flash_attn==2.3.6 +gradio==4.7.1 +horovod==0.27.0 +huggingface_hub==0.14.0 +ijson==3.2.3 +importlib_metadata==6.6.0 +inflection==0.5.1 +markdown2==2.4.8 +natsort==8.4.0 +nltk==3.8.1 +numpy==1.26.2 +openai==1.3.7 +opencv_python==4.8.1.78 +opencv_python_headless==4.8.1.78 +orjson==3.9.10 +packaging==23.2 +peft==0.6.2 +Pillow==10.1.0 +Pillow==10.1.0 +pycocoevalcap==1.2 +pycocotools==2.0.7 +Requests==2.31.0 +scikit_learn==1.3.2 +torch==2.0.1 +torchvision==0.15.2 +tqdm==4.65.0 +transformers==4.35.0 +uvicorn==0.24.0.post1 +webdataset==0.2.79 +xformers==0.0.22