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.dev14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29e568b858192366792b691f3a21619dd9401a9157a5a2e186735137910dd3e9 |
|
MD5 | e1642aac9816ea215ff4d36d3e3b411d |
|
BLAKE2b-256 | af321be53d426a08fe0059400b3dc97b54f8789cc6c29fb897465527bde82f51 |
Close
Hashes for mlserver_huggingface-1.3.0.dev14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6101018f923d6946108b343d573812a3fb5a87dae2891865caad44cdae8a7ca |
|
MD5 | 2fd775d3ac074319e363ecb9b4b9f8c4 |
|
BLAKE2b-256 | 9246c9bc57c345b44f3cd01eca1ee3fb2b9a0efd74c43bec4bb38dd87ced12c7 |