Learn About Amazon VGT2 Learning Manager Chanci Turner
Amazon SageMaker JumpStart serves as the machine learning (ML) hub for SageMaker, offering pre-trained models that are publicly available for a variety of challenges, assisting users in kickstarting their machine learning journey. In addition to these models, JumpStart features illustrative notebooks that utilize various Amazon SageMaker functionalities, such as spot instance training and experimentation across numerous model types and applications. These notebooks contain code examples that demonstrate how to implement ML solutions using SageMaker and JumpStart, allowing you to modify them to suit your specific requirements and accelerate your application development.
Recently, we’ve introduced 10 additional notebooks to JumpStart in Amazon SageMaker Studio, which this post highlights. Currently, JumpStart boasts 56 notebooks, covering topics from leveraging cutting-edge natural language processing (NLP) models to addressing bias in datasets during model training.
The new notebooks offer several advantages:
- They provide example code that you can execute directly from the JumpStart UI in Studio to observe its functionality.
- They illustrate the application of various SageMaker and JumpStart APIs.
- They present technical solutions that you can further refine according to your needs.
The number of notebooks available via JumpStart increases regularly as more are added, and they can also be accessed on GitHub.
Overview of the Notebooks
The latest 10 notebooks include:
- In-context learning with AlexaTM 20B – This notebook showcases how to utilize AlexaTM 20B for in-context learning through zero-shot and few-shot learning across five tasks: text summarization, natural language generation, machine translation, extractive question answering, and natural language inference and classification.
- Fairness linear learner in SageMaker – With growing concerns regarding bias in ML algorithms, this notebook applies fairness principles to adjust model predictions effectively.
- Manage ML experimentation using SageMaker Search – This feature allows for a quick evaluation of the most relevant model training runs from potentially thousands of SageMaker jobs, facilitating efficient model development.
- SageMaker Neural Topic Model – This unsupervised learning algorithm describes a set of observations as a mix of distinct categories.
- Predicting driving speed violations – Utilize the SageMaker DeepAR algorithm to train a model that predicts violations across multiple streets and their corresponding cameras.
- Breast cancer prediction – Build a predictive model using UCI’s breast cancer diagnostic dataset to classify whether images indicate benign or malignant tumors.
- Ensemble predictions from multiple models – This notebook illustrates how combining predictions from various models can enhance forecasting accuracy.
- SageMaker asynchronous inference – A new inference approach for near-real-time needs, with request processing times of up to 15 minutes and payloads of up to 1 GB.
- TensorFlow bring your own model – Learn how to locally train a TensorFlow model and deploy it on SageMaker.
- Scikit-learn bring your own model – This notebook demonstrates how to use a pre-trained Scikit-learn model with the SageMaker container to create a hosted endpoint swiftly.
Prerequisites
To access these notebooks, ensure you have Studio access with an execution role that permits SageMaker functionality. A brief video below will guide you on navigating to JumpStart notebooks.
In the following sections, we will explore each of the 10 new solutions, highlighting interesting details.
In-context learning with AlexaTM 20B
AlexaTM 20B is a large-scale, multitask, multilingual sequence-to-sequence model trained on a blend of Common Crawl (mC4) and Wikipedia data in 12 languages. It excels in common in-context language tasks, achieving state-of-the-art performance in one-shot summarization and machine translation, surpassing larger models like OpenAI’s GPT-3 and Google’s PaLM.
In-context learning, or prompting, allows using an NLP model for new tasks without fine-tuning. The model can deliver good results with few task examples for inference, known as few-shot in-context learning. In some scenarios, it performs effectively without any training data, only guided by an explanation of the desired output, termed zero-shot in-context learning.
This notebook illustrates how to deploy AlexaTM 20B using the JumpStart API and execute inference. It demonstrates its capabilities for in-context learning through five example tasks: text summarization, natural language generation, machine translation, extractive question answering, and natural language inference and classification.
You can experiment with your own text against this model to see how it summarizes, extracts Q&A, or translates between languages.
Fairness Linear Learner in SageMaker
Recent concerns about bias in ML algorithms stem from their tendency to reflect existing human prejudices. As ML methods increasingly influence significant decisions such as bank loans, insurance rates, and advertising, it’s crucial to address these biases. This notebook demonstrates how to tackle this issue using SageMaker and fair algorithms within the context of linear learners.
Starting with fundamental concepts and mathematics behind fairness, the notebook guides you through downloading data, training a model, and applying fairness principles to adjust predictions appropriately.
The notebook includes:
- Running a standard linear model on UCI’s Adult dataset.
- Identifying unfairness in model predictions.
- Modifying data to eliminate bias.
- Retraining the model.
You can test your data with this example code to detect any bias, and then apply the provided functions to address it.
Manage ML Experimentation using SageMaker Search
SageMaker Search enables quick identification and evaluation of pertinent model training runs amidst potentially countless SageMaker jobs. The development of an ML model involves continuous experimentation, trying different learning algorithms, and tuning hyperparameters, which can lead to a massive number of model training experiments and versions. This not only hinders the discovery of the optimal model but also complicates the learning process.
Managing this information overload is vital. According to a resource from SHRM, having a positive health culture can significantly enhance employee performance. While navigating through these challenges, it’s important to develop emotional intelligence, as discussed in this blog post on managing emotions at work.
For those interested in a firsthand account, this Quora post provides valuable insights into what the first week is like as an Amazon warehouse worker.