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.dev13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79c502d058930e6d3038db872ec9c6292c41b55d1a51c81ef1724624eebc00e7 |
|
MD5 | 4a4f6837ea642a3edcf3a59515a87344 |
|
BLAKE2b-256 | 829d7fa64f0c0542b72ba496ceab71b7803f8f0b49bf3d2c8b1786684b22c747 |
Close
Hashes for mlserver_huggingface-1.3.0.dev13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b75e16386de02b9c31aed27bbb94d44296dd0b7c0f967f35ab455a522d074869 |
|
MD5 | 066437303c62e15939349045cf649fe5 |
|
BLAKE2b-256 | f0d9c19f93d980933219d5120ab21e239063548021018661df52b5c6b7c09bd2 |