HuggingFace runtime for MLServer
Project description
HuggingFace runtime for MLServer
This package provides a MLServer runtime compatible with HuggingFace Transformers.
Usage
You can install the runtime, alongside mlserver
, as:
pip install mlserver mlserver-huggingface
For further information on how to use MLServer with HuggingFace, you can check out this worked out example.
Settings
The HuggingFace runtime exposes a couple extra parameters which can be used to
customise how the runtime behaves.
These settings can be added under the parameters.extra
section of your
model-settings.json
file, e.g.
---
emphasize-lines: 5-8
---
{
"name": "qa",
"implementation": "mlserver_huggingface.HuggingFaceRuntime",
"parameters": {
"extra": {
"task": "question-answering",
"optimum_model": true
}
}
}
These settings can also be injected through environment variables prefixed with `MLSERVER_MODEL_HUGGINGFACE_`, e.g.
```bash
MLSERVER_MODEL_HUGGINGFACE_TASK="question-answering"
MLSERVER_MODEL_HUGGINGFACE_OPTIMUM_MODEL=true
```
Reference
You can find the full reference of the accepted extra settings for the HuggingFace runtime below:
.. autopydantic_settings:: mlserver_huggingface.settings.HuggingFaceSettings
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mlserver-huggingface-1.3.0.dev8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b262b74b3a451a578ab33f0efe63bc3da75a50c24b60533a78e448fbe9ea739 |
|
MD5 | 97a9cd82d76e1c9fee605fd363745bf0 |
|
BLAKE2b-256 | 5ccb26f46a39ae95334f1749ac42e4657401dfdc965459270c4bbc1e3d40a6e8 |
Close
Hashes for mlserver_huggingface-1.3.0.dev8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5648143ee0e6302fec46b274d05fb61e1446478eb9b7a40e0f9c9ce41614366 |
|
MD5 | c2dba6e4a9335241d290b9de7067b1d8 |
|
BLAKE2b-256 | e653c4266a64b853bf5129bb5476f26b85d597f5382fca729b3ef026967a1e33 |