Skip to content

Commit

Permalink
Update pipeline parallel serving for more model support (#11428)
Browse files Browse the repository at this point in the history
  • Loading branch information
plusbang authored Jun 27, 2024
1 parent 029ff15 commit 987017e
Show file tree
Hide file tree
Showing 8 changed files with 389 additions and 398 deletions.
2 changes: 2 additions & 0 deletions python/llm/example/GPU/Pipeline-Parallel-FastAPI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pip install transformers==4.37.0
bash run.sh
```

> Note: INT4 optimization is applied to the model by default. You could specify other low bit optimizations (such as 'fp8' and 'fp6') through `--low-bit`. Besides, you could change `NUM_GPUS` to the number of GPUs you have on your machine.

### 3. Sample Input and Output

Expand Down
16 changes: 16 additions & 0 deletions python/llm/example/GPU/Pipeline-Parallel-FastAPI/gradio_webui.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import argparse

import gradio as gr
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Adapted from
# https://github.com/lm-sys/FastChat/blob/168ccc29d3f7edc50823016105c024fe2282732a/fastchat/protocol/openai_api_protocol.py
import time
Expand Down
Loading

0 comments on commit 987017e

Please sign in to comment.