Skip to main content

ML inference tools

Project description

ML inference tools

Requirements

For model export onnx package is required.

Convert to ONNX

Below are some examples:

Convert t5-small:

PYTHONPATH=. python mlit to-onnx --model-type t5 --model-name t5-small --export-dir tmp

Check that it is working:

PYTHONPATH=. python mlit inference --model-name t5-small --base-dir tmp --model-input "translate English to French: How does this model work?" --model-type t5

Convert custom checkpoint:

PYTHONPATH=. python mlit to-onnx --model-type t5 --model-name "../my_custom_model" --export-dir tmp

Check that it is working:

PYTHONPATH=. python mlit inference --model-name my_custom_model --base-dir tmp --model-input "translate English to French: How does this model work?" --model-type t5 --tokenizer-name "t5-small"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlit-0.1.6.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

mlit-0.1.6-py3-none-any.whl (14.0 kB view hashes)

Uploaded Python 3

Supported by

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