Skip to main content

paddle-gpu-serving

paddle-gpu-serving简介是基于Paddle Serving框架的模型预测服务库,通过少量代码即可部署和使用指定的模型进行远程预测。目前支持使用PaddleHub语义理解模型库中的BERT类模型获取文本对应的向量表示。其中serving服务的代码参考bert模型服务demo server端

安装

server端

环境要求:python3,paddlepaddle>=1.6,paddlehub>=1.4

pip install paddle-gpu-serving

client端

环境要求:ujson,python2或python3

下载bert_service.py脚本使用

使用

server端

from paddle_gpu_serving.run import BertServer
bs = BertServer(with_gpu=True)
bs.with_model('bert_chinese_L-12_H-768_A-12')
bs.run(gpu_index = 0, port = 8010)

client端

bc = BertService(
    model_name='bert_chinese_L-12_H-768_A-12',
    max_seq_len=20,
    show_ids=False,
    do_lower_case=True)
bc.add_server('127.0.0.1:8010')
result = bc.encode([["远上寒山石径斜"], ])
print(result[0])

Release files for paddle-gpu-serving 0.8.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for paddle-gpu-serving 0.8.3
File Interpreter ABI Platform
paddle_gpu_serving-0.8.3-py3-none-any.whl Python 3 none any Details

Release files / paddle_gpu_serving-0.8.3-py3-none-any.whl

Download URL paddle_gpu_serving-0.8.3-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5594c2403ec7da2d013ece49eb8ea4bbb05a737390221f3475643740d12a6e30
BLAKE2b-256 checksum
How to use checksums
9d6cfdc32da765bb268e961cd79c497410216a7b7bd77384954f8db52742b42a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.8.3 This release

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.4

1 release file

0.7.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page