Examples¶
This section contains examples of Stained Glass Core in action.
-
Cancer image classification
The purpose of this notebook is to demonstrate how to use Stained Glass Core to create a Stained Glass for a pretrained base model using a pure distillation loss. -
Computing the Voronoi l2 Distance of a LLM's Embedding Table
The inverse power law geometric catalyst loss uses a parameter
inverse_l2_power_law_characteristic_lengthwhich is recommended to be set as the 5th percentile of the Voronoi l2 distances between embeddings. -
Creating Stained Glass for LLMs Recipe (with logging)
This notebook provides a full recipe for creating a Stained Glass Transform for LLMs with additional logging to track the evolution of metrics, parameters, generated text, and obfuscation scores during training.
-
Inference with Mistral 7B
This notebook demonstrates using a pre-trained Stained Glass Transform to transform text inputs for a Mistral 7B model.
-
TensorFlow Adapter
The notebook demonstrates how to use Stained Glass Core to create a Stained Glass Transform for a TensorFlow model using
TensorFlowAdapter, a PyTorch-based TensorFlow model wrapper.