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.2rc2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5cd3fc43bb63afacba709f708985e84bfdd7c6a18c854114c24564d8efbbec9 |
|
MD5 | cda620e0d221e69774403d4f879a9da2 |
|
BLAKE2b-256 | 2c364cff858d4ce6b25a672aa1a2c83c16793af4076d0de56de4d7879fa2fd74 |
Close
Hashes for mlserver_huggingface-1.3.2rc2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a91bba8b478d52a6b3e60c10aff5e74b8d86c3203091a7c41da18c9d7f50fba |
|
MD5 | c6d5e357364414363eb491ff74b9a07d |
|
BLAKE2b-256 | 61f7d122b23cdd3d40f3f1e56ce99dcfc128ec138f5c03705cdf22db6c97ffb3 |