Skip to main content

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

mlserver-huggingface-1.3.3rc2.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlserver_huggingface-1.3.3rc2-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file mlserver-huggingface-1.3.3rc2.tar.gz.

File metadata

  • Download URL: mlserver-huggingface-1.3.3rc2.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for mlserver-huggingface-1.3.3rc2.tar.gz
Algorithm Hash digest
SHA256 d9ecca2e67b289b979d7d4cb1b855bc49e879b31addf4fc10fc6cab5efd72c55
MD5 686fbb1d2df9be15a6f9944795a7e3fa
BLAKE2b-256 25f3679dab37c40342f4930f922bf9c090eb4727c6c83236b0a2daa178440366

See more details on using hashes here.

File details

Details for the file mlserver_huggingface-1.3.3rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for mlserver_huggingface-1.3.3rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 523625ca743a38aae5a7067f519d81e7ed587da18e910ba90d8251d9121cda6c
MD5 c782ee4e91c9efc7d7efa81e3c9c169a
BLAKE2b-256 aab30eeb88f616d2c8fec15c6689fa1f3908c8e4374060e14d4debdfc3c044b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page