Skip to content

Latest commit

 

History

History
 
 

bert-mojo-torchscript

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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