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.dev5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3baccc31bda74286b59431a60fb63c1f7523a105d5469371401ff24b1908d8f |
|
MD5 | 2b36ee9c782c3364deee5698542eb264 |
|
BLAKE2b-256 | 5685add077f3cf995bc667b442be03a89705aed1db347f1671a286a5869b38e5 |
Close
Hashes for mlserver_huggingface-1.3.0.dev5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5ab2f53ec83937481423f57f898abd89f0beb42587c132f4fa29c80e120b1bb |
|
MD5 | e144b1b096e12b60e183905c3c3567ba |
|
BLAKE2b-256 | 258b77a91b0f4dc61758ed5084db50a627351e4db43d3f9c45dbf29a4c5954f6 |