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.2rc3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b97de7c78415591658e96dfbce9711a54d2e35742f21a6de3024fed0d506f5b6 |
|
MD5 | b25430f62f64662b1e1dbb96e2a649ee |
|
BLAKE2b-256 | 004b785329134f500d3a426c70da9e313ccd9842eddd8fade49f1984992489c5 |
Close
Hashes for mlserver_huggingface-1.3.2rc3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d97fe521dccc9a69683500586a3811cf460ff374dd0f7ee0714127a276d84a03 |
|
MD5 | 4e55ee50936715108d19cc6350304dfd |
|
BLAKE2b-256 | aa3305eb5c99bee3e304e8619e0245be3449bbac108ac2c135a1501c799946e9 |