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.dev6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7f2a2189544ee27c085ca98f766ad9344fe2165b60a85323d6e4607f6033b35 |
|
MD5 | 84f08443809451ef025dfcdde5006779 |
|
BLAKE2b-256 | 0090a3ef5895e97ca551e2b242fbda77677a32922af05a6a55c736e0ed37f4ed |
Close
Hashes for mlserver_huggingface-1.3.0.dev6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 860923a30bb6e0385a023a0777fd17936671a6f5ce58a4be5f58e923dfe80480 |
|
MD5 | 9a5333b479b5a5fe690f98afe7251eaf |
|
BLAKE2b-256 | adf38bdf1769fe8fb0dff6ba13ffc7302de01bd429a0d186b46a21bb582c6a03 |