Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 763 Bytes

File metadata and controls

30 lines (22 loc) · 763 Bytes

TorchScript BERT inference with Mojo

This directory includes scripts used to run simple BERT inference via the MAX Engine Mojo API to predict the masked words in a sentence.

Quickstart

Magic instructions

If you have magic, you can run the following command:

magic run bash run.sh

Conda instructions

Create a Conda environment, activate that environment, and install the requirements:

# Create a Conda environment if you don't have one
conda create -n max-repo
# Update the environment with the environment.yml file
conda env update -n max-repo -f environment.yml --prune
# Run the example
conda run -n max-repo --live-stream bash run.sh