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.dev7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | edbf2531b2a51889735ae3fc4a95e694cd5775a0c66bc821cd047b7772bece3d |
|
MD5 | 2146eaaad559ad8378acba7a4f1cea5e |
|
BLAKE2b-256 | fe6237620b185ff05be80038901963fe21a6cf35dfb7630e121806c2f894329f |
Close
Hashes for mlserver_huggingface-1.3.0.dev7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8562e6bff8877ee4c921253cdc4902933250d756a43bf335d35f0a617baabcfd |
|
MD5 | e23a4af737af01eca35685ccd751a4ca |
|
BLAKE2b-256 | 9724aa3cfa3b6749dd4b9003aaeca50c7a4a6cd146d825d060bb110e556f4bee |