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.dev15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1a9bb5a0fea66a0624c515828814c1ca32f2cc3fd40668602930a274941eea0 |
|
MD5 | 9de0f2072890c738d1d502d815854ff6 |
|
BLAKE2b-256 | 663b830b542c2e56a8ac5efbc069409de6979745379265cae30f95834a1c20b6 |
Close
Hashes for mlserver_huggingface-1.3.0.dev15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09d3c013e6e54377a98afaf18479483eea0801c596a6053266e0daa61982fa95 |
|
MD5 | 51e02ee2305067bc8460504e68ece42a |
|
BLAKE2b-256 | 09083dd07ed06b60c41d44e673fd82135f235eee2349873de9da9c994cd24e51 |