Examples
Mistral-7b text generation
Generates new text from a prompt, using the MAX Engine Python API and Mistral-7b from ONNX.
Llama 2 text generation
A complete implementation of the Llama2 large language model, written in Mojo, with the MAX Graph API.
Stable Diffusion image generation
A multi-model AI pipeline for image generation, using the MAX Engine Mojo API and StableDiffusion-1.4 from ONNX.
Stable Diffusion image generation
A multi-model AI pipeline for image generation, using the MAX Engine Python API and StableDiffusion-1.4 from ONNX.
BERT text prediction
Predicts masked text in a string, using the MAX Engine Python API and a BERT PyTorch model from HuggingFace.
BERT text prediction
Predicts masked text in a string, using the MAX Engine C API and a BERT PyTorch model from HuggingFace.
ResNet image classification
Classifies an image, using the MAX Engine Python API and a ResNet-50 PyTorch model from HuggingFace.
YOLOv8 segmentation
Segments objects in an image, using the MAX Engine Python API and the YOLOv8 Segmentation with a webcam.
Custom ops
Two examples of how to write custom graph ops with Mojo (for a loaded model and a MAX Graph model).
MAX Graph basics
A very simple model (it does nothing useful) showing how to build a model with the MAX Graph API.
Mistral-7b text generation
Generates new text from a prompt, using the MAX Engine Python API and Mistral-7b from ONNX.
Llama 2 text generation
A complete implementation of the Llama2 large language model, written in Mojo, with the MAX Graph API.
Stable Diffusion image generation
A multi-model AI pipeline for image generation, using the MAX Engine Mojo API and StableDiffusion-1.4 from ONNX.
Stable Diffusion image generation
A multi-model AI pipeline for image generation, using the MAX Engine Python API and StableDiffusion-1.4 from ONNX.
BERT text prediction
Predicts masked text in a string, using the MAX Engine Python API and a BERT PyTorch model from HuggingFace.
BERT text prediction
Predicts masked text in a string, using the MAX Engine C API and a BERT PyTorch model from HuggingFace.
ResNet image classification
Classifies an image, using the MAX Engine Python API and a ResNet-50 PyTorch model from HuggingFace.
YOLOv8 segmentation
Segments objects in an image, using the MAX Engine Python API and the YOLOv8 Segmentation with a webcam.
Custom ops
Two examples of how to write custom graph ops with Mojo (for a loaded model and a MAX Graph model).
MAX Graph basics
A very simple model (it does nothing useful) showing how to build a model with the MAX Graph API.