Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion concepts/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ deployment: !Deployment
destination: gcp
endpoint_name: opt-125m-gcp
instance_count: 1
machine_type: n1-standard-4
instance_type: n1-standard-4
accelerator_type: NVIDIA_TESLA_T4
accelerator_count: 1

Expand Down
46 changes: 25 additions & 21 deletions concepts/fine-tuning.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ description: Guide to fine-tuning models with Magemaker

## Fine-tuning Overview

<Note>
Fine-tuning is currently only available for **AWS SageMaker**. Support for GCP and Azure is coming soon.
</Note>

Fine-tuning allows you to adapt pre-trained models to your specific use case. Magemaker simplifies this process through YAML configuration.

### Basic Command
Expand All @@ -26,10 +30,15 @@ training: !Training

models:
- !Model
id: your-model-id
source: huggingface
id: tensorflow-tc-bert-en-uncased-L-12-H-768-A-12-2
version: 1.0.0
source: sagemaker
```

<Note>
Currently, fine-tuning only supports **SageMaker JumpStart models** (source: `sagemaker`). Support for Hugging Face models is not yet implemented.
</Note>

### Advanced Configuration

```yaml
Expand All @@ -38,15 +47,17 @@ training: !Training
instance_type: ml.p3.2xlarge
instance_count: 1
training_input_path: s3://your-bucket/data.csv
output_path: s3://your-bucket/output
hyperparameters: !Hyperparameters
epochs: 3
per_device_train_batch_size: 32
learning_rate: 2e-5
weight_decay: 0.01
warmup_steps: 500
evaluation_strategy: "steps"
eval_steps: 500
save_steps: 1000

models:
- !Model
id: tensorflow-tc-bert-en-uncased-L-12-H-768-A-12-2
version: 1.0.0
source: sagemaker
```

## Data Preparation
Expand Down Expand Up @@ -98,27 +109,20 @@ Popular choices:

## Hyperparameter Tuning

### Basic Parameters
### Supported Hyperparameters

The following hyperparameters can be configured (all optional):

```yaml
hyperparameters: !Hyperparameters
epochs: 3
per_device_train_batch_size: 32
learning_rate: 2e-5
batch_size: 32
```

### Advanced Tuning

```yaml
hyperparameters: !Hyperparameters
epochs: 3
learning_rate:
min: 1e-5
max: 1e-4
scaling: log
batch_size:
values: [16, 32, 64]
```
<Note>
These hyperparameters override the default values for the SageMaker JumpStart model. Any hyperparameter not specified will use the model's default value.
</Note>

## Monitoring Training

Expand Down
68 changes: 56 additions & 12 deletions concepts/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ description: Guide to supported models and their requirements

## Supported Models

<Note>
Currently, Magemaker supports deployment of Hugging Face models only. Support for cloud provider marketplace models is coming soon!
</Note>
Magemaker supports multiple model sources depending on your cloud provider:

### Hugging Face Models

Hugging Face models can be deployed to **all three cloud providers** (AWS, GCP, Azure):

<CardGroup>
<Card title="Text Generation" icon="pen-to-square" href="https://huggingface.co/models?pipeline_tag=text-generation">
- LLaMA
Expand All @@ -26,19 +26,63 @@ Currently, Magemaker supports deployment of Hugging Face models only. Support fo
</Card>
</CardGroup>

### AWS SageMaker JumpStart Models

<Note>
SageMaker JumpStart models are available when using the **interactive deployment menu** with `magemaker --cloud aws`.
</Note>

AWS SageMaker JumpStart provides pre-trained, open-source models from various frameworks:

- **Hugging Face** models
- **Meta** models (e.g., Llama)
- **TensorFlow** models
- **PyTorch** models
- **MXNet** models

To deploy a SageMaker JumpStart model:
1. Run `magemaker --cloud aws`
2. Select "Deploy a model endpoint"
3. Choose "Deploy a Sagemaker model"
4. Search and select from available models

Example YAML configuration for SageMaker models:
```yaml
deployment: !Deployment
destination: aws
instance_type: ml.m5.xlarge

models:
- !Model
id: huggingface-tc-bert-large-cased
source: sagemaker
```

### Custom Models

You can deploy your own fine-tuned models (currently AWS only):

```yaml
deployment: !Deployment
destination: aws
instance_type: ml.m5.xlarge

models:
- !Model
id: google-bert/bert-base-uncased # base model
source: custom
location: s3://your-bucket/model.tar.gz # or local path
```

### Future Support

We plan to add support for the following model sources:
We plan to add support for:

<CardGroup>
<Card title="AWS SageMaker" icon="aws">
Models from AWS Marketplace and SageMaker built-in algorithms
</Card>

<Card title="GCP Vertex AI" icon="google">
Models from Vertex AI Model Garden and Foundation Models
</Card>

<Card title="Azure ML" icon="microsoft">
Models from Azure ML Model Catalog and Azure OpenAI
</Card>
Expand All @@ -65,17 +109,17 @@ We plan to add support for the following model sources:
#### GCP Vertex AI
1. **Small Models** (n1-standard-4)
```yaml
machine_type: n1-standard-4
instance_type: n1-standard-4
```
2. **Medium Models** (n1-standard-8 + GPU)
```yaml
machine_type: n1-standard-8
instance_type: n1-standard-8
accelerator_type: NVIDIA_TESLA_T4
accelerator_count: 1
```
3. **Large Models** (a2-highgpu-1g)
```yaml
machine_type: a2-highgpu-1g
instance_type: a2-highgpu-1g
```

#### Azure ML
Expand Down
2 changes: 0 additions & 2 deletions configuration/AWS.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ title: AWS

### AWS CLI

<Note>To install Azure SDK on MacOS, you need to have the latest OS and you need to use Rosetta terminal. Also, make sure you have the latest version of Xcode tools installed.</Note>

Follow this guide to install the latest AWS CLI

https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
Expand Down
9 changes: 7 additions & 2 deletions installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ title: Installation
description: Configure Magemaker for your cloud provider
---

## Prerequisites

- **Python 3.11+** is required
- **Python 3.13 is not supported** due to compatibility issues with Azure SDK

<Note>
For Macs, maxOS >= 13.6.6 is required. Apply Silicon devices (M1) must use Rosetta terminal. You can verify, your terminals architecture by running `arch`. It should print `i386` for Rosetta terminal.
For Macs, macOS >= 13.6.6 is required. Apple Silicon devices (M1/M2/M3) must use Rosetta terminal. You can verify your terminal's architecture by running `arch`. It should print `i386` for Rosetta terminal.
</Note>

## Installation

Install via pip:

Expand Down Expand Up @@ -47,7 +52,7 @@ magemaker --cloud gcp
### Azure Configuration

- Follow this detailed guide for setting up Azure credentials:
[GCP Setup Guide](/configuration/Azure)
[Azure Setup Guide](/configuration/Azure)


Once you have your Azure credentials, you can configure Magemaker by running:
Expand Down
7 changes: 7 additions & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,15 @@
"pages": [
"concepts/deployment",
"concepts/models",
"concepts/fine-tuning",
"concepts/contributing"
]
},
{
"group": "Reference",
"pages": [
"reference/yaml-schema"
]
}
],
"footerSocials": {
Expand Down
38 changes: 18 additions & 20 deletions quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,15 @@ Example YAML for AWS deployment:

```yaml
deployment: !Deployment
destination: aws
destination: aws
endpoint_name: facebook-opt-test
instance_count: 1
instance_type: ml.m5.xlarge
num_gpus: null
quantization: null

models:
- !Model
id: facebook/opt-125m
location: null
predict: null
source: huggingface
task: text-generation
version: null
```

For GCP Vertex AI:
Expand All @@ -76,20 +71,15 @@ For GCP Vertex AI:
deployment: !Deployment
destination: gcp
endpoint_name: facebook-opt-test
accelerator_count: 1
instance_count: 1
instance_type: g2-standard-12
accelerator_type: NVIDIA_L4
num_gpus: null
quantization: null
accelerator_count: 1

models:
- !Model
id: facebook/opt-125m
location: null
predict: null
source: huggingface
task: null
version: null
```

For Azure ML:
Expand All @@ -100,14 +90,11 @@ deployment: !Deployment
endpoint_name: facebook-opt-test
instance_count: 1
instance_type: Standard_DS3_v2

models:
- !Model
id: facebook--opt-125m
location: null
predict: null
source: huggingface
task: text-generation
version: null
```
<Note>
The model ids for Azure are different from AWS and GCP. Make sure to use the one provided by Azure in the Azure Model Catalog.
Expand All @@ -131,6 +118,10 @@ models:

### Model Fine-tuning

<Note>
Fine-tuning is currently only available for AWS SageMaker with SageMaker JumpStart models.
</Note>

Fine-tune models using the `train` command:

```sh
Expand All @@ -141,14 +132,21 @@ Example training configuration:

```yaml
training: !Training
destination: aws # or gcp, azure
instance_type: ml.p3.2xlarge # varies by cloud provider
destination: aws
instance_type: ml.p3.2xlarge
instance_count: 1
training_input_path: s3://your-bucket/data.csv
output_path: s3://your-bucket/output
hyperparameters: !Hyperparameters
epochs: 3
per_device_train_batch_size: 32
learning_rate: 2e-5

models:
- !Model
id: tensorflow-tc-bert-en-uncased-L-12-H-768-A-12-2
version: 1.0.0
source: sagemaker
```
{/*
### Recommended Models
Expand Down
Loading