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.4.tar.gz
(15.3 kB
view hashes)
Built Distribution
Close
Hashes for mlserver-huggingface-1.3.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c93e6622c3f16404910bed6665b06640143d12f7199928b682253845b2d3860f |
|
MD5 | da00fd1c74b79e60db77b7a63bcf371d |
|
BLAKE2b-256 | 8703df9f8ab5f7569d07cfe74aa255b72d9106b95f8b3d3da11c3dc597224c64 |
Close
Hashes for mlserver_huggingface-1.3.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f79d5cda3d17564971a918ced74b3d12f694b31ef5b6837c290a48c58cfe8308 |
|
MD5 | a9a614d4368097e76f716ee1a11f1a15 |
|
BLAKE2b-256 | 5c56a65260ed598f756a04fd0cb968d0838cffd6ea30cc15fb8668970114877d |