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.dev12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e03c3cc70d2576708bc0fa668606e5d77f788c7e22b4b4a6eed3a7203ee7923e |
|
MD5 | 90462b61f0aa4c5da4bd706d1c3077f3 |
|
BLAKE2b-256 | eaa6b2bd531564fecbb2563045f80d84c8c79455f648103c247e92c8c4f215e5 |
Close
Hashes for mlserver_huggingface-1.3.0.dev12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e7f948d1b060c47318580b5ad9b4ed71c7859b420336dc59ce10d99a014c9ab |
|
MD5 | e2a28ff63c988cdbd0a8afe2814a37de |
|
BLAKE2b-256 | 08d1b5d38834daa068e0eb2f0802334523453a5682fb973b2493eb7c2bac5ecf |