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
mlserver-huggingface-1.3.2.tar.gz
(15.3 kB
view hashes)
Built Distribution
Close
Hashes for mlserver-huggingface-1.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8cc1e47aa123944807c2048321f5a30857ace7266d62cf60260c22ee5d46a1d |
|
MD5 | b125917a6eff2b6ef513437ec41b1551 |
|
BLAKE2b-256 | c3fdfd77bd3cd12bd2ad1bee4f3476428b4dccf9831d2649a8511730979e5572 |
Close
Hashes for mlserver_huggingface-1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 108c238f8e06ce86bbda7afe07502d0188c284265d116c37493b302954ec8c29 |
|
MD5 | a7721913e3f80c38a31001b0313b636f |
|
BLAKE2b-256 | 3f442b3fb1dd1d42472beb5e309d9306d15e12ff71270c01497c221a17c7848c |