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.dev11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12def4fee1f1d82ca53b8f4e03000602cdb0b9bce90550e1061b8d98a9675909 |
|
MD5 | 46edd7ced4ba67abe2f39dae637bb580 |
|
BLAKE2b-256 | 4b6311dcc2ea6b69645bcbe613053daf9f4b1c5b1275b397772d75c8df63b315 |
Close
Hashes for mlserver_huggingface-1.3.0.dev11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7c84c99496e2775ca2571b422e1b4c4ce01920c32761f3061803d989e3abbf5 |
|
MD5 | e670ec4a102ab0d7c260229ae052916f |
|
BLAKE2b-256 | ad65c267feebd3a1405cc5e714cc0ee926fa6c0e6a5c7fccfaa543ff7b96b30b |