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
mlserver-huggingface-1.3.3.tar.gz
(15.3 kB
view hashes)
Built Distribution
Close
Hashes for mlserver-huggingface-1.3.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 774e072300525459dbcafc70b3da2f276181e26b0da47896a25a9c4051f33dd5 |
|
MD5 | ee9bfea595afff550f632a9456f563d4 |
|
BLAKE2b-256 | cbee8d41f1f04d7eaf74b7f43d0bd0c4196a6a158a65aec079d775a26e3811da |
Close
Hashes for mlserver_huggingface-1.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d04e1f652eccad98a6a8d3795df6a832949d4130b8ac136932e62bc93a5d8af5 |
|
MD5 | 99a44cfd944accf479127c5b8cc63ff7 |
|
BLAKE2b-256 | 339378ab0ac1ea1ea1940c7ae5b5f3c794740e72c7d359ef29315d335dd81917 |