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.3rc1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1318f3c4d520d0d0cee3f81471efb0d59b6484522cf43011c0e7cbf0410cdeb6 |
|
MD5 | 6dd8b2a613267c60bed4594e645029d0 |
|
BLAKE2b-256 | ef82c9fa8428038a55ee0ff6f90ca5afa9e227d7ea7e84aa21de379fc95e6336 |
Close
Hashes for mlserver_huggingface-1.3.3rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b67f6dd92522f62b57dedc26caa297579cec66a5b9ecd4ce3f62b20ad743c62a |
|
MD5 | a120e96c59404077bfc5862997d3935f |
|
BLAKE2b-256 | 6fe1093bdb74735da1d2de601e56cb80c1becf2bd30ff261a6e84913ec087acb |