-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add uie cpp deploy #120
Add uie cpp deploy #120
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples/text/uie/
按模型铺下来即可。
nlp不适合一个场景一类,因为很多是一个预训练模型能支持很多场景
Done |
@@ -101,6 +101,8 @@ if (ENABLE_TEXT) | |||
find_library(FASTER_TOKENIZER_LIB core_tokenizers ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/faster_tokenizer/lib NO_DEFAULT_PATH) | |||
list(APPEND FASTDEPLOY_LIBS ${FASTER_TOKENIZER_LIB}) | |||
list(APPEND FASTDEPLOY_INCS ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/faster_tokenizer/include) | |||
# TODO (zhoushunjie): Will remove it later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里需要升级FasterTokenizer的目录结构。
@@ -23,6 +23,7 @@ set(FASTERTOKENIZER_INSTALL_DIR ${THIRD_PARTY_PATH}/install/faster_tokenizer) | |||
set(FASTERTOKENIZER_INC_DIR | |||
"${FASTERTOKENIZER_INSTALL_DIR}/include" | |||
"${FASTERTOKENIZER_INSTALL_DIR}/third_party/include" | |||
"${FASTERTOKENIZER_INSTALL_DIR}/third_party/include/faster_tokenizer" # TODO (zhoushunjie): Will remove it later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上,需要升级
examples/text/uie/cpp/README.md
Outdated
``` | ||
#下载SDK,编译模型examples代码(SDK中包含了examples代码) | ||
wget https://bj.bcebos.com/paddlehub/fastdeploy/libs/0.2.0/fastdeploy-linux-x64-gpu-0.2.0.tgz | ||
tar xvf fastdeploy-linux-x64-gpu-0.2.0.tgz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里先改成自行编译吧,下载上面这个,按这个文档也跑不通
UIE目前还未发布,当前需开发者自行编译FastDeploy,通过如下脚本编译得到部署库fastdeploy-linux-x64-dev
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
mkdir build && cd build
cmake .. -DENABLE_ORT_BACKEND=ON \
-DENABLE_VISION=ON \
-DENABLE_PADDLE_BACKEND=ON \
-DENABLE_TEXT=ON \
-DWITH_GPU=ON \
-DCMAKE_INSTALL_PREFIX=${PWD}/fastdeploy-linux-x64-gpu-dev
make -j8
make install
编译UIE示例代码
cd ../examples/text/uie/cpp
mkdir build && cd build
cmake .. -DFASTDEPLOY_INSTALL_DIR=${PWD}/../../../../../build/fastdeploy-linux-x64-gpu-dev
make -j8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,这里我改改。开始的时候想先占坑,就把vision的一些readme搞过来了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
PR types
Add Backend
PR changes
Others
Describe
Add uie cpp deploy.
Demo
NER
Relation extraction
Event extraction
Opinion extraction
Sequence classification
Cross task extraction