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.dev10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9325549691fb2c86f36f3f811b264fd5c92eb2c05c2e271fb34ed8cdaa0f9228 |
|
MD5 | 857a9ac69ef4c42ad2dc4b15571bb1dc |
|
BLAKE2b-256 | 70796e93f2424f7a561023efbf7c584c8c8bfa3539ccd6eadf9076c3e0a3c78e |
Close
Hashes for mlserver_huggingface-1.3.0.dev10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eb3ead088463755fa766c2654c3685b52eb83dccdfcd2c82b391b4d4caee4d4 |
|
MD5 | 57db57a5c8d701c589d954c5254b223c |
|
BLAKE2b-256 | 438d45883b6d7a9f58d067f25911f4ce2c0ecf102cdedd9c91d86bf8605bd297 |