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.4.0.dev2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57a47dce0691626b053f73dd6af81a18a856d145fe46fa03be07ce3c3cbf5657 |
|
MD5 | d2825d04b3d45ca3aa60e6f01b7a895b |
|
BLAKE2b-256 | f0832735b6f081605f7c92fa3d85a4716cadd7b0eb1a50a71cdf6ec89daf1698 |
Close
Hashes for mlserver_huggingface-1.4.0.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3365b93d5f4b1c4895ce3dfa1e43d9a92f0a60dd1ff084bd5dd3749c14a593f3 |
|
MD5 | e8b344f08c377cd36503a405d639003e |
|
BLAKE2b-256 | 304dfa8c29ca81e9bf43d36865e3485ef55b67f8569675540f3eff1d43fdfd86 |