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.dev9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a357371436f4cae7a0054200cd2717b85b3cfc6b756164657cfe5eb6225e13f2 |
|
MD5 | 6df57d6486c589dba81da09c9ad2024f |
|
BLAKE2b-256 | c5f0b9739942da6d462448a15b27d709a7becd726c92f30e31216929e6c62192 |
Close
Hashes for mlserver_huggingface-1.3.0.dev9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38237fb2fa570c80f2e609fa3738ec134e338f04f67de341df79d9a8bbb7fa46 |
|
MD5 | 17379dc3cefc75a19b6ea9edaa4fc637 |
|
BLAKE2b-256 | d051d2ed6c69559d04c0abe3e71d61a4108e1422faa7db187275f309235acf11 |