AWS DeepComposer provides a creative, hands-on experience for learning generative AI and machine learning. With generative AI, one of the biggest recent advancements in artificial intelligence. With AWS DeepComposer, you can experiment with different generative AI architectures and models by creating and transforming musical inputs and accompaniments to create compositions.
Regardless of your experience with machine learning (ML) or music, you can use AWS DeepComposer to develop a working knowledge of generative AI. AWS DeepComposer includes learning capsules, sample code, and training data to help you understand and use generative AI models.
Note
To use the AWS DeepComposer console and other AWS services, you need an AWS account. If you don't have an account, go to aws.amazon.com and choose Create an AWS Account. For detailed instructions, see Create and Activate an AWS Account.
As a best practice, you should also create an AWS Identity and Access Management (AWS IAM) user with administrator permissions and use that user for all work that doesn’t require root credentials.
To use the AWS Command Line Tool (AWS CLI), create a password for console access, and access keys. For more information, see Creating Your First IAM Admin User and Group in the AWS IAM User Guide.
The best way to understand how to use this notebook is to read the following learning capsule first: Learn more about the Transformer technique
If you’re unfamiliar with Amazon SageMaker, also read Getting started with Amazon SageMaker notebook instances and SDKsin the Amazon SageMaker Developer Guide.
To train the Transformer-XL model using an accelerated computing instance will decrease the amount of time required to train the model. When you create your Notebook instance we recommend that you select the ml.p2.xlarge
instance. To use that instance you need to request a service Service limit increase.
-
Open the AWS Support Center console
-
On the AWS Support Center page, choose Create Case and then choose Service limit increase.
-
In the Case classification panel under Limit type, search for SageMaker.
-
In the Request panel, choose the Region that you are working in. For Resource Type, choose SageMaker Notebooks.
-
For Limit choose ml.p2.xlarge instances
-
For New Limit Value, verify that the value is 1
-
In Case description, provide a brief explanation of why you need the Service limit increase. For example, I need to use this compute optimized notebook instance to train a deep learning model using TensorFlow.
-
In Contact options, provide some details about how you would like to be contacted by the AWS service support team on the status of your Service limit increase request.
-
Choose submit.
After you submit your servive limit increase it can take 2-3 days for it to be approved.
To start creating a custom Transformer-XL model, launch a SageMaker notebook instance.
Note
Jupyter notebooks are open-source web applications that you can use to create and share documents that contain live code, equations, visualizations, and instructions. The AWS DeepComposer Jupyter notebook in this repo contains code that shows how to train a custom Transformer-XL with SageMaker and AWS DeepComposer.
Creating a SageMaker training instance
-
Open the Amazon SageMaker console.
-
In the navigation pane, choose Notebook instances.
-
On the Notebook instances page, choose Create notebook instance.
-
On the Create notebook instance page, for Notebook instance name, enter your notebook name and then choose the ml.p2.xlarge instance.
-
Choose your IAM Role to set up the correct permissions and encryption. If you already have an Amazon SageMaker IAM role, choose it from the list. If you are new to SageMaker, create an IAM role by choosing Create a new role.
-
On the Create an IAM role page, choose Any S3 bucket to give your new IAM role access to any S3 bucket you might create.
-
Choose Create Role.
-
On the Create notebook instance page, for IAM role, choose your newly created IAM role.
-
Open the GitHub repositories panel. For Default repository, choose Clone a public Git repository to this notebook instance only.
-
The GitHub repository called transformer-xl contains the Jupyter notebook required for this custom project. Copy this link and paste it into the field under GitHub repositories.
-
Choose Create notebook instance.
-
On the Notebook instances page, choose Open Jupyter to launch your new Jupyter notebook.
-
On the Jupyter screen, choose *New and then choose the
conda_python3
virtual environment. This launches your new Jupyter notebook.
You can reach out to the AWS DeepComposer engineering team for additional support by visiting the AWS DeepComposer forum
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License").
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.